iOS Question Issues deploying on a physical device (related to M1 processor ?)

wl

Well-Known Member
Licensed User
Longtime User
Setup:
- Mac Mini M1 (16GB - 1 TB) latest BigSur, latest XCode (12)
- AC 2 set up (with automated tools enabled)
- version 7.5 of Mac Builder
- Latest Windows ARM running Parallels 17, hosting b4i 7.5

Issue:
- when deploying to simulator all is OK, but can't deploy to physical device connected through USB (AC 2)

Details:
- when running the builder without sudo
-> "code sign wants to access key "B4i" in your keychain. To allow this, enter the "b4i_default-db" keychain password"

- when running the builder with sudo
B4X:
B4i Version: 7.50
Parsing code.    (0.00s)
Building folders structure.    (0.01s)
Compiling code.    (0.01s)
Building designer app.    (0.00s)
Building Xcode project.    (0.12s)
Preparing project for builder.    (0.09s)
    Project size: 0.24 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/wim/Documents/B4iBuildServer/UploadedProjects/<user id>/Payload "CODE_SIGN_IDENTITY=iPhone Distribution: Wim Lambrechts (6T4HF6S2R4)" "OTHER_CODE_SIGN_FLAGS=--keychain <user id>" PROVISIONING_PROFILE=9468f969-9919-4aa0-8fa8-01c114503122 -arch armv7 -arch arm64

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
    ARCHS = armv7 arm64
    CODE_SIGN_IDENTITY = iPhone Distribution: Wim Lambrechts (6T4HF6S2R4)
    CONFIGURATION_BUILD_DIR = /Users/wim/Documents/B4iBuildServer/UploadedProjects/<user id>/Payload
    OTHER_CODE_SIGN_FLAGS = --keychain <user id>
    PRODUCT_NAME = B4i-Bridge
    PROVISIONING_PROFILE = 9468f969-9919-4aa0-8fa8-01c114503122

note: Using new build system
note: Using codesigning identity override: iPhone Distribution: Wim Lambrechts (6T4HF6S2R4)
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/wim/Documents/B4iBuildServer/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: "B4iProject" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'B4iProject' from project 'B4iProject')


Error: ** BUILD FAILED **

The same setup is working flawlessly on my old Mac Mini x86 (having done, redone and redone again all steps - including reinstalling the entire OS on both the x86 and the M1 machine)
It *should* be possible to get it running on an M1 (thanks @mike2ppc for your continuous support !)

Related: https://www.b4x.com/android/forum/t...eychain-password-required.132386/#post-836641 (same issue without solution)
and (my old post): https://www.b4x.com/android/forum/t...import-unknown-format-in-import.133821/page-2
 
Last edited:

wl

Well-Known Member
Licensed User
Longtime User
Tested with same certificates on hosted builder. Works ...
Switched back to try and build on the M1 (running builder as sudo):
-> error: "B4iProject" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'B4iProject' from project 'B4iProject')

BTW: both tests have been running from my Windows PC (with the M1 being the server in the local builder scenario), just to take out any potential Windows ARM Parallels impact.
 

Attachments

  • Untitled.png
    Untitled.png
    22.9 KB · Views: 153
Last edited:
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Unfortunately due to the continuous efforts of @mike2ppc to help me it seems he now also has the same problem as I have.... Sorry Michael !
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
I wrote about this in another post some time ago but I didn't investigate further, mainly because in this moment I am doing very little programming. Anyway my issue was similar I believe.
This was the thread

Maybe the B4i Java executable, the builder. on the M1 must run in Rosetta mode? I read somewhere that you can run Rosetta mode from the command line.
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
I there (still) anyone successfully using an M1 for building/debugging on a physical device (through Apple Configurator 2) ?

@Erel : do you have an idea when you could be checking the M1 setup ? Reason for asking is that I purchased an M1 with its main purpose to use it for B4I. If it would not be working I would need to return it.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
builder1 is now running on a new M1 Mac. Nothing special was needed.

AppPath=/Users/administrator/Documents
Builder: builder1
Mac version: 10.16
Xcode path: /Applications/Xcode.app/Contents/Developer
Xcode version: 12.5
2021-09-02 02:37:51.060:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2021-09-02 02:37:51.113:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2021-09-02 02:37:51.113:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2021-09-02 02:37:51.116:INFO:eek:ejs.session:main: node0 Scavenging every 660000ms
2021-09-02 02:37:51.368:INFO:eek:ejs.Server:main: Started @5544ms
Build server is ready
Build server version: 7.50
Adding user to keychain: xxx
02:46:42| Compilation time: 17234, xxx, queue: 0, success: true
02:55:15| Compilation time: 5270, xxx, queue: 0, success: true
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
thanks @Erel: I would have hoped you would have had the same issue so there was something I could look into, but also @mike2ppc currently has the same problem. So no idea on how to solve this on my machine (not even a clue on where to start). This is just with a default Bigsur (latest version) and XCode installation ? specific user account ? specific JDK version ... just guessing where I could search further ... (when I get the Mac mini reinstalled again)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is just with a default Bigsur (latest version) and XCode installation ?
Mac version: 10.16
Xcode path: /Applications/Xcode.app/Contents/Developer
Xcode version: 12.5

specific JDK version
OpenJDK 11, though it isn't related to the error.

The process is running as an administrator.

The first step is to understand that it is not related to the CPU type.
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
builder1 is now running on a new M1 Mac. Nothing special was needed.

AppPath=/Users/administrator/Documents
Builder: builder1
Mac version: 10.16
Xcode path: /Applications/Xcode.app/Contents/Developer
Xcode version: 12.5
2021-09-02 02:37:51.060:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2021-09-02 02:37:51.113:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2021-09-02 02:37:51.113:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2021-09-02 02:37:51.116:INFO:eek:ejs.session:main: node0 Scavenging every 660000ms
2021-09-02 02:37:51.368:INFO:eek:ejs.Server:main: Started @5544ms
Build server is ready
Build server version: 7.50
Adding user to keychain: xxx
02:46:42| Compilation time: 17234, xxx, queue: 0, success: true
02:55:15| Compilation time: 5270, xxx, queue: 0, success: true

hi Erel, your Mac version is 10.16, shouldn't BigSur be 11.x ? With the latest version I at least had 11.5 as a version number ...
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Mac version: 10.16
Xcode path: /Applications/Xcode.app/Contents/Developer
Xcode version: 12.5


OpenJDK 11, though it isn't related to the error.

The process is running as an administrator.

The first step is to understand that it is not related to the CPU type.

"Running as an administrator" as in: "sudo java -jar" or as in: "the logged in user on the Mac is an administrator"
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
I have the strong impression something might be wrong with the certificates or their generation. would there be a way to test it using other certificates or created by someone else ? (of course in a safe way) ? can I use the certificates I generated with my other/working environment ?
 
Upvote 0
Top