I have the following App delegate for an iOS app in Xcode 8.3:
#UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: #escaping (UIBackgroundFetchResult) -> Void) {
}
}
When I start my app in either the simulator or on a device, it crashes with the following message:
2017-07-04 21:26:04.284336+0200 MyApp[352:25788] -[NSTaggedPointerString containsObject:]: unrecognized selector sent to instance 0xa00000070696f764
2017-07-04 21:26:04.284569+0200 MyApp[352:25788] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '- [NSTaggedPointerString containsObject:]: unrecognized selector sent to instance 0xa00000070696f764'
*** First throw call stack:
(0x188baefe0 0x187610538 0x188bb5ef4 0x188bb2f54 0x188aaed4c 0x18ef7d030 0x18ef630f4 0x18ef77d18 0x18ef60474 0x18a757884 0x18a7576f0 0x18a757aa0 0x188b5d42c 0x188b5cd9c 0x188b5a9a8 0x188a8ada4 0x18ed4a384 0x18ed45058 0x100106fc8 0x187a9959c)
libc++abi.dylib: terminating with uncaught exception of type NSException
In the simulator, it's a slightly different error message:
2017-07-04 21:30:10.379 MyApp[55965:1127208] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x608000028d60
2017-07-04 21:30:10.383 MyApp[55965:1127208] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x608000028d60'
Removing the application(:didReceiveRemoteNotification) method makes the crash disappear.
Does anyone have any clue what's going on?
Figured out the problem: my Info.plist had 'Background Modes' set to a string instead of an array of modes. Fixing that fixes the crash.
You likely have a third party framework that's causing the issue here. For one, you've posted Swift code, but are getting an Objective-C error message. It's likely that a library you're using is registering itself to handle notifications.
Second, the didReceiveRemoteNotification needs to always call it's completionHandler before exiting. So a blank function will cause issues.
You need to call completionHandler with a parameter of either .newData, .noData, or .failed depending on your results.
Related
I am using Firebase inside my app and calling FirebaseApp.configure() inside didFinishLaunchingWithOptions . Now my app works fine when I do a clean installation (delete the app and install again) and run it for the first time. But when I re-run the app the second time, it crashes on FirebaseApp.configure() with
2019-11-11 12:02:43.166729+0530 MyAppName[885:135491] 6.11.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
2019-11-11 12:02:43.176694+0530 MyAppName[885:135418] -[FIRInstanceIDTokenInfo isFresh]: unrecognized selector sent to instance 0x281bc8a80
2019-11-11 12:02:43.179909+0530 MyAppName[885:135418] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FIRInstanceIDTokenInfo isFresh]: unrecognized selector sent to instance 0x281bc8a80'
*** First throw call stack:
(0x1a267180c 0x1a2399fa4 0x1a257536c 0x1a2675c88 0x1a2677a6c 0x102e632fc 0x102e48844 0x102e48714 0x102e48530 0x102986b70 0x102986e0c 0x1029869e4 0x1029811dc 0x102980c18 0x102980b64 0x10264ea14 0x10264e7d4 0x10264eb7c 0x1a66d0ef4 0x1a66d2d20 0x1a66d8554 0x1a5ea6cdc 0x1a633bfc4 0x1a5ea77c4 0x1a5ea721c 0x1a5ea75f0 0x1a5ea6eac 0x1a5eab3c8 0x1a626e6a4 0x1a63555b0 0x1a5eab100 0x1a63554ac 0x1a5eaaf6c 0x1a5d1cba4 0x1a5d1b70c 0x1a5d1c8dc 0x1a66d68d4 0x1a628f09c 0x1a7776850 0x1a779b8e8 0x1a7780fb4 0x1a779b5a4 0x107b1abd8 0x107b1dffc 0x1a77c04c8 0x1a77c0194 0x1a77c06bc 0x1a25ef7c4 0x1a25ef71c 0x1a25eeeb4 0x1a25ea000 0x1a25e98a0 0x1ac541328 0x1a66da768 0x102654b44 0x1a2474360)
libc++abi.dylib: terminating with uncaught exception of type NSException
To setup firebase I am using the following
private func setupFirebase() {
FirebaseApp.configure()
Messaging.messaging().delegate = self
}
I am using Cocoapods for installation and Firebase version that I'm using is 6.11.0
Please pod update to Firebase 6.12.0.
We suspect that this is related to https://github.com/firebase/firebase-ios-sdk/issues/4167 that was fixed in 6.12.0.
When I Navigate the specific UITableView called "InvoiceViewController" from HomeViewController by didSelectRowAtIndexPath and from "TimerViewController" by sliding Slider Action. App Crashing and the compiler, throwing following error.
2017-10-30 14:57:25.181311+0400 FixtrProvider[3667:1496216] desc: -[UIView adjustedContentInset]: unrecognized selector sent to instance 0x102d16010
2017-10-30 14:57:25.181369+0400 FixtrProvider[3667:1496216] name: NSInvalidArgumentException
2017-10-30 14:57:25.181402+0400 FixtrProvider[3667:1496216] user info: (null)
2017-10-30 14:57:25.181466+0400 FixtrProvider[3667:1496216] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView adjustedContentInset]: unrecognized selector sent to instance 0x102d16010'
*** First throw call stack:
(0x18575fd38 0x184c74528 0x18576d1f8 0x18ef27cc4 0x1857656e4 0x18564b0dc 0x18eefe628 0x18eefe3f0 0x18eefdbc0 0x18eefd8f0 0x18ec18964 0x18ecf4e48 0x18ec16e04 0x18ec16a34 0x18ec1695c 0x18eb6d000 0x18973d0b4 0x189741194 0x1896aff24 0x1896d6340 0x18eb62884 0x1857078b8 0x185705270 0x18570582c 0x1856262d8 0x1874b7f84 0x18ebd3880 0x100e6a47c 0x18514a56c)
libc++abi.dylib: terminating with uncaught exception of type NSException
Properties of the invoiceViewController
Please help me to find out the issue that caused only in iOS 11 devices.
Try to rename contentScrollView in line 28 to another name or remove outlet.
I'm getting this error trying to run a bare project from the react-native init command, on an iOS 7.1 device.
This works on the iOS simulator, so I wonder if its an iOS compatibility issue?
The Movies example app works ok on this device.
```
2016-01-08 16:34:33.224 CouchTest[1210:60b] -[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10
2016-01-08 16:34:33.226 CouchTest[1210:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10'
* First throw call stack:
(0x2edb0f83 0x39561ccf 0x2edb4917 0x2edb3203 0x2ed02768 0x10abaf 0xb47a1 0xb1735 0xb0c8b 0x39a49833 0x39a4981f 0x39a49777 0x2ed7b8a1 0x2ed7a175 0x2ece4ebf 0x2ece4ca3 0x33bea663 0x3163114d 0x9780d 0x39a6eab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
```
NSURLComponents queryItems is only available on iOS8+
That's why you are seeing the crash.
See the docs here for more info: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLComponents_class/index.html#//apple_ref/occ/instp/NSURLComponents/queryItems
Setting an exception breakpoint will show you which class/method is making that call. Otherwise, it sounds like react-native is calling queryItems when it shouldn't.
I just updated to Parse SDK 1.9.1 and FBSDK 4.7.1. I haven't changed any code, and all of a sudden when logging into Facebook I've been getting this error:
2015-10-30 13:49:01.392 [2834:809095] -[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x12de5d360
2015-10-30 13:49:01.404 [2834:809095] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x12de5d360'
*** First throw call stack:
(0x182f60f48 0x197b13f80 0x182f67c5c 0x182f64c00 0x182e68cac 0x1003d254c 0x1003d136c 0x1003d11f0 0x100241758 0x100247578 0x100247de0 0x1002ec864 0x1002f08cc 0x1002f0618 0x1002ed504 0x1002f1c68 0x1002a1868 0x10012ec5c 0x10012edcc 0x1887a2f24 0x1887a2994 0x1887aaedc 0x1887b10c0 0x1887b04c4 0x18879af14 0x18879ab9c 0x18cd7f7c4 0x18cd7fb44 0x182f18544 0x182f17fd8 0x182f15cd8 0x182e44ca0 0x18e080088 0x18855cffc 0x10013071c 0x1983628b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I'm not using logInWithReadPermissions:fromViewController as that wasn't available in the previous SDKs I had. I think Facebook just added that in, but it's not covered by the Parse SDKs. I'm using class func logInInBackgroundWithReadPermissions(permissions: [String]?, block: PFUserResultBlock?).
So it looks like I'm missing that viewController parameter but Parse says nothing about it. What should I do? Thanks!
I've updated to Parse 1.9.1, Facebook SDK v4.x, iOS 9, Swift 2, and Xcode 7. Didn't change any code and added my .plist keys for LSApplicationQueriesSchemes and App Transport Security Settings.
Now, I can't log into Facebook using class func logInInBackgroundWithReadPermissions(permissions: [String]?, block: PFUserResultBlock?) because I get this error:
2015-10-30 15:24:22.433 [2905:830174] -[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x15ee75d60
2015-10-30 15:24:22.437 [2905:830174] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x15ee75d60'
*** First throw call stack:
(0x182f60f48 0x197b13f80 0x182f67c5c 0x182f64c00 0x182e68cac 0x1003de54c 0x1003dd36c 0x1003dd1f0 0x10024d8dc 0x100253578 0x100253de0 0x1002f8864 0x1002fc8cc 0x1002fc618 0x1002f9504 0x1002fdc68 0x1002ad868 0x10013ade0 0x10013af50 0x1887a2f24 0x1887a2994 0x1887aaedc 0x1887b10c0 0x1887b04c4 0x18879af14 0x18879ab9c 0x18cd7f7c4 0x18cd7fb44 0x182f18544 0x182f17fd8 0x182f15cd8 0x182e44ca0 0x18e080088 0x18855cffc 0x10013c8a0 0x1983628b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
I'm not using IBuilder so I don't have anything that's not connected in my storyboard, it looks like I'm just missing that fromViewController parameter. Facebook briefly mentions it in the changelog, but the method isn't available in the ParseFacebookUtilsV4.framework and nothing like it exists for use with Parse.
What am I missing here? Why am I getting this exception everytime I log in and how can I fix it?