iOS Tutorial Publishing your app to the App Store

Not open for further replies.
This tutorial explains the steps required to create a store ready ipa file.

1. The first step is to uninstall your app from the device and install it again in Release mode (Tools - Build Server - Build Release App). This is an important test. Similar to the test Apple will run.
Make sure to also test it with airplane mode on.
The certificate used at this point should be the same non-store certificate.

2. Make sure to use a distribution certificate and create a store provision profile.
Managing multiple certificates (in most cases you should always use a distribution certificate):

3. Add code similar to this to select the new store certificate when the app is compiled in release mode:
   #ProvisionFile: store.mobileprovision

4. Compile your app in Release mode (Alt + T + B + R). Don't try to install the app on the device as it is not possible to install store signed apps.

5. Download the compiled app to the PC: Tools - Build Server - Download last build. This step is required even if you are using a local mac.

You will see this message:

6. Create an app specific password: - Security - App Specific Passwords

7. Upload the IPA with the local builder:
Or with the build server - Tools - Build Server - Upload App To Itunes Connect. Make sure to use the app specific password.

Apple App Store review guidelines:
Last edited:


Licensed User
Longtime User
only with the developer certificates. With store certificate i can't install the app on my device


Licensed User
Longtime User
I deleted and recreated the keys many many times.
I just try to create a new empty project and upload it with the keys created and there was no problems!
I think it is a problem with my code but i don't know where.


Well-Known Member
Licensed User
Longtime User
Does anyone know precisely what Apple's rejection criteria are around testing in airplane mode?

The first thing my app does is attempt to download a status file from a website.

This contains various settings which may be updated from time to time.

If it can not do this download it just stops cleanly with a message.

Erel says in post #1 to "Make sure to also test it with airplane mode on."

I have read in other threads about Apple testing with airplane mode on - and various unsatisfactory reactions from Apple when it didn't work.

I am ready to publish and am wondering if I am about to waste a week waiting for Apple.

Last edited:

Daniel Uribe

Licensed User
Longtime User
This error occurs when I compile in release mode:

B4i version: 3.01
Parsing code. (0.05s)
Compiling code. (0.21s)
Compiling layouts code. (0.01s)
Building Xcode project (0.22s)
Sending data to remote compiler. Error
Communication error: java.lang.RuntimeException: java.lang.IllegalArgumentException: MALFORMED

the ios_distribution.cer and store.mobileprovision files are in key folder, created with the same .csr of dvelopment's certificates

and this is my head code:
'Code module
#Region  Project Attributes
    #ApplicationLabel: CrazyAPP
    #Version: 1.0.0
    #iPhoneOrientations: Portrait
    #iPadOrientations: Portrait
   #CertificateFile: ios_distribution.cer
   #ProvisionFile: store.mobileprovision
    #PlistExtra:<key>NSLocationWhenInUseUsageDescription</key><string>Used to display the current navigation data.</string>
    #PlistExtra:<key>NSLocationUsageDescription</key><string>Used to display the current navigation data.</string>
    #PlistExtra:<key>NSCameraUsageDescription</key><string>Lector Qr</string>
    #PlistExtra:<key>NSPhotoLibraryUsageDescription</key><string>Selecciona foto</string>
#End Region
#UrlScheme: com.googleusercontent.apps.xxxxxxxx
#QueriesSchemes: fbapi
#QueriesSchemes: fb-messenger-api
#QueriesSchemes: fbauth2
#QueriesSchemes: fbshareextension
#UrlScheme: xxxxxxxxxx

Thanks a lot for all the help..!

Daniel Uribe

Licensed User
Longtime User
thanks a lot Erel,

The problem was in one of my files, had a name with "ñ". i just change the name, of course I did what you told me to upgrade to the latest version of B4i and I put the two files (the ios_distribution.cer and store.mobileprovision) in another key folder.



