B4J Tutorial [Tool] MacStorePackager - publish your App to the Mac AppStore

In this tutorial, I want to show you, how you can upload your Java Application to the Mac AppStore.
Here you can find a test Application in the Store.

Requirements:
  • MacOS (tested with version 10.13.3)
  • Apple Developer Account
  • Java JDK (recommended: JDK 9)
  • Xcode + Developer Tools

Video:


Before we can upload our App to the AppStore, we have to prepare some things:

Step 1: Create a new AppID:
  1. Login to your Apple Developer account and go to the Certificates, ID & Profiles section
  2. Choose macOS in the ChoiceBox at the top
  3. Go to the App ID’s section under identifiers
  4. Click on the + Button to create a new App ID
  5. Fill in the description field
  6. Under App ID Suffix, choose Explicit App ID and enter your package name (the package name, you have set in B4J under Projects --> Build Configuration --> Package)
  7. Click on Continue
  8. Click on Register

Step 2: Create a new App in iTunes Connect
  1. Go to iTunesConnect and click on My Apps
  2. Click on the + Button at the top and choose New Mac-App
  3. Fill in all fields, use the Bundle-ID we have created in Step 1.
  4. Click on the Create button
Note 1: You can’t remove Apps from iTunes Connect after you have added them


Step 3: Create and download certificates
  1. Open Xcode
  2. Click on Xcode --> Preferences in the MenuBar
  3. Go to the Accounts section
  4. Click on the + Button at the Bottom to add your Apple ID
  5. Fill in all fields and click on Sign In
  6. Select your Account and click on the Manage Certificates Button
  7. Click on the + Button at the Bottom and choose macOS App Store
  8. Click again on the + Button and choose macOS App Store Installer
  9. Now you can close Xcode
Now we have everything we need to create our package for the AppStore.
Next Steps:

Step 4: Create the package
  1. Download the StorePackager (for VM: http://bit.ly/2utzAgH) application (v. 1.0.1, created with B4J)
  2. Fill in all fields.
  3. Click on Next
  4. Set the entitlements of your App, for example when it uses Bluetooth. For more information click on the info button
  5. Click on Next
  6. Now you have to set the App category. For more information click on the info button
  7. Click on Create
  8. After StorePackager has finished, you will find the package on your desktop
Note 1: if you your icon is a png file, StorePackage will automatically resize it. The minimum dimension of the png is 1024x1024. If you are using .icns, be sure you have included all necessary formats (http://iconhandbook.co.uk/reference/chart/osx/)

Note 2: The root password is needed to have the permission to edit the bundle identifier of the Java info.plist, this prevents a CFBundleIndentifier Collision


Step 5: Upload the package
  1. Open Application Loader
  2. SignIn
  3. Click on Deliver your App
  4. Choose the package (.pkg) from your desktop
  5. Click to the next site and wait til the upload finishes

Congratulations! Now you have successfully upload your App to iTunes Connect. The last thing to do now is fill in all fields for the App Store listing and finally submit your App for the review.


Feel free to ask questions ;)
 
Last edited:

ilan

Expert
Licensed User

this will be found by someone that know it exists but for someone that doesnot know about a possibility to create mac os apps with b4j he will never find it because he doesnot know it exists so he wont look for anything like that.
 

tufanv

Expert
Licensed User
Hi,

Possible, you should use Xcode 8.
But probably your are in the wrong preferences, can you send me a screenshot?

Jan
I am having trouble after xcode 9.2 update. It says no certificate found when creating the package altough i signed in to my account created what you said. They are visible in xcode preferences but i keep getting no certificate found. I created a new installer and macos appstore but still the same.



edit: using VM version
 
Last edited:

JanPRO

Well-Known Member
Licensed User
Update v. 1.0.1
  • MacStorePackager now supports Java 9 (it's recommend to use it)
  • a bug related to .icns icons was fixed
Thank you @tufanv for reporting and testing :)

You can find the link to the new version in the start post.

Jan
 

ajk

Active Member
Licensed User
Unfortunately this app not working: display Success but there are no result on desktop.
 
Top