Spotify SPTAuth canHandleURL is crashing with NSInvalidArgumentException - ios

I have upgraded Spotify from Beta6 to Beta9. One of the necessary changes to support the upgrade is to the canHandleURL method signature. The Beta6 signature was:
canHandleURL: withDeclaredRedirectURL:
The new signature removes withDeclaredRedirectURL. However, when I try to execute the method with the new signature from my appDelegate in the following manner:
-(BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
if ([[SPTAuth defaultInstance] canHandleURL:url]) {
[[SPTAuth defaultInstance]
handleAuthCallbackWithTriggeredAuthURL:url callback:^(NSError *error, SPTSession *session) {
if (error != nil) {
...
return;
}
// Save the session info
...
}];
return YES;
}
...
return NO;
}
The error is as follows:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '- [__NSCFString hasPrefix:]: nil argument'
*** First throw call stack:
(
0 CoreFoundation 0x0000000112eeec65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000112b87bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000112eeeb9d +[NSException raise:format:] + 205
3 CoreFoundation 0x0000000112e0ee00 -[__NSCFString hasPrefix:] + 96
4 MyAPP 0x000000010fa64c0a -[SPTAuth _canHandleURL:withDeclaredRedirectURL:] + 143
5 MyAPP 0x000000010fa64c7e -[SPTAuth canHandleURL:] + 82
6 MyAPP 0x000000010f9e8c09 -[myAppDelegate application:openURL:sourceApplication:annotation:] + 73
7 UIKit 0x0000000111159cd0 __45-[UIApplication _applicationOpenURL:payload:]_block_invoke + 144
8 UIKit 0x0000000111159c31 -[UIApplication _applicationOpenURL:payload:] + 333
9 UIKit 0x0000000111162328 -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:] + 2350
10 UIKit 0x0000000111165e71 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 196
11 UIKit 0x0000000111165d9e -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 349
12 UIKit 0x00000001111507fa -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 486
13 FrontBoardServices 0x00000001175605e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
14 CoreFoundation 0x0000000112e2241c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
15 CoreFoundation 0x0000000112e18165 __CFRunLoopDoBlocks + 341
16 CoreFoundation 0x0000000112e17f25 __CFRunLoopRun + 2389
17 CoreFoundation 0x0000000112e17366 CFRunLoopRunSpecific + 470
18 GraphicsServices 0x00000001138f6a3e GSEventRunModal + 161
19 UIKit 0x0000000111152900 UIApplicationMain + 1282
20 MyAPP 0x000000010f9925b1 main + 97
21 libdyld.dylib 0x0000000113420145 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
This code appears to follow the iOS SDK tutorial, so I am not sure why this is crashing. When I updated the Spotify.framework, I deleted the old one (moved to trash) and I deleted the Derived Data to clear out the cache in the compiler. Then I dragged the new Spotify.framework into Xcode. Can you see if I have made some mistake? Please help.

Related

"unrecognized selector sent to instance" error occured from AppLovin SDK for iOS

