iOS app crashing when testing over test flight - ios

I have an iOS app that I need to test on other devices over testflight.
When I run the app directly from XCode it works perfectly (both debug and release mode).
But when I archive the IPA file and download it over testflight it crashes when loading a viewcontroller with a scrollview with images;.
It never crashed in Xcode,only when installing from testflight.
Stack trace I got,
: -[CALayer _isResizable]: unrecognized selector sent to
instance 0x1d570730 : * Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[CALayer
_isResizable]: unrecognized selector sent to instance 0x1d570730'
* First throw call stack: (0x32a452a3 0x3a8e597f 0x32a48e07 0x32a47531 0x3299ef68 0x3486929f 0x34861eb3 0x7a3cf 0x3486c595
0x348c114b 0x348c1091 0x348c0f75 0x348c0e99 0x348c05d9 0x348c04c1
0x348aeb93 0x348ae833 0x7860f 0x3490f28d 0x34991f81 0x33353277
0x32a1a5df 0x32a1a291 0x32a18f01 0x3298bebd 0x3298bd49 0x365552eb
0x348a1301 0x30e1f 0x3ad1cb20)
What can cause such a problem?

The crash is 100% unrelated to the distribution method (here OTA distribution of an Ad-Hoc build via Testflight).
You need to symbolicate that crash report using Xcode and will then see the file, method and line number in your app where it crashes. Drag the crash report into Xcode organizer crashes section and hope you still have all the files required for this to work. That is the .app and .dSYM bundles that where generated for this build and these being indexed via Spotlight.
The exception message is already pretty clear and says a lot about what is happening:
: -[CALayer _isResizable]: unrecognized selector sent to instance 0x1d570730 : * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer _isResizable]: unrecognized selector sent to instance 0x1d570730' *
The exception is a NSInvalidArgumentException
You code is calling a method/selector on an object that doesn't know this method/selector
This hints that you are having a memory issue (No, ARC is no magic and does NOT solve all your memory issues automatically)
Check your code for retain cycles (e.g. when using async completion blocks), memory leaks or zombies. Basically check for any memory related problem. There are multiple threads and documentation on StackOverflow or other places on what to do and how to check for these.

Related

Firebase AdMob implementation crashing app

I am using Google Firebase for analytics, crash reporting, authentication...
I installed SDKs with Cocoa Pods. All currently installed SDKs work fine.
After adding AdMob SDK my app crashes. Right after successful build I get different errors on different devices.
Iphone 6s:
-[NSTaggedPointerString count]: unrecognized selector sent to instance
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString count]: unrecognized selector sent to instance 0xa000000000062662'
And iPad 2:
-[__NSCFString count]: unrecognized selector sent to instance 0x6100000348a0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x610000024dc0'
I am not even initialising AdMob in AppDelegate class, just implementing it and trying to build.
If I remove AdMob from project, app works fine so its definitely AdMob problem.
I really cant find any useful help or someone with similar problem. Creating new and clean project definitely wont be my solution.
I guess there is something wrong with my project configuration, because in my other project I have implemented AdMob about month ago and everything works fine.

iOS 10 Beta SDK - [UIDeviceRGBColor countByEnumeratingWithState:objects:count:]: unrecognized selector

When our iOS application is compiled on iOS 10 Developer Preview SDK, when launching one of the first view controllers of the application, the application crashes with this exception :
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceRGBColor countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x17adb5a0'
*** First throw call stack:
(0x23c9b91b 0x23436e17 0x24474da3 0x24474f5f 0x24447e81 0x24446f25 0x286c8a0b 0x2857baa3 0x2834effb 0x28214a1f 0x28214971 0x28aa9ec1 0x28560d01 0x285846e5 0x28586d65 0x28223541 0x28586ca9 0x28586f91 0x2830ddb9 0x28586fcf 0x1c13b3 0x1beb89 0x1bf927 0x244c6655 0x23c5e58f 0x23c5e1c1 0x23c5c00d 0x23bab229 0x23bab015 0x2519bac9 0x2827d189 0xe3b65 0x23853873)
libc++abi.dylib: terminating with uncaught exception of type NSException
In the code of our application, this selector of UIDeviceRGBColor is never called.
Does someone have the same problem ? Is it a bug of iOS 10 Beta ?
When compiled with iOS 10 Beta SDK, the problem occurs as well on devices running on iOS 10 Beta as on iOS 9.
The problem does not appear (not on iOS 10, not on iOS 9) when the application is compiled with iOS 9 SDK
Thank you.
Best regards.
In case your are using interface files like Xib and Nib for your views, refer to my answer in this question
Quoted from that question:
When I try to compile and run my project with the same configuration (XCode 8 beta 6, iOS 10 SDK), I encountered a similar issue, except that my error message was:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceRGBColor length]: unrecognized selector sent to instance 0x600000479280'
And I noticed that this issue only occurs when the view is init by using interface files, i.e. Xib and Nib. I solved this issue by:
Open your interface file, in the right panel, navigate to the File Inspector tab.
Change the attribute highlighted to "iOS 7.0 and Later" (or whatever iOS version later)
Then compile and run your project again, this should fix your issue, though I am not sure about the reason behind this.

React native ios app fails running with the message: reason: '-[RCTRootContentView reactTag]: unrecognized selector sent to instance

This is the error message I get when I try to deploy a react-native IOS app on my Iphone 5s:
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[RCTRootContentView reactTag]:
unrecognized selector sent to instance
There are no errors when I build the app, it appears only When I install it (hit the run button).
Any idea how to fix it?
thanks
When I checked the main.jsbundle I realized that it was almost empty, it has just a warning. After creating it correctly the error I mentioned above disappeared.

Unreproducible crash: [__NSArrayI enumerateObjectsUsingBlock:]: unrecognized selector sent to instance

I keep getting crash reports with the following crash:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI enumerateObjectsUsingBlock:]: unrecognized selector sent to instance
What could be triggering this crash? An empty array or something that is not an array at all? I am not able to reproduce the crash myself, I just can see it in crash logs.
You most likely have a memory issue, the fact that you can't regularly reproduce it also suggests a memory issue.
The error you are getting is saying, "we tried to call this method on this object you have a pointer to, unfortunately the object is not the type of object you told me it was going to be."
I can really only speculate given the information you've provided. Take a really fine tooth comb through your code and make sure you are not changing that object prior to that crash happening.
Try adding a debug check to make sure its the correct class. NSAsserts are NOT the solution, they are not even compiled into production apps but, it should help find the cause of the error.
NSAssert([myObject isKindOfClass:[NSArray class]], #"aw snap its not an array!");
Post more info and I can try to help further

Error after submitting app to store -[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance

I am developing an iOS 7 app that integrates the Google Maps SDK for iOS.
When testing the app on both iOS devices and emulator it works well.
After submitting the app to the store, when I try to access the part that contains the map it crashes. The phone log shows me this error
-[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance 0x17da2490 <Error>:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
-[GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance 0x17da2490'"
I don't know what I'm doing wrong.
With the Google maps SDK, 'unrecognized selector' often occurs if you haven't included the -ObjC linker flag.
Could it be that you've included -ObjC in the debug build settings (which you might be using when running it from XCode), but it's missing in the release build settings (which it would use when you build to submit to the App Store)?

Resources