Search Unity

Unity3D saving data to ICloud

Discussion in 'iOS and tvOS' started by zaher_it, Oct 6, 2016.

  1. zaher_it

    zaher_it

    Joined:
    Oct 14, 2015
    Posts:
    5
    Hello.

    I am working on game project using Unity3D and I want to save (string or binary no problem) to icloud. I need it to implement game progress synchronization. I searched the web but I couldn't find a solution. I used google play services cloud and it was very easy to use. But when I began with data upload and download, I didn't know what to do.
    Any helps :)

    Thanks
     
  2. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,468
    Prime31 has an iCloud plugin.
     
  3. zaher_it

    zaher_it

    Joined:
    Oct 14, 2015
    Posts:
    5
    Thanks. I am looking for plugins.
    But I wonder if there is a solution like saving to google cloud. Simple and without plugins
     
  4. Kujo87

    Kujo87

    Joined:
    Sep 16, 2013
    Posts:
    105
  5. Stamblew

    Stamblew

    Joined:
    Sep 3, 2014
    Posts:
    18
    Any luck with iOS cloud storage? Google Play Games Service has their own solution, yet Apple has not provided anything like that so far =/
     
  6. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    164
    Have you looked at this plugin:
    https://assetstore.unity.com/packag...ross-platform-native-plugins-ultra-pack-31086

    Particularly the cloud services. It has iCloud (iOS) and SavedGames (Android) support.

    Haven't tried it myself but I'm planning to use it on my next project.
    Let us know how it goes.
     
  7. DanarKayfi

    DanarKayfi

    Joined:
    Aug 27, 2012
    Posts:
    69
    I have been searching about the same thing! Any luck?
     
  8. zaher_it

    zaher_it

    Joined:
    Oct 14, 2015
    Posts:
    5
    We used a plugin from the asset store
     
  9. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    164
    Which one did you go with exactly?
     
  10. juanpbol

    juanpbol

    Joined:
    Oct 22, 2017
    Posts:
    1
    Just wow... at least share the solution if you have found it. I mean, you came asking for help and yet you can't even provide the name of the plugin you used. I am actually researching on this same issue, without any luck so far.
     
    Tanek likes this.
  11. Tanek

    Tanek

    Joined:
    Apr 19, 2016
    Posts:
    23
    Anyone is willing to share anything useful about this topic?
    It just looks like that there is no documentation at all and no plugin from Apple for Unity integration, how am I supposed to make this work?
    I am of course willing to evaluate to use an asset store plugin if someone shares his/hers experience with it and if it can save me time but I don't want to use it as a "black box" without knowing what it does and knowing that with the proper plugin or documentation I could probably implement it by myself (as I did with Google Play Games integration for instance).
     
    Garrettec likes this.
  12. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    6,548
    Did you check out the reviews for the mentioned asset? Good reviews for the most part. I often write the author to confirm the level of service, etc.
     
  13. Tanek

    Tanek

    Joined:
    Apr 19, 2016
    Posts:
    23
    Hi @JeffDUnity3D , thank you very much for your response.

    I checked the asset and yes, it's clearly a good asset.
    What bothers me is that there is no official Apple plugin for this integration and I don't want to use external assets as a "black box": I am an experienced developer and I'd like to understand how it works and what kind of integration it is using (surely native code from what I am discovering in these days).
    I know that the first part of my sentence probably should be taken to another "interested party", but IMHO it's very strange that there is no "official" way of integrating these key features.
     
    Garrettec likes this.
  14. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    76
    There are a lot of assets with cloud save functions, but all of them are multipurpose overloaded with tons of stuff and libraries. And what we (most of the developers) need is simple plugin for cloud saves. I've tried the only lightweight solution I found Play Game & Game Center Integration yesterday and it occurred that this is just a fraud, there is no Cloud Save inside as declared.
     
    Zimbres and Tanek like this.
  15. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    146
    I'm currently on the asset store and I see 10 different "Super Mobile Ultra Mega Shiny Pack". They all do the same thing and they all cost the same but, guaranteed, the one I choose will have some showstopper bug or not actually have the one thing I was looking for.

    Looking for assets on the store is a frustrating experience. It feels like a flea market.
     
    Zimbres and Tanek like this.
  16. Stamblew

    Stamblew

    Joined:
    Sep 3, 2014
    Posts:
    18
    Please, could you, at least, provide the name of the plugin you are currently using for this purpose?
     
  17. wtfkeklol

    wtfkeklol

    Joined:
    Feb 9, 2016
    Posts:
    4
    2019.
    Still looking for a proper solution.
    Still no luck.
     
  18. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    76
    True... What we did - we purchased one of the "big packages" (Easy Mobile, to be precise), and took library responsible for game services and code "talking" to this library. Slightly adjusted it to our needs and that's it. But I don't like this solution, because when cloud saves will change on Apple or Google side - probably we will need to reimplement it... Still better then nothing...
     
  19. CSmochinaArnia

    CSmochinaArnia

    Joined:
    Feb 26, 2018
    Posts:
    6
    Well, for iOS, whatever is saved in the persistendatapath, is automatically synced to iCloud. if the user has an iCloud account setup. Unless the file is marked with UnityEngine.iOS.Device.SetNoBackupFlag
     
    CasualT_Bossfight and Garrettec like this.
  20. Dark-1-Games

    Dark-1-Games

    Joined:
    Mar 26, 2014
    Posts:
    29
    Gooren, Zimbres and Garrettec like this.
  21. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    155
    Amazing work, thanks for sharing it!
    One question though - how did you handle the entitlements for the iCloud capability and the iCloud container?
    Could you please send me an example 'entitlements.xml' file or something like that?
    Or did you use the ProjectCapabilityManager unity API for that? If so, how?

    Sorry for the intense questioning :)
     
  22. Dark-1-Games

    Dark-1-Games

    Joined:
    Mar 26, 2014
    Posts:
    29
    Hey,
    Sorry for not responding sooner, here's a sample entitlements file:

    Code (CSharp):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    3. <plist version="1.0">
    4. <dict>
    5.     <key>com.apple.developer.icloud-container-identifiers</key>
    6.     <array>
    7.         <string>iCloud.$(CFBundleIdentifier)</string>
    8.     </array>
    9.     <key>com.apple.developer.icloud-services</key>
    10.     <array>
    11.         <string>CloudDocuments</string>
    12.     </array>
    13.     <key>com.apple.developer.ubiquity-container-identifiers</key>
    14.     <array>
    15.         <string>iCloud.$(CFBundleIdentifier)</string>
    16.     </array>
    17. </dict>
    18. </plist>
    19.  
    Handling entitlements is out of scope for this project, but is something we should totally do on DarkCPS (The project GKNativeExtensions was made for).
     
    Gooren likes this.
  23. sachinmok

    sachinmok

    Joined:
    Feb 25, 2019
    Posts:
    1
    I am working on game project using Unity3D and I want to save data to icloud. I need it to implement game progress synchronization. I searched the web but I couldn't find a solution.
    i cloud tutorial for unity
     
unityunity