Unlocking Developer ID version of app if Mac App Store version is present on system - macos

I'm currently working on sandboxing some of my applications and it looks like I'll have to get rid of a few features just to satisfy the Mac App Store sandboxing (and other) rules.
Obviously users won't be happy about losing features and I fear they won't blame Apple for making stupid rules and we developers will have to bear the brunt of the anger.
In this vein, I'm thinking about building a system that means that if a user buys the Mac App Store version, s/he'll get the "normal" distribution version for free.
Since I have no idea what the email of the people buying my apps on the Mac App Store is and I don't want to have to handle such cases "by hand", I'd like to find a way of doing so automatically.
I've been thinking about just looking on the hard disk, finding an installed version of the program from the Mac App Store and then unlock the "distribution" version as well.
I'm just not certain whether this doesn't break Mac App Store rules..
is looking for the MAS receipt okay in terms of the MAS rules?
can I verify the MAS receipt using the same mechanism as is embedded in the MAS version of my program?
Is anybody else thinking along these lines?
Best regards,
Frank

I do something like this to enable Mac App Store customers to easily beta test new versions of my app downloaded from my website while still enforcing licensing. Upon startup of the MAS version of my app, I copy its receipt into /Library/Application Support/MyAppName/. Beta versions of the non-MAS version of my app include the same receipt validation code as the MAS version. They look for a receipt in the App Support folder, and validate it, running in licensed-mode if the receipt is valid.
I've been doing this since shortly after the launch of the Mac App Store, as have other developers with no problem. What you describe should be just fine.

Related

Distributing Mac App via Mac App Store and Own Website

I want to distribute my Mac App on both Mac App Store and my own website. The Mac App Store app will be signed via the Mac App Distribution certificate from Apple and the Website version will be signed via the Developer ID Application certificate. The website version will be distributed as a simple MyAppName.zip file that lets the user unpack MyAppName.app to where ever the user wishes. My app is a document based app that creates documents with extension .mydoc
I have two options to implement such a scenario.
First, and my preferred method is to have same bundle identifier for both apps. If a user tries to install from MAS first and then website; Will both apps live on my Mac without any issues? If a user installs the website version first, and then tries to install from MAS, how will MAS behave? How is it decided that which app will open my document by default?
Second, I use different bundle identifier for the apps on MAS and my website. Essentially they are different apps and I don't like this because it is confusing for a user because the apps look and behave exactly the same. In this case, how is it decided which one of the apps will open my document by default?
If a user tries to install from MAS first and then website; Will both apps live on my Mac without any issues? Answer: YES
If a user installs the website version first, and then tries to install from MAS, how will MAS behave? Answer: MAS will ask user that there already exists a version and if it should be kept.
How is it decided that which app will open my document by default? Answer:
Launch Services documentation says the the behavior is not determinate. So either one will open.
Second, I use different bundle identifier for the apps on MAS and my website. Essentially they are different apps and I don't like this because it is confusing for a user because the apps look and behave exactly the same. In this case, how is it decided which one of the apps will open my document by default? Answer:
Launch Services documentation says the the behavior is not determinate. So either one will open.

Distribute App Outside the Mac App Store

I'm a newbie in OSX Development. I built an application in which will be distributed outside the Mac App Store. I have all the other certificates and keys working except for the Developer ID (App and Installer) for production.
I know that this may sound stupid, but for what it's worth, I just wanna make sure.
Will my app still be considered Developer ID - signed if I exported it as a Mac Installer Package instead of selecting Export Developer ID-signed Application, when I install it to its destination devices? Will it be successfully installed or be rejected with GateKeeper-enabled devices?
I have been scratching my head for this since for some weird reason, I cannot add a new Distribution Developer-ID from the Dev Center. I was able to add a Developer ID earlier this week however, I ran into some issues with my private keys. As per suggested by Apple and many other developers, I revoked all the Developer IDs and private keys to start fresh. The problem now is that I can't add any new Developer ID (Distribution). I cannot add in both Dev Center and by requesting through Xcode 5.0.1. I'm stuck.
I have submitted a Bug Report to Apple, but who knows when they'll be able to resolve it.
So now, temporarily, since I don't have any choice (I guess), I'll use the Mac Installer Package, but the question is, will it work?
Any help would be very, very much appreciated.
I've done this recently and have created a third Xcode project configuration to Debug and Release called Archive, which is a copy of Release except the app is signed using the Mac App Distribution / Third Party Mac App Developer and, confusingly there is a third name used for this same certificate.
I then changed the Archive scheme to use the Archive configuration to build.
Before doing this I had errors on some Macs when signing with my Developer ID, in some cases they claimed the app was corrupted, and in other cases I got gatekeeper blocking the app, forcing me to override it in System Preferences > Security & Privacy.
I personally use xcodebuild (from Jenkins) to build the app for distribution to testers, which I package in a .dmg so they only need to drag it to /Applications or ~/Applications and I do all that using a script within the Jenkins configuration. Your experience may differ to mine if you are using the Xcode app instead.

Bypass Gatekeeper in Mac OS X Apps without a Mac Developer Membership

Scenario
I want to release an app for Mac OS X, but not on the AppStore. The app runs on 10.6 - 10.8 and up.
Problem
Apple requires all apps for Mac OS X 10.8+ to be signed by the developer to get past Gatekeeper. And unless I tell each user to temporarily disable and re-enable gatekeeper just for my app, according to this document and the Mountain Lion change log... my app won't be allowed to run.
From the wording on Apple's website, it sounds like I'll have to pay the $99.00 a year for the certificate. However, I do not want to pay the $99 - I'm not publishing to the AppStore!
Question
Is there any way I can get around paying the $99 for distribution on 10.8+? I know my app will work on 10.6 and 10.7, but according to Apple it won't be allowed to run on 10.8 without the certificate. Is that true? How can I distribute on 10.8+ (preferably a DMG) without a $99 distribution certificate? Thanks in advance!
Edit #1
DMG files are not authenticated by Gatekepper, only the app itself is.
OS X Lion 10.7.5+ also has Gatekeeper * angry face *
Apple currently provides no way to get around Gatekeeper without paying the $99 / year membership fee. To me, this seems unfair because it squishes out the smaller developers (but that's a discussion for elsewhere).
For a rather cumbersome workaround, one can include a ReadMe or note on the download page for their software to explain to users that they need to right click your app and then click 'Open' and then click confirm to run it. I have also found through experimenting that Gatekeeper does not run security checks on DMG files or the installation of files, only the execution / running of Apps. So one could include some kind of note in their DMG installer that told the user exactly how to install and run the app.
Hopefully Apple will provide a workaround for developers (possibly a cheaper solution for a limited membership) that distribute freeware and open source software.
You don't need to purchase membership. Just get a code signing certificate from any agency and sign your app with it. Then it will bypass the Gatekeeper check. Gatekeeper only checks whether the app is from identified developer or not.

Must I used my developer account when downloading Xcode from the App Store?

Regular distributions of Xcode are now available exclusively from the OS X App Store, but (like many, I expect) my App Store account and developer accounts use different Apple IDs. All my previous installations of Xcode have used my developer account, and I also wonder if there are critical parts of the Xcode configuration (e.g. provisioning profiles, etc.) that rely on Xcode having been installed using the developer Apple ID.
Are there any undesirable consequences to simply installing Xcode from the App Store using my personal account? Or, should I (can I, must I) log in to the App Store using my developer Apple ID instead?
You can use whatever Apple ID you want to download Xcode from the Mac App Store. There's nothing special about what it downloads. You'll need to log in to the developer portal though to download beta versions.
You can download Xcode (and lots of other stuff) from Apple's developer downloads website.
I very much doubt, therefore, that it matters whether you got it from the Mac App Store or not.

Update Mac App Store App outside the MAS and check receipt

I am wondering how to build the follwoing scenario:
- I have one app which can be bought in the Mac App Store
- Because this app cannot use sandboxing which will me soon mandatory, I won't be able to update it in the Mac App Store.
- I want to continue to provide updates to these users but it will be outside MAS updates
- How can I check if the application has been legally acquired ?
Thanks for your help
I do something like this to enable Mac App Store customers to easily beta test new versions of my app downloaded from my website while still enforcing licensing. Upon startup of the MAS version of my app, I copy its receipt into /Library/Application Support/MyAppName/. Beta versions of the non-MAS version of my app include the same receipt validation code as the MAS version. They look for a receipt in the App Support folder, and validate it, running in licensed-mode if the receipt is valid.
I believe that MAS receipts are tied to the machine used to buy/download the app, so your users won't be able to transfer receipts between computers. The way to attack this problem might be to issue regular licenses to users who successfully validate a MAS receipt on at least one machine. There's an opportunity for cheating here, but I don't think it's any different than the weaknesses inherent in whatever licensing scheme you use.

Resources