Reading Xamarin iCloud in App Builder

6 posts, 0 answers
  1. Sean
    Sean avatar
    18 posts
    Member since:
    Nov 2010

    Posted 25 Jun 2015 Link to this post

    Not sure if this is possible, or if someone can point me in the right direction.

    Basically I have an existing app that was written using XCode + Xamarin that is in the App Store.  We are currently porting it into App Builder (various reasons).  The AppBuilder uses all of the same identifiers, so it should be able to see the existing iCloud sync from the Xamarin version of the app.  The question is, is there anything available for me to use to get the new AppBuilder version of the app to read the iCloud data from the Xamarin version of the app?  There is some info we would like to read into the AppBuilder versions.

     

    Thanks.

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 30 Jun 2015 Link to this post

    Hi Sean,

    Generally speaking, if iCloud backup is turned on, the data stored for the app should be synced with the device. The answer to "how to access it" depends on the format of the data.

    If you have used the key-value storage to save the data from your Xamarin app, then you can take advantage of the PhoneGap iCloudKV custom plugin. If the data is saved in files, then you should be able to access it through the Cordova File API.

    let me know if that helps.

    Regards,
    Tina Stancheva
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  3. Sean
    Sean avatar
    18 posts
    Member since:
    Nov 2010

    Posted 16 Jul 2015 in reply to Tina Stancheva Link to this post

    Just cant get iCloudKV to work.  Says synchronize failed, when attempting to run the .sync, and same when trying to use .save.  Please correct me if I am wrong, but I did the following to download and import it:

    1. Downloaded iCloudKV from the link provided above as a ZIP file.
    2. Used the 'import' function in App Builder.
    3. It unzipped and installed under the 'Plugins' directory.
    4. Appears as a plugin in properties, but always marked 'On' you cannot turn off.
    5. Use the following code:

                if (window.navigator.simulator !== true) {
                    iCloudKV.sync(function(value) {
                        alert("sync: " + JSON.stringify(value));
                    }, function(value){
                        alert("sync failure: " + value);
                    });
                    iCloudKV.save("testfree","boo",function (value) {
                        alert("save: " + value);
                    });
                }

     

    Any help would be appreciated.

     

    Cam.

     

  4. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 21 Jul 2015 Link to this post

    Hello Cam,

    Please accept my apology for the delay. I am not sure why the synchronization fails - the plugin logic works as it tries to initiate a sync operation, which fails. Generally, in order to use the plugin you need to ensure that the app is distributed through the App Store and you must also request the com.apple.developer.ubiquity-kvstore-identifier entitlement. When you create your App ID in the Apple development center, make sure to enable the iCloud entitlement for it.

    If you have more specific questions on the plugin's behavior, it would be best to post them in the its repository where the plugin's authors can help you make the most of its functionality.

    Regards,
    Tina Stancheva
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  5. Sean
    Sean avatar
    18 posts
    Member since:
    Nov 2010

    Posted 22 Jul 2015 in reply to Tina Stancheva Link to this post

    Thanks for your reply.  The build is an AdHoc, and all of the entitlements are fine, as it is the same one used to build the Xamarin version.  I will post back anything I find out.
  6. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 27 Jul 2015 Link to this post

    Hi Sean,

    We will be glad if you share your findings with us. Also, if there are such from our side, we will update you as well.

    Regards,
    Kaloyan
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top