icloud

Save game data into iCloud via GameKit

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to save game's data to iCloud via next code: GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; [localPlayer saveGameData:[NSData dataWithBytes:rawData->data() length:rawData->size()] withName:[NSString stringWithUTF8String:fileName.c_str()] completionHandler:^(GKSavedGame *savedGame, NSError *error) { if (error == nil) { DebugLog(@"Snapshot successfully saved"); } else { DebugLog(@"saveSnapshot error: %@", error.description); } }]; But getting error message: The requested operation could not be completed because you are

Syncing a local sqlite file to iCloud

江枫思渺然 提交于 2019-12-03 08:44:30
问题 I store some data in my iOS app directly in a local .sqlite file. I chose to do this instead of CoreData because the data will need to be compatible with non-Apple platforms. Now, I'm trying to come up with the best way to sync this file over iCloud. I know you can't sync it directly, for many reasons. I know CoreData is able to sync its DBs, but even ignoring that using CD would essentially lock this file into Apple platforms (I think? I've only looked into CD a bit), I need the iCloud

Questions concerning iCloud + core data

ぃ、小莉子 提交于 2019-12-03 08:43:11
I have an app on the app store, that uses coredata as storage. I wan't to update the app with iCloud synchronization as new feature. Following apple`s sample code, I managed to have my core data storage synchronize between devices. However, I'm experiencing problems when either iCloud synchronization is turned off/on in the app on only one of the devices, or when the app is deleted from the device and the reinstalled. In both cases, data is not synchronized back to the device, although it is available just fine on a second device (which was not disabled/reinstalled). I also found that all

The entitlements specified…profile. (0xE8008016). Error iOS 4.2

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting the 'dreaded' error The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016). when trying to deploy my first app to an un-jailbroken device on iOS 4.2.6 (Verizon). The thing is, I do not have a Entitlements file in my project, as I am not distributing it at all, only putting it on one device. I have gone through all the hoops and loops apple puts you through (certificate, device, provisioning) down to the letter, and I cannot figure

Deleting data from cloudkit with swift

别来无恙 提交于 2019-12-03 08:23:59
How do I delete some data I put into the cloud? I made an app that when you enter a url in 1 view controller it uploads into the cloud, and when you go to another view controller it shows the url you entered before from the cloud in a webview. for example, when you enter www.hello.com, it goes into the cloud, and when you go to the webview on a different view controller it loads www.hello.com. My problem: When I enter a second url, it still loads the first one. How do I get it to load the latest one I uploaded? Is there a way to delete the first one when the second one is uploaded? You can

iPhone (iOS) app using local sqlite and desire to sync between multiple devices

大兔子大兔子 提交于 2019-12-03 08:19:44
问题 I have an iPhone (iOS) app that keeps data in a local SQLite database on each device. The app is used to manage a virtual bank account for kids to track their allowance, spending, savings, etc. (KidsBank and KidsBank Free). I am getting a lot of requests from parents to provide a sync capability between parents and possibly even their children's iOS devices. I have considered several options, but all are tedious and non-trivial since this basically requires database replication or a new

Magical Record and iCloud enabling/disabling

霸气de小男生 提交于 2019-12-03 08:05:37
How to handle correct the following flow using Magical Record ? Assume that my app enable feature to switch iCloud sync on/off. The user installs the app. On startup he is asked about iCloud preference. His choice: do not use iCloud. The user creates some data in the app. Then he decides to store it in iCloud and enables iCloud. Later by some reason the user disables iCloud in the app. Data should be left locally. How to setup Magical Record correctly? UPDATE: Source code Implementing a switch to enable or disable iCloud in your app is also much easier in iOS 7, although it probably isn’t

NSUbiquitousKeyValueStore sync issues

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 07:59:25
I'm having nothing but trouble with NSUbiquitousKeyValueStore and getting it to reliably sync across two devices. It's starting to drive me mad. Mad. I watch my code make a call to: [[NSUbiquitousKeyValueStore defaultStore] setObject:_someData forKey:@"SomeData"]; [[NSUbiquitousKeyValueStore defaultStore] synchronize]; But more times than not, the data never shows up on the other device. I've seen it sync within a few seconds and other times I've waited for an hour and never seen a sync. I plug the devices into xcode and start debugging and sometimes the data suddenly pops up and other times

iOS: Migrating existing Core Data-database into iCloud

元气小坏坏 提交于 2019-12-03 07:43:03
I'm using Core Data in an existing application. Now I want to integrate iCloud so that the user can synchronize their contents between their iOS-devices. To do that I've written the following code for my NSPersistentStoreCoordinator (of course the placeholders are filled out in my code): - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (persistentStoreCoordinator_ != nil) { return persistentStoreCoordinator_; } NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"<DB_Name>.sqlite"]; persistentStoreCoordinator_ = [[NSPersistentStoreCoordinator

Not receiving CloudKit push notifications for Custom Record Zone on the Mac

筅森魡賤 提交于 2019-12-03 07:16:15
I've setup a custom zone subscription to receive (silent) push notifications from my custom record zone. Everything works fine on my iOS devices but I'm not able to receive the notifications on my Mac. To register the notifications I'm registering the notification type in applicationDidFinishLaunching : [[NSApplication sharedApplication] registerForRemoteNotificationTypes:NSRemoteNotificationTypeNone]; (Tried the other types with the same result) application:didRegisterForRemoteNotificationsWithDeviceToken: is then called with a valid token. Everything seems fine but when the custom zone