Mac App Store Approval

Mac OSX specific forum
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Mac App Store Approval

Post by J. Baker »

This is how to get your sandboxed app approved on the Mac App Store, as of Aug 13 2012. Your app is already considered compiled. Text that are BOLD are for you to edit for your own app.

*A sandboxed app needs to read and write all of its preference data and so forth from...
"Library/Containers/com.yourcompany.YourApp/Data/Library/Application Support/Your App/"


If your app is sandboxed, GetHomeDirectory() doesn't return your usual directory. It returns "/Users/jbaker/Library/Containers/com.posemotion.spritemonkey/Data/", the sandboxed containers folder for the app.

But when your sandboxed app first launches, it automatically creates...
"/Users/jbaker/Library/Containers/com.posemotion.spritemonkey/Data/Library/Application Support/"

So you just need to create AppName (Sprite Monkey in my case) directory to store your preference files and so forth.
"/Users/jbaker/Library/Containers/com.posemotion.spritemonkey/Data/Library/Application Support/Sprite Monkey/"


1.) You have to purchase a Developers lincense which is $99 plus tax USD. Make sure to select Mac Developer and NOT iOS Developer. You'll need a bank account in order for Apple to pay you for your sales. So get your bank information ready when you're ready to purchase your license.

2.) You'll eventually get an email with an activation code to complete your license purchase. You'll need to click the link to activate the account.

3.) Sign in to your new account at https://developer.apple.com/.

4.) Click on "Mac Dev Center".

5.) Click on the "Learn More" under "Get Your Mac Apps Ready for the Mac App Store".

6.) Scroll down and click on "Register your App ID". This is the page where you will create your "App ID" and "Certificates". You create two certificates. One for the app and one for the installer.

7.) Download your certificates and double click on them to import them into "Keychain Access". You can close "Keychain Access" now but remember their names.

8.) Right click on your app and choose "Show Package Contents". Open "Contents" folder. Open your info.plist in "TextEdit". Make sure it matches the following and "LSApplicationCategoryType" stays at the top or your app could get rejected. Edit where needed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Your App Name</string>
<key>CFBundleGetInfoString</key>
<string>Your App Name 1.0, Copyright © 2012 Company Name Inc. All rights reserved.</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.company name.app name</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Your App Name</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>PURE</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
</dict>
</plist>
9.) Save it and close "TextEdit".

10.) Now you need to create an entitlements (Your App.entitlements) file. This can be done in TextEdit. Just make sure to change the extension to ".entitlements". This file has to be signed with your app and allows your app to function when sandboxed. But you need to have the correct entitlements in it. You can find more on entitlements here...
http://developer.apple.com/library/ios/ ... ments.html

The following sandboxes the app, allows open and save requesters and allows an app to read/write anywhere in or below a users home folder...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.temporary-exception.files.home-relative-path.read-write</key>
<array>
<string>/</string>
</array>
</dict>
</plist>
*Just a note. The last temporary entitlement allows my app to export files not noted in the SaveFileRequester(). If your app only exports a single file that is named in the SaveFileRequester(), you should be fine without it. Also, if you add an extension (*.png or whatever) in the SaveFileRequester(), make sure to do it there. Else if your app checks for it later and adds it, the sandboxed app will not export the file. As it only sees the original Result$ from the SaveFileRequester().

11.) Icon Composer no longer seems to be in Xcode. So I use the following app to create my 1024x1024 icon (*.icns). New size is required for the new retina displays.
http://itunes.apple.com/us/app/icon-sla ... 7913?mt=12
You'll have to click on the "2X" button to make the 1024x1024 size. Make sure to create all the smaller sizes too, in the "1:1" area of the app.

12.) Runs these lines in the "Terminal" one at a time. Edit what's in bold to your own info.
sudo chmod -R a+xr "/Users/Your Name/Desktop/Your App.app"
codesign -f -s "3rd Party Mac Developer Application: Your Name" --entitlements "/Users/Your Name/Desktop/Your App.entitlements" "/Users/Your Name/Desktop/Your App.app"
productbuild --component "/Users/Your Name/Desktop/Your App.app" /Applications --sign "3rd Party Mac Developer Installer: Your Name" yourapp.pkg
*Just a note. If you want to build a 64-bit app for outside of the Mac App Store and keep compatibility with Snow Leopard and up, read the following post...
http://www.purebasic.fr/english/viewtop ... 02#p468002

13.) Now you will need to test the installer you just made. Put your app temporarily in the trash or the installer will think it is already installed. Edit where needed.
sudo installer -store -pkg /Users/Your Name/installername.pkg -target /
14.) Go to https://itunesconnect.apple.com/ if you haven't already and set that up. Once that is all set up you will be ready to upload.

15.) Open "Application Loader v2.7" or better. You can find it in Xcode. Or just "Show Package Contents" by right clicking on the Xcode app and view "Contents" then "Applications". This will allow you to select your installer package and upload it to iTunes Connect.
Xcode is in your "Applications" folder as of v4.4 for Lion and Mountain Lion.

