Questions tagged icloud

Explore the latest questions and answers asked by our top developers.

GKLocalPlayer fetchSavedGamesWithCompletionHandler returns 0 games on installation

I can save my game and also fetch it but if I uninstall the game and then install it again, the call to fetchSavedGamesWithCompletionHandler returns 0 games (even if I call it several times). And if I call it again after some few seconds, the GKLocalPlayer manages to fetch the game i previously saved. The […]

By Zansin
Published
Categorised as game-center, icloud, ios, iphone Tagged , , ,

Crash occurs when executing Share Extension twice in system Files to share file to app

Anyone could reproduce the bug by downloading this demo project. The app uses Share Extension to import a string of .txt files to Core Data. And then syncs the Core Data to iCloud. There is an entity called Item. When sharing a new item in system Files through Share Extension, the code needs to calculate […]

By Muz
Published
Categorised as core-data, icloud, ios, ios8-share-extension, swift

How to add metadata to files in iCloud Drive and read it offline?

I came across a variant of the same issue while developing very different iOS apps: I want to associate some custom metadata with files in the iCloud Drive and be able to read it while the files are offline. So far I have tried two ways of doing this, but neither seemed to work: I […]

By Vincent
Published
Categorised as icloud, icloud-drive, ios, macos, swift

Can I add metadata to files in iCloud Drive and read it offline?

I came across a variant of the same issue while developing very different iOS apps: I want to associate some custom metadata with files in the iCloud Drive and be able to read it while the files are offline. So far I have tried two ways of doing this, but neither seemed to work: I […]

By Vincent
Published
Categorised as icloud, icloud-drive, ios, macos, swift

How to wait until cloud kit data is being synced with core data in swift in iOS13

I developed core data based app and implemented iCloud sync feature after it was introduced in iOS 13. I enabled iCloud kit, used NSPersistentCloudKitContainer instead of NSPersistentContainer and added several lines of code to sync core data with iCloud. Sync works fine. The problem is that when I uninstall app and reinstall app, it doesn’t […]

By ZhengGe Che
Published
Categorised as core-data, icloud, ios, swift

Setting local notifications on all devices Swift

I have added date triggered local notifications to my app and now I want the user to be able to get the notification they set on one device on all of their devices that have the app. I save the notification they set in a core data entity (saving the notifcation identifier and date it’s […]

By fphelp
Published
Categorised as icloud, ios, notifications, swift, xcode

Forcing NSPersistentContainer change Core Data

I just added the option for a user to toggle Cloud sync inside my app where I save whether or not the user wants to use iCloud sync in UserDefaults under “useCloudSync”. I load my persistentContainer when the app runs with: class CoreDataManager { static let sharedManager = CoreDataManager() private init() {} lazy var persistentContainer: […]

By ap123
Published
Categorised as core-data, icloud, nspersistentcloudkitcontainer, swift, xcode

iOS iCloud documents: can I prevent documents from being purged?

I have an app that stores documents in iCloud. iOS seems to regularly purge the local copies of the ubiquitous documents, forcing my users to re-download from iCloud. I had assumed this was due to low storage on the devices but I’ve experienced it myself when my device has more than 3GB of free space. […]

By SeanR
Published
Categorised as icloud, icloud-documents, ios, ios13, swift

Xcode Error – Profile doesn’t include the com.apple.developer.icloud-container-environment entitlement

We have enabled iCloud capability in our application and enabled below services, Key-value storage iCloud Documents But while trying to export the build through the archive, it’s throwing me the below error, Profile doesn’t include the com.apple.developer.icloud-container-environment entitlement. I have tried to set the com.apple.developer.icloud-container-environment entitlement in Entitlements file also as Production or Development but […]

By Bappaditya
Published
Categorised as archive, icloud, ios, ios-provisioning, xcode

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq