I have an app that uses EventKit. I ask for permission for reminders and then I have code that creates a reminder. I sometimes get this error message in my logs when running the app in the simulator:
Error getting changed object IDs since timestamp 450512391.766620 from daemon: Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"
Error getting default calendar for new reminders: Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"
The first error comes from the authorization step and second comes from these lines:
EKReminder *reminder = [EKReminder reminderWithEventStore:eventStore];
reminder.calendar = eventStore.defaultCalendarForNewReminders;
This happens after requestAccessToEntityType:completion: returns granted permission for reminders, so there is definitely permission.
The weird thing is, once the issue happens if I just restart the app everything is fine. If I reset the simulator and rerun the app this only sometimes will happen again.
This seems to only happen with the following workflow:
Reset All Contact and Settings Menu Option.
Quit simulator right away when it comes back up.
Run your app which immediately asks for Calendar info on the just-reset, never-opened-before simulator.
I suspect the reason is because when you reset the entire simulator, it needs a few seconds to initialize all the demo data such as the contacts and calendar events when it "boots" for the first time.
If you wait 10+ seconds after reset, THEN run your app, you do not get this warning.
Another workaround is to use the "Reset Privacy Settings" in iOS Simulator Settings App (General > Reset) during testing of calendar permission testing.
Related
I have a brand new app, has not been published yet. I added an in-app purchase to the code, went through the process of adding the product to the app in "app store connect", and added a sandbox user there as well.
To test, I plug in my phone to the mac, and from xcode (13.3.1) I run the app on my phone. The app runs, and I see the product show up in the app. When I hit the button to "buy", I immediately get a dialog to enter credentials. I enter the sandbox credentials, then get another alert saying "Apple ID verification, open settings to continue signing in with.."
I do that, then it pops up a 2-factor dialog saying a code has been sent, but the dialog just goes away after the code is sent via sms to that same device. There's no place to enter that code, as if it knew "oh, the code is being sent to the device that wants it". After a couple of seconds, I end up in Settings->App store, and I don't see anything useful there.
I then go back to the app, and w/o doing anything in the app I immediately get messages in the debug console:
Payment Queue Error: Optional(Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x28160ee80 {Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x2816dc150 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSMultipleUnderlyingErrorsKey=(
"Error Domain=AMSErrorDomain Code=2 \"An unknown error occurred. Please try again.\" UserInfo={NSLocalizedDescription=An unknown error occurred. Please try again.}",
"Error Domain=AMSServerErrorDomain Code=-5000 \"(null)\" UserInfo={failureType=-5000, m-allowed=false, pings=(\n), cancel-purchase-batch=true, customerMessage=The Apple\U00a0ID you entered couldn\U2019t be found or your password was incorrect. Please try again.}"
), NSLocalizedDescription=Authentication Failed, NSLocalizedFailureReason=The authentication failed.}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}}})
I know the account credentials are correct (tried several times and verified them). It's almost as if I'm not really hitting the "sandbox" user db, more like production. But everything I read says I should be in development mode when I run things like this (based on What is a "development-signed version" of an iOS app? How do I run a development-signed version of my app?)
Is there some more precise way of determining whether or not I'm in development mode? Maybe some setting got tweaked or something.
Sorry, my bad. I had created the test account in the "regular user" section, not the "sandbox user" section up at "App store connect" (that's why I was getting the auth errors).
Things work fine with a real sandbox tester account.
GLInstanceID | Unable to find token in cache Error Domain=com.google.iid Code=-25300 "The operation couldn’t be completed. (com.google.iid error -25300.).
Please get me out of this.
The error log message GLInstanceID | Unable to find token in cache Error Domain=com.google.iid Code=-25300 is traced often, both when receiving google token succeeds or fails. I assume this is not an actual error.
I started receiving the error Error Domain=com.google.iid Code=501 on one device. No matter how many times I retried the call to tokenWithAuthorizedEntity:scope:options:handler: it always returned 501. I tried deleting the app, I tried restarting the device with no luck. I noticed that the same code ran fine on other devices. As a final resort I reset all data and settings on the device (factory reset) and this fixed the problem for me.
In a Unity project running on iPhones in iOS 9 I'm calling:
Social.localUser.Authenticate(ProcessAuthentication);
On a phone with all data cleared, this brings up Apple's dialogue to log into GameCenter. I enter an email address and password from an existing GameCenter test account. The dialogue seems to lock up for a few seconds. It then returns to the game, passing false (failure) to ProcessAuthentication.
When I try logging into the same account via the GameCenter settings menu, it brings up a Terms and Conditions screen that I wasn't getting in-game - I suspect that it's failing to bring it up and acting as though you refused to accept. If I complete the login process in settings I can run the game and GameCenter works fine.
This problem didn't occur in iOS 8.
Is this normal? Does anyone know if it can be fixed?
Edit:
Output message being printed:
Setting up 1 worker threads for Enlighten.
Thread->id: 40933000 -> priority: 1
2015-10-29 16:02:02:02.287 autowarriors[365:26287] plugin com.apple.GameCenterUI.GameCenterAuthenticateExension interrupted
2015-10-29 16:02:02:02.288 autowarriors[365:26233] plugin com.apple.GameCenterUI.GameCenterAuthenticateExension invalidated
2015-10-29 16:02:02:02.308 autowarriors[365:26220] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo=(Message=Service Connection Interrupted)
Failed to authenticate
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
-> applicationWillResignActive()
Following this question:
GPP iOS not refreshing token
So I correctly receive refresh token, if I use the app for some time. The problem is that if I put the app in background for some hours (more than 3-4 hours as I noticed), next time when I trySilentAuthentication, it returns following error:
Error Domain=com.google.HTTPStatus Code=400
"The operation couldn’t be completed. (com.google.HTTPStatus error 400.)"
UserInfo=0x7feefbfa4cd0 {
json={ error = "invalid_grant";
"error_description" = "Token has been revoked."; }
I must specify that nobody manually revoked the token or anything else done manually.
What's even more strange is that sometimes after receiving this error, if I terminate the app, and then open it again and run trySilentAuthentication, it's working, and a new token is correctly generated, though sometimes won't work.
Is there anything else I need to do, like showing the consent screen again? This would be much unpleasant for user, to see that screen each day.
Any help is greatly appreciated.
Suddenly in my project,I keep on getting error as below which works well before.
error:
{
NSLocalizedDescription = "The requested operation has been canceled or disabled by the user.";
}, 2
I can see the GameCenter login window several days ago,but now it doesn't show again.
After search with error info above in statckoverflow ,I found this has happened with ios7。3 times after dismiss of GameCenter login window,it never shows again.I reset the hardware,then it works。
It seems the same problem in ios8.1 with in ios7.Will it be solved in later version all it is the strategy that never changed,means it does not fixed in ios7.1 ?
I suppose that if you switch to the Game Center app and log in there all will be good. After a third unsuccessful login attempt in GKGameCenterViewController (i.e. your app) that is normally required.