Bug? [NOT A BUG] Building a B4i- Bridge App seems to ignore #IF RELEASE compiler directives

Andris

Active Member
Licensed User
Longtime User
I've been using the following code as suggested by Erel here: https://www.b4x.com/android/forum/threads/publishing-your-app-to-the-app-store.57528/

B4X:
#IF RELEASE
     #ProvisionFile: xxxxxxxx_store.mobileprovision  
#ELSE
      #ProvisionFile: xxxxxxxx.mobileprovision
#END IF

I had added these lines with a B4i Bridge App already built and installed. Compilation in Debug mode worked fine, even with the iStore Library NOT installed.

Recently, I happened to uninstall the B4i Bridge App, and then I rebuilt it with Tools>Build Server>Build B4i- Bridge App. The build failed because I didn't have the correct provisioning file, i.e. the build hadn't taken #IF RELEASE into account. Upon commenting out all but the xxxx.mobileprovision line, the Bridge App built and installed OK. Then I removed the commented lines (put #IF RELEASE back in) and everything was back to normal.

I can always do this again next time, but I have quite a few #IF RELEASE blocks and it is a pain. Is this a bug with the Bridge App builder that can be fixed?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is not a bug.
The bridge is always built in "release" mode.
The bridge doesn't do anything with your code. Once a year you need to build it. In the worst case you will need to explicitly set the provision file with another line.

Don't forget to test your app in release mode as well => means that it is better to create a STORE configuration.
 
Top