Post

Replies

Boosts

Views

Activity

Universal Purchase Questions (Mac and iOS)
I have a bunch of questions about universal purchases between iOS and Mac. I'm hoping I can get answers to these soon—or at least before March—but so far I don't think Apple has shared enough information to answer these definitively. I thought I'd ask them here anyway in case anyone can help.Will universal purchase have any OS requirements?As far as I can tell most of it will happen server side—all the appropriate info should just appear in the receipt like it normally would, and there aren't any changes to the receipt format or StoreKit. The only reason I can think of for an OS requirement would be if the App Store needs to be a particular version just to be able to download the app in the first place. Regardless, this seems like an incredibly important question to have answered before I can decide whether supporting universal purchase is an option.What does that mean for existing apps?Apple has made it clear the apps will need to have the same bundle ID. In my case I have an iOS app with the bundle ID com.company.AppName and a Mac app with the bundle ID com.company.mac.AppName. If I want to use universal purchase in the future, I'll change the bundle ID of the Mac app. Does that mean I'll effectively have two completely separate Mac apps? I'm assuming that my Mac users will have to re-download the app—it won't update automatically due to the new bundle ID. I'm also assuming that the receipts will be separate—the app with the new bundle ID wouldn't show any record of purchases tied to the old bundle ID. Is that correct? From what I gather this is how it has worked with iOS/tvOS universal purchases, so I think my assumptions are correct.Are there any concerns related to different App ID Prefixes?I doubt this will be a concern for most developers, but my iOS app is old enough that it has a unique App ID Prefix that is not the same as the Team ID. When I released my Mac app, the only option was to use my Team ID. Is there anything I need to watch out for if I switch the Mac app to use the same bundle ID as my iOS app? From what I can tell, using the same bundle ID means my Mac app will now have the same App ID Prefix as my iOS app. This has an effect on keychain access groups of course. Do I need to look out for anything else?
10
0
4.2k
Feb ’20
How can I use conditional code for a new OS version while building with the current SDK?
While iOS 14 and macOS Big Sur 11 are in public beta, I'd like to add some conditional code to work around significant issues. I'm still building my app with the current SDKs because I plan to release updates before the fall, when the new OS versions are released. Some time back, the recommended way to handle this in Objective-C was to check if a class existed before using it: if (NSClassFromString(@"UINewClassName")) Or you could check if a class had been added to an existing method: if ([object respondsToSelector:@selector(newMethodName:)]) { Then at some point we got #available in Swift and @available in Objective-C, which is now the recommended way to handle this: if #available(iOS 14, *) if (@available(iOS 14.0, *)) This works great if you are building your app with the iOS 14 SDK, but from what I can tell the condition is simply ignored if you are building with an older SDK, at least in Swift. I could go back the old NSClassFromString or respondsToSelector: approach, but I would prefer to handle this in Swift if it's possible. I also have some cases where there's not really a new class or method to check for—it's just new behavior I want to accommodate. What's the best way to handle these cases?
3
0
6.9k
Jul ’20