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

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.

Related

Twitter Login initialization via Parse not working: Swift

[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.

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.

SBNotificationHub crash on return from registerTemplateWithDeviceToken in Testflight Beta build distribution only

If I disable notifications for the app, I don't sync and the app runs fine. If they're enabled, and the code notices and tries to sync - it falls apart.
App has been working 100% fine for weeks with no code changes. Wondering if switching between schemes of the same build on the same test device is hosing things.
Works fine run with the same, non-debug/production, scheme from Xcode to the device. But installed via Testflight app of an official archived build it crashes. Very weird.
Any insights?
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x000000018714659c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x00000001978980e4 objc_exception_throw + 60
2 CoreFoundation 0x00000001870311f8 -[__NSDictionaryM setObject:forKey:] + 972
3 0x0000000100522580 -[SBLocalStorage updateWithRegistrationName:registration:] (SBLocalStorage.m:89)
4 0x00000001005223fc -[SBLocalStorage updateWithRegistration:] (SBLocalStorage.m:59)
5 0x000000010051ceb4 __72-[SBNotificationHub retrieveAllRegistrationsWithDeviceToken:completion:]_block_invoke (SBNotificationHub.m:314)
6 0x000000010051b31c -[SBURLConnection connectionDidFinishLoading:] (SBURLConnection.m:115)
7 CFNetwork 0x0000000186beae70 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 80
8 CFNetwork 0x0000000186beae00 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 208
9 CFNetwork 0x0000000186beaf7c -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60
10 CFNetwork 0x0000000186abf8e4 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 104
11 CFNetwork 0x0000000186b88540 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 104
12 CFNetwork 0x0000000186aabb54 RunloopBlockContext::_invoke_block(void const*, void*) + 76
13 CoreFoundation 0x0000000187028aac CFArrayApplyFunction + 68
14 CFNetwork 0x0000000186aaba00 RunloopBlockContext::perform() + 136
15 CFNetwork 0x0000000186aab8b4 MultiplexerSource::perform() + 312
16 CFNetwork 0x0000000186aab6e0 MultiplexerSource::_perform(void*) + 68
17 CoreFoundation 0x00000001870fe9ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
18 CoreFoundation 0x00000001870fdc90 __CFRunLoopDoSources0 + 264
19 CoreFoundation 0x00000001870fbd40 __CFRunLoopRun + 712
20 CoreFoundation 0x00000001870290a4 CFRunLoopRunSpecific + 396
21 GraphicsServices 0x00000001901c35a4 GSEventRunModal + 168
22 UIKit 0x000000018b95aaa4 UIApplicationMain + 1488
23 0x00000001000dabc0 main (main.m:14)
24 libdyld.dylib 0x0000000197f06a08 start + 4
This is 1.2.4 version of the Windows Messaging Azure SDK
Edit: Also v2.0
Edit: I tracked it down to this line of code, which I believe is falling over because of a nil template name. In my server code which also interacts with the hub, I'm not passing template name so it's getting nilled out. But that alone doesn't cause the crash. There is a scenario I'm yet to uncover with the device ID changing, or similar, that is making this surface. I'll update when I figure out what.
Edit 2: For the few users who experienced this, the common characteristic of their data in Azure, and as hinted by the code above, was a missing TemplateName. It is possible to manually force the crash by passing a nil name to:
[hub registerTemplateWithDeviceToken:deviceToken
name:nil
jsonBodyTemplate:alertTemplate
expiryTemplate:#"0"
tags:[NSSet setWithArray:tags]
completion:^(NSError* error) {
I don't know what was happening with Azure such that a call with a valid string name wasn't updating the Azure data and returning a valid value, but my gut feeling is there is a race condition and bug on the Azure side.
We're now crawling through the registered user data in Azure and fixing the nil template names, which we've verified fixes the issue for users that were caught up in this cycle of sadness.
Update - this was indeed the fix. Haven't had the crash since correcting the bad user template data.
Original answer:
Not a very fulfilling solution, but I disabled notifications for the app (Via OS Settings), used the app to unsubscribe to all the tags I was subscribed to (lots). Then re-enabled notifications, and the crash no longer occurs.
Now both my production Xcode scheme and test flight install result in the same device ID. That doesn't seem to have been the root of the issue, but who knows. Would be really interesting to know what the SDK is trying to persist at the point where it crashes - that would be the surest way to figure out what happened.

Persistent crash on my iOS App, unable to locate it

I'm searching for 5 days ago about this crash, but I can find why my app crash sometimes.
I'm using the Crittercism library to log my crash. The dSYM file is correctly uploaded on the Crittercism website. Here the crash log from Crittercism:
0 libobjc.A.dylib 0x38540626 objc_msgSend + 6
1 UIKit 0x307baaf7 -[_UIModalItemsCoordinator _notifyDelegateModalItem:tappedButtonAtIndex:] + 95
2 UIKit 0x307ba96d -[_UIModalItemAlertContentView tableView:didSelectRowAtIndexPath:] + 749
3 UIKit 0x306c205f -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1079
4 UIKit 0x30774377 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 215
5 UIKit 0x306236f5 _applyBlockToCFArrayCopiedToStack + 317
6 UIKit 0x3059c55b _afterCACommitHandler + 431
7 CoreFoundation 0x2dd532a5 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
8 CoreFoundation 0x2dd50c49 __CFRunLoopDoObservers + 285
9 CoreFoundation 0x2dd50f8b __CFRunLoopRun + 731
10 CoreFoundation 0x2dcbbf0f CFRunLoopRunSpecific + 523
11 CoreFoundation 0x2dcbbcf3 CFRunLoopRunInMode + 107
12 GraphicsServices 0x32bc0663 GSEventRunModal + 139
13 UIKit 0x3060716d UIApplicationMain + 1137
14 myApp 0x000c3357 main (main.m:16)
15 libdyld.dylib 0x38a43ab7 start + 3
The thing is: I have many UITableView in my app. But I can't find which one it is.
How do I have to process to debug this crash ? I didn't find some useful information on Apple Developer Center. I try to use the atos command to symbolicate the file, but no useful information. It's exactly the same info than on the Crittercism website.
Here the command I used: atos -arch armv7 -o myApp (to enter interactif mode, then, enter each memory address like : 0x307baaf7)
I have only the myApp.app.dSYM archive, and to use this command (above), I used the file the archive at path: Contents/Resources/DWARF/myApp
I'm really lost. Any idea ? Suggestions ? Thank you so much for your help.
EDIT 1:
I've checked all my UIAletView and delegate of UIAlertView: all is ok.
I see the crash log on Crittercism, (around 120 crashes for 63 users on iOS 7 only, iPhone and iPad).
I can't reproduced it ! I really don't understand.
Frame 14 already shows the correct symbol, which is main.m line 16. Using atos with the address as written in the stackframe like you did is wrong, see this stackoverflow explanation. As such it is not possible for a crash report to tell you which table view is causing such a memory issue.
Based upon the above you may not be able to get the exact table view from the stack trace itself, but with Crittercism there are additional features (such as Breadcrumbs) that allow for capturing a trail beyond just the stack.
My recommendation is to add a breadcrumb in the viewDidLoad of the TableViewController and grab/define the name of the table view there. That way you can step through the breadcrumbs and know that leading up to the crash you were in this tableview.
That should help you for better capturing this scenario in the future.
As for this particular stack trace. You can potentially use the techniques described in this post to help you better understand the true origins of the objc_msgSend.
* See the Kerni's response below in the comments *

Could not find a storyboard named

I have problem when I try to launch my app in iOS simulator,
I need someone to fix this please, I have tried everything but still I have the same problem
I got this error :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard_iPhone.storyboard' in bundle NSBundle </Users/iYousef911/Library/Application Support/iPhone Simulator/7.1/Applications/F00ED8C4-145B-43C0-ACDA-C41EDC01D824/Azkar.app> (loaded)'
*** First throw call stack:
(
0 CoreFoundation 0x029c21e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x027418e5 objc_exception_throw + 44
2 UIKit 0x01965400 -[UIStoryboard name] + 0
3 UIKit 0x01401692 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 53
4 UIKit 0x01401949 -[UIApplication _loadMainInterfaceFile] + 245
5 UIKit 0x0140054e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
6 UIKit 0x01414f92 -[UIApplication handleEvent:withNewEvent:] + 3517
7 UIKit 0x01415555 -[UIApplication sendEvent:] + 85
8 UIKit 0x01402250 _UIApplicationHandleEvent + 683
9 GraphicsServices 0x03d21f02 _PurpleEventCallback + 776
10 GraphicsServices 0x03d21a0d PurpleEventCallback + 46
11 CoreFoundation 0x0293dca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
12 CoreFoundation 0x0293d9db __CFRunLoopDoSource1 + 523
13 CoreFoundation 0x0296868c __CFRunLoopRun + 2156
14 CoreFoundation 0x029679d3 CFRunLoopRunSpecific + 467
15 CoreFoundation 0x029677eb CFRunLoopRunInMode + 123
16 UIKit 0x013ffd9c -[UIApplication _run] + 840
17 UIKit 0x01401f9b UIApplicationMain + 1225
18 Azkar 0x00002a4d main + 141
19 libdyld.dylib 0x0325f701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
This may be due to different reasons. Check the below:
Check the spelling of your storyboard name. Maybe it is different or capital letters may be different
Check your bundle resources contain this storyboard from by selecting Target->Build Phases->Copy Bundle Resources. If not add it by the below plus button.
Delete your app from the iOS Simulator. Then reinstall the app.
Try to rename the storyboard and apply same name in Main storyboard file base name in your application plist file.
I know this is an old post but just in case someone wanders in here with a similar problem. My issue was we have over a dozen targets and I was not selecting them when I created the SB.
In the left hand column, under File Inspector, make sure you check the membership that the file should belong to.
In info.plist please check if values for properties UISceneStoryboardFile and UIMainStoryboardFile are correct
<key>UISceneStoryboardFile</key>
<string>[MY_PROJECT_NAME]</string>
and
<key>UIMainStoryboardFile</key>
<string>[MY_PROJECT_NAME]</string>
In my case, I accidentally mistype the name of the storyboard……
The cache is messing up everything...run this on your terminal and make sure everything inside gets cleaned up...
sudo rm -rf $HOME/Library/Developer/Xcode/DerivedData/
I have this problem but it it fixed by. there is storyboard name problem. I have my all View Controllers in Main.storyboard so there the name is "Main" and after this, write the storyboard Identifier.

Resources