I'm trying the following steps to integrate AppLovin for iOS, but an error occurred Do you have any idea how to resolve this issue?
Download AppLovin SDK for iOS and drag AppLovinSDK.framework to my project.
Add dependent frameworks.
AdSupport
AVFoundation
CoreGraphics
CoreMedia
CoreTelephony
StoreKit (NEW)
SystemConfiguration
UIKit
WebKit (OPTIONAL)
Add my AppLoin SDK Key to info.plist.
Add initialize snippets to AppDelegate.m.
#import <AppLovinSDK/AppLovinSDK.h>
// ...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[ALSdk initializeSdk];
return YES;
}
Add snippets to display ad to ViewController.m.
#import <AppLovinSDK/AppLovinSDK.h>
// ...
- (void)viewDidLoad {
[super viewDidLoad];
if([ALInterstitialAd isReadyForDisplay]){
[ALInterstitialAd show];
}
else{
NSLog(#"Failed");
}
}
Run the application and an error occur with the following stacktraces:
2017-01-03 11:09:58.437 AppLovinSample[80329:1731987] -[NSTaggedPointerString al_containsSubstring:]: unrecognized selector sent to instance 0xa0045564954414e6
2017-01-03 11:09:58.458 AppLovinSample[80329:1731987] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString al_containsSubstring:]: unrecognized selector sent to instance 0xa0045564954414e6'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a02c34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000109a8d21e objc_exception_throw + 48
2 CoreFoundation 0x000000010a09bf34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000109fb1c15 ___forwarding___ + 1013
4 CoreFoundation 0x0000000109fb1798 _CF_forwarding_prep_0 + 120
5 AppLovinSample 0x0000000106834ac0 -[ALSettingsManager loadFromUserSettings:] + 1295
6 AppLovinSample 0x00000001068327f4 -[ALSdk(Private) initWithKey:usingSettings:] + 1446
7 AppLovinSample 0x0000000106831799 +[ALSdk sharedWithKey:settings:] + 181
8 AppLovinSample 0x00000001068314d7 +[ALSdk shared] + 120
9 AppLovinSample 0x000000010683143a +[ALSdk initializeSdk] + 31
10 AppLovinSample 0x00000001067fe75c -[AppDelegate application:didFinishLaunchingWithOptions:] + 92
11 UIKit 0x0000000106fbb68e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
12 UIKit 0x0000000106fbd013 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
13 UIKit 0x0000000106fc33b9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
14 UIKit 0x0000000106fc0539 -[UIApplication workspaceDidEndTransaction:] + 188
15 FrontBoardServices 0x000000011192576b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
16 FrontBoardServices 0x00000001119255e4 -[FBSSerialQueue _performNext] + 189
17 FrontBoardServices 0x000000011192596d -[FBSSerialQueue _performNextFromRunLoopSource] + 45
18 CoreFoundation 0x0000000109fd1311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 CoreFoundation 0x0000000109fb659c __CFRunLoopDoSources0 + 556
20 CoreFoundation 0x0000000109fb5a86 __CFRunLoopRun + 918
21 CoreFoundation 0x0000000109fb5494 CFRunLoopRunSpecific + 420
22 UIKit 0x0000000106fbedb6 -[UIApplication _run] + 434
23 UIKit 0x0000000106fc4f34 UIApplicationMain + 159
24 AppLovinSample 0x00000001067fe9ef main + 111
25 libdyld.dylib 0x000000010e70a68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Here is the documentation that how to integrate AppLovin SDK for iOS. (It should be logged in.)
I did not realize some sentence in the official documentation. In order to resolve this issue, I needed to enable Xcode Flags.
Enable Xcode Flags
The -ObjC flag must be added for static libraries (such as our SDK) to run correctly.

Google Maps iOS SDK "mapView:didTapMarker:" crashes

I have a subclass of GMSMarker called customMarker.
My user gets notifications every time he approaches one of the markers on the map.
I want that when the user clicks on a notification, the marker will be already selected (when the app opens from the notification) adn its infoWindow will be visible.
I try to do it like this:
-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
AroundersViewController *aroundersVC=[[UIStoryboard storyboardWithName:#"Main" bundle:nil] instantiateViewControllerWithIdentifier:#"aroundersPage"];
NSString *markerIdentifier=[[notification userInfo] objectForKey:#"markerIdentifier"];
CustomMarker *notificationsMarker=[self.monitorLocationVC markerForIdentifier:markerIdentifier];
[aroundersVC mapView:aroundersVC.mapView didTapMarker: notificationsMarker]; //App crashes here
}
But the app crashes with this error log message:
2016-02-11 20:39:30.355 App[15887:4216691] -[AroundersViewController mapView:didTapMarker:]: unrecognized selector sent to instance 0x7fa01bcf5890
2016-02-11 20:39:30.365 App[15887:4216691] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AroundersViewController mapView:didTapMarker:]: unrecognized selector sent to instance 0x7fa01bcf5890'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105257e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000104cd0deb objc_exception_throw + 48
2 CoreFoundation 0x000000010526048d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001051ad727 ___forwarding___ + 487
4 CoreFoundation 0x00000001051ad4b8 _CF_forwarding_prep_0 + 120
5 App 0x0000000101988dab -[AppDelegate application:didReceiveLocalNotification:] + 523
6 UIKit 0x000000010561cdc5 -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] + 3650
7 UIKit 0x0000000105622cc1 __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 214
8 UIKit 0x0000000105622b95 -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 508
9 UIKit 0x0000000105602007 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 159
10 UIKit 0x0000000105601c94 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 843
11 FrontBoardServices 0x0000000108027754 -[FBSSerialQueue _performNext] + 192
12 FrontBoardServices 0x0000000108027ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
13 CoreFoundation 0x0000000105183a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14 CoreFoundation 0x000000010517995c __CFRunLoopDoSources0 + 556
15 CoreFoundation 0x0000000105178e13 __CFRunLoopRun + 867
16 CoreFoundation 0x0000000105178828 CFRunLoopRunSpecific + 488
17 GraphicsServices 0x0000000107e53ad2 GSEventRunModal + 161
18 UIKit 0x0000000105604610 UIApplicationMain + 171
19 App 0x000000010199fd7f main + 111
20 libdyld.dylib 0x0000000106c7f92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Does anybody have an idea?
Thanks!

