When attempting to save a contact that has populated Social Profile data the following error is encountered: This is seen in iOS 9.2
Domain=CNErrorDomain,Code=500 "(null)"
UserInfo={CNKeyPaths=(SocialProfiles),
NSUnderlyingError=0x1612681f0{Error Domain=ABAddressBookErrorDomain
Code=0 "(null)"}}
I am serializing a contact that already exists in a different phone's address book and when I look at the attributes for the Facebook social Profile Inotice that the UserIdentity attribute is nil (null).
I'm not sure if I am just missing some knowledge on how this works and this is expected behavior, a usage problem or is it a defect?
Solved. The issue was that the default contact account was an exchange account. The socialProfile save is not allowed in this type of container. Solution is to remove the unsupported property and attempt the save again.
Related
I'm trying to implement the StoreKit2 API to implement IAPs, but keep getting the error Error Domain=ASDErrorDomain Code=509 "No active account".
I've researched online but can't find ANY information about different ASDErrorDomain error codes. Does anyone know what this error means?
If you're curious, my full error log is below.
2022-05-31 02:33:35.491370-0500 (app name deleted for privacy) [Default] Error enumerating unfinished transactions for first transaction listener: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account}
2022-05-31 02:33:35.884686-0500 (app name deleted for privacy) [Default] [StoreKit] Failed to get products through appstored in simulator, will try using appstoreagent on host mac:
Error Domain=ASDErrorDomain Code=507 "Error decoding response" UserInfo={NSLocalizedDescription=Error decoding response, NSLocalizedFailureReason=Could not decode media products response}
2022-05-31 02:33:36.296678-0500 (app name deleted for privacy) [Default] Error enumerating monthlySubscription current transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account}
objc[16313]: Class _PathPoint is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x126673338) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x137570fe8). One of the two will be used. Which one is undefined.
objc[16313]: Class _PointQueue is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore (0x126673310) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/TextInputUI.framework/TextInputUI (0x137571010). One of the two will be used. Which one is undefined.
I did some googling myself and could not find much but ran into this link https://developer.apple.com/forums/thread/660287 which tells me your device is not connected to the Apple Store therefore unable to proceed to the usage of StoreKit. Go to the settings and tap on the first section of it where the profile picture is and sign in with a valid appleid.
I hope this helps!
You can test IAP in the simulator without connecting to the App Store. In this case, the project is not set up to do so by default. You have to select the included StoreKit configuration under the build scheme's run > options tab to get the SKDemo app running as expected.
Figured it out by looking at these generic instructions for testing StoreKit. You may find some useful information here as well - https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode?language=objc
Edit: It turns out it is actually in the instructions on the project site (duh) - https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_a_store_in_your_app_using_the_storekit_api under "Configure the sample code project"
requestItemAtURI received error
Error Domain=com.spotify.ios-sdk Code=101
"JSON object contains no URI" UserInfo=0x16e2e890
{NSLocalizedDescription=JSON object contains no URI}
Testing with various uri have previously succeeded until just now, for example, this uri should be valid:
spotify:track:5jSz894ljfWE0IcHBSM39i
Any ideas?
Unfortunately this is part of the "This SDK may stop working at any time" part of the Beta. There'll be an update before long to resolve it.
I am using the Dropbox iOS SDK (as of this writing, Cocoapod version 1.3.9). I noticed a strange bug. Here are the steps to reproduce it.
Connect to Dropbox, successfully sign in, and link to my account.
URL logged to the console (tokens masked for security):
db-abcdef123://1/connect?oauth_token=xyz123&oauth_token_secret=lmno123&uid=10884&state=91D8CB70-1037-4A4C-8F7B-CB8970E5E0BC
App linked successfully!
Sign out, then sign in with a different account...
URL logged to the console again, similar to the previous one:
db-abcdef123://1/connect?oauth_token=def123&oauth_token_secret=jkl123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F
Then comes the error:
*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <Unsupported Signature Method> The signature method "(null)" is not currently support by MPOAuthConnection
[WARNING] DropboxSDK: error loading DBConnectController - Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x12848f00 {NSErrorFailingURLStringKey=db-abcdef123://1/connect?oauth_token=123abc&oauth_token_secret=xyz123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F, NSErrorFailingURLKey=db-abcdef123://1/connect?oauth_token=123abc&oauth_token_secret=xyz123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F, NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x144c4c80 "unsupported URL"}
The Dropbox login screen remains in the webView, and clicking Sign in again causes the same error but then makes the app crash.
Any ideas?
I'm using Xcode 5 and iOS 7
This is a known issue which will be fixed in the next release of the iOS Dropbox app (not the SDK).
EDIT: I misdiagnosed this based on the error message. The actual issue is likely that once you've initialized a DBRestClient, it continues to try to use the same user ID for authentication throughout its lifespan. If you unlink that user (even if you've added another user instead), it will fail to authenticate API calls because it no longer has credentials for that user.
The fix is to create a new DBRestClient when you switch to a new user.
This issue is present in the DBRoulette sample app. We're going to try to put in a fix for the next SDK release.
I'm integrating the iOS 3.1 Facebook SDK. When implementing a login with Facebook feature, I call FBSession openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:. When called on the simulator (where I don't have a FB account set up natively) I can successfully login.
However, from a device with a native Facebook account setup, when calling openActiveSessionWithReadPermissions... the session type returned in the completion handler is always sessionStateClosedLoginFailed, regardless of whether I allow or disallow my app to use Facebook in the alert dialog. The session state before calling the method is sessionStateCreated.
This is the NSError from the completion handler:
Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0x20a80820 {com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:ErrorLoginFailedReason, com.facebook.sdk:ErrorInnerErrorKey=Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (No value.) UserInfo=0x208ed930 {NSDebugDescription=No value.}}
What am I doing wrong that would cause this problem?
Update: I just noticed that my app is not appearing in the Settings > Facebook > "Allow these apps to use your account' section. (It was definitely there earlier today).
Update2: If I delete my account from the iOS Settings app, and then log my test user into the Facebook iPhone app, I am able to login with fast app switching. So it appears to only be a problem with the native account.
Update3: I ran the sample Facebook app Scrumptious I have the same problem. Upon clicking 'Login', which calls the openActiveSessionWithRead... I get the same error.
Update4: Possibly related to this bug? http://developers.facebook.com/bugs/450137751688028?browse=search_50a43a39b37ae4868318658
Update5: I should have mentioned this earlier, but it was a Facebook test user account that had this problem.
I switched from using a Facebook test user account to a regular account and this solved the problem on both the Scrumptious app and my app.
Have you set the FacebookAppID in your plist? See "Adding your Facebook App ID" in section 5 of the Getting Started with the Facebook SDK. Also, check the "Facebook" section of your device's settings to make sure your app hasn't been unauthorized (in which case it won't be authorized unless you manually do so).
When attempting to save an account into an ACAccountStore, I sometimes receive this error. Later, if I attempt to access this account, I find that it's actually been saved. So far, I've yet to find any information about this nondescript error. Does anyone know what it means?
Error Domain=com.apple.accounts Code=5 "The operation couldn't be completed. (com.apple.accounts error 5.)"
This question is a little dated, but I'm struggling in the same area. Here's one thing that should help: I did find documentation on the error codes:
typedef enum ACErrorCode {
ACErrorUnknown = 1,
ACErrorAccountMissingRequiredProperty,
ACErrorAccountAuthenticationFailed,
ACErrorAccountTypeInvalid,
ACErrorAccountAlreadyExists,
ACErrorAccountNotFound,
ACErrorPermissionDenied,
ACErrorAccessInfoInvalid
} ACErrorCode;
I found this in the documentation under the Accounts.framework link.
Interpreting this gives error=5 being "Account already exists" and error=6 being "Account not found." I'm hopeful this makes the errors a little less "nondescript."
This error occurs because you didn't set the Facebook account in the settings. The settings are available in iOS 6. Set that account and then try again.
Also give proper alert message on error.
While I didn't find any documentation to support (or contradict) my findings, here is what seems be changed (since iOS 5):
In iOS 5, the user is prompted with access request even when there are no Twitter accounts setup. In iOS 6 it seems the request is declined with error code 6 when there are no accounts setup.
In iOS 5 the user is prompted again (and again) with access request if the user had previously disabled access to said account from Settings > Twitter. Now, in iOS 6, it seems access request is silently declined (with no error, i.e. nil error) if user has removed access to app from Settings
If anyone else finds a better answer, do comment, please.