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.
Related
I'm using the iOS LinkedIn SDK to log into my App and retrieve basic profiles.
All works perfectly fine the first time I login, until either I log out, or I close my App.
On attempting to log back into my App with LinkedIn: the usual redirect to the LinkedIn app takes place, but the permissions screen for my app doesn't pop up, it just redirects straight back to my app with the following error:
Error Domain=LISDKAuthError Code=5 "(null)" UserInfo={errorDescription=The operation couldn’t be completed. Software caused connection abort, originalDomain=LISDKServerError, errorInfo=PARSING_ERROR}
I can only successfully log back in again if I first close the LinkedIn App, before reopening mine.
Does anyone have an idea of what's going on please?
-This doesn't occur on all of my test devices!
-On the device that it does occur on, I also receive the same error in that scenario when running the sample App provided with the LinkedIn SDK.
-The LinkedIn App is up to date.
-The App id, bundle ids etc etc are all set, hence login success half of the time!
-I've tried calling [LISDKSessionManager clearSession] in numerous locations.
Cheeky framework fix alert.
Uncomment out the lines in LISDKSession.h
This allows the correct use of [LISDKSessionManager hasValidSession]
Which is an improvement on what we were working with.
Not yet tested with iOS12...
I had a similar problem. It was mainly reproduced only on iOS 12. The problem is that when you already have a LinkedIn application running, you will not be able to log in through their SDK in your application. On iOS 11, the second time you try to log in after this error, the authorization worked fine.
I solved this issue by simply showing the user an alert with a message about what he needs to do to authorize.
Here you can check an example of my implementation in Swift 4:
LISDKSessionManager.createSession(withAuth: ["r_basicprofile"],
state: nil,
showGoToAppStoreDialog: true,
successBlock: { _ in
// Your actions in case of successful authorization
}, errorBlock: { error in
guard let nsError = error as NSError? else {
return
}
if #available(iOS 12.0, *),
nsError.code == LISDKErrorCode.SERVER_ERROR.rawValue {
// Show alert to user with text - "Please, shut down the LinkedIn app and try login again"
} else if nsError.code != LISDKErrorCode.USER_CANCELLED.rawValue {
// Handling when user tap on Cancel button in LinkedIn SDK
}
})
I've been battling for a fix for this with LinkedIn for months.
There 'solution' is to kill off the SDK.
Taken from their 'Important updates to the LinkedIn Developers program and APIs' email December 2018:
"Authentication, SDKs, and Plugins: We are also deprecating several obsolete or seldomly-used products and technologies."
"SDKs: Our JavaScript and Mobile Software Development Kits (SDKs) will stop working. Developers will need to migrate to using OAuth 2.0 directly from their apps."
Uncomment this two lines of code in LISDKSession.h
- (LISDKAccessToken *)getAccessToken;
- (void)setAccessToken:(LISDKAccessToken *)accessToken;
I'm working on retrieving steps data within HealthKit. The query all works as expected (I'm only retrieving step data) however I'm having a strange issue with the Health Access modal that appears (see screenshot below - this is NOT my app, just an example screenshot taken from the web)
The issue is when the user soft closes the app (i.e. pressing the home to get to springboard) and then goes back into the app. The modal doesn't want to disappear when clicking allow or disallow.
Looking at the log it appears I have this strange error:
Error Domain=com.apple.healthkit Code=5 "(null)"
Any thoughts? If further info is required please let me know.
P.S. Just an addition to this, I notice that when clicking "Don't Allow" (where the "Cancel" is within the screenshot), I get an alert dialogue stating:
"You can turn on health data categories later in the Health app."
Upon clicking "OK" the Health Access screen still does not dismiss.
P.S.S. Not sure if this affect this but when the Health Access screen appears, it does so with the following message in the Log:
Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x1343f4040>.
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()
I have an turn-based game using GameKit in iOS. Generally, my authentication with Game Center works. My game works and I can for periods of time send moves back and forth. However, relatively frequently but not constantly, when I try to perform an action (e.g., finding a new match) over Game Center it fails with the error:
Error Domain=GKErrorDomain Code=6 "The requested operation could not be completed because local player has not been authenticated." UserInfo={NSLocalizedDescription=The requested operation could not be completed because local player has not been authenticated.}
Yet, the GKLocalPlayer.localPlayer().authenticated = true, both immediately before getting the error and after. After getting this error, the authentication viewController does not get presented and GameKit methods that rely on authentication cease to function (they don't come back to life ). Then, if I send the app to the background and then bring it back to the foreground, the error does not return when I retry the action (without requiring new login and password entry).
According to this similar observation:
GKLocalPlayer authentication not working, but isAuthenticated returns YES (Game Center sandbox)
"1.Game Center fails to complete authentication if your device has incorrect dates. So, go ahead and check the current date.
You might have done this. I trust you - iOS Simulator >> Reset Content and Settings"
I am getting this problem on the device, not the simulator, ruling out #2. Could someone help me with #1? I may be naive here, but my iPhone and iPad have the right time and date. Is there something or somewhere else I should be checking and setting?
Then, if this is not the issue, what else could be the problem? I am running iOS9.
I've seen this too, and have an open bug with Apple. In my case, I'm testing with multiple physical devices, and only one of those devices ever encounters this. On that particular device, I'm logged into iTunes using a personal account, but logged into game center using a test account.
From what I can see, when the device is using the same login for iTunes, iCloud and game Center, there are no problems. But, when I try to mix-and-match the accounts for whatever testing I need to do, then I randomly get error 6.
There doesn't seem to be anyway to recover from this, except to have the user re-login into game center. Of course, there's no way to present the login view controller again, so the only option is for the user to leave the game, kill it off, and star up again (which re-starts the game center authentication process). I trap the error now, give the user a message saying Game Center has logged them out, and explain what they need to do about it.
But as I said, when I stopped mixing up credentials on the device, the problem went away.
BTW, on a slightly related topic, I've come to view the .authenticated property as completely unreliable. It will be TRUE in conditions where you do not actually have connection to Game Center. I opened a bug on this, too. Apple closed it saying this was working as intended by using "cached" data. Thus, it will report authenticated when it's not authenticated and give you access only to outdated match and leaderboard data which had previously been saved locally.
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.