Post

Replies

Boosts

Views

Activity

Reply to Fetch data from WatchOS CoreData for WatchOS 9 widget with an App Group
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?
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’22
Reply to Can't Load Image on Apple Watch Complications with New iOS 16 Widget
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
Topic: App & System Services SubTopic: General Tags:
Sep ’22
Reply to Privacy redaction not working in iOS16 beta widget
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.
Topic: App & System Services SubTopic: General Tags:
Sep ’22
Reply to Adding Contact to Device Contacts app crashing in macOS ventura
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.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’22
Reply to CNSaveRequest without having a container assignment
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
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’22
Reply to Has anyone figured out how to create a CNContainer in an iOS device?
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.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to Adding or using Note Field Access Entitlement
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.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to Fail to upload to App Store - Invalid Provisioning Profile
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.
Jan ’23
Reply to ITMS-90892: Missing recommended icon error from Apple App Store
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Xcode Mac Catalyst Share Extension import problem
Sorry I realise now that this is just the recently opened documents list and that's there for every app. Ignore this question
Replies
Boosts
Views
Activity
Sep ’21
Reply to Fetch data from WatchOS CoreData for WatchOS 9 widget with an App Group
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?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Can't Load Image on Apple Watch Complications with New iOS 16 Widget
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
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Privacy redaction not working in iOS16 beta widget
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.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Xcode 14 Previews: Groups on the same page?
I feel the same pain, Maybe some intelligent person has decided we can't view two previews at the same time anymore.
Replies
Boosts
Views
Activity
Oct ’22
Reply to XCODE requesting access to save new contact Mac Catalyst
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)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to Adding Contact to Device Contacts app crashing in macOS ventura
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.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to Please provide information on how these features were intended to work
not sure what your question is. They found something in your app that wasn’t working quite right and have asked you to fix.
Replies
Boosts
Views
Activity
Oct ’22
Reply to CNSaveRequest without having a container assignment
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
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to Has anyone figured out how to create a CNContainer in an iOS device?
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Adding or using Note Field Access Entitlement
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Fail to upload to App Store - Invalid Provisioning Profile
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.
Replies
Boosts
Views
Activity
Jan ’23
Reply to Remove old app version from store
Whoops, Nothing to see here.
Replies
Boosts
Views
Activity
Feb ’23
Reply to Swift CoreData view won't refresh If I have a predicate filter
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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23