Twitter Login initialization via Parse not working: Swift - twitter

[Xcode V.7.0 Beta 6, OSX El Capitan, iOS9]
I'm trying to add the Twitter login using the latest version of the Parse SDK. I've tried several ways of integrating the Twitter Login with Parse but its not working. I've added my consumerkey/secret and it says that I need to initialize PFTwitterUtils which I have done.
You must call PFTwitterUtils initializeWithConsumerKey:consumerSecret: to use PFTwitterUtils" I posted the full error below as well as my github repository.
At the moment I didn't add the ParseTwitterUtils framework because it didn't say i needed to in the QuickStart guide on Parse.com. However, when I add the module I get a linker error. When i take it out, i get the error below.
Steps I took:
At first, I was having an issue with the PFTwitterUtils module not appearing or being recognized. I built the project adding the frameworks in this link: https://www.parse.com/apps/quickstart?app_id=discounts--6#parse_data/mobile/ios/swift/existing and using the SDK here: https://www.parse.com/apps/quickstart?app_id=fblogin--81#parse_data/mobile/ios/swift/existing
(similar problem to this link: No such module 'Parse' following Parse iOS Swift Quickstart guide)
I posted the issue on github, thinking it's a bug on their end:
https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/407
I was advised to check the Framework Search Path to see if the module lives inside the folder the search path is directing to. It looked good, but it still didn't work so I also tried adding another path to the ParseSDK and that also didn't work.
I then took a Parse-Starter-project from another source where the PFTwitterUtils worked (my github repository is below with the new frameworks) but then I get the error I mentioned below. I'm assuming this is the better way of going about it because now the PFTwitterUtils is recognized within Xcode but not when building the project. I also checked the callback URL when making an app on twitter. I found a stack overflow question that had a problem with the callback URL. I edited that as well and it still doesn't work.
Here is the error I'm getting:
2015-10-14 13:13:18.374 ParseStarterProject[3757:390022] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'You must call PFTwitterUtils initializeWithConsumerKey:consumerSecret: to use PFTwitterUtils.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010f9849b5 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111927deb objc_exception_throw + 48
2 CoreFoundation 0x000000010f9848ed +[NSException raise:format:] + 205
3 ParseStarterProject 0x000000010eddcd7e +[PFTwitterUtils logInInBackground] + 31
4 ParseStarterProject 0x000000010eddce30 +[PFTwitterUtils logInWithBlock:] + 48
5 ParseStarterProject 0x000000010edca6b1 _TFC19ParseStarterProject14ViewController11viewDidLoadfS0_FT_T_ + 417
6 ParseStarterProject 0x000000010edca8c2 _TToFC19ParseStarterProject14ViewController11viewDidLoadfS0_FT_T_ + 34
7 UIKit 0x00000001106cbd05 -[UIViewController loadViewIfRequired] + 877
8 UIKit 0x00000001106cc054 -[UIViewController view] + 27
9 UIKit 0x00000001105ab77c -[UIWindow addRootViewControllerViewIfPossible] + 61
10 UIKit 0x00000001105abe79 -[UIWindow _setHidden:forced:] + 302
11 UIKit 0x00000001105bd6dc -[UIWindow makeKeyAndVisible] + 43
12 UIKit 0x000000011053dd13 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4003
13 UIKit 0x000000011054413d -[UIApplication _runWithMainScene:transitionContext:completion:] + 1755
14 UIKit 0x0000000110541390 -[UIApplication workspaceDidEndTransaction:] + 188
15 FrontBoardServices 0x00000001193b57ac -[FBSSerialQueue _performNext] + 192
16 FrontBoardServices 0x00000001193b5b1a -[FBSSerialQueue _performNextFromRunLoopSource] + 45
17 CoreFoundation 0x000000010f8b0b21 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18 CoreFoundation 0x000000010f8a6a4c __CFRunLoopDoSources0 + 556
19 CoreFoundation 0x000000010f8a5f03 __CFRunLoopRun + 867
20 CoreFoundation 0x000000010f8a5918 CFRunLoopRunSpecific + 488
21 UIKit 0x0000000110540d2d -[UIApplication _run] + 402
22 UIKit 0x000000011054599e UIApplicationMain + 171
23 ParseStarterProject 0x000000010edcce6d main + 109
24 libdyld.dylib 0x0000000116bed92d start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
//
In the repository the ParseTwitterUtils.framework module isn't there. But once I import it I get a linker error.
Could it be that i'm missing a Framework Search Path? When i add the Framework Search Path where the frameworks live, it doesn't change anything. Any ideas of how to add the TwitterSDK with Parse with the current SDKs I'm using?
Here's the link to my repository. https://github.com/rinyfo4/ParseStarterProject-2/tree/c512acb4360d45927f0cc5b34505d3caacae728c
Any help means a lot. Thank you in advance.
Please let me know if I can provide more information.

