iOS Question Installing release version on debug device - doesn't run

biometrics

Active Member
Licensed User
Longtime User
I want to demo the app I've written away from my PC so I want to install the release version.

Everything works in the debug environment. So obviously my certificates, UDID and mobileprovision are correct. The bridge is working and I can single step code. I use the hosted builder.

Reading the forum there were suggestions that I should uninstall the debug version and then select Tools/Build Server/Build Release App. This does compile the app but doesn't install it on the device. I also select Download Last Build that that only downloads Archive.zip, it doesn't install it to the device.

I've also tried using OTA Deployer. I extracted the .ipa and completed the form and uploaded. Emailed the link to myself on the device. When installing the app from the URL on the device it installs but ends up with grey icon on the desktop. Touching it does nothing. See below (Activate is my app).

Any ideas?

Capture.PNG
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. No need to uninstall the debug app before installing the release app. The suggestion you read is related to tests you should do before releasing to the store.

2. You should use the exact same provision profile and certificate when you build the release app. Don't use store files (as you are not going to submit the build to the store).

All other things are unrelated.
The only difference between running in debug mode and in release mode is between clicking on the run button or clicking on Tools - Build Server - Build Release app (Alt + T + B + R).
 
Upvote 0

biometrics

Active Member
Licensed User
Longtime User
1. No need to uninstall the debug app before installing the release app. The suggestion you read is related to tests you should do before releasing to the store.

2. You should use the exact same provision profile and certificate when you build the release app. Don't use store files (as you are not going to submit the build to the store).

All other things are unrelated.
The only difference between running in debug mode and in release mode is between clicking on the run button or clicking on Tools - Build Server - Build Release app (Alt + T + B + R).

You should use the exact same provision profile and certificate when you build the release app. Don't use store files

Thanks, that was the cause.
 
Upvote 0

biometrics

Active Member
Licensed User
Longtime User
Tip: read the compilation window text. It tells you whether it was compiled with a store certificate or not.
Not sure I see the difference.

This is with the store certificate:
B4X:
B4i Version: 5.81
Parsing code.    (0.03s)
Building folders structure.    (0.03s)
Compiling code.    (0.10s)
Compiling layouts code.    (0.00s)
Compiling debugger engine code.    (0.00s)
Building Xcode project    (0.24s)
Sending data to remote compiler.    (5.20s)
Completed successfully.
Make sure that B4i-Bridge is started (192.168.10.32).
Manually launch the app after installation.

This is the debug certificate:
B4X:
B4i Version: 5.81
Parsing code.    (0.03s)
Building folders structure.    (0.03s)
Compiling code.    (0.10s)
Compiling layouts code.    (0.00s)
Compiling debugger engine code.    (0.00s)
Building Xcode project    (0.24s)
Sending data to remote compiler.    (6.62s)
Completed successfully.
Make sure that B4i-Bridge is started (192.168.10.32).
Manually launch the app after installation.
 
Upvote 0

biometrics

Active Member
Licensed User
Longtime User
Oh hang on, I see it when you use Tools/Build Server/Build Release App not when you run with F5.

e.g.
B4X:
B4i Version: 5.81
Parsing code.    (0.02s)
Building folders structure.    (0.03s)
Compiling code.    (0.04s)
Compiling layouts code.    (0.00s)
Building Xcode project    (0.24s)
Sending data to remote compiler.    (7.01s)
   Application compiled with non-store provision profile.
Completed successfully.
Make sure that B4i-Bridge is started (192.168.10.32).
Manually launch the app after installation.
 
Upvote 0

biometrics

Active Member
Licensed User
Longtime User
True.

Another tip: don't use debug certificate at all. Use a distribution certificate and only switch between ad hoc provision profile and store provision profile.

To get the release version to run on the device I commented out the store. Will using your suggestion not also require me to comment out the store and only use the ad hoc

B4X:
'#If RELEASE
'   #CertificateFile: ios_distribution.cer
'   #ProvisionFile: Activate.mobileprovision
'#ELSE
   #CertificateFile: ios_development.cer
   #ProvisionFile: Activate_Development.mobileprovision
'#END IF

Now that I know what the issue is it's not a big deal but it would be nice if I didn't have to comment out code to get from device to store...
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. You will never need to change the #CertificateFile as you will use the same one all the time.

2. You will need to change the provision profile. You can comment or uncomment that line as needed (very simple) or create a build configuration specifically for the store and change to:
B4X:
#CertificateFile: ios_development.cer
#If STORE
   #ProvisionFile: Store.mobileprovision
#ELSE
   #ProvisionFile: Activate_Development.mobileprovision
#END IF
 
Upvote 0
Top