icloud

iCloud + Core Data today (10th july 2015)

徘徊边缘 提交于 2019-12-09 04:13:40
问题 Some years ago Apple released the iCloud sync of Core Data apps. Then I released an app for iPad / iPhone / MAC with a shared model using the new Apple mechanism. Things have not gone as expected. The sync mechanism sometimes doesn't work. For example, the last months, in my case, rarely the sync ends well through my 3 devices. Uploading objects in general works fine. But the download process of new or deleted objects normaly crash. Apple released some time ago a way to force the devices to

How (and when) do I use iCloud's encodeSystemFields method on CKRecord?

依然范特西╮ 提交于 2019-12-08 23:09:45
问题 encodeSystemFields is supposed to be used when I keep records locally, in a database. Once I export that data, must I do anything special when de-serializing it? What scenarios should I act upon information in that data? As a variation (and if not covered in the previous question), what does this information help me guard against? (data corruption I assume) 回答1: encodeSystemFields is useful to avoid having to fetch a CKRecord from CloudKit again to update it (barring record conflicts). The

Excluding the Documents Directory from iCloud Backup

最后都变了- 提交于 2019-12-08 15:27:39
问题 Here is the code that I'm using right now, however, Apple still sent me the 'Rejection' notice: didFinishLaunchingWithOptions: NSString *docsDir; NSArray *dirPaths; NSURL *finalURL; dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); docsDir = [dirPaths objectAtIndex:0]; finalURL = [NSURL fileURLWithPath:docsDir]; [self addSkipBackupAttributeToItemAtURL:finalURL]; I beg that you please do not redirect me to another Stack Overflow thread, I have tried

Storing pictures in iCloud

ぐ巨炮叔叔 提交于 2019-12-08 11:26:26
问题 I'm currently working on a concept for a new iPhone app, the would involve some very basic profile system. Since all the other data will be stored in iCloud, I was wondering if it would be possible to store pictures in the cloud too. I see that the storage per app is only 1MB, so this seems extremely low to store pictures. 回答1: The 1 MB limit is for Key-Value storage only (and KV storage is inappropriate for images for other reasons, too). If you use the Documents in the Cloud APIs, your app

Setting an Entitlements file - The executable was signed with invalid entitlements

江枫思渺然 提交于 2019-12-08 10:02:42
问题 As soon as I check "Use Entitlements File" in Xcode, I get the following error when I try to run my app on my phone: The executable was signed with invalid entitlements. The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. I'm trying to get iCloud working, and it seems like I'm failing on step 1. I can run in the emulator, but not in the device I provisioned automatically through the organizer. What am I

Setting an Entitlements file - The executable was signed with invalid entitlements

Deadly 提交于 2019-12-08 08:50:30
As soon as I check "Use Entitlements File" in Xcode, I get the following error when I try to run my app on my phone: The executable was signed with invalid entitlements. The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. I'm trying to get iCloud working, and it seems like I'm failing on step 1. I can run in the emulator, but not in the device I provisioned automatically through the organizer. What am I doing incorrectly here? First of all, you need to have specific provisioning for your App's ID, matching

Deleting an iOS App with documents in the iCloud-enabled folder

旧城冷巷雨未停 提交于 2019-12-08 07:33:18
问题 I found out that if I delete an App from the device, all local documents are deleted of course, but if the App has files stored in the iCloud-enabled folder ( [[[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil] ) - These files are not deleted. This causes two problems: The storage taken by these files is not freed. If the user re-installs the App, there are already files in the folder, which disrupts normal initialization. I can take care of the second issue by going

iCloud incremental data

荒凉一梦 提交于 2019-12-08 06:48:02
问题 Reading the iCloud design docs, it mentions: Because the system tracks changes to the document, it is able to upload only the parts that changed, as shown in step 2. This optimization reduces iCloud network traffic and also reduces the amount of power consumed by the device—important for battery-based devices. In my scenario, I have a plist file that a UIDocument tracks. What if I replace the plist file with a copy of same plist, same filename, same path? I know that the metadata gets updated

Simple iCloud implementation

↘锁芯ラ 提交于 2019-12-08 06:42:43
问题 I have created a new appID and enabled iCloud on iTunes Connect. I have enabled entitlements within the app from the summary section. I have included this code for checking for iCloud availability: NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; if (ubiq) { NSLog(@"iCloud access at %@", ubiq); // TODO: Load document... } else { NSLog(@"No iCloud access"); } All I need to do is a method to save an NSArray to the cloud and one to be able to download it. Yet

Want to connect to iCloud caldav server and add an event, preferably from PHP

谁都会走 提交于 2019-12-08 04:52:50
问题 I am trying to get a server script back end to connect to an iCloud calendar and add an event to a certain calendar. I have found a scrip that can connect to the iCloud server and scrape all the right info for URL's needed etc but can find no example or documentation on adding or at least syncing an event from a web based script, ideally php to an iCloud server caldav calendar. This is a script that can connect and get the necessary URLS http://icloud.niftyside.com/ But am struggling after