If all went well, your app on iTunes Connect should be "Waiting for Review". I believe this is everything. Good luck! ;)
Last edited by J. Baker on Wed Jul 22, 2015 5:19 am, edited 19 times in total.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Mac App Store Approval

Post by luis »

I don't have a Mac but it's very nice of you to have made this.

Thank you :)
"Have you tried turning it off and on again ?"
A little PureBasic review
spacebuddy
Enthusiast
Enthusiast
Posts: 346
Joined: Thu Jul 02, 2009 5:42 am

Re: Mac App Store Approval

Post by spacebuddy »

Nice info thank you :)

Has anyones app been accepted in the store yet?
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: Mac App Store Approval

Post by J. Baker »

luis wrote:I don't have a Mac but it's very nice of you to have made this.

Thank you :)
Your welcome!
spacebuddy wrote:Nice info thank you :)

Has anyones app been accepted in the store yet?
Your welcome!

My app was accepted on Aug. 11. :D
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Mac App Store Approval

Post by Polo »

Seems as annoying as getting an iOS app accepted :)
Thanks for the detailed process though, might be handy!
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: Mac App Store Approval

Post by J. Baker »

Polo wrote:Seems as annoying as getting an iOS app accepted :)
Thanks for the detailed process though, might be handy!
LOL! Your welcome!
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Mac App Store Approval

Post by kenmo »

Thanks for this guide!
Last edited by kenmo on Wed Jul 22, 2015 9:47 pm, edited 1 time in total.
User avatar
J. Baker
Addict
Addict
Posts: 2178
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: Mac App Store Approval

Post by J. Baker »

kenmo wrote:Thanks for this guide!

I may try this out in the future, but first I need to finish some software that could make $100+ in order to justify the $99 fee!

Do you know what % of your sales revenue Apple takes?
No problem!

My app sales for $1.99 USD and I get $1.40 USD off each sale. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: Mac App Store Approval

Post by moogle »

kenmo wrote:Do you know what % of your sales revenue Apple takes?
It's always been 30% iirc.
Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Mac App Store Approval

Post by Polo »

moogle wrote:
kenmo wrote:Do you know what % of your sales revenue Apple takes?
It's always been 30% iirc.
Yeah, they take 30% plus 79 euros per year.
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Mac App Store Approval

Post by jesperbrannmark »

Hehe... everyone being so productive... including me :wink:
I posted my first OS X app for approval just 30 seconds ago. Could not have done it without this fantastic guide. Hopefully I will post another one tomorrow.
Ramihyn_
Enthusiast
Enthusiast
Posts: 314
Joined: Fri Feb 24, 2006 9:40 am

Re: Mac App Store Approval

Post by Ramihyn_ »

jesperbrannmark wrote:Hehe... everyone being so productive... including me :wink:
I posted my first OS X app for approval just 30 seconds ago. Could not have done it without this fantastic guide. Hopefully I will post another one tomorrow.
Grats :)
jamirokwai
Enthusiast
Enthusiast
Posts: 771
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: Mac App Store Approval

Post by jamirokwai »

Hiya,

just want to share a little Terminal-Script, giving you step 11 and 12 in one rush.
Replace the 3rd-Party Developer Name <name> with the information of your license, and the rights of the .sh with "sudo chmod -R a+xr app.sh".

The you may call the helper in Terminal.app with (EDIT: don't forget to name your App correctly here with path and all. Just drag the .App-Bundle onto Terminal.)

Code: Select all

./app.sh "<Path to You App/YourApp.app>"
Here is the script... It will change the rights, sign the app, build the pkg, and install you app into /Applications.

Code: Select all

sudo chmod -R a+xr "$1"
codesign -f -s "3rd Party Mac Developer Application: <name>" "$1"
productbuild --component "$1" /Applications --sign "3rd Party Mac Developer Installer: <name>" "$1.pkg"
sudo installer -store -pkg "$1.pkg" -target /
Does it work for you?
It does here on Mac OS X Lion 10.7.2
Last edited by jamirokwai on Thu Oct 27, 2011 9:53 am, edited 1 time in total.
Regards,
JamiroKwai
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Mac App Store Approval

Post by jesperbrannmark »

Just got rejected because I named the app "My App Name"... A hint. what is bold and mentioned as change this above - change it... (i am so stupid)
jamirokwai
Enthusiast
Enthusiast
Posts: 771
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: Mac App Store Approval

Post by jamirokwai »

jesperbrannmark wrote:Just got rejected because I named the app "My App Name"... A hint. what is bold and mentioned as change this above - change it... (i am so stupid)
That's hard. You wait 10 days for the approval, and it stops working because of something obvious, you didn't think of.
Believe me, it happened to me the first time, too... :-)
Regards,
JamiroKwai
Post Reply