Closed Tyhja closed 9 years ago
Just checking; did you remember to turn on Saved Games in the Play Developer Console for the iOS Client? (Yeah, you have to do it for all client IDs)
Yes. You must have missed it, but I did say my android build works flawlessly. In fact iOS can detect the save game made by the android build. Writing and reading from the saved game slots gives the aforementioned errors. Edit: Could it be the sdks? I'm using the most updated ones for everything: google plus ios sdk 1.7.1 gpg cpp sdk 1.3
Edit2: Redoing the port to xcode still produces the same result. Again there are no compilation or linking errors. There are the usual deprecated warnings.
Any ideas? I'm using Unity 4.6.1f1 and XCode Version 6.1.1 (6A2008a)
I realised you said I had to do it for every client ID. By which do you mean each App ID, or do you mean that each of the build types need to be enabled with it. Because on the developer console, the save game option is App-wide, there is no such option per client ID (if i understand you right)
I've also tested this on iPhones 5, 5s and 6, on iOS 7 and 8. The errors are exactly the same.
On further investigation, I went to the api's console page and looked at the reports page. The error that is causing the problem is : MethodsError codes drive.files.insert 400
ie when I use iOS to do file storage this is the error that increments in the reports panel on the api console page.
I hope this can narrow it down for you.
Due to the lack of response we have decided to go with GameCentre. Thanks for your time.
Hello, I'm sorry for commenting on this issue but I'm having a similar one, I migrated our game to the new Saved Games system. In Android works perfectly, but in iOS while I can log in with Google+ and check my achievements and rankings, I can't get to load the data from the Saved Game, when I try to load the game this is what my log shows:
[Play Games Plugin DLL] 02/04/15 16:43:56 -05:00 DEBUG: Entering internal callback for SnapshotManager#FetchAllCallback (Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
[Play Games Plugin DLL] 02/04/15 16:43:59 -05:00 DEBUG: Entering internal callback for SnapshotManager#OpenCallback (Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
[Play Games Plugin DLL] 02/04/15 16:43:59 -05:00 DEBUG: Invoking conflict callback (Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
2015-02-04 16:44:00.009 FallingCat[790:1277b] ERROR: MD5 mismatch. Couldn't read at path: /var/mobile/Applications/XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX/Library/Application Support/com.levelplusgames.FallingCat/snapshots/711dbbfcae06bd1f456aeeb173dcf3d0.conflict.
2015-02-04 16:44:00.011 FallingCat[790:9a07] ERROR: Encountered a read error with snapshot used for conflict resolution
[Play Games Plugin DLL] 02/04/15 16:44:00 -05:00 DEBUG: Entering internal callback for SnapshotManager#CommitCallback
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
Is this some kind of bug in the iOS SDK? Any help would be greatly appreciated Thanks.
PD: I'm using the same version of the SDKs @Tyhja named.
I assumed you want to reopen this topic, so i've did it for you, to get a better chacne of a reply. Though I wish you good luck in that.
Tyhja, could you please help me with Android? Can you provide me a sample code of how to save and load an INT or FLOAT value to cloud?
Thanks!
This is fixed in the latest version of the plugin and C++ SDK. You'll need version 0.9.20 of the plugin, and version 1.4.1 of the C++ SDK or higher.
I'm getting the following output from XCode:
[Play Games Plugin DLL] 01/14/15 18:36:55 +08:00 DEBUG: Entering internal callback for SnapshotManager#SnapshotSelectUICallback [Play Games Plugin DLL] 01/14/15 18:36:55 +08:00 DEBUG: Entering internal callback for SnapshotManager#SnapshotSelectUICallback 2015-01-14 18:36:55.338 ColouredLights[3745:2283652] ERROR: Attempting check if an invalid SnapshotMetadata is open 2015-01-14 18:36:55.338 ColouredLights[3745:2283652] ERROR: Attempting to get file name of an invalid SnapshotMetadata 2015-01-14 18:36:55.339 ColouredLights[3745:2283652] ERROR: Attempting to get file name of an invalid SnapshotMetadata 2015-01-14 18:36:55.339 ColouredLights[3745:2283652] ERROR: Attempting to get description of an invalid SnapshotMetadata 2015-01-14 18:36:55.339 ColouredLights[3745:2283652] ERROR: Attempting to get description of an invalid SnapshotMetadata 2015-01-14 18:36:55.340 ColouredLights[3745:2283652] ERROR: Attempting to get CoverImageURL of an invalid SnapshotMetadata 2015-01-14 18:36:55.340 ColouredLights[3745:2283652] ERROR: Attempting to get CoverImageURL of an invalid SnapshotMetadata 2015-01-14 18:36:55.340 ColouredLights[3745:2283652] ERROR: Attempting to get played time of an invalid SnapshotMetadata 2015-01-14 18:36:55.341 ColouredLights[3745:2283652] ERROR: Attempting to get last modified of an invalid SnapshotMetadata opening saved game: [NativeSnapshotMetadata: IsOpen=False, Filename=, Description=, CoverImageUrl=, TotalTimePlayed=00:00:00, LastModifiedTimestamp=01/01/1970 00:00:00]
2015-01-14 18:36:55.343 ColouredLights[3745:2283652] ERROR: Attempting to get file name of an invalid SnapshotMetadata Unhandled Exception: System.ArgumentException: GCHandle value belongs to a different domain at System.Runtime.InteropServices.GCHandle.op_Explicit (IntPtr value) [0x00000] in:0
at System.Runtime.InteropServices.GCHandle.FromIntPtr (IntPtr value) [0x00000] in :0
at GooglePlayGames.Native.PInvoke.Callbacks.IntPtrToCallback[Action:0
at GooglePlayGames.Native.PInvoke.Callbacks.PerformInternalCallback (System.String callbackName, Type callbackType, IntPtr response, IntPtr userData) [0x00000] in :0
at GooglePlayGames.Native.PInvoke.SnapshotManager.InternalSnapshotSelectUICallback (IntPtr response, IntPtr data) [0x00000] in :0
at (wrapper native-to-managed) GooglePlayGames.Native.PInvoke.SnapshotManager:InternalSnapshotSelectUICallback (intptr,intptr)
1](IntPtr handle, Boolean unpinHandle) [0x00000] in <f2015-01-14 18:36:55.343 ColouredLights[3745:2283652] ERROR: Attempting to get file name of an invalid SnapshotMetadata ilename unknown>:0 at GooglePlayGames.Native.PInvoke.Callbacks.IntPtrToTempCallback[Action
1](IntPtr handle) [0x00000] in2015-01-14 18:36:55.356 ColouredLights[3745:2283908] VERBOSE: Snapshot cache fully expired: refreshing all. [After this theres a bunch of stuff: VERBOSE: Download file request: and VERBOSE: Download file response: which i left out]
This is what happens when I try to save a new game. It seems it is unable to handle an empty save game slot? I have no idea at this point.
However saving to a current game slot gives me this error : Unhandled Exception: System.ArgumentException: GCHandle value belongs to a different domain at System.Runtime.InteropServices.GCHandle.op_Explicit (IntPtr value) [0x00000] in:0
at System.Runtime.InteropServices.GCHandle.FromIntPtr (IntPtr value) [0x00000] in :0
at GooglePlayGames.Native.PInvoke.Callbacks.IntPtrToCallback[Action:0
at GooglePlayGames.Native.PInvoke.Callbacks.PerformInternalCallback (System.String callbackName, Type callbackType, IntPtr response, IntPtr userData) [0x00000] in :0
at GooglePlayGames.Native.PInvoke.SnapshotManager.InternalSnapshotSelectUICallback (IntPtr response, IntPtr data) [0x00000] in :0
at (wrapper native-to-managed) GooglePlayGames.Native.PInvoke.SnapshotManager:InternalSnapshotSelectUICallback (intptr,intptr)
1](IntPtr handle, Boolean unpinHandle) [0x00000] in <filename unknown>:0 at GooglePlayGames.Native.PInvoke.Callbacks.IntPtrToTempCallback[Action
1](IntPtr handle) [0x00000] inThis later error also occurs when I open and download from the cloud. All of this is with the iOS build. The android build works flawlessly. So the code should be correct.
For completion the basic code follows your samples:
I assume I could have been missing something out. I hope you guys know where to direct me to correct my error. Thank you for your time.