I solved it. As i mentioned, I went to github and was helped.
This is the answer to what was going on:
According to this guide, to enable authentication with Twitter - you need to call PFTwitterUtils.initializeWithConsumerKey:consumerSecret:
The exception is being thrown about the fact that you simply didn't initialize the twitter utils, so there is no need to unlink/remove ParseTwitterUtils from Cocoapods.
pod 'ParseTwitterUtils' and ParseTwitterUtils.framework are mutually exclusive, as they are absolutely the same thing, with the only difference on how you install them.
Here is the solution: I needed to edit my AppDelegate didFinishLaunchingWithOptions method to reflect the following:
`Parse.enableLocalDatastore()
Parse.setApplicationId("...",
clientKey: "...")
PFTwitterUtils.initializeWithConsumerKey("...", consumerSecret:"...")`
Hope this helps whoever has this problem in the future.

Related

FIrebase iOS integration crash - caused by an invalid GOOGLE_APP_ID

I am trying to build my Cordova app with Firebase integrated using Xcode build, but I am getting this vague error, and I can't understand what's wrong. I have placed the GoogleService-Info.plist file in the project directory, but it still fails to build. Here is the stack trace
2017-05-17 09:56:43.610 MyAppz[824:13611] *** Terminating app due to uncaught exception 'com.firebase.core',
reason: 'Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in GoogleService-Info.plist
or set in the customized options.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001099cdb0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000109409141 objc_exception_throw + 48
2 CoreFoundation 0x0000000109a36625 +[NSException raise:format:] + 197
3 MyAppz 0x0000000107280b70 +[FIRApp addAppToAppDictionary:] + 371
4 MyAppz 0x000000010728011b +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 285
5 MyAppz 0x000000010727fe4f +[FIRApp configure] + 302
6 MyAppz 0x000000010721c59a -[AppDelegate(FirebasePlugin) application:swizzledDidFinishLaunchingWithOptions:] + 122
7 UIKit 0x000000010a804957 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 299
8 UIKit 0x000000010a80623c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4119
9 UIKit 0x000000010a80c584 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1709
10 UIKit 0x000000010a809793 -[UIApplication workspaceDidEndTransaction:] + 182
11 FrontBoardServices 0x000000010fce15f6 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
12 FrontBoardServices 0x000000010fce146d -[FBSSerialQueue _performNext] + 186
13 FrontBoardServices 0x000000010fce17f6 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
14 CoreFoundation 0x0000000109973c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
15 CoreFoundation 0x00000001099590cf __CFRunLoopDoSources0 + 527
16 CoreFoundation 0x00000001099585ff __CFRunLoopRun + 911
17 CoreFoundation 0x0000000109958016 CFRunLoopRunSpecific + 406
18 UIKit 0x000000010a80802f -[UIApplication _run] + 468
19 UIKit 0x000000010a80e0d4 UIApplicationMain + 159
20 MyAppz 0x0000000107195df1 main + 65
21 libdyld.dylib 0x000000010cc3a65d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
What could be the problem, I don't know what else to show if it's needed, so please ask.
For some reason Xcode always ignored the GoogleService-Info.plist located in the project root directory, and didn't copied it in the Resources folder of the project.
I manually copied the file there, and then the app compiled and ran just fine.
In my case the problem was with the cordova copying GoogleService-Info.plist and corrupting it.
So the solution is you need to do it manually.
Just copy your GoogleService-Info.plist from your root folder then go to
platforms/ios/project-name/Resources and paste it there and then there is another Resources folder in it paste it there too.
platforms/ios/project-name/Resources/Resources
Then again try to make a build or run it in simulator and it'll be working fine.
Possibly your GoogleService-Info.plist file is corrupted.
Please redownload and replace it.
original discussion here - Firebase for Cordova
Hope this helps...
Also, when you use the below method,
FirebaseApp.configure(name:userName , options: .init(googleAppID: ConfigValues.Firebase.googleAppID, gcmSenderID: ConfigValues.Firebase.gcmSenderID))
make sure you give the proper googleAppID and gcmSenderID, to avoid the similar crash.
Please redownload GoogleService-Info.plist file from firebase and replace in your project. This solved my issue.
If you are initializing firebase like this
await Firebase.initializeApp(
name: "AppName",
options: FirebaseOptions(
apiKey: "XXXXXX_XXX3VeDOXXDXXXwR8",
authDomain: "myApp.com",
databaseURL:
"https://myapp.firebasedatabase.app",
projectId: "My_App",
storageBucket: "my-app-station.com",
messagingSenderId: "39847398285093",
appId: "1:439hiojfiojh84394f3j8j943",
measurementId: "G-4489KDJJHF94"),
);
update it to this
await Firebase.initializeApp();
No need to explicitly mention all fields as per new docs
Answer may vary for Flutter Web

