This is a migrated thread and some comments may be shown as answers.

Reading Xamarin iCloud in App Builder

5 Answers 65 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sean
Top achievements
Rank 1
Sean asked on 25 Jun 2015, 10:32 AM

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.

5 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 30 Jun 2015, 12:08 PM
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.

 
0
Sean
Top achievements
Rank 1
answered on 16 Jul 2015, 12:48 PM

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.

 

0
Tina Stancheva
Telerik team
answered on 21 Jul 2015, 03:19 PM
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.

 
0
Sean
Top achievements
Rank 1
answered on 22 Jul 2015, 12:49 PM
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.
0
Kaloyan
Telerik team
answered on 27 Jul 2015, 10:07 AM
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.

 
Tags
Apache Cordova
Asked by
Sean
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Sean
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or