iOS Question Debug after deploy to the appstore

TheRealMatze

Active Member
Licensed User
Hi,
i have my first app deployed in the google playstore and the apple appstore. Google was absolute straight forward, apple was painful. But after a 10 days of waiting the app is finaly ready for the testers in testdrive. While they are testing they found a bug - only in ios, android works with the same code - so i have to debug it. And here is a problem. I have a new key for the appstore, and i was thinking i had copied the other key to a different folder. But i cant create the bridge-app

B4X:
B4i Version: 7.80
Parsing code.    (0.32s)
Building folders structure.    (0.43s)
Running custom action.    (0.15s)
Compiling code.    (1.06s)
Building designer app.    (0.52s)
Building Xcode project.    (0.59s)
Preparing project for builder.    (0.38s)
    Project size: 0.23 MB
Sending data to remote compiler.    Error
Out: Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -configuration Release PRODUCT_NAME=B4i-Bridge CONFIGURATION_BUILD_DIR=/Users/administrator/Documents/UploadedProjects/<user id>/Payload "CODE_SIGN_IDENTITY=iPhone Distribution: Matthias Vastring (46P9939WPL)" "OTHER_CODE_SIGN_FLAGS=--keychain <user id>" PROVISIONING_PROFILE=96f906b3-4b8e-4a21-ac6d-8abbb9ad5e59 -arch armv7 -arch arm64

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
    ARCHS = armv7 arm64
    CODE_SIGN_IDENTITY = iPhone Distribution: XXXXXXXXX (XXXXXXXXX)
    CONFIGURATION_BUILD_DIR = /Users/administrator/Documents/UploadedProjects/<user id>/Payload
    OTHER_CODE_SIGN_FLAGS = --keychain <user id>
    PRODUCT_NAME = B4i-Bridge
    PROVISIONING_PROFILE = 96f906b3-4b8e-4a21-ac6d-8abbb9ad5e59

note: Using new build system
note: Using codesigning identity override: iPhone Distribution: XXXXXXXXX (XXXXXXXXX)
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'B4iProject' from project 'B4iProject')
error: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Distribution: XXXXXXXXX (XXXXXXXXX)" in the keychain. To sign with this signing certificate, install its private key in your keychain. If you don't have the private key, select a different signing certificate for CODE_SIGN_IDENTITY in the build settings editor. (in target 'B4iProject' from project 'B4iProject')


Error: ** BUILD FAILED **

What do i have to do when i want to debug this app and dont want to destroy the appstore-keys?

Please help...

Matze
 
Solution
Ok, i got it. I created a new identifier - the same as for the release but with a .* at the end. Then i created 2 new profiles, one for the correct id and one for the wildcard.
Now, i have 3 profiles. One for the appstore, one for debug and one for the bridge-app.

Very complicated...

Erel

B4X founder
Staff member
Licensed User
Longtime User
And here is a problem. I have a new key for the appstore, and i was thinking i had copied the other key to a different folder. But i cant create the bridge-app
That's a mistake.

You should have a single folder with a single "key" and a single certificate. You should have two provision profiles. One for the store and one during development.
 
Upvote 0

TheRealMatze

Active Member
Licensed User
Ok. I have both provision-files. when i copy the first one (from the beginning) the compiler says there are multiple .mobileprovision files. Rename the appstore-one let the compiler start, but it fails because of the wrong certificate

B4X:
B4i Version: 7.80
Parsing code.    (0.37s)
Building folders structure.    (0.30s)
Running custom action.    (0.14s)
Compiling code.    (1.06s)
Building designer app.    (0.51s)
Building Xcode project.    (0.59s)
Preparing project for builder.    Error
Provision profile and certificate do not match.

I don´t want to create a new debug-key and damage the release-key....
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I don´t want to create a new debug-key and damage the release-key....
No need to worry about it. In iOS you can always create new keys.
As I wrote, you did a mistake. You should have a single certificate and multiple provision profiles.

the compiler says there are multiple .mobileprovision files
You can explicitly choose the provision profile with the #ProvisionProfile attribute.
 
Upvote 0

TheRealMatze

Active Member
Licensed User
Ok, it looks like the error changes...


[CODE lang="b4x" title="note: Using new build system note: Using codesigning identity override: iPhone ????????? (?????????) note: Planning build note: Analyzing workspace note: Constructing build description note: Build preparation complete /Users/administrator/Documents/UploadedProjects//B4iProject.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'B4iProject' from project 'B4iProject') error: Provisioning profile "?????????" has app ID "?????????", which does not match the bundle ID "?????????.bridge". (in target 'B4iProject' from project 'B4iProject')"]note: Using new build system
note: Using codesigning identity override: iPhone Distribution: ????????? (?????????)
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/administrator/Documents/UploadedProjects/<user id>/B4iProject.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'B4iProject' from project 'B4iProject')
error: Provisioning profile "?????????_DEV" has app ID "?????????", which does not match the bundle ID "?????????.bridge". (in target 'B4iProject' from project 'B4iProject')[/CODE]

I have overwrite something with ????????? - but the main problem now is that the id got a .bridge at the end and i havn´t use a wildcard... Do i always need a wildcard-cert if i want to debug something, or is there another trick i don´t see?
 
Upvote 0

TheRealMatze

Active Member
Licensed User
Ok, i got it. I created a new identifier - the same as for the release but with a .* at the end. Then i created 2 new profiles, one for the correct id and one for the wildcard.
Now, i have 3 profiles. One for the appstore, one for debug and one for the bridge-app.

Very complicated...
 
Upvote 0
Solution
Top