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 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
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