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.
Related
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
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.
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.
I'm developing a simple game and I am having trouble when a particular UIViewController (called SPSwipes.swift) is loaded. On the screen, there are three buttons: 5, 10, and 25. When one is picked, a variable is set in that scene and the player moves on to the main Game: GameScene.swift.
As far as I am aware, the variables are recognised in the GameScene, but there is a 'NSUnknownKeyException' error when I open up the SPSwipes view in the simulator. This is done by way of a segue. Here is the error in more detail:
2014-11-09 15:32:43.718 Swipe Racer[2644:1620056] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Swipe_Racer.SPSwipes 0x7fbf52d461b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key fiveSwipes.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c021f35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010dd1bbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010c021b79 -[NSException raise] + 9
3 Foundation 0x000000010c4397b3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
4 CoreFoundation 0x000000010bf6be80 -[NSArray makeObjectsPerformSelector:] + 224
5 UIKit 0x000000010cd28c7d -[UINib instantiateWithOwner:options:] + 1506
6 UIKit 0x000000010cb87f98 -[UIViewController _loadViewFromNibNamed:bundle:] + 242
7 UIKit 0x000000010cb88588 -[UIViewController loadView] + 109
8 UIKit 0x000000010cb887f9 -[UIViewController loadViewIfRequired] + 75
9 UIKit 0x000000010cb88c8e -[UIViewController view] + 27
10 UIKit 0x000000010caa7ca9 -[UIWindow addRootViewControllerViewIfPossible] + 58
11 UIKit 0x000000010caa8041 -[UIWindow _setHidden:forced:] + 247
12 UIKit 0x000000010cab472c -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x000000010ca5f061 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2628
14 UIKit 0x000000010ca61d2c -[UIApplication _runWithMainScene:transitionContext:completion:] + 1350
15 UIKit 0x000000010ca60bf2 -[UIApplication workspaceDidEndTransaction:] + 179
16 FrontBoardServices 0x000000011383b2a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
17 CoreFoundation 0x000000010bf5753c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
18 CoreFoundation 0x000000010bf4d285 __CFRunLoopDoBlocks + 341
19 CoreFoundation 0x000000010bf4d045 __CFRunLoopRun + 2389
20 CoreFoundation 0x000000010bf4c486 CFRunLoopRunSpecific + 470
21 UIKit 0x000000010ca60669 -[UIApplication _run] + 413
22 UIKit 0x000000010ca63420 UIApplicationMain + 1282
23 Swipe Racer 0x000000010be380de top_level_code + 78
24 Swipe Racer 0x000000010be3811a main + 42
25 libdyld.dylib 0x000000010e507145 start + 1
26 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
As you can see, there is an issue with my first variable, fiveSwipes (and I would imagine that there would be errors with the two others). What does 'this class is not key value coding-compliant for the key fiveSwipes' mean? How should I go about fixing it?
My SPSwipes.swift file:
class SPSwipes: UIViewController {
var no_of_swipes = 0
#IBAction func fiveSwipes(sender: AnyObject) {
no_of_swipes = 5
//and so on
}
Thank you in advance,
Will
The problem was that the button was linked to numerous IBActions - three of which didn't exist. I right clicked on the button in the Interface Builder and removed the old and irrelevant links, fixing the problem.
For me it was because I had multiple views connected to non existent IBOutlets
To get an idea how to find out:
1- Click on the whole view controller
2- go to : Show the connector Inspector
There you will find all the not connected outlets
The exception is happening when attempting to load the view based on what you set up in Interface Builder. It's looking for fiveSwipes and not finding it. This can happen if you edited your code and forgot to update a connection in IB.
Have you made a connection in IB to something called fiveSwipes that isn't this function? Perhaps a variable called fiveSwipes? The way to fix the problem would be to find the element with the bad connection in IB and clear that connection.
This is an old question, the other answers din't help to fix my issue so would like to leave this answer here might help other people.
Our app contains multiple "Targets" now it happens that the ViewController is pointing to specific target and only on that target this ViewController works. When running on other target the app crashes with this error.
So, for those who has multiple "Targets" be sure to check the "Module" in the "Identity Inspector" and make sure that the "Inherit Module From Target" is checked.
Another possible reason for this is if you are initializing your Controller using nibName:bundle: and you pass it the wrong nib name - some other nib that is not for this controller. The end result is the same, you'll likely have a bunch of #IBOutlets that do not match up between the Controller and the nib.
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.