Post

Replies

Boosts

Views

Activity

Reply to NSApplication's openURLs delegate method not getting called
Soon after typing this out, I found the culprit! The Mac app was using the Dropbox v2 SDK, which requires the app to register for Apple 'events', using this: [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self                                                        andSelector:@selector(handleAppleEvent:withReplyEvent:)                                                      forEventClass:kInternetEventClass                                                         andEventID:kAEGetURL]; With this handler in place, the actual NSApplication "application openURLs" method doesn't get called. Removing this 'event handler' gets it working again (or can handler the event in this 'handleAppleEvent' method, like this: - (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent {     NSURL *url = [NSURL URLWithString:[[event paramDescriptorForKeyword:keyDirectObject] stringValue]]; } Just putting it out there in case someone is stuck on this in the future.
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’22
Reply to StoreKit2 to validate purchase of paid-app
This is what the documentation says about Transaction.all: This sequence returns the user’s transaction history current to the moment you access the sequence. The sequence emits a finite number of transactions. If the App Store processes new transactions for the user while you’re accessing this sequence, the new transactions appear in the transaction listener, updates. The transaction history doesn’t include finished consumable products or finished non-renewing subscriptions, repurchased non-consumable products or subscriptions, or restored purchases. Even after reading this, I'm not 100% sure if paid apps transactions should show up in the transaction history or not.
Topic: App & System Services SubTopic: StoreKit Tags:
Mar ’22
Reply to macOS: Detect Link URL from WidgetKit extension
Ok, so it seems like the the right delegate method is: - (void)application: (NSApplication *)application openURLs:(nonnull NSArray<NSURL *> *)urls But unfortunately this doesn't get called at all. The 'Link' from the widget will open the app, but not call this method, so I can't figure out which URL was tapped. I have configured the Info.plist to the link URL in CFBundleURLTypes as well.
Topic: UI Frameworks SubTopic: AppKit Tags:
Nov ’21
Reply to Intents not showing up in Shortcuts app
So far, I've downloaded the SoupChef example and it works fine ... though it's a Catalyst app, so different than what I'm doing. And now I tried to create an Intents Extension to try that out, and I can't get past provisioning profile issues. Even set to "automatic provisioning" (like the main app target is), it complains with this error: Provisioning profile "Mac Team Provisioning Profile: com.test.MacSiriExtension" doesn't include the aps-environment and com.apple.developer.siri entitlements. When I look in the Xcode target "Signing & Capabilities" tab, it doesn't really list any option for adding "Siri" like it does in the iOS app target. This is using Xcode 13.1, running on macOS Monterey RC. I've checked both the app target and the extension target. I've also gone to the developer portal, and in the app's Identifier, manually added "SiriKit" to the target (though the popup says "Platform Support: tvOS, iOS, watchOS") and doesn't list macOS here. Could it be that manually adding SiriKit to a Mac app isn't possible right now?
Oct ’21
Reply to NSApplication's openURLs delegate method not getting called
Soon after typing this out, I found the culprit! The Mac app was using the Dropbox v2 SDK, which requires the app to register for Apple 'events', using this: [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self                                                        andSelector:@selector(handleAppleEvent:withReplyEvent:)                                                      forEventClass:kInternetEventClass                                                         andEventID:kAEGetURL]; With this handler in place, the actual NSApplication "application openURLs" method doesn't get called. Removing this 'event handler' gets it working again (or can handler the event in this 'handleAppleEvent' method, like this: - (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent {     NSURL *url = [NSURL URLWithString:[[event paramDescriptorForKeyword:keyDirectObject] stringValue]]; } Just putting it out there in case someone is stuck on this in the future.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to StoreKit2 to validate purchase of paid-app
Would love some clarification / confirmation about this.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to StoreKit2 to validate purchase of paid-app
This is what the documentation says about Transaction.all: This sequence returns the user’s transaction history current to the moment you access the sequence. The sequence emits a finite number of transactions. If the App Store processes new transactions for the user while you’re accessing this sequence, the new transactions appear in the transaction listener, updates. The transaction history doesn’t include finished consumable products or finished non-renewing subscriptions, repurchased non-consumable products or subscriptions, or restored purchases. Even after reading this, I'm not 100% sure if paid apps transactions should show up in the transaction history or not.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to macOS: Detect Link URL from WidgetKit extension
Ok, so it seems like the the right delegate method is: - (void)application: (NSApplication *)application openURLs:(nonnull NSArray<NSURL *> *)urls But unfortunately this doesn't get called at all. The 'Link' from the widget will open the app, but not call this method, so I can't figure out which URL was tapped. I have configured the Info.plist to the link URL in CFBundleURLTypes as well.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to How to add SiriKit to macOS app
I created a new Feedback with a sample project: FB9716011
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Intents not showing up in Shortcuts app
So far, I've downloaded the SoupChef example and it works fine ... though it's a Catalyst app, so different than what I'm doing. And now I tried to create an Intents Extension to try that out, and I can't get past provisioning profile issues. Even set to "automatic provisioning" (like the main app target is), it complains with this error: Provisioning profile "Mac Team Provisioning Profile: com.test.MacSiriExtension" doesn't include the aps-environment and com.apple.developer.siri entitlements. When I look in the Xcode target "Signing & Capabilities" tab, it doesn't really list any option for adding "Siri" like it does in the iOS app target. This is using Xcode 13.1, running on macOS Monterey RC. I've checked both the app target and the extension target. I've also gone to the developer portal, and in the app's Identifier, manually added "SiriKit" to the target (though the popup says "Platform Support: tvOS, iOS, watchOS") and doesn't list macOS here. Could it be that manually adding SiriKit to a Mac app isn't possible right now?
Replies
Boosts
Views
Activity
Oct ’21
Reply to Intents not showing up in Shortcuts app
I tried creating a new intents definition file, and added a basic "get" intent with no input parameters. Now I can "donate" the new intent successfully through the app, but it still won't show up in the Shortcuts app. I have also added this new intent to the "Intents eligible for in-app handling" item in my Info.plist file. Still confused.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Can I use the Apple San Francisco Font?
Hi Doug, Wondering if you can follow up here ... does the same apply for Mac apps? Can they use SF fonts directly, for a (paid) Mac app? Thanks.
Replies
Boosts
Views
Activity
Oct ’21