iOS Question can't generate IPA with store provision

omarruben

Active Member
Licensed User
Longtime User
Hello, I am using local Mac with B4iBuilServer and App Configurator 2
I did create on Apple website a store provision and download to the folder with the keys etc..
After click on B4i/Build Server / Build Release App I have this screen

2021-03-14 19_39_44-ActiproWindowChromeShadow.jpg

any help , appreciated
 

Alex_197

Well-Known Member
Licensed User
Longtime User
You also need a store certificate Type iOS Distribution.
You can use it for both development and store.

You need to provide this certificate name in your Main file
B4X:
'Code module
#CertificateFile: ios_distribution.cer
#Region  Project Attributes
    #ApplicationLabel: HCMS-EVV
    #Version: 1.0.46
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    #Target: iPhone, iPad
    #ATSEnabled: True
    #MinVersion: 8   
        
    #If RELEASE
    #ProvisionFile: MyReleaseOrg.mobileprovision
    #Else
    #ProvisionFile: MyDebugProfile.mobileprovision
    #End If
        
    #PlistExtra: <key>UIFileSharingEnabled</key><true/>
    #PlistExtra: <key>UIUserInterfaceStyle</key><string>Light</string>
    #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>UIBackgroundModes</key><array><string>audio</string></array>
    #PlistExtra:<key>NSMicrophoneUsageDescription</key><string>Used to record the voice messages.</string>
    '#PlistExtra:<key>NSMicrophoneUsageDescription</key><string>Record video.</string>
    #PlistExtra:<key>NSPhotoLibraryUsageDescription</key><string>Select a photo.</string>
    #PlistExtra:<key>NSPhotoLibraryAddUsageDescription</key><string>Save photo in albums.</string>
    #PlistExtra:<key>NSCameraUsageDescription</key><string>Taking a photo.</string>   
#End Region

Then you need to specify what provision file for release and what for development. Then you need to specify what package for what.

So click Ctrl+B (or Project-Build Configurations) and provide package name for development. This is from your settings in Profiles where you created them.
Then in Build Configurations click on Create New and provider settings for Store (you can enter Store into Configuration then in Package name provider explicit identifier that was used for store provision and click Ok.

Now - from configuration drop box on the top menu select Store and - good luck. The IDE will use your Store settings.

Read this - https://www.b4x.com/android/forum/threads/dummies-guide-to-getting-started-with-b4i.124564/
 
Upvote 0

omarruben

Active Member
Licensed User
Longtime User
You also need a store certificate Type iOS Distribution.
You can use it for both development and store.

You need to provide this certificate name in your Main file
B4X:
'Code module
#CertificateFile: ios_distribution.cer
#Region  Project Attributes
    #ApplicationLabel: HCMS-EVV
    #Version: 1.0.46
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    #Target: iPhone, iPad
    #ATSEnabled: True
    #MinVersion: 8
     
    #If RELEASE
    #ProvisionFile: MyReleaseOrg.mobileprovision
    #Else
    #ProvisionFile: MyDebugProfile.mobileprovision
    #End If
     
    #PlistExtra: <key>UIFileSharingEnabled</key><true/>
    #PlistExtra: <key>UIUserInterfaceStyle</key><string>Light</string>
    #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>UIBackgroundModes</key><array><string>audio</string></array>
    #PlistExtra:<key>NSMicrophoneUsageDescription</key><string>Used to record the voice messages.</string>
    '#PlistExtra:<key>NSMicrophoneUsageDescription</key><string>Record video.</string>
    #PlistExtra:<key>NSPhotoLibraryUsageDescription</key><string>Select a photo.</string>
    #PlistExtra:<key>NSPhotoLibraryAddUsageDescription</key><string>Save photo in albums.</string>
    #PlistExtra:<key>NSCameraUsageDescription</key><string>Taking a photo.</string>
#End Region

Then you need to specify what provision file for release and what for development. Then you need to specify what package for what.

So click Ctrl+B (or Project-Build Configurations) and provide package name for development. This is from your settings in Profiles where you created them.
Then in Build Configurations click on Create New and provider settings for Store (you can enter Store into Configuration then in Package name provider explicit identifier that was used for store provision and click Ok.

Now - from configuration drop box on the top menu select Store and - good luck. The IDE will use your Store settings.

Read this - https://www.b4x.com/android/forum/threads/dummies-guide-to-getting-started-with-b4i.124564/

thank you very much for your help, your guide is very good, but still the problem persists....
I have this in code :
2021-03-14 20_36_31-NJTax2 - B4i.jpg

making sure it is pointing to the store .cer and mobileprovision
I am not sure about the APN mobileprovision, but I did commented that line still nothing

other thing I realize :
both options produce the same output and start the simulator on the Mac , Build Release App and Build Simulator Release App
2021-03-14 20_43_42-NJTax2 - B4i.jpg
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
thank you very much for your help, your guide is very good, but still the problem persists....
I have this in code :
View attachment 109664
making sure it is pointing to the store .cer and mobileprovision
I am not sure about the APN mobileprovision, but I did commented that line still nothing

other thing I realize :
both options produce the same output and start the simulator on the Mac , Build Release App and Build Simulator Release App
View attachment 109666
First things first
Check my code
B4X:
#If RELEASE
    #ProvisionFile: MyReleaseOrg.mobileprovision
#Else
    #ProvisionFile: MyDebugProfile.mobileprovision
#End If

You need to do like this - specify which provisional file to use for development and for release.

Second - Build Simulator Release app creates ipa file for a simulator but not for a store. For upload to the Apple Store please use Build Release App - it will create Archive.zip file if you setup the everything correctly.
 
Upvote 0

omarruben

Active Member
Licensed User
Longtime User
Please post text as text, not screenshots.


No.

Can you post the text from the compilation window when you compiled the app?

Ok I will do, I switch to hosted builder and all worked fine, I was able to send the app to Apple and now is under review

I will try again today with the local Mac and post all messages and errors

my code has the right lines, like :

B4X:
#If RELEASE
    #ProvisionFile: MyReleaseOrg.mobileprovision
#Else
    #ProvisionFile: MyDebugProfile.mobileprovision
#End If
 
Upvote 0
Top