Select to view content in your preferred language

application crashing at "self.view.layoutIfNeeded()" bfunction in IOS 15.x

1488
1
05-27-2022 06:56 PM
Sunil26
New Contributor

We created  an IOS application. This application is important and developed using AGSRuntimeSDKiosv10.2.5.pkg. It worked fine so far but crashing at "self.view.layoutIfNeeded()" function call in IOS 15.x.  Below is the code snippet and error message where it crash, quick help will be appreciated. 
 
Error Mesage:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SMPAgentryClientGISEsri.SymbolsViewController collectionView:numberOfItemsInSection:]: unrecognized selector sent to instance 0x1247375d0'
terminating with uncaught exception of type NSException
(lldb)

Code
func animateContainer(_ toolContainerType: ToolContainerType)
        if let containerModel = self.toolHelper.getContainerModel(toolContainerType)
            self.view.layoutIfNeeded()
            //UIView.animate(withDuration: 0.5, animations:
            //    containerModel.animateContainer()
           
            //    self.view.layoutIfNeeded()
            //)
       
   
        self.setButtonActive(toolContainerType)

0 Kudos
1 Reply
Nicholas-Furness
Esri Regular Contributor

It doesn't appear that the crash has anything to do with the Runtime SDK. It seems that your SymbolViewController instance might be being used as a UICollectionViewDataSource but does not implement numberOfItemsInSection. I couldn't say why this stops working in iOS 15, but that's an Apple API, and not related to ArcGIS Runtime.

Please note: version 10.2.5 of the Runtime SDKs was retired in December 2019. You really should be using the 100.x family of Runtime SDKs, though at this point you might hold off until the 200.x family is released (see this blog post).

0 Kudos