How do I debug: libc++abi.dylib: terminating with uncaught exception of type NSException?

Sorry for asking this noob question, I know it has been asked thousands of times before, I know because I've had this problem thousands of times before. But this time google isn't helping.
The error / terminal print:
libc++abi.dylib: terminating with uncaught exception of type NSException
I generally know what type of situations cause this because I have had this issue in the past and it was quite simple to fix, usually a misnamed function or a broken link between some UI element and my code, but right now I have no idea what could be causing it.
What I have already tried:
I've added tonnes of breakpoints on the starting ViewController and it goes through all the #IBOutlets without throwing any issues. I've added breakpoints in all the methods in the AppDelegate and it doesn't break anywhere there. The code crashes before it reaches any viewDidLoad() methods. I've cleaned my project, restarted XCode a thousand times and even broken and re-made every link between UI and code. Renamed and then reassigned every #IBAction.
At this point I don't even know what I haven't tried. Every stackoverflow posts is always about the same thing "check broken links etc" but that just isn't helping anymore. I can't remember what it was that I changed because I changed so many small things before I started getting this error. I tried putting everything back but that didn't seem to help.
When the app crashes:
Right after "applicationDidBecomeActve()" is finished the debugger goes into a bunch of machine code, then the app crashes and I get this:
Proof of correct linking:
[Images removed as they were unneccessary]
My main question(s):
If linking is not the issue here, what else could it be?
About NSLogs/stack traces
I would love to provide some sort of NSLog or stack trace as I have seen people ask and give for on other questions but I have no idea how. I cannot find anything on the internet that isn't from the stone age on how to turn them on. And everything else is just how to use the debugger, but I am using the debugger and all I am getting are brief glimpses of my code in a see of machine instructions until it finally just crashes.
EDIT:
Apparently I can only get logs when running on an emulator instead of physical device. Here are the logs I get when running on emulator:
objc[40258]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x123242998) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x123067d38). One of the two will be used. Which one is undefined.
2016-11-04 16:26:47.463 KotConnect[40258:1345011] Unknown class ProgressViewContainer in Interface Builder file.
2016-11-04 16:26:47.500 KotConnect[40258:1345011] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIView 0x7fbfe3c0a030> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key loadingView.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001105ca34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000011002b21e objc_exception_throw + 48
2 CoreFoundation 0x00000001105ca299 -[NSException raise] + 9
3 Foundation 0x000000010fb3b26f -[NSObject(NSKeyValueCoding) setValue:forKey:] + 291
4 UIKit 0x0000000110e0580d -[UIView(CALayerDelegate) setValue:forKey:] + 173
5 UIKit 0x000000011114f79e -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x000000011056f590 -[NSArray makeObjectsPerformSelector:] + 256
7 UIKit 0x000000011114e122 -[UINib instantiateWithOwner:options:] + 1867
8 UIKit 0x0000000110ee1c21 -[UIViewController _loadViewFromNibNamed:bundle:] + 386
9 UIKit 0x0000000110ee2543 -[UIViewController loadView] + 177
10 UIKit 0x0000000110ee2878 -[UIViewController loadViewIfRequired] + 201
11 UIKit 0x0000000110f2307b -[UINavigationController _layoutViewController:] + 55
12 UIKit 0x0000000110f23963 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 471
13 UIKit 0x0000000110f23ada -[UINavigationController _startTransition:fromViewController:toViewController:] + 133
14 UIKit 0x0000000110f24ce5 -[UINavigationController _startDeferredTransitionIfNeeded:] + 874
15 UIKit 0x0000000110f25dc7 -[UINavigationController __viewWillLayoutSubviews] + 58
16 UIKit 0x000000011111cd6f -[UILayoutContainerView layoutSubviews] + 223
17 UIKit 0x0000000110e05f50 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
18 QuartzCore 0x0000000110ac3cc4 -[CALayer layoutSublayers] + 146
19 QuartzCore 0x0000000110ab7788 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
20 QuartzCore 0x0000000110ab7606 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
21 QuartzCore 0x0000000110a45680 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
22 QuartzCore 0x0000000110a72767 _ZN2CA11Transaction6commitEv + 475
23 QuartzCore 0x0000000110a730d7 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 113
24 CoreFoundation 0x000000011056ee17 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
25 CoreFoundation 0x000000011056ed87 __CFRunLoopDoObservers + 391
26 CoreFoundation 0x00000001105534b6 CFRunLoopRunSpecific + 454
27 UIKit 0x0000000110d3b7e6 -[UIApplication _run] + 434
28 UIKit 0x0000000110d41964 UIApplicationMain + 159
29 KotConnect 0x000000010d52cc8f main + 111
30 libdyld.dylib 0x00000001135c968d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Swift
Just add
NSSetUncaughtExceptionHandler { exception in
print(exception)
print(exception.callStackSymbols)
}
at the bottom of didFinishLaunchingWithOptions method of AppDelegate. It will give you the better info about the exception occurred.
Happy coding !
Once I was able to see my app log I could see my custom class was not being found. I'll leave the fix I found for this issue for any people who have this issue in the future:
Xcode 6 Strange Bug: Unknown class in Interface Builder file
This happened to me when I accidentaly removed one of my storyboards from my targets. Make sure to double check your Target Membership.

