App crashes on launch due to Spotify issue - ios

We are working on a project where we are fetching feeds from Spotify. We have integrated Spotify library in the same. The app was rejected by MFI approval process due to app launch crash issue. We are stuck here. Its really urgent and we appreciate some quick help.
We are getting a app crash error when app launches. We are calling a method, which might be the reason of the crash but we are not sure.
- (void)clearKeychain {
for( NSString *serviceName in #[#"rdio",#"spotify",#"spotifyUsername",#"muzik"]) {
DDLogVerbose(#"removing keychain entry for service = %#", serviceName);
[MZUserManager removeTokenForService:serviceName];
}
MZSpotifyService *spotify = (MZSpotifyService*)[[MZDataManager sharedManager] serviceWithName:[MZSpotifyService shortName]];
[spotify.sessionManager logout];
[MZRdioService rdio].delegate = nil;
[[MZRdioService rdio] logout];
}
---------------------------------
- (MZBaseService *)serviceWithName:(NSString *)serviceName
{
NSLog(#"active services : \n %#",_activeServices);
return _activeServices[serviceName];
}
---------------------------------------
- (void)logout {
[[SPSession sharedSession] logout:^{
DDLogVerbose(#"logged out from spotify");
}];
}
Below are the logs
2013-10-31 15:43:54 -0700 muzik[297] <Warning> *** Assertion failure in NSString* base::deviceIdFromKeychain()(), /Users/spotify-buildagent/buildAgent/work/1e0ce8a77adfb2dc/client/base/_apple/_ios/os_ios.mm:287
2013-10-31 15:43:54 -0700 muzik[297] <Error> *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Keychain error when fetching device ID, nonrecoverable'
*** First throw call stack:
(0x2e265e8b 0x385ca6c7 0x2e265d5d 0x2ec0e29b 0x2ea90f 0x2eaee5 0x2e7bb3 0x1a618d 0x1a545d 0x2e230f55 0x2e2302cf 0x2e22ebd5 0x2e199541 0x2e1dd1ab 0x1a55a1 0x2ec49dc7 0x38be0c5d 0x38be0bcf 0x38bdecd0)
Detail logs are uploaded here (skydive)
Full Crash Logs shared by MFI
Date/Time: 2013-10-31 15:43:54.065 -0700
OS Version: iOS 7.0.2 (11A501)
UDID: 41ab058a88eb7c1c3976828019bdfa0bd5edae22
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 7
Filtered syslog:
2013-10-31 15:43:52 -0700 muzik[297] <Warning> Flurry: Starting session on Agent Version [Flurry_iOS_120_4.2.4]
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:53 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:54 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:54 -0700 muzik[297] <Error> SecOSStatusWith error:[-34018] The operation couldn’t be completed. (com.apple.security.osstatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.osstatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
2013-10-31 15:43:54 -0700 muzik[297] <Warning> *** Assertion failure in NSString* base::deviceIdFromKeychain()(), /Users/spotify-buildagent/buildAgent/work/1e0ce8a77adfb2dc/client/base/_apple/_ios/os_ios.mm:287
2013-10-31 15:43:54 -0700 muzik[297] <Error> *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Keychain error when fetching device ID, nonrecoverable'
*** First throw call stack:
(0x2e265e8b 0x385ca6c7 0x2e265d5d 0x2ec0e29b 0x2ea90f 0x2eaee5 0x2e7bb3 0x1a618d 0x1a545d 0x2e230f55 0x2e2302cf 0x2e22ebd5 0x2e199541 0x2e1dd1ab 0x1a55a1 0x2ec49dc7 0x38be0c5d 0x38be0bcf 0x38bdecd0)

The important error is here:
The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)
Now, as to why you're triggering it, I don't know. Try Googling that specific error — it's not Spotify-specific.
However, it looks like you're storing Spotify credentials in the Keychain, and you might be triggering the problem by clearing stuff from the Keychain. Unfortunately, "We are calling a method" isn't helpful information.
Now, you shouldn't be storing Spotify credentials in the Keychain. DEFINITELY not user passwords — that's a breach of the ToS. CocoaLibSpotify gives you token that are safe to store in NSUserDefaults.
You can find an example of how to store Spotify credentials properly in the "Empty CocoaLibSpotify" sample project that ships with the library.
Also, try testing your archive builds before submitting them to the App Store. There's no reason this shouldn't be triggering for you locally if it's happening during review.

Related

App failed to launch on Xcode after build successfully

I'm trying to launch the application on a real device from Xcode, but after building correctly the app doesn't launch.
The error is the following:
Unable to launch bundle.identifier Domain: com.apple.platform.iphoneos
Code: -12
-- Request to launch "bundle.identifier" failed. Domain: com.apple.dt.deviceprocesscontrolservice Code: 2 Failure Reason: The
operation couldn’t be completed. Application info provider
(FBSApplicationLibrary) returned nil for "bundle.identifier" : Failed
to launch process with bundle identifier 'bundle.identifier'.
-- The operation couldn’t be completed. Application info provider (FBSApplicationLibrary) returned nil for "bundle.identifier" Domain:
FBSOpenApplicationErrorDomain Code: 4 Failure Reason: Application info
provider (FBSApplicationLibrary) returned nil for "bundle.identifier"
User Info: {
BSErrorCodeDescription = NotFound; }
It started giving me this error when i changed bundle identifier to the application. I also tried to change the bundle identifier directly from info.plist and not only from project > Targets but the error persists.

Xcode Signing error - The operation couldn’t be completed. (OSStatus error -2147416032.)

I made a flutter app. Opened the Runner.xcodeproj and under
runner>target>general>signing
When I select my AppleId for Signing it shows the following error:
The operation couldn’t be completed. (OSStatus error -2147416032.).
I don't know how to resolve this please help.
I'm using Xcode 10.2.1.

Xcode executes successful build but is unable to launch on a physical device

I'm having this exact same issue:
https://github.com/facebook/react-native/issues/26152
This is on react-native 0.60.4
I'm able to have a successful build in Xcode, but I'm not able launch the app on a physical device.
This is the error that I'm given:
This is the readout from the console:
Details
Unable to launch com.news.arg
Domain: com.apple.platform.iphoneos
Code: -12
--
Request to launch com.news.arg failed.
Domain: com.apple.dt.deviceprocesscontrolservice
Code: 2
Failure Reason: The operation couldn’t be completed. Application "com.news.arg" is unknown to FrontBoard. : Failed to launch process with bundle identifier 'com.news.arg'.
--
The operation couldn’t be completed. Application "com.news.arg" is unknown to FrontBoard.
Domain: FBSOpenApplicationErrorDomain
Code: 4
Failure Reason: Application "com.news.arg" is unknown to FrontBoard.
User Info: {
BSErrorCodeDescription = NotFound;
}
--
Someone said on the react native reddit that expo posted a workaround on their twitter, but we were unable to find it when we went back and looked.

iOS Firebase - Failed to fetch default token Error Domain=com.firebase.iid Code=501

I'm trying to integrate Firebase into my app. I’m using Xcode 7.3 & Cocoapods 1.0.1. I created an APNS dev push certificate and uploaded the p12 file to my Firebase project. I downloaded GoogleService-Info.plist and added it to the root of my project. I then followed the instructions here for setting up push notifications (https://firebase.google.com/docs/cloud-messaging/ios/client).
I'm using the following library versions: Firebase 3.6.0, FirebaseInstanceID 1.0.8, FirebaseMessaging 1.2.0
When testing on a device, the 'didRegisterForRemoteNotificationsWithDeviceToken' gets hit and I get a valid device token however I am unable to successfully retrieve a FCM registration token.
I've been struggling with this for a couple of days but not getting anywhere. Below is the relevant code snippet and the console log errors.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
NSString *devToken = [[[[deviceToken description]
stringByReplacingOccurrencesOfString:#"<"withString:#""]
stringByReplacingOccurrencesOfString:#">" withString:#""]
stringByReplacingOccurrencesOfString: #" " withString: #""];
NSLog(#"didRegisterForRemoteNotificationsWithDeviceToken with token: %#", devToken);
[[FIRInstanceID instanceID] setAPNSToken:deviceToken type:FIRInstanceIDAPNSTokenTypeSandbox];
}
2016-10-19 10:23:09.523: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-10-19 10:23:09.872: <FIRInstanceID/WARNING> APNS Environment in profile: development
2016-10-19 10:23:11.761: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-10-19 10:23:25.759: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-10-19 10:23:54.365: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-10-19 10:24:38.482: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-10-19 10:25:42.257: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-10-19 10:25:42.257: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries

Unable to validate upload to appstore

I keep getting this message when trying to upload an app to the app store:
Unable to validate your application. the path...
'/var/.../T/xcodedistpipeline.u4Q/packages/unity-iphone.ipa' does not
contain a file.
One of the log files says:
2016-05-19 13:34:43 +0000 [MT] Presenting: Error Domain=IDEFoundationErrorDomain Code=1 "Codesign failed" UserInfo={NSLocalizedDescription=Codesign failed}
Thanks.

Resources