cloudkit

discoverAllIdentities & discoverUserIdentity returning nil for CKUserIdentity.lookupInfo as of iOS 10.3

旧时模样 提交于 2019-12-06 04:18:57
问题 CKContainer.discoverAllIdentities(completionHandler:), discoverUserIdentity(recordID: - completion handler returns CKUserIdentity but .lookupInfo is always nil even when contacts contain email, phone, etc. Other properties such as hasiCloudAccount, userRecordID, nameComponents are fine. This issue just started happening with recent Swift 3.1 release. Does anyone know if this is intended behavior as I have not been able to find any reference to CloudKit changes in release notes but this is

CloudKit: switch container environment from Development to Production

若如初见. 提交于 2019-12-06 03:26:51
I'm building a test tool to verify content in CloudKit, but I want to be able to select the container's environment. On iOS, you can select either the "Development" or the "Production" environment when you export your app for ad hoc testing, but you don't have that option on OS X. It always points to the "Development" environment. Anyone knows, if there is a programmatically way to set or select what container environment you want to work with, either on OS X or iOS? snagra In the entitlements file, add in the row of com.apple.developer.icloud-container-environment and you can switch the value

How to prompt for CKApplicationPermissionUserDiscoverability again

守給你的承諾、 提交于 2019-12-06 02:06:05
Is there a way to get iOS to prompt for CKApplicationPermissionUserDiscoverability again after the user has declined it? The most I've been able to do is remove permission in the iCloud settings pane in OS X, which just returns a deny to the iOS app without any user interaction. The app I'm writing is useless without discoverability, so I want to be able to prompt again if the user initially says no. On the iCloud settings of the iOS 8.1, under the iCloud Drive, there is an option called "Look Me Up By Email". There you will be able to reset the permission. In iCloud dashboard, under

How to initialize CKRecord with both zoneID and recordID?

孤街浪徒 提交于 2019-12-06 01:25:18
问题 I'm currently building a solution to sync Core Data records to CloudKit . I need help to find out it what I want to do with CKRecord is feasible. I’ve checked the Apple CloudKit documentation, experiment and searched the web, but I didn’t find the kind of answer I want. I would like to initialize the CKRecord with having zoneID and also recordID that I would supply in init method. The initializer seems to force me to choose between the two. I want to create my own ZoneID (not using default),

How to use “fetchWithRecordID” for automatically generated ID in CloudKit Dashboard?

不想你离开。 提交于 2019-12-05 19:16:41
I'm new to CloudKit and iOS development. I've manually added some records to the CloudKit Dashboard, and now I want to retrieve them by their IDs, which were automatically created. And then I want to display a record's value in a UILabel for a static tableview cell. Having two issues: 1). I'm getting an error in xCode when using the ID from the dashboard (error says "expected "," separator") ; and 2). I can't find any examples of putting a record value in a UILabel in a static tableview cell. (especially for swift). Any help is greatly appreciated! Here's my code: override func viewDidLoad() {

CloudKit CKSubscription without notifications?

醉酒当歌 提交于 2019-12-05 18:12:13
问题 I'm writing a Swift app with CloudKit. When a record is modified in CloudKit by a device, I want the corresponding records to be updated in the local storage of the other devices without displaying a push notification. Do I need to call registerUserNotificationSettings in didFinishLaunchingWithOptions (meaning that the user has to accept the notifications for my app) even if I don't plan to display any push notification? application.registerUserNotificationSettings(UIUserNotificationSettings

CloudKit Push Notification, App running on background

夙愿已清 提交于 2019-12-05 12:45:16
When iOS8.2-app is running in the background, it does not receive any push notification, while if it is running on the foreground, it receives the push notifications fine. Any idea what is going on ? Running on CloudKit Development mode, the subscription is for add,edit,and remove, and using the following didReceiveRemoteNotification : -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { NSLog(@"Push received."); NSDictionary * apsDict = [userInfo objectForKey:@"aps"];

creatorUserRecordID.recordName contains “__defaultOwner__” instead of UUID shown in Dashboard

二次信任 提交于 2019-12-05 09:50:48
Downloading a CKRecord from CloudKit and when plotting creator recordName , I can see this: (lldb) po record.creatorUserRecordID.recordName __defaultOwner__ but, Dashboard show a real value. Why the difference?! I hope I do not have to download only because of this the logged in user first?! "__defaultOwner__" mean's its owned by the currently logged in iCloud account. So you could replace that with "Me" or the person's name if you have it. If you want to find out the logged in user's recordID you can use the asynchronous method fetchUserRecordIDWithCompletionHandler. Jay it is a bug edit this

How to store big image in CloudKit?

感情迁移 提交于 2019-12-05 09:17:53
I tried to upload a picture to CloudKit , and store it as NSData , but with a relatively bigger picture, taken with camera, I get this error: Error saving record <CKRecordID: 0x15998770; 04359DFA-8370-4000-9F53-5694FC53FA9C:(_defaultZone:__defaultOwner__)> to server: record too large id=04359DFA-8370-4000-9F53-5694FC53FA9C of type UserSetting What is the maximum size of data is able to store in CloudKit ? How do you store big images taken with camera in CloudKit ? I tried with two image, and I plotting out size of them. let d = UIImagePNGRepresentation(image) println("d.length: \(d.length)") d

Not sure how to generate an ECDSA signature, given a private key and a message

落花浮王杯 提交于 2019-12-05 09:02:49
I'm following Apple's guide towards composing a CloudKit Web Services request. The bit I'm having trouble with is Step 2, under "Authenticate Web Service Requests": Compute the ECDSA signature of this message with your private key. Before getting to this point, I generated my certificate, a .pem file, which when opening it in a text editor shows me my private key, so I have that in string format too. I've also followed the steps for generating what it refers to as a message, which I now have as a string. So given that I have a private key, (or the .pem file if required), and a message as a