Bridging an ObjC project with the SalesForce SDK causes a crash due to inability to find a category in the SF SDK

I have an iOS project called Core.proj that includes the SalesForce SDK and it is written in Objective-C. This project utilises the SF SDK and links the binary to the SF libraries. It does a bunch of stuff to help manage my implementation of SF. It is included in all my other Obj-C projects and it works absolutely fine within them.
This is the first time I am using this project with Swift (2.1). I am using iOS 9 with Xcode 7.1.1. I added the Core.xcodeproj into my Swift project. I then created an ObjC file. Xcode then asks if I want to create a bridging header. I do. I have created a bridging header called Swift-Bridging-Header.h. This enables me to access the files in Core.xcodeproj via the bridging header. For example, I can access my own version of the Salesforce Authentication Manager from the bridging header.
In my app delegate, I want to now kick off OAuth (I'm keeping this minimal here):
let sharedManager = MyAuthenticationManager.sharedManager()
let successBlock: OAuthFlowSuccessCallbackBlock = { sfAuthInfo in }
let failureBlock: OAuthFlowFailureCallbackBlock = { sfAuthInfo in }
sharedManager.loginWithCompletion(successBlock, failure: failureBlock)
Full disclosure: each block that you see here takes the SFOAuthInfo object as an argument. In order to get Swift to read this block, I had to add SFOAuthInfo.h into the copy files.
Now this all compiles fine but when I tap to login and execute the above code, I get the following error:
2015-12-04 11:53:54.879 MyApp[19108:3494140] -[UIDevice macaddress]: unrecognized selector sent to instance 0x7fcfb4903230
2015-12-04 11:53:54.890 MyApp[19108:3494140] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDevice macaddress]: unrecognized selector sent to instance 0x7fcfb4903230'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d6adf65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010f624deb objc_exception_throw + 48
2 CoreFoundation 0x000000010d6b658d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010d603f7a ___forwarding___ + 970
4 CoreFoundation 0x000000010d603b28 _CF_forwarding_prep_0 + 120
5 MyApp 0x000000010c869317 -[SFOAuthCredentials keyMacForService:] + 84
6 MyApp 0x000000010c8696b8 -[SFOAuthCredentials updateTokenEncryption] + 210
7 MyApp 0x000000010c8673ee -[SFOAuthCredentials initWithIdentifier:clientId:encrypted:] + 211
8 MyApp 0x000000010c84102c -[SFUserAccount initWithIdentifier:] + 197
9 MyApp 0x000000010c85f32d -[SFUserAccountManager createUserAccount] + 91
10 MyApp 0x000000010c831b41 -[SFAuthenticationManager loginWithCompletion:failure:account:] + 284
11 MyApp 0x000000010c831a0b -[SFAuthenticationManager loginWithCompletion:failure:] + 53
12 MyApp 0x000000010c60440c -[MyAuthenticationManager loginWithCompletion:failure:] + 124
13 MyApp 0x000000010c5dc58f _TFC18MyApp11AppDelegate5loginfS0_FT_T_ + 911
14 MyApp 0x000000010c5dfdc4 _TFC18MyApp25LandingPageViewController17loginButtonTappedfS0_FPSs9AnyObject_T_ + 68
15 MyApp 0x000000010c5dfe16 _TToFC18MyApp25LandingPageViewController17loginButtonTappedfS0_FPSs9AnyObject_T_ + 54
16 UIKit 0x000000010e1af1fa -[UIApplication sendAction:to:from:forEvent:] + 92
17 UIKit 0x000000010e313504 -[UIControl sendAction:to:forEvent:] + 67
18 UIKit 0x000000010e3137d0 -[UIControl _sendActionsForEvents:withEvent:] + 311
19 UIKit 0x000000010e312906 -[UIControl touchesEnded:withEvent:] + 601
20 UIKit 0x000000010e219aa3 -[UIWindow _sendTouchesForEvent:] + 835
21 UIKit 0x000000010e21a691 -[UIWindow sendEvent:] + 865
22 UIKit 0x000000010e1cc752 -[UIApplication sendEvent:] + 263
23 UIKit 0x000000010e1a7fcc _UIApplicationHandleEventQueue + 6693
24 CoreFoundation 0x000000010d5da0a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
25 CoreFoundation 0x000000010d5cffcc __CFRunLoopDoSources0 + 556
26 CoreFoundation 0x000000010d5cf483 __CFRunLoopRun + 867
27 CoreFoundation 0x000000010d5cee98 CFRunLoopRunSpecific + 488
28 GraphicsServices 0x0000000113e46ad2 GSEventRunModal + 161
29 UIKit 0x000000010e1ad676 UIApplicationMain + 171
30 MyApp 0x000000010c5ddd8d main + 109
31 libdyld.dylib 0x00000001107a592d start + 1
32 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The SF SDK has a category called UIDevice+SFHardware.h. Within this category there is a method called 'macaddress'. So clearly it is not correctly reading this category. But why? As you can see from the stack trace it is reading the other files in the SF SDK correctly.
I tried a number of things to get this to work. For example, this: iOS - UUID generation throwing a strange exception but with UIDevice+SFHardware.h. I tried this: https://developer.salesforce.com/forums/?id=906F00000009CBvIAM. I completely rebuilt the project again to check my working.
I shouldn't need to add this file into my bridge as this UIDevice+SFHardware.h is only ever accessed from SF SDK which sits within an ObjC project.
I must have done something wrong though. Any help would be greatly appreciated.
I just went through this issue.
In your Project > Build Settings > Other Linker Flags add:
-ObjC
-all_load
My SalesforceSDK is in my Pod project. If you're doing the same, set those flags in your SalesforceMobileSDK-iOS project. If not, wherever the Salesforce SDK is getting compiled.
It turns out this was a combination of things. Firstly, I was missing the -ObjC linker flag in BOTH the Swift project and the Objc project. Thanks DarthVadar123451 for pointing that out. But I also realised I was missing two libraries: libz.dylib and libxml2.dylib. Once added, everything worked. I hope that helps anyone running into the same issue.

