Allow App Data to be downloaded to iCloud (Nativescript) - nativescript

My Nativescript iOS app saves some user created data using the nativescript-localstorage plugin. I want to be sure that users have a place to back-up this data.
The most straightforward option seems to be that they can include the app's data in an icloud backup (ie, icloud -> icloud Drive -> then allow the app to be backed up in the drive).
When I have used "$ tns run ios" and run the app locally on my phone, the app properly runs on my phone, but it does not appear as an option for backing up to icloud. On the icloud backup screen where apps are listed that you can choose to backup, my app does not appear.
This might be because it is just a local build, and only full releases (apps received from the app store) can be included in icloud backups, but I have not seen this confirmed anywhere.
Do I need to do anything to enable my app to be available for icloud backup?

I have figured out the key piece I was missing--that there are two different types of iCloud uses:
(i) the system-wide iCloud backup that happens automatically if the user turns it on (app developer does not need to take special action) and (ii) the iCloud as a cloud storage solution for certain data that you as the programmer need to configure.
For iCloud with CloudKit to show up as a specific feature of your app, this requires (ii)--and further configuration than just enabling it.
Further detail in my answer here.

Related

iCloud Testing of application in iOS simulator

I am new to the iOS application development and i came across a situation where i need to perform iCloud testing using XCode to check if it is working properly. Can anyone please suggest the steps that needs to be followed in order to perform iCloud testing of iOS application?
You can login to iCloud in the simulator. Open Settings, then login to iCloud just like you would on a device.
I highly recommend using a test account, not your actual account. I also recommend that you have that test account login on a real physical device at least once somewhere to enable additional storage and features on the account.
From that point iCloud should report as available in the simulator.
To trigger a sync with the server, use the "Trigger iCloud Sync" menu item. Simulators don't currently have server-side push notification support so the simulator device is not notified immediately about CloudKit subscriptions.
If you run into any problems please file a feedback report after reproducing the problem, then running xcrun simctl diagnose to gather logs.

Mac OSX Core Data App - Cannot turn on iCloud Capability

I have a published Mac app which uses Core Data and I am in the beginning stages of implementing iCloud (Documents) to sync data between devices (using Ensembles). When I attempt to turn on iCloud the app does not run. It builds successfully and then says it has finished running. This message appears in the Console:
Message from debugger: unable to attach
If I turn off the iCloud capability it will run successfully with no issues.
I am logged into iCloud, and there are no issues shown in the setup. Any ideas as to why I cannot use the iCloud capability? The same issue occurs if I try to activate Push Notifications (even with iCloud Off).
iCloud Settings 1
iCloud Settings 2

Provisioning: Install a Mac app with iCloud for testing

I am working on a Mac app which works with iCloud KVS & CloudKit container of my iOS app which is already in production. All works fine when I run the app from Xcode directly. However, I need to Archive > Export and move it to the /Applications folder because that's how the system picks up Safari Extension Companion.
But when I try to run the exported app, it immediately crashes and the following error is printed in Console:
When exporting the app, I tried to choose between Development-signed Application (as required here in the CloudKit docs) and Developer ID (as required in SO answer linked above), also between iCloud Development / Production modes. I tried to recreate Certificates and provisioning profiles, making sure that I have iCloud enabled for my App ID (and iOS container is selected).
When I do export, there are a few folders titled "A" and I don't remember having them before enabling iCloud for my project:
What am I missing here? Thanks!

UIDocumentPickerViewController & iCloud entitlement in IOS 8

I have a document based app in App Store. Now I am trying to use UIDocumentPickerViewController in my app to share the file from my app UIDocumentProviderExtension supported apps.
Previously I have used UIDocumentInteractionController to transfer files between apps. The problem is when I used UIDocumentPickerViewController, I got the error "iCloud entitlement missing" in app.
According to the Apple document, I need to add the iCloud entitlement if my app supports the iCloud storage, but it's not a requirement for my app. So, I want to understand what is the need of iCloud entitlement for presenting UIDocumentPickerViewController?
the UIDocumentPickerViewController allows your app to access the shared iCloud documents even if your app does not support iCloud document storage itself. This is the default behavior of the UIDocumentPickerViewController.
So if you want to use the UIDocumentPickerViewController you have to add iCloud entitlement to your App ID.
If not, you might want to create an DocumentProviderExtension in your app. Then you don't need to add the iCloud entitlement to your app id and your users can access your documents from within their preferred app (which has a UIDocumentPickerViewController).

Downloading app data from a released app using Xcode 4.6

Related to How to download app data in Xcode 4.2, I am using XCode 4.6 and can no longer download my app data using the Xcode Organizer. My app was recently released to the app store, and I can't recall, but I may have downloaded my app from the app store. In any event, the current version of the app on my phone is a development version (through Xcode, not app store). Other development apps show up in the Organizer, but not my released app. Since I don't want to lose the data associated with the app, I can't just delete the app, and re-install through Xcode. Suggestions?
If you coded your app to save the data to the app's Application Documents directly you can use a tool like PhoneDisk (or the newer iExplorer - http://www.macroplant.com/phonedisk/) to access your device and copy the contents from the documents folder to your desktop (or wherever).
Often times when we build apps with databases and we want to make sure users can easily backup, transfer, and/or email the DB to customer support so we enable iTunes file sharing.
This allows users to open iTunes, choose their device, select the Apps tab, then scroll down to the File Sharing section. From there the user can select any file located in the documents folder and easily copy the files to/from the device via iTunes.
To do this, you must enable Application Supports iTunes File Sharing by adding the same key and setting the BOOL value to YES in the *-Info.plist file for your application.

Resources