Nextpeer Issue With Cocos2dx

I am using Nextpeer with cocos2dx in iOS.
I have configure Nextpeer sdk with cocos2dx successfully.
In "AppController.mm" i am using following code
[Nextpeer initializeWithProductKey:#"KEY" andDelegates:[NPDelegatesContainer containerWithNextpeerDelegate:self]];
but my code is crashed with following log
2015-09-05 17:05:06.621 Test-mobile[5474:79097] Using Nextpeer version 2.2.2, build number 28, server: https://api.nextpeer.com/v3
2015-09-05 17:05:08.250 Test-mobile[5474:79097] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ac52c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010a828bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010ac52b9d +[NSException raise:format:] + 205
3 Foundation 0x0000000109af37ef +[NSJSONSerialization JSONObjectWithData:options:error:] + 67
4 Test-mobile 0x00000001060a85e5 -[NPStringsService loadResourceBundleStrings] + 159
5 Test-mobile 0x00000001060a82f1 -[NPStringsService fillStringModel] + 41
6 Test-mobile 0x00000001060a7ec1 -[NPStringsService init] + 72
7 Test-mobile 0x00000001060a7e2b +[NPStringsService initializeService] + 58
8 Test-mobile 0x0000000106061b2f +[Nextpeer initializeWithProductKey:andSettings:andDelegates:] + 1150
9 Test-mobile 0x00000001060616a4 +[Nextpeer initializeWithProductKey:andDelegates:] + 50
10 Test-mobile 0x000000010605ef07 -[AppController application:didFinishLaunchingWithOptions:] + 1095
11 UIKit 0x00000001077da788 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 240
12 UIKit 0x00000001077db397 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2540
13 UIKit 0x00000001077de1de -[UIApplication _runWithMainScene:transitionContext:completion:] + 1349
14 UIKit 0x00000001077dd0d5 -[UIApplication workspaceDidEndTransaction:] + 179
15 FrontBoardServices 0x000000010e4a05e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21
16 CoreFoundation 0x000000010ab8641c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
17 CoreFoundation 0x000000010ab7c165 __CFRunLoopDoBlocks + 341
18 CoreFoundation 0x000000010ab7bf25 __CFRunLoopRun + 2389
19 CoreFoundation 0x000000010ab7b366 CFRunLoopRunSpecific + 470
20 UIKit 0x00000001077dcb42 -[UIApplication _run] + 413
21 UIKit 0x00000001077df900 UIApplicationMain + 1282
22 Test-mobile 0x000000010605f604 main + 100
23 libdyld.dylib 0x000000010b83b145 start + 1
24 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException.
Nextpeer SDK Version is 2.2.2.
Cocos2dx SDK Version is 3.7.1.
Xcode Version is 6.3.2.
How i can resolve this issue.
I have try following code
#try {
if([Nextpeer isNextpeerSupported])
{
NSLog(#"AAAAAAAAA");
[Nextpeer initializeWithProductKey:#"88b83720cf1fa8e9f2007f29e91b9dd6" andDelegates:[NPDelegatesContainer containerWithNextpeerDelegate:self]];
}
else
NSLog(#"BBBBBBBB");
}
#catch (NSException * e) {
NSLog(#"Exception: %#", e);
}
#finally {
}
but getting exception
2015-09-07 11:33:44.382 Test-mobile[2811:25650] Name: NSInvalidArgumentException
2015-09-07 11:33:44.382 Test-mobile[2811:25650] Reason: data parameter is nil

Parse v1.7.4 and Facebook SDK NSInvalidArgumentException', reason: '+[NSData PF_dataFromBase64String:]: unrecognized selector sent to class

I get this error, after upgrading both the FB and Parse SDK to the latest versions. I know that this occurs in my app delegate in the method below.
I have a mixed swift and objective c application, my delegate is written in Objective C and as I am working to the next version I am converting and writing new classes in Swift. If I comment out the handler below the error does not occur, but i get a login failed message, which is what i would expect. After pressing in the login button the Facebook page to authorise the app appears and then the returns to the view controller it is at this point when the method below completes that the error happens.
I understand the meaning of this error, in that a selector is being called on a class that does not have it. The issue I have is that I have checked that all the frameworks are present, and this call appears to be happening from within either the PARSE or Facebook SDKs, so I can't see how to rectify this. can anyone help in why this call fails.
Many thanks.
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
NSLog(#"-------------------------end.of.application.FBSDKApplicationDelegate");
NSLog(#"facebook.Response=%#,url =%#,sourceApp= %#,annotation =%#",application,url,sourceApplication,annotation);
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
// return true;
}
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSData PF_dataFromBase64String:]: unrecognized selector sent to class 0x11343ca48'
*** First throw call stack:
(
0 CoreFoundation 0x0000000113193c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000112e2cbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000011319afad +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001130f113c ___forwarding___ + 988
4 CoreFoundation 0x00000001130f0cd8 _CF_forwarding_prep_0 + 120
5 Chored 0x000000010e2badf5 -[PFDecoder decodeDictionary:] + 658
6 Chored 0x000000010e2bb545 -[PFDecoder decodeObject:] + 130
7 Chored 0x000000010e2bb1b8 __30-[PFDecoder decodeDictionary:]_block_invoke + 94
8 CoreFoundation 0x0000000113192fbc ____NSDictionaryEnumerate_block_invoke421 + 28
9 CoreFoundation 0x0000000113092400 CFBasicHashApply + 128
10 CoreFoundation 0x00000001130cb85b __NSDictionaryEnumerate + 619
11 Chored 0x000000010e2bad5c -[PFDecoder decodeDictionary:] + 505
12 Chored 0x000000010e2bb545 -[PFDecoder decodeObject:] + 130
13 Chored 0x000000010e259631 -[PFCommandNetworkOperation _operationDidFinish] + 259
14 CFNetwork 0x000000011100c0bc __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 69
15 CFNetwork 0x000000011100c060 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 199
16 CFNetwork 0x000000011100c1c7 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48
17 CFNetwork 0x0000000110edb757 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 107
18 CFNetwork 0x0000000110fa8de1 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 273
19 CFNetwork 0x0000000110ec6a26 _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 72
20 CoreFoundation 0x000000011309a354 CFArrayApplyFunction + 68
21 CFNetwork 0x0000000110ec68e7 _ZN19RunloopBlockContext7performEv + 133
22 CFNetwork 0x0000000110ec6726 _ZN17MultiplexerSource7performEv + 256
23 CFNetwork 0x0000000110ec653c _ZN17MultiplexerSource8_performEPv + 72
24 CoreFoundation 0x00000001130c7431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
25 CoreFoundation 0x00000001130bd2fd __CFRunLoopDoSources0 + 269
26 CoreFoundation 0x00000001130bc934 __CFRunLoopRun + 868
27 CoreFoundation 0x00000001130bc366 CFRunLoopRunSpecific + 470
28 CoreFoundation 0x000000011316a661 CFRunLoopRun + 97
29 Foundation 0x0000000112988383 __NSOQSchedule_f + 184
30 libdispatch.dylib 0x00000001141f2614 _dispatch_client_callout + 8
31 libdispatch.dylib 0x00000001141d96a7 _dispatch_queue_drain + 2176
32 libdispatch.dylib 0x00000001141d8cc0 _dispatch_queue_invoke + 235
33 libdispatch.dylib 0x00000001141dc3b9 _dispatch_root_queue_drain + 1359
34 libdispatch.dylib 0x00000001141ddb17 _dispatch_worker_thread3 + 111
35 libsystem_pthread.dylib 0x000000011455f637 _pthread_wqthread + 729
36 libsystem_pthread.dylib 0x000000011455d40d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The problem isn't yours. It was created by version 1.7.4. I faced it too. This temporary fix is a category on NSData that provides the missing selectors. Here it is a header, NSData+PFData.h:
#import Foundation;
#interface NSData (PFData)
+ (NSData *) PF_dataFromBase64String: (NSString *) base64;
- (NSString *) PF_base64EncodedString;
#end
Implementation NSData+PFData.m:
#import "NSData+PFData.h"
#implementation NSData (PFData)
+ (NSData *) PF_dataFromBase64String: (NSString *) base64 {
return [NSData.alloc initWithBase64EncodedString: base64 options: 0];
} // +PF_dataFromBase64String:
- (NSString *) PF_base64EncodedString {
return [self base64EncodedStringWithOptions: 0];
} // -PF_base64EncodedString
#end
You should plan on removing this category when it is no longer necessary, say with Parse v1.7.5.

Receiver has no segue with identifier error

I am getting an error
2014-04-09 01:42:23.599 appname[9584:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<LoginViewController: 0x9a9cda0>) has no segue with identifier 'login''
*** First throw call stack:
(
0 CoreFoundation 0x0263c1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x023bb8e5 objc_exception_throw + 44
2 UIKit 0x0119c48c -[UIViewController shouldPerformSegueWithIdentifier:sender:] + 0
3 appname 0x00002fea -[LoginViewController viewDidAppear:] + 170
4 UIKit 0x0119e099 -[UIViewController _setViewAppearState:isAnimating:] + 526
5 UIKit 0x0119e617 -[UIViewController __viewDidAppear:] + 146
6 UIKit 0x011a0014 __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke + 44
7 UIKit 0x0119e9aa -[UIViewController _executeAfterAppearanceBlock] + 63
8 UIKit 0x010990d0 ___afterCACommitHandler_block_invoke_2 + 33
9 UIKit 0x01099055 _applyBlockToCFArrayCopiedToStack + 403
10 UIKit 0x01098e9a _afterCACommitHandler + 568
11 CoreFoundation 0x0260436e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
12 CoreFoundation 0x026042bf __CFRunLoopDoObservers + 399
13 CoreFoundation 0x025e2254 __CFRunLoopRun + 1076
14 CoreFoundation 0x025e19d3 CFRunLoopRunSpecific + 467
15 CoreFoundation 0x025e17eb CFRunLoopRunInMode + 123
16 GraphicsServices 0x042205ee GSEventRunModal + 192
17 GraphicsServices 0x0422042b GSEventRun + 104
18 UIKit 0x0107bf9b UIApplicationMain + 1225
19 appname 0x00004e3d main + 141
20 libdyld.dylib 0x02ed9701 start + 1
21 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
However I do not think I am doing something wrong with my code this is my viewdiappear. What did I miss out so that this kind of error is created?
- (void)viewDidAppear:(BOOL)animated {
PFUser *user = [PFUser currentUser];
if (user.username != nil) {
[self performSegueWithIdentifier:#"login" sender:self];
}
}
It seems like you haven't set the name of the segue in the storyboard. The picture below is the name of one of my segues, for you, the text box would contain simply login.
It can also happen when you forget to "Embed" the storyboard in Navigation controller:
What the error is telling you is that although your storyboard may contain a segue called #"login", it does not emanate from this LoginViewController (the one that is currently self).
You may think it does, but trust me, the runtime knows more than you do.

Resources