iOS 9 error while running Worklight 6.1 Application

We have tried to run WL 6.1 Fix Pack FP02 app on iOS 9 and got the following error in main.m file:
‘Application windows are expected to have a root view controller at the end of application launch’
The exception is thrown on this line of main.m:
int retVal = UIApplicationMain(argc, argv, appClass, #”MyAppDelegate”);
Any help would be greatly appreciated.
Below is the stack trace from xcode 7 :
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
*** First throw call stack:
(
0 CoreFoundation 0x047e0a94 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0429fe02 objc_exception_throw + 50
2 CoreFoundation 0x047e092a +[NSException raise:format:arguments:] + 138
3 Foundation 0x00f0e3e6 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118
4 UIKit 0x012b3568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3674
5 UIKit 0x012d6905 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3171 + 68
6 UIKit 0x012afbae -[UIApplication workspaceDidEndTransaction:] + 163
7 FrontBoardServices 0x07c1cccc __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
8 FrontBoardServices 0x07c1c7a3 __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
9 FrontBoardServices 0x07c3a1cb -[FBSSerialQueue _performNext] + 184
10 FrontBoardServices 0x07c3a602 -[FBSSerialQueue _performNextFromRunLoopSource] + 52
11 FrontBoardServices 0x07c398fe FBSSerialQueueRunLoopSourceHandler + 33
12 CoreFoundation 0x046fae7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
13 CoreFoundation 0x046f0b0b __CFRunLoopDoSources0 + 523
14 CoreFoundation 0x046eff28 __CFRunLoopRun + 1032
15 CoreFoundation 0x046ef866 CFRunLoopRunSpecific + 470
16 CoreFoundation 0x046ef67b CFRunLoopRunInMode + 123
17 UIKit 0x012af497 -[UIApplication _run] + 540
18 UIKit 0x012b4cc1 UIApplicationMain + 160
19 MYAPP 0x00100f5d main + 157
20 libdyld.dylib 0x04c8ba21 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Update:
Tested with the provided Hello World project - failing
Tested with the latest available iFix - working
Please upgrade.
Without proper example that can be debugged it is difficult to answer, but it should be noted that for applications compiled with Xcode 7 to correctly function you need to make sure, at minimum, to make the following tweaks:
Disable Bitcode, as it is currently not supported.
Correctly define ATS (either allow all addresses, or correctly setup the client application with HTTPS, and the server with TLS 1.2 support).
Read more about ATS and Bitcode, here: https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/
See if that resolves this issue. If not, you must provide an application with reproduction steps.
You should also note that 6.1 Fix Pack 2 is extremely old and you should, as an IBM customer, login to IBM Fix Central and download the latest available iFix (for Studio and Server) and upgrade. This latest iFix also contains iOS 9 related fixes, so it is advised to test with it first, in addition to the above required changes for applications compiled in Xcode 7.
From the provided example project, you are not even using Fix Pack 2, but 1. Even older...
Application windows are expected to have a root view controller at the end of application launch’
This error is caused when there is no view controller for the app to go to after the launch. This could be because you have not created one yet because you started with an empty application, you deleted the view controller, or it might be you deleted the entrance point to the main view controller.

Unable to fix crash/exception reported by iTunes review team [duplicate]

My App does not crash on my iDevices, but the apple review team says it is crashing on ipad 6.0.1. This is the relevant part of the resymbolicated log:
Last Exception Backtrace:
0 CoreFoundation 0x327fb29e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x394dd97a objc_exception_throw + 26
2 UIKit 0x38897d54 +[UIStoryboard storyboardWithName:bundle:] + 436
3 UIKit 0x386da406 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 38
4 UIKit 0x38563794 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 524
5 UIKit 0x3850bc34 -[UIApplication handleEvent:withNewEvent:] + 1000
6 UIKit 0x3850b6c8 -[UIApplication sendEvent:] + 68
7 UIKit 0x3850b116 _UIApplicationHandleEvent + 6150
8 GraphicsServices 0x35c8759e _PurpleEventCallback + 586
9 CoreFoundation 0x327d067e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
10 CoreFoundation 0x327cfee4 __CFRunLoopDoSources0 + 208
11 CoreFoundation 0x327cecb2 __CFRunLoopRun + 642
12 CoreFoundation 0x32741eb8 0x32739000 + 36536
13 CoreFoundation 0x32741d44 CFRunLoopRunInMode + 100
14 UIKit 0x38562478 -[UIApplication _run] + 664
15 UIKit 0x3855f2f4 UIApplicationMain + 1116
16 MyApp 0x0007362e main (main.m:16)
17 MyApp 0x000735e4 start + 36
Does this mean that the Storyboard is the problem (line 2)?
To answer your question:
Does this mean that the Storyboard is the problem (line 2)?
It means that the most likely problem is related to the storyboard loading - either with the storyboard or the bundle - as that's where the exception is being thrown from. Without knowing the source code of UIStoryboard and what's on line 436 that makes it throw an exception, that's probably about as specific as you'll get from a non-Apple employee.
To get beyond that and actually reproduce the crash locally (so you can work toward fixing it):
Validate packaging / do a clean/fresh install (as suggested in the comments)
Try on a different device (perhaps there's something leftover that a clean isn't removing properly)
Try an older iOS version (maybe they're accidentally giving you incorrect information to the iOS version?)
Try simulating low memory environment while your app is in the background (maybe the crash is related to your app closing and restarting in the background in this situation?)
More likely you'll want to get more info from the review team than just a stack trace if you can't reproduce the issue:
Can you get more exact reproduction steps on how they are causing the crash?
Is this an update to an existing app? Might they have an old version of your app that hasn't been cleaned properly?
My guess is that at some point you changed the name of the storyboard file but did not reflect that change in Xcode under (project) > (target) > General > Deployment Info > Main Interface.
Consequently, it's still working on your device (because you still have the storyboard file with the old name installed on that device, as well as the new one), but it crashes when newly-installed on other devices, where only the storyboard file with the new name exists.

Resources