Post

Replies

Boosts

Views

Activity

Fetch data from WatchOS CoreData for WatchOS 9 widget with an App Group
Ive added App Group entitlements to my Watch target and Watch Widget target to hopefully create a container both the CoreData for the Watch app and the Widget can draw from. I put the CoreData object in there for hopefully both the Watch App and WatchOS 9 widget to access. let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.my-company.my-app")! let storeURL = containerURL.appendingPathComponent("DataModel.sqlite") let description = NSPersistentStoreDescription(url: storeURL) let container = NSPersistentContainer(name: "DataModel") container.persistentStoreDescriptions = [description] container.loadPersistentStores { ... } Following posts in StackExchange Its been working for iOS App and Widget. It works wonderfully for iOS apps and their widgets. Would this be identical for WatchOS apps and Widgets? However when I use the same implementation for WatchOS and Watch widgets it fails to fetch the data giving an error : WidgetsExtension[75018:10584043] [error] error: No NSEntityDescriptions in any model claim the NSManagedObject subclass 'MyContactCard' so +entity is confused.  Have you loaded your NSManagedObjectModel yet ? 'executeFetchRequest:error: A fetch request must have an entity.' The exact same widget files works on iOS. EDIT: IT STARTED WORKING after I posted this. My have just been an error with the Core data models or something. Just leave this here so others can know that it does work same as iOS widgets
1
0
1.1k
Sep ’22
redacted(reason: .privacy) not working as expected
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 when I add it to an element. 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.
2
0
1.7k
Sep ’22
Minimum deployments XCODE 14.0.1 (14A400)
hello, Im struggling with the Minimum deployments section in Xcode 14 for the Target of my iOS and Mac Catalyst app. Its a bit different from what I'm used, previously I could look at the values in a drop down box. That values I would like to set are iOS 12.4 and MacOS 11.0. What is macOS 14.2 ? it that a catalyst number, What macOS is that? Nevermind I found this - macCatalyst 13.0 = macOS 10.15 macCatalyst 13.4 = macOS 10.15.4 macCatalyst 14.0 = macOS 11.0 macCatalyst 14.7 = macOS 11.6 macCatalyst 15.0 = macOS 12.0 macCatalyst 15.3 = macOS 12.2 and 12.2.1 macCatalyst 15.4 = macOS 12.3 macCatalyst 15.5 = macOS 12.4 macCatalyst 15.6 = macOS 12.5 How do I delete a question?
1
0
1.7k
Dec ’23
XCODE requesting access to save new contact Mac Catalyst
Im having trouble requesting access to save a new contact as of today with updating to Ventura 13.0 (22A380). Im requesting access to contacts using @IBAction func requestConactsAccess() {         CNContactStore().requestAccess(for: .contacts) { granted, error in             if granted {                 // Yes                 print("Granted")                 self.authStatusLabel.text = "Granted"             } else {                 // No                 print("Denied")                 self.authStatusLabel.text = "denied"             }         }     } But it is just being automatically denied. I can't save a contact either with an app that previously had permission. I created a small app to test this from scratch using the documentation "Working with the user’s contacts" https://developer.apple.com/documentation/contacts?language=objc I have been doing this since the first version of the app, Ive never had an issue Has something changed with regards to Requesting access to contacts in latest OS? https://developer.apple.com/documentation/contacts/requesting_authorization_to_access_contacts Thank you.
2
0
1.1k
Nov ’22
App submission rejected - Does your app include any Siri Shortcuts features?
Hello, App review team rejected my app update under guideline 2.1 - Information needed. Asking me : " To help us proceed with the review of your app, please provide detailed information to the following questions. The more information you can provide upfront, the sooner we can complete your review. – Does your app include any Siri Shortcuts features? – If so, where can we locate Siri Shortcuts in your app? " Ive replied letting them where to find the Siri shortcut in my app. Has anyone else been asked this question? Sometimes it feel like they reject my app for the weirdest reasons. It would be nice if they had a yellow icon for an Enquiry, Getting the RED REJECTED letter in the email makes my heart stop.
1
0
1.7k
Mar ’23
Swift CoreData view won't refresh If I have a predicate filter
Hello, Im using a coredata to populate a list. When I add a new object the list dissent update until close the app and open it again. But this only started happening after I started using a predicate in the fetch request, Taking the Predicate out makes it work again. I tried everything else. This is the only thing that is causing it. Has anyone else experienced this? @FetchRequest( sortDescriptors: [NSSortDescriptor(key: "sobrietyDate_month", ascending: true),NSSortDescriptor(key: "sobrietyDate_day", ascending: true),NSSortDescriptor(key: "first_name", ascending: true)], predicate: NSPredicate(format: "isVisible == %@", "1") ) var allContacts: FetchedResults<User> if I take the predicate out it starts updating again. I tried this with Apple standard out of the box CoreData project, by adding a new object to core data as a bool then @FetchRequest(         sortDescriptors: [NSSortDescriptor(keyPath: \Item.timestamp, ascending: true)],         predicate: NSPredicate(format: "isVisible == %@", "1"),         animation: .default)     private var items: FetchedResults<Item> Same thing happens, Won't update live until the app is closed. Any ideas Thanks
1
0
786
Mar ’23
Turn on focus (mindfulness) when using my app
Hello, Ive had some feedback from a customer asking that when he uses my app to start the mindfulness focus. Ive tried this on iPhone and setup the mindfulness focus to start when my app is open and that works fine, however this is not mirrored on my Apple Watch where the app is used. Upon opening the Apple Watch app the focus does not turn on. How can I get this working? Thank you.
0
0
808
Jun ’23
Animation not showing on WatchOS 10.1
Ive got a little animation on the first screen on my watchOS app, but in watchOS 10.1 it's not showing up. It docent work. I can't use the simulator to find out why because I haven't got watchOS 10.1 simulator. - here is the code that works on watch OS 10 func updatCurrentProgress() { print("updatCurrentProgress") withAnimation(.interpolatingSpring(duration: 1.2, bounce: 0.0, initialVelocity: 0.0).delay(0.5)) { currentProgress = tiyowehSession.currentDayGoalComplete } completion: { if customGoalValue > 0 && UserDefaults.standard.double(forKey: "currentDayGoalComplete") < 1.0 && tiyowehSession.currentDayGoalComplete >= 1.0 { WKInterfaceDevice.current().play(.notification) print("playing .success)") goalProgressViewOpasity = 0.0 goalCompleteTickOpasity = 1.0 withAnimation(.easeOut(duration: 2.0).delay(1.2)) { goalCompleteTickOpasity = 0.0 goalProgressViewOpasity = 1.0 } } UserDefaults.standard.set(currentProgress, forKey: "currentDayGoalComplete") } } . The sound plays correctly "WKInterfaceDevice.current().play(.notification)" but the opacity docent change like it used to.
0
0
530
Oct ’23
Fetch data from WatchOS CoreData for WatchOS 9 widget with an App Group
Ive added App Group entitlements to my Watch target and Watch Widget target to hopefully create a container both the CoreData for the Watch app and the Widget can draw from. I put the CoreData object in there for hopefully both the Watch App and WatchOS 9 widget to access. let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.my-company.my-app")! let storeURL = containerURL.appendingPathComponent("DataModel.sqlite") let description = NSPersistentStoreDescription(url: storeURL) let container = NSPersistentContainer(name: "DataModel") container.persistentStoreDescriptions = [description] container.loadPersistentStores { ... } Following posts in StackExchange Its been working for iOS App and Widget. It works wonderfully for iOS apps and their widgets. Would this be identical for WatchOS apps and Widgets? However when I use the same implementation for WatchOS and Watch widgets it fails to fetch the data giving an error : WidgetsExtension[75018:10584043] [error] error: No NSEntityDescriptions in any model claim the NSManagedObject subclass 'MyContactCard' so +entity is confused.  Have you loaded your NSManagedObjectModel yet ? 'executeFetchRequest:error: A fetch request must have an entity.' The exact same widget files works on iOS. EDIT: IT STARTED WORKING after I posted this. My have just been an error with the Core data models or something. Just leave this here so others can know that it does work same as iOS widgets
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’22
redacted(reason: .privacy) not working as expected
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 when I add it to an element. 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.
Replies
2
Boosts
0
Views
1.7k
Activity
Sep ’22
Minimum deployments XCODE 14.0.1 (14A400)
hello, Im struggling with the Minimum deployments section in Xcode 14 for the Target of my iOS and Mac Catalyst app. Its a bit different from what I'm used, previously I could look at the values in a drop down box. That values I would like to set are iOS 12.4 and MacOS 11.0. What is macOS 14.2 ? it that a catalyst number, What macOS is that? Nevermind I found this - macCatalyst 13.0 = macOS 10.15 macCatalyst 13.4 = macOS 10.15.4 macCatalyst 14.0 = macOS 11.0 macCatalyst 14.7 = macOS 11.6 macCatalyst 15.0 = macOS 12.0 macCatalyst 15.3 = macOS 12.2 and 12.2.1 macCatalyst 15.4 = macOS 12.3 macCatalyst 15.5 = macOS 12.4 macCatalyst 15.6 = macOS 12.5 How do I delete a question?
Replies
1
Boosts
0
Views
1.7k
Activity
Dec ’23
XCODE requesting access to save new contact Mac Catalyst
Im having trouble requesting access to save a new contact as of today with updating to Ventura 13.0 (22A380). Im requesting access to contacts using @IBAction func requestConactsAccess() {         CNContactStore().requestAccess(for: .contacts) { granted, error in             if granted {                 // Yes                 print("Granted")                 self.authStatusLabel.text = "Granted"             } else {                 // No                 print("Denied")                 self.authStatusLabel.text = "denied"             }         }     } But it is just being automatically denied. I can't save a contact either with an app that previously had permission. I created a small app to test this from scratch using the documentation "Working with the user’s contacts" https://developer.apple.com/documentation/contacts?language=objc I have been doing this since the first version of the app, Ive never had an issue Has something changed with regards to Requesting access to contacts in latest OS? https://developer.apple.com/documentation/contacts/requesting_authorization_to_access_contacts Thank you.
Replies
2
Boosts
0
Views
1.1k
Activity
Nov ’22
App submission rejected - Does your app include any Siri Shortcuts features?
Hello, App review team rejected my app update under guideline 2.1 - Information needed. Asking me : " To help us proceed with the review of your app, please provide detailed information to the following questions. The more information you can provide upfront, the sooner we can complete your review. – Does your app include any Siri Shortcuts features? – If so, where can we locate Siri Shortcuts in your app? " Ive replied letting them where to find the Siri shortcut in my app. Has anyone else been asked this question? Sometimes it feel like they reject my app for the weirdest reasons. It would be nice if they had a yellow icon for an Enquiry, Getting the RED REJECTED letter in the email makes my heart stop.
Replies
1
Boosts
0
Views
1.7k
Activity
Mar ’23
Swift CoreData view won't refresh If I have a predicate filter
Hello, Im using a coredata to populate a list. When I add a new object the list dissent update until close the app and open it again. But this only started happening after I started using a predicate in the fetch request, Taking the Predicate out makes it work again. I tried everything else. This is the only thing that is causing it. Has anyone else experienced this? @FetchRequest( sortDescriptors: [NSSortDescriptor(key: "sobrietyDate_month", ascending: true),NSSortDescriptor(key: "sobrietyDate_day", ascending: true),NSSortDescriptor(key: "first_name", ascending: true)], predicate: NSPredicate(format: "isVisible == %@", "1") ) var allContacts: FetchedResults<User> if I take the predicate out it starts updating again. I tried this with Apple standard out of the box CoreData project, by adding a new object to core data as a bool then @FetchRequest(         sortDescriptors: [NSSortDescriptor(keyPath: \Item.timestamp, ascending: true)],         predicate: NSPredicate(format: "isVisible == %@", "1"),         animation: .default)     private var items: FetchedResults<Item> Same thing happens, Won't update live until the app is closed. Any ideas Thanks
Replies
1
Boosts
0
Views
786
Activity
Mar ’23
Turn on focus (mindfulness) when using my app
Hello, Ive had some feedback from a customer asking that when he uses my app to start the mindfulness focus. Ive tried this on iPhone and setup the mindfulness focus to start when my app is open and that works fine, however this is not mirrored on my Apple Watch where the app is used. Upon opening the Apple Watch app the focus does not turn on. How can I get this working? Thank you.
Replies
0
Boosts
0
Views
808
Activity
Jun ’23
Animation not showing on WatchOS 10.1
Ive got a little animation on the first screen on my watchOS app, but in watchOS 10.1 it's not showing up. It docent work. I can't use the simulator to find out why because I haven't got watchOS 10.1 simulator. - here is the code that works on watch OS 10 func updatCurrentProgress() { print("updatCurrentProgress") withAnimation(.interpolatingSpring(duration: 1.2, bounce: 0.0, initialVelocity: 0.0).delay(0.5)) { currentProgress = tiyowehSession.currentDayGoalComplete } completion: { if customGoalValue > 0 && UserDefaults.standard.double(forKey: "currentDayGoalComplete") < 1.0 && tiyowehSession.currentDayGoalComplete >= 1.0 { WKInterfaceDevice.current().play(.notification) print("playing .success)") goalProgressViewOpasity = 0.0 goalCompleteTickOpasity = 1.0 withAnimation(.easeOut(duration: 2.0).delay(1.2)) { goalCompleteTickOpasity = 0.0 goalProgressViewOpasity = 1.0 } } UserDefaults.standard.set(currentProgress, forKey: "currentDayGoalComplete") } } . The sound plays correctly "WKInterfaceDevice.current().play(.notification)" but the opacity docent change like it used to.
Replies
0
Boosts
0
Views
530
Activity
Oct ’23