iOS Question Mac Local Builder - observations, experiences and frustration

Robby

Member
Licensed User
Longtime User
I’d like to share my observations, experiences and frustration when using the Mac Local Builder. The aim of this post is to get some input from other users who might have hit similar issues and the fixes actioned to get the compiler actually compiling without so many errors.

1. Fail to load Xcode.
The version I run is 11.5 and is located in Applications/Xcode. I only have the one version. When I first hit the problem I ran: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer then xcodebuild -version to check - So no problems finding the app. The error occurs when I run java -jar B4iBuildServer.jar when the compiler starts then waits for Xcode and aborts when it can’t find it. I check by running xcodebuild -version which currently returns Xcode 11.5. Build version 11E608c. It can sometimes take 20 seconds to get a response

My current fix is to repeat xcodebuild -version until I get a response within 5-6 seconds. I then run java -jar B4iBuildServer.jar and Xcode is usually found by the compiler and runs. It can take quite a few efforts to get the compiler to see Xcode
I get the impression there is a timeout: is there a possibility for this to be checked and extended? Has anybody hit this problem and sorted out a better fix?

2. Error Java.lang.RuntimeException: Wrong Version of debug app started
No idea why this error occurs. It only happens immediately after the compiler has been successful. The debug screen is correctly displayed and immediately shut down. The message in logs is to Press on Tools-Clean Project to reinstall the app. I have learnt not to bother as the recompile ends up **CLEAN FAILED** and aborts. No changes to code when recompiling

3. My main fix for most issues is to close down the server, delete data under Uploaded Projects, run the server (wait for Xcode) Tools clean project (I don’t know what that does) then recompile. It might be successful first time or abort with either **BUILD INTERRUPTED** or **BUILD FAILED*. At that stage I have learnt to ignore the error, Press Tools Clean Project and recompile. It tends to be a successful recompile at this stage. Bearing in mind the code has not changed the issues are generated by the compiler without any indication as to why the same code should have problems one minute then compile successfully the next.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I check by running xcodebuild -version which currently returns Xcode 11.5. Build version 11E608c. It can sometimes take 20 seconds to get a response

My current fix is to repeat xcodebuild -version until I get a response within 5-6 seconds. I then run java -jar B4iBuildServer.jar and Xcode is usually found by the compiler and runs
I never encountered such error. However once the build server is running you don't need to stop it. It can run for months.

2. Error Java.lang.RuntimeException: Wrong Version of debug app started
No idea why this error occurs. It only happens immediately after the compiler has been successful. The debug screen is correctly displayed and immediately shut down. The message in logs is to Press on Tools-Clean Project to reinstall the app. I have learnt not to bother as the recompile ends up **CLEAN FAILED** and aborts. No changes to code when recompiling

3. My main fix for most issues is to close down the server, delete data under Uploaded Projects, run the server (wait for Xcode) Tools clean project (I don’t know what that does) then recompile. It might be successful first time or abort with either **BUILD INTERRUPTED** or **BUILD FAILED*. At that stage I have learnt to ignore the error, Press Tools Clean Project and recompile. It tends to be a successful recompile at this stage. Bearing in mind the code has not changed the issues are generated by the compiler without any indication as to why the same code should have problems one minute then compile successfully the next.
It is not needed to stop the build server.
Make sure that there aren't multiple debug apps installed on your device as it can cause this issue. If it happens, clean the project in the IDE (Ctrl + P) and run again. No need to touch the server.
 
Upvote 0
Top