Posts

Post not yet marked as solved
1 Replies
Actally never mind i think it was the way i was checking for the bool, Should have been NSPredicate(format: "boolAttribute = %d", true) Its working now.
Post not yet marked as solved
1 Replies
Whoops, Nothing to see here.
Post not yet marked as solved
1 Replies
I did have an issue recently with my certificates or something. The only way I could get it to work was to refresh the certificate by adding a new new entitlement under the 'Signing and capabilities' for my app target. Then it downloaded a new certificate, then delete the thing you just added?. If you have automatically manage signing, and you click the little I for information, it gives you the date of the certificate. Make sure the date is today.
Post marked as solved
1 Replies
I added the Entitlement to my app in the developer portal first via the instructions here -> Provisioning in Xcode with additional capabilities (https://developer.apple.com/help/account/reference/provisioning-with-managed-capabilities) I then went into Xcode and followed the instructions to add com.apple.developer.contacts.notes, Bool YES , to my app as described here -> com.apple.developer.contacts.notes(https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_contacts_notes) If the .entitlement file dose not exist in Code go to you app target, Signing and Capabilities and add something like App Groups (remove after if not required) This is also a necessary step to get Xcode to redownload a new provisioning profile. With out adding something new in Signing and Capabilities Xcode won't launch your app with the com.apple.developer.contacts.notes string in th e.plist. It just won't launch. You need to force Xcode to detect the differences between your currently issued provisioning profile and the entitlements.plist, and then request a new provisioning profile from you developer portal.
Post not yet marked as solved
2 Replies
saveRequest.add(contact, toContainerWithIdentifier: CNContactStore().defaultContainerIdentifier()) Im getting an error when trying to add a new contact on Ventura 13.0.1 (22A400) The error is 2022-12-03 09:33:54.543143+1000 **** [1941:15105] [api] Attempt to write notes by an unentitled app 2022-12-03 09:33:54.580714+1000 **** [1941:15105] [plugin] CDX_AB_GetGroupCollectionPath: nil group 2022-12-03 09:33:54.580765+1000 **** [1941:15105] [plugin] CDX_AB_GetGroupCollectionPath: nil group 2022-12-03 09:33:54.581969+1000 **** [1941:15105] [ABCDContact] An ABCDRecord is being saved without having a container assignment. Assigning the contact to <CNCDContainer 0x6000013c92c0 ab>. Please remember to assign contacts to containers to avoid recurring container lookup and contact re-validation costs. I waited weeks for notes field access as well and it hasn't seamed to fix the issue.
Post not yet marked as solved
3 Replies
My issue is CNSaveRequest no longer working in Mac Catalyst app on Ventura 13.0 (22A380), Ive created a simple Mac Catalyst App with a request to Authorise Contacts. Ive added the tick box in the Sandbox section for the app under Contacts. Added a usage description in the .Plist of 'Privacy - Contacts' When creating a new contact using the instructions at https://developer.apple.com/documentation/contacts On Mac Ventura the app just crashes at the execute save request -> Error I get is 2022-10-27 08:22:48.718228+1000 [api] Attempt to write notes by a pre-Fall-2022 app 2022-10-27 08:22:48.755086+1000 [plugin] CDX_AB_GetGroupCollectionPath: nil group 2022-10-27 08:22:48.755139+1000 [plugin] CDX_AB_GetGroupCollectionPath: nil group 2022-10-27 08:22:48.756550+1000 [ABCDContact] An ABCDRecord is being saved without having a container assignment. Assigning the contact to <CNCDContainer 0x60000133a7c0 ab>. Please remember to assign contacts to containers to avoid recurring container lookup and contact re-validation costs. Thread 1: EXC_BAD_ACCESS (code=1, address=0x49f330ba4290) I created a simple project showing this error and filed a feedback request with the sample project to apple FB11721907
Post not yet marked as solved
5 Replies
I have the same issue. CNSaveRequest no longer working in Mac Catalyst app on Ventura 13.0 (22A380) https://stackoverflow.com/questions/74215842/cnsaverequest-no-longer-working-in-mac-catalyst-app-on-ventura-13-0-22a380 i filed a feedback with Apple after creating a sample project showing the error. On Mac Ventura the app just crashes at the execute save request -> Error I get is Thread 1: EXC_BAD_ACCESS (code=1, address=0x49f330ba4290) I created a simple project showing this error and filed a feedback request with the sample project to apple FB11721907 CNSaveRequest failing on Ventura 13.0 (22A380) Any help would be appreciated because my Mac Catalyst app is in the App Store and if the user updates to Ventura the app just crashes. Thank you.
Post not yet marked as solved
5 Replies
I feel the same pain, Maybe some intelligent person has decided we can't view two previews at the same time anymore.
Post not yet marked as solved
5 Replies
I am having a lot of trouble with this. My idea was going to be to put a switch in the setting page of my app so user can choose if they want sensitive information redacted or not. Some people may want to hide their appointment on the Lock Screen, others may not. redacted(reason: .placeholder) works fine. but the .privacy reason docent seam to work. If I add the capability to the target 'Data Protection' every thing on the widget gets redacted, unless I mark elements with .unredacted() But to have to do that for everything is too difficult. My thinking around how it worked was to add the modifier, redacted(reason: .privacy) to an element like a Text view or an image and if the device is locked that will be redacted. I must not have the same thinking as Apple on this process.
Post not yet marked as solved
3 Replies
Resize the image to width of 50 using this extension extension UIImage { func resized(toWidth width: CGFloat? = 50.0, isOpaque: Bool = true) -> UIImage { let canvas = CGSize(width: width ?? 50.0, height: CGFloat(ceil((width ?? 50.0)/size.width * size.height))) let format = imageRendererFormat format.opaque = isOpaque return UIGraphicsImageRenderer(size: canvas, format: format).image { _ in draw(in: CGRect(origin: .zero, size: canvas)) } } } to use UIImage.resized then the widget should load
Post not yet marked as solved
1 Replies
Nevermind I just renamed the icon from AA_appIcon83.5@2x~iPad.png to AA_appIcon@3x~ipad.png and the error went away and the icon picker still works from within the app.
Post not yet marked as solved
3 Replies
I could never figure out yet why I can't fetch from The intent file, the fetch error catch bit gets called because I put a dummy entry in there that would display on an error. the app group share file approach I put in the comments is the best solution I've found so far, and just an update, after deleting the Derived Data file from the Mac the widget is working on the Mac now so I'm happy with that.
Post not yet marked as solved
3 Replies
I have the same issue, I can not fetch from the IntentHandler.swift so in my App I created an array of values when the appp opens and closes that saves some values to an array in the app group, let defaults = UserDefaults.init(suiteName: "group.my-app")! defaults.setValue(CoreDataStack.createArrayOfContactsForWidget(), forKey: "ContactsForWidgetIntent") static func createArrayOfContactsForWidget() - [String] {         var arrayOfContactIDsAndNames = [String] ()         let fetchRequest = NSFetchRequestUser()         let entity = User.entity()         fetchRequest.entity = entity         fetchRequest.predicate = NSPredicate(format: "isVisible = %@", "1")         do {             var users = try CoreDataStack.managedObjectContext!.fetch(fetchRequest)             users.sort(by: { $0.first_name $1.first_name })             for user in users {                 //To get an array of currently added users                 arrayOfContactIDsAndNames.append("\(user.contactID)|\(Helper.getUserFullName(user: user))")             }         } catch {print(error)}         return arrayOfContactIDsAndNames     } Then in the intent I pull that contact ID and the name to display and it works fine on iPhone but not on Mac. ... contactIDsArray = defaults.value(forKey: "ContactsForWidgetIntent") as! [String]     for user in contactIDsArray {         let values = user.components(separatedBy: "|")         let contactID = values[0]         let name = values[1]         let personIntentObject = Person(identifier: "\(contactID)", display: "\(name)")         userItems.append(personIntentObject)     }     completion(INObjectCollection(items: userItems), nil) Not sure why but its working on iPhone. On Mac I get an error that there are No options provided for this parameter
Post not yet marked as solved
10 Replies
I am creating a widget that has configurable content and I'm getting this error on the Mac OS when running the WidgetExtension in the Mac WidgetKit Simulator The operation could not be completed. (CHSErrorDomain error 1101.) I must be missing something somewhere, all my other widgets are working fine, but with the dynamic widget where the user can edit the widget in the swift file I'm always getting warnings that appear then disappear about Cannot find type 'DynamicPersonSelectionIntent' in scope When I build it goes away. I have added DynamicPersonSelection.intentdefinition, I have an IntentHandler.swift with an IntentHandler: DynamicPersonSelectionIntentHandling.in the Target Intent handler I have added the supported Intent, In the framework section is the Intents.framework. I have check all the Tagret memberships I think. The widget works sometimes? on the iPhone but not on the Mac at all. I must be missing something. Please help if you can.
Post not yet marked as solved
8 Replies
I didn’t know I had to do anything on the developer CloudKit dashboard. After putting my app in the store and CloudKit not working I found this, went to the CloudKit dashboard, cleaned up the ‘Schema’ for the iCloud container I wanted to use, then chose the cog, deploy schema to production and its working.