No I didnt pursue this further
Post
Replies
Boosts
Views
Activity
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.
Whoops, Nothing to see here.
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.
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.
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.
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
not sure what your question is. They found something in your app that wasn’t working quite right and have asked you to fix.
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.
Requesting access isn't a problem, I have ticked the box Contacts in Sandbox and access to contacts is granted. Saving the contacts is the problem. Can't save contacts on Mac Catalyst This is the error I get Thread 1: EXC_BAD_ACCESS (code=1, address=0x4c8ecba407d0)
I feel the same pain, Maybe some intelligent person has decided we can't view two previews at the same time anymore.
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.
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
I worked out why I've been getting this error with the Widget, I was trying to fetch directly from PersistenceController()
eg. let myfetchedContactCards = try persistenceController().shared.managedObjectContext.fetch(fetchRequest)
but when I changed to
let persistenceController = PersistenceController.shared
let myfetchedContactCards = try persistenceController.managedObjectContext.fetch(fetchRequest)
It worked.
Must have fully loaded the model.
I was trying to access before it had loaded?
Sorry I realise now that this is just the recently opened documents list and that's there for every app. Ignore this question