Post

Replies

Boosts

Views

Activity

Question about using camera-to-text functionality
Hi, I just saw the "Use the camera for keyboard input in your app" talk, and had a question about it's capability that wasn't covered. From what I could tell, you have to designate a particular UITextField / UITextView as the 'target' (or is it 'responder'?). If I want to parse different types of content (name, email, phone number) into different UITextFields, for e.g to fill out a form ... how would that work? I don't want the user to launch the camera 3 times, one for each text field. Or would it be best to dump the contents into a UITextView and then have it parse the contents and detect the content types? Thanks.
1
0
642
Jun ’21
Looking for a solution to replace UILocalNotifications
Hi, I am using the (deprecated) UILocalNotification class in my app right now, because it fulfills a need that the UserNotification framework doesn't fulfill even 5 years after it was introduced. In my app, users can setup 'reminders' for different tasks, and those could be one-off tasks, or repeating tasks that start from a particular date/time. The UserNotifications system doesn't work with the latter requirement; it doesn't allow for you to setup a repeating alert which starts at a specific date/time. You can either setup a one-off alert in the future, or you can setup a repeating alert which starts as soon you set it up. As an example, I want to be reminded to call a friend of mine every week, from July 10th onward ... with the UserNotification framework, setting a 'repeat' will mean it'll fire an alert every week, starting from today. So what's the best way to build a solution to this? Is there a way to 'intercept' the alert before it's shown (if it's before the date we want it to start firing)? Should I be looking at some 3rd-party services to do this remotely? Thanks!
1
0
758
Jun ’21
UserNotifications local notifications limits
Hi, With iOS15, is there still a limit for how many UserNotifications can be scheduled locally on a device? A lot of places suggest that the limit is for 64 notifications at a time, and this limit has been there since UILocalNotifications were a thing. Has that changed at all? Considering that modern devices are so much more powerful than in the past, one would imagine that they should be handle more than a few local notifications in the system. I filed a Radar for this 5 years ago, which was changed to this Feedback Request: FB5978935
1
0
2.8k
Jun ’21
macOS Monterey partition missing "SF Pro Text" font
I want to use the "SF Pro Text" font in my app. It works fine when I build my app on my main computer running macOS11 Big Sur, but I have a 2nd partition to run macOS Monterey, and it doesn't seem to be available there at all, whether through Interface Builder or through code (using NSFontManager). Using this returns nil on my Monterey partition: NSFont* regularFont = [[NSFontManager sharedFontManager] fontWithFamily:@"SF Pro Text" traits:NSFontWeightRegular weight:5 size: 16.0]; Maybe I'm missing something here ... should I have to install the font manually? I thought the SF Font is a 'system font', so it would be available on all Macs?
1
0
1.5k
Feb ’22
Installing macOS Catalina for testing
Hi, I want to install macOS Catalina on a partition on my computer's hard drive to test and fix some bugs for my Mac app. I can't seem to find a simple way to download the installer. I found a link to the Catalina page on the Mac App Store through some other website, but when I try to download it, I get an error saying "This copy of the macOS Catalina installer application is too old to be opened on this version of macOS". I've checked the Downloads page from the developer page, and it's not listed there either. What gives? Shouldn't be easier to test Mac apps on older versions? FWIW I'm trying this on a MacBook Pro 2016.
0
0
819
Oct ’21
Intents not showing up in Shortcuts app
I have an existing iOS app with shortcuts support, and I am trying to bring the same shortcuts to my Mac app in macOS Monterey. In my case, I have added the same intents definition file to my Mac target app, added "Intents eligible for in-app handling" to my Info.plust file and added the intent names, and made sure all the intent handling code is part of both iOS and Mac targets. Still, when I build and run the app on macOS Monterey, the new shortcuts don't show in the shortcut editor at all. I've tried closing and restarting the Shortcuts app, but no luck. The build logs do show the intents being built, but they're just not showing up in the Shortcuts app. I tried 'donating' one of the intents in my Mac app code, but got an error: Cannot donate interaction with intent that has no valid shortcut types Not sure what to try to make it work. Thanks.
4
0
2.2k
Dec ’24
How to add SiriKit to macOS app
Hi, I haven't been able to add some basic SiriKit actions to my macOS app in macOS Monterey. To test this out, I created a new project, made it a macOS app with Storyboard. Then I added an intents definition file, and added a basic intent, with no inputs/outputs. I added the intent name to "Supported Intents" in the target "General" configuration. Now when I build and run the app, the shortcut doesn't show up in the Apple Shortcuts app. I've tried looking for the "Siri" capability in "Signing & Capabilities" and it's not listed there (compared to a new iOS app where it would be). I'm not sure what I'm missing here. Would love some help. I'm using Xcode 13.1 on macOS Monterey RC.
1
0
870
Oct ’21
Can Intents Extensions access the container app's Application Support directory?
Hi, My Mac app saves it's local database and other important information in the Application Support directory. I want to now create an Intents extension for the app so I can create shortcut actions. When I currently run this, the Application Support directory for the extension is different than for the main application. Is there any way on macOS for the extension to access it's parent applications App Support directory? I know it's not possible in iOS, and you have to use App Groups for this, but I'm wondering about the Mac. BTW, the app is a sandboxed app for the Mac App Store.
1
0
1k
Oct ’21
macOS: Detect Link URL from WidgetKit extension
I am building a widget for my (AppKit) Mac app, and one thing I can't figure out is how to detect when a Link is pressed in the widget to open the parent app. It just opens the parent app but I can't get any information about the URL that was passed in. With iOS, it's easy to detect, from the AppDelegate method: - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation I can't find anything equivalent on macOS. Can someone point me to the right place?
1
0
860
Nov ’21
NSApplicationDelegate openURLs never called
Hi, I have an existing AppKit-based Mac app that I have been working on for a few years. For a new feature, I wanted to have the app opened by a different app, so I setup the URL scheme under CFBundleURLTypes in my Info.plist, and adopted this delegate callback:   - (void)application: (NSApplication *)application openURLs:(nonnull NSArray<NSURL *> *)urls Now when I invoke the URL from the 2nd app, it opens my app correctly, BUT this delegate method isn't called. What's interesting is that if I make a totally new app with a URL scheme and adopt this delegate method, it gets called without a problem! SO what about my original project could be responsible for this 'opensURLs' method to not be called? I've been searching for a solution for a couple of days without any luck. The macOS app's target has a Deployment Target of 10.15 and I'm running this on macOS12.0 with Xcode 13.
Topic: UI Frameworks SubTopic: AppKit Tags:
2
0
833
Feb ’25
Unable to accept "Paid Applications Agreement"
Hi, When I login to App Store connect, I get a banner message saying "Review the updated Paid Applications Schedule": In order to update your existing apps, create new in-app purchases, and submit new apps to the App Store, the user with the Legal role (Account Holder) must review and accept the Paid Applications Schedule (Schedule 2 to the Apple Developer Program License Agreement) in the Agreements, Tax, and Banking module. When I click the link, select "View and Agree Terms", and select the checkbox and select the "Agree" button to accept the terms, I get an error message: We are currently unable to process your request. Please try again later. This has been happening for the past 2 days now. What should I try to do to overcome this problem? I'll file a bug with Apple, but it takes them many days to respond to these issues usually.
16
0
5.2k
Jan ’22
MailKit: access rawData for email
Hi, I am trying to build a Mail 'action' extension, and want to access the email body and parse it for specific content. Not sure how to go about converting the 'rawData' that comes in the MEMessage into something that I can read. Here's how I access the rawData property: func decideAction(for message: MEMessage, completionHandler: @escaping (MEMessageActionDecision?) -> Void) { var action: MEMessageActionDecision? = nil      if let messageData =  message.rawData {          print("messageData = \(messageData)") // what to do here??      } else {          action = MEMessageActionDecision.invokeAgainWithBody      } return action } The documentation just says this is 'unprocessed data': The content is available after MailKit downloads the message. MailKit provides the content as unprocessed data. For details about the format of the data, see RFC 2822. But I'm not sure what I'm supposed to do to go about converting the unprocessed 'data' into something that is accessible and useful to my app. Let me know if you have any thoughts or recommendations
2
0
1.7k
Apr ’22
StoreKit2 to validate purchase of paid-app
Hi, I have a paid app in the Mac App Store, and I want to verify that the user purchased the app legitimately. Does the StoreKit2 framework have an easy way to determine this? From the documentation I've seen, I believe the 'Transaction.currentEntitlements' call will only return transactions for IAP and subscriptions. I would assume that 'Transaction.all' would work, but when I run the app (with Xcode debugger attached) I get no results. What's the best way to test this out for an app that's going to be paid-up-front?
2
0
1.2k
Mar ’22
Detecting Link tap inside WidgetKit
Hi, I am working on a widget for my existing Mac app. The problem I am running into is that when I add a Link from the widget to the main app, the method 'openURLs' isn't called at all: - (void) application: (NSApplication *)application openURLs:(NSArray<NSURL *> *)urls  So I'm not able to direct the app on how to best handle the widget tap. I'm trying to work around that by trying to detect if a Link was selected. Something like this could work Link("Test", destination: URL(string: "https://duckduckgo.com")!) .environment(\.openURL, OpenURLAction { url in print("---> testing link actioned") return .systemAction }) When I add this to the main app, it works fine. But when I add something like this to the widget, the completion handler isn't called (supposedly). Can someone confirm if this was supposed to work inside a widget? Or is it only something that works from the main app?
0
0
698
Mar ’22
Question about using camera-to-text functionality
Hi, I just saw the "Use the camera for keyboard input in your app" talk, and had a question about it's capability that wasn't covered. From what I could tell, you have to designate a particular UITextField / UITextView as the 'target' (or is it 'responder'?). If I want to parse different types of content (name, email, phone number) into different UITextFields, for e.g to fill out a form ... how would that work? I don't want the user to launch the camera 3 times, one for each text field. Or would it be best to dump the contents into a UITextView and then have it parse the contents and detect the content types? Thanks.
Replies
1
Boosts
0
Views
642
Activity
Jun ’21
Looking for a solution to replace UILocalNotifications
Hi, I am using the (deprecated) UILocalNotification class in my app right now, because it fulfills a need that the UserNotification framework doesn't fulfill even 5 years after it was introduced. In my app, users can setup 'reminders' for different tasks, and those could be one-off tasks, or repeating tasks that start from a particular date/time. The UserNotifications system doesn't work with the latter requirement; it doesn't allow for you to setup a repeating alert which starts at a specific date/time. You can either setup a one-off alert in the future, or you can setup a repeating alert which starts as soon you set it up. As an example, I want to be reminded to call a friend of mine every week, from July 10th onward ... with the UserNotification framework, setting a 'repeat' will mean it'll fire an alert every week, starting from today. So what's the best way to build a solution to this? Is there a way to 'intercept' the alert before it's shown (if it's before the date we want it to start firing)? Should I be looking at some 3rd-party services to do this remotely? Thanks!
Replies
1
Boosts
0
Views
758
Activity
Jun ’21
UserNotifications local notifications limits
Hi, With iOS15, is there still a limit for how many UserNotifications can be scheduled locally on a device? A lot of places suggest that the limit is for 64 notifications at a time, and this limit has been there since UILocalNotifications were a thing. Has that changed at all? Considering that modern devices are so much more powerful than in the past, one would imagine that they should be handle more than a few local notifications in the system. I filed a Radar for this 5 years ago, which was changed to this Feedback Request: FB5978935
Replies
1
Boosts
0
Views
2.8k
Activity
Jun ’21
Sheet controller - drag and drop
If we are presenting a sheet controller without any dimming view, would we be able to drop drag-and-drop between the sheet view and the presenting view controller (if the views themselves supported drag-and-drop)? Thanks.
Replies
1
Boosts
0
Views
696
Activity
Jun ’21
macOS Monterey partition missing "SF Pro Text" font
I want to use the "SF Pro Text" font in my app. It works fine when I build my app on my main computer running macOS11 Big Sur, but I have a 2nd partition to run macOS Monterey, and it doesn't seem to be available there at all, whether through Interface Builder or through code (using NSFontManager). Using this returns nil on my Monterey partition: NSFont* regularFont = [[NSFontManager sharedFontManager] fontWithFamily:@"SF Pro Text" traits:NSFontWeightRegular weight:5 size: 16.0]; Maybe I'm missing something here ... should I have to install the font manually? I thought the SF Font is a 'system font', so it would be available on all Macs?
Replies
1
Boosts
0
Views
1.5k
Activity
Feb ’22
Installing macOS Catalina for testing
Hi, I want to install macOS Catalina on a partition on my computer's hard drive to test and fix some bugs for my Mac app. I can't seem to find a simple way to download the installer. I found a link to the Catalina page on the Mac App Store through some other website, but when I try to download it, I get an error saying "This copy of the macOS Catalina installer application is too old to be opened on this version of macOS". I've checked the Downloads page from the developer page, and it's not listed there either. What gives? Shouldn't be easier to test Mac apps on older versions? FWIW I'm trying this on a MacBook Pro 2016.
Replies
0
Boosts
0
Views
819
Activity
Oct ’21
Intents not showing up in Shortcuts app
I have an existing iOS app with shortcuts support, and I am trying to bring the same shortcuts to my Mac app in macOS Monterey. In my case, I have added the same intents definition file to my Mac target app, added "Intents eligible for in-app handling" to my Info.plust file and added the intent names, and made sure all the intent handling code is part of both iOS and Mac targets. Still, when I build and run the app on macOS Monterey, the new shortcuts don't show in the shortcut editor at all. I've tried closing and restarting the Shortcuts app, but no luck. The build logs do show the intents being built, but they're just not showing up in the Shortcuts app. I tried 'donating' one of the intents in my Mac app code, but got an error: Cannot donate interaction with intent that has no valid shortcut types Not sure what to try to make it work. Thanks.
Replies
4
Boosts
0
Views
2.2k
Activity
Dec ’24
How to add SiriKit to macOS app
Hi, I haven't been able to add some basic SiriKit actions to my macOS app in macOS Monterey. To test this out, I created a new project, made it a macOS app with Storyboard. Then I added an intents definition file, and added a basic intent, with no inputs/outputs. I added the intent name to "Supported Intents" in the target "General" configuration. Now when I build and run the app, the shortcut doesn't show up in the Apple Shortcuts app. I've tried looking for the "Siri" capability in "Signing & Capabilities" and it's not listed there (compared to a new iOS app where it would be). I'm not sure what I'm missing here. Would love some help. I'm using Xcode 13.1 on macOS Monterey RC.
Replies
1
Boosts
0
Views
870
Activity
Oct ’21
Can Intents Extensions access the container app's Application Support directory?
Hi, My Mac app saves it's local database and other important information in the Application Support directory. I want to now create an Intents extension for the app so I can create shortcut actions. When I currently run this, the Application Support directory for the extension is different than for the main application. Is there any way on macOS for the extension to access it's parent applications App Support directory? I know it's not possible in iOS, and you have to use App Groups for this, but I'm wondering about the Mac. BTW, the app is a sandboxed app for the Mac App Store.
Replies
1
Boosts
0
Views
1k
Activity
Oct ’21
macOS: Detect Link URL from WidgetKit extension
I am building a widget for my (AppKit) Mac app, and one thing I can't figure out is how to detect when a Link is pressed in the widget to open the parent app. It just opens the parent app but I can't get any information about the URL that was passed in. With iOS, it's easy to detect, from the AppDelegate method: - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation I can't find anything equivalent on macOS. Can someone point me to the right place?
Replies
1
Boosts
0
Views
860
Activity
Nov ’21
NSApplicationDelegate openURLs never called
Hi, I have an existing AppKit-based Mac app that I have been working on for a few years. For a new feature, I wanted to have the app opened by a different app, so I setup the URL scheme under CFBundleURLTypes in my Info.plist, and adopted this delegate callback:   - (void)application: (NSApplication *)application openURLs:(nonnull NSArray<NSURL *> *)urls Now when I invoke the URL from the 2nd app, it opens my app correctly, BUT this delegate method isn't called. What's interesting is that if I make a totally new app with a URL scheme and adopt this delegate method, it gets called without a problem! SO what about my original project could be responsible for this 'opensURLs' method to not be called? I've been searching for a solution for a couple of days without any luck. The macOS app's target has a Deployment Target of 10.15 and I'm running this on macOS12.0 with Xcode 13.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
2
Boosts
0
Views
833
Activity
Feb ’25
Unable to accept "Paid Applications Agreement"
Hi, When I login to App Store connect, I get a banner message saying "Review the updated Paid Applications Schedule": In order to update your existing apps, create new in-app purchases, and submit new apps to the App Store, the user with the Legal role (Account Holder) must review and accept the Paid Applications Schedule (Schedule 2 to the Apple Developer Program License Agreement) in the Agreements, Tax, and Banking module. When I click the link, select "View and Agree Terms", and select the checkbox and select the "Agree" button to accept the terms, I get an error message: We are currently unable to process your request. Please try again later. This has been happening for the past 2 days now. What should I try to do to overcome this problem? I'll file a bug with Apple, but it takes them many days to respond to these issues usually.
Replies
16
Boosts
0
Views
5.2k
Activity
Jan ’22
MailKit: access rawData for email
Hi, I am trying to build a Mail 'action' extension, and want to access the email body and parse it for specific content. Not sure how to go about converting the 'rawData' that comes in the MEMessage into something that I can read. Here's how I access the rawData property: func decideAction(for message: MEMessage, completionHandler: @escaping (MEMessageActionDecision?) -> Void) { var action: MEMessageActionDecision? = nil      if let messageData =  message.rawData {          print("messageData = \(messageData)") // what to do here??      } else {          action = MEMessageActionDecision.invokeAgainWithBody      } return action } The documentation just says this is 'unprocessed data': The content is available after MailKit downloads the message. MailKit provides the content as unprocessed data. For details about the format of the data, see RFC 2822. But I'm not sure what I'm supposed to do to go about converting the unprocessed 'data' into something that is accessible and useful to my app. Let me know if you have any thoughts or recommendations
Replies
2
Boosts
0
Views
1.7k
Activity
Apr ’22
StoreKit2 to validate purchase of paid-app
Hi, I have a paid app in the Mac App Store, and I want to verify that the user purchased the app legitimately. Does the StoreKit2 framework have an easy way to determine this? From the documentation I've seen, I believe the 'Transaction.currentEntitlements' call will only return transactions for IAP and subscriptions. I would assume that 'Transaction.all' would work, but when I run the app (with Xcode debugger attached) I get no results. What's the best way to test this out for an app that's going to be paid-up-front?
Replies
2
Boosts
0
Views
1.2k
Activity
Mar ’22
Detecting Link tap inside WidgetKit
Hi, I am working on a widget for my existing Mac app. The problem I am running into is that when I add a Link from the widget to the main app, the method 'openURLs' isn't called at all: - (void) application: (NSApplication *)application openURLs:(NSArray<NSURL *> *)urls  So I'm not able to direct the app on how to best handle the widget tap. I'm trying to work around that by trying to detect if a Link was selected. Something like this could work Link("Test", destination: URL(string: "https://duckduckgo.com")!) .environment(\.openURL, OpenURLAction { url in print("---> testing link actioned") return .systemAction }) When I add this to the main app, it works fine. But when I add something like this to the widget, the completion handler isn't called (supposedly). Can someone confirm if this was supposed to work inside a widget? Or is it only something that works from the main app?
Replies
0
Boosts
0
Views
698
Activity
Mar ’22