Active Member
Licensed User
Longtime User
I'm trying to publish the latest version of my iOS app, I've done this several times before. I'm using the hosted compiler.

I select Tools/Build Server/Build Release App, then Download Latest Build.

It downloads the .ipa and but not, to the Objects folder.

When I try to upload the .ipa using Upload App to iTunes Connect I get this error:

Package Summary:
1 package(s) were not uploaded because they had problems:
/var/folders/35/nx43fs8567l9z_wvvpc35snh0000gn/T/F77AF154-B1BA-42DB-B011-11FC5AF96198/1211673654.itmsp - Error Messages:
ERROR ITMS-90017: "This bundle is invalid. The IPA format requires a top-level directory named Payload, containing only a .app bundle and optional plugins in a Plugins directory."

If I try to upload I get this error:

Invalid archive file.

I've tried renaming to

This used to work fine using this procedure so I'm a bit stumped as to what the problem is.

I'm using B4i 4.01.
Last edited:


Licensed User
Longtime User
hi erel,
i have macosx 10.12.6 with xcode 9
i am writing an application for ipad2

this is buildserver's information:
serkans-iMac:B4iBuildServer-2 serkan$ java -jar B4iBuildServer.jar
Build server version: 4.4
2017-10-09 10:06:46.871:INFO::main: Logging initialized @353ms to org.eclipse.jetty.util.log.StdErrLog
Loading default configuration file.
Mac version: 10.12.6
Xcode path: /Applications/
Xcode version: Xcode 9.0
Build version 9A235

i have 2 certificate , one ise development and the other is for production(appstore).
i defined them like this as you mentioned before:
#CertificateFile: ios_distribution.cer
#ProvisionFile: 20171009production.mobileprovision
#CertificateFile: ios_development.cer
#ProvisionFile: 20171009development.mobileprovision

#End If

i am using simulator to build the release app,
when i compile the app in release mode (tools--build server-build release app) i get this message:

B4i Version: 4.40 BETA #1
Parsing code. (0.03s)
Compiling code. (0.08s)
Compiling layouts code. (0.01s)
Building Xcode project (0.08s)
Sending data to remote compiler. (6.58s)
Application compiled with non-store provision profile.
Completed successfully.
App will run on the simulator.
This is a simulator build. Do not submit it to the App Store.

i downloaded the last build file, the name of the zip was and i renamed it to then
i used application uploader with my developer account, i choosed the file then i get this:
ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."

after times and times, i revoked all certificates from developer site, deleted all related keys from keychain..created new certificates and provision files.. still the same..

help needed..


Licensed User
I'm trying to upload my app to iTunes Connect...
but when using the iTunes connect uploader, after few minutes i get this error:

Error: 2017-10-16 15:02:05.179 altool[94384:127242686] *** Error: Unable to validate your application.
Please sign in with an app-specific password. You can create one at

i used my apple developer credentials, and i logged into itunes connect from my browser without any problem... i followed Erel's tutorial to create distribution cert and provision file... all seems done without problems.
What i'm doing wrong?

thanks in advance


Licensed User
Solved that problem... i had to create from site an app-password... as the message said! :p
But (obviously) now i get another error...
here's the complete log

Uploading ipa file.
Submitting app (this step can take several minutes to complete).
Error: 2017-10-16 15:33:02.149 altool[97331:127255221] *** Error: Errors uploading 'Shock Calc.ipa': (
    "Error Domain=ITunesConnectionOperationErrorDomain Code=1190 \"No suitable application records were found. Verify your bundle identifier 'xxx.xxxxxx.shockCalculator' is correct.\" UserInfo={NSLocalizedRecoverySuggestion=No suitable application records were found. Verify your bundle identifier 'xxx.xxxxxx.shockCalculator' is correct., NSLocalizedDescription=No suitable application records were found. Verify your bundle identifier 'xxx.xxxxxx.shockCalculator' is correct., NSLocalizedFailureReason=iTunes Store operation failed.}"
Not open for further replies.