-
Notifications
You must be signed in to change notification settings - Fork 167
Add Mac Store guide #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v6
Are you sure you want to change the base?
Add Mac Store guide #251
Conversation
| - Developer ID Application | ||
| - Developer ID Installer | ||
|
|
||
| All of these certificates should be created through Xcode after you have signed up for an Apple Developer Account. If you have created them any other way, you will have to delete them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true, you can create them on the developer.apple.com website, download and install them. The removed link has information on that, so it's worth keeping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried this, it did not work. The only way that worked was via Xcode.
|
|
||
| Once you have created the certificates, you need to go to your Apple Developer Account and create provisioning profiles. If you are submiting your app to the app store, you will need a development profile and a distribution profile. If you are submiting it outside of the app store, you will need a profile for the ```Developer ID Application``` certificate. | ||
|
|
||
| You need to download these after creating them and double clicking them to install them on your computer. Not all of them can be installed locally, but just double-click on them anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think guides should tell readers to do something "anyway". Either its required, or we can leave it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can't remember which ones do and don't need double clicking. If you double click one of them, it tells you it can't be installed or something like that.
| }; | ||
| ```optionsForFile```: for distribution outside of the app store, you may be able to rely on the defaults if you app doesn't need any extra entitlements. For the app store, you will definitely need to provide this. | ||
|
|
||
| You need to add logic to determine which set of entitlements to use. If you specify more entitlements then your app uses, it will probably be rejected by the review process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You need to add logic to determine which set of entitlements to use. If you specify more entitlements then your app uses, it will probably be rejected by the review process.
+ Your list of entitlements should contain only the ones your application needs. Adding extraneous entitlements could be cause for rejection during the review process.| module.exports = { | ||
| packagerConfig: { | ||
| osxSign: {} // object must exist even if empty | ||
| osxSign: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason not to recommend the empty configuration object as the default anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a case where it would work with no options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested myself on electron/minimal-repro and I can confirm that osxSign: {} works for me after checking the output with codesign -dv.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm.... I don't think it is that simple. Anyway, there would need to be some kind of examples, which is the foundation of any good documentation. Leaving it empty and simply describing the fields is pointless. Either way, I will make the edits I agree with and you can do the rest as you see fit. I will do that now.
| | `appleId` | string | Usually the email address you used to create your Apple Developer account. | | ||
| | `appleIdPassword` | string | A one-time password that can be create via the Apple Developer website. | | ||
| | `teamId` | string | The Apple Team ID you want to notarize under. It is the set of characters inside the brackets at the end of your identity name. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old descriptions were more helpful and used the terminology as used by Apple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not from my experience. As the documentation was wrong in many places, I can't see how the author could know which is the best or not best. It wasn't possible to submit to the MAS using the documentation.
| packagerConfig: { | ||
| // ... | ||
| osxNotarize: { | ||
| tool: 'notarytool', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this the default so should be left out
| packagerConfig: { | ||
| osxSign: {}, | ||
| osxNotarize: { | ||
| tool: 'notarytool', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this the default so should be left out
guides/mac-store.md
Outdated
|
|
||
| # App Store | ||
|
|
||
| Follow the documentation on how to add Electron Forge to your project. This is fairly straight-forward, so I won't go into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tutorials should avoid calling things "straight-forward", "easy" et cetera.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I have missed some casual language as it is adapted from an informal guide.
guides/mac-store.md
Outdated
| ``` | ||
| {% endcode %} | ||
|
|
||
| ```appBundleId```: At some point, you need to sign up for an Apple Developer Account and create an app. This is where you create a bundle Id that you then provide to Forge in this field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point, you need to sign up for an Apple Developer Account and create an app.
Is this helpful information to explain appBundleId?
guides/mac-store.md
Outdated
|
|
||
| After the packager configuration, there is the ```maker``` configuration and some types of configuration that you can just leave as they are unless you have a use for them. | ||
|
|
||
| I don't think you need any makers just for testing. Maybe add the ```zip``` maker if nothing is created. For distribution on the Mac store you need to create a ```pkg``` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a guide should not have "I don't think you need" sentences. Guides are authoritative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I have missed some casual language as it is adapted from an informal guide.
guides/mac-store.md
Outdated
|
|
||
| ## Package Configuration | ||
|
|
||
| Inside your ```package.json``` you might need to add a ```productName``` field. The scripts mentioned below can help you bundle and package your code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might, or have to? Guides should work to remove ambiguity in the process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It don't know whether it is needed or not. It was written a while ago when I was making an app. Unless somebody knows, I would go with it being required.
guides/mac-store.md
Outdated
| ``` | ||
| {% endcode %} | ||
|
|
||
| ```npm run mas``` will create a ```pkg``` file for distribution inside the app store, assuming you have used the appropriate forge configuration. For testing, you don't need to use any of the ```makers``` so you can just use ```npm run package```. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid telling readers they can "just" do something. Remove the word just
guides/mac-store.md
Outdated
|
|
||
| ## Testing and Submission | ||
|
|
||
| To test your application before submitting it to the app store, you need to make sure you are actually running inside an app store sandbox, and not just running like a normal mac application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid telling readers they can "just" do something. Remove the word just
guides/mac-store.md
Outdated
|
|
||
| To test your application before submitting it to the app store, you need to make sure you are actually running inside an app store sandbox, and not just running like a normal mac application. | ||
|
|
||
| App containers are located in ```~/Library/Containers```. If there is not a folder named after your app there, then your app is not running inside a container and therefore you have messed up one of the steps in the configuration section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"messed up" is not neutral language. Try "[...]then your app is not running inside a container. When this is the case, app-sandbox was not configured correctly, and you can find out which steps you missed by..."
guides/mac-store.md
Outdated
|
|
||
| Before packaging your application, you should also check that every file has user read permissions, and that every folder has user read and user execute permissions. Every binary should have user read and user execute permissions as well. | ||
|
|
||
| You will also need a working help section in the menu of your app. The help section can link to a website. The electron documentation provides a basic template that you can copy and paste to make sure you have the right menu items. You just need to fix up the help section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid telling readers they can "just" do something. Remove the word just.
Additionally, if this is a hard requirement for the app store, explicitly state that, and provide a code example, e.g.
import electron from 'electron';
const { shell } = electon;
// your help menu
{
role: "help",
submenu: [
{
label: "Documentation",
click() {
shell.openExternal('https://example.com');
}
},
]
}|
|
||
| You will also need a working help section in the menu of your app. The help section can link to a website. The electron documentation provides a basic template that you can copy and paste to make sure you have the right menu items. You just need to fix up the help section. | ||
|
|
||
| If your app only has one window, the app should close completely when the window is closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what the minimal-repro example project uses. It would be good to remain consistent there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm... this is required to successfully submit the app on MAS, which is what the guide is for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an Apple guideline we can reference here? I skimmed https://developer.apple.com/app-store/review/guidelines/ and might have missed it but didn't see any mention about this particular rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I can't find anything either but my app was rejected because of this. The way that MacOS works is that if the app is a single window utility-based application like a calculator, then it closes completely when you close. If it can be used to spawn lots of new windows (document-based), it stays open. The problem is, what about apps that have background tasks running but are single window? Mine was in this category, yet it was still rejected. Maybe the reviewer made a mistake. The assumption I took from his review was that anything that doesn't launch multiple windows should close completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is also specifically what he said.
guides/mac-store.md
Outdated
|
|
||
| If your app only has one window, the app should close completely when the window is closed. | ||
|
|
||
| Once everything is ready, you need to download Transporter from the Mac App Store and upload your ```pkg``` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a link to Transporter? https://apps.apple.com/us/app/transporter/id1450874784?mt=12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
erickzhao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this @andrewitsover! 🙇
As a note, I was wondering if you wanted to do the copy-editing adjustments from the previous review, or if you'd prefer it if a maintainer took this to the finish line?
A step-by-step guide on how to distribute your app inside or outside of the Mac App Store, and to the Windows store.