iOS Tutorial Local Mac Builder Installation

Status
Not open for further replies.
Edit: Apple Configurator 2 must be used when using a local Mac:
iOS compilation requires an Apple Mac computer. Developers have two options with B4i:
- Use a local Mac machine connected over the local network.
- Use our hosted builder rental service.

These instructions explain how to install the builder on a local Mac machine.

1. Install Java JDK 8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
OpenJDK 11+ is also good (link is available here: https://www.b4x.com/android/forum/t...lest-way-to-distribute-ui-apps.99835/#content)

2. Install Xcode 14:
2.5. You need to run Xcode at least once. Approve installation of additional components when asked.
3. Download and unzip the B4i-Builder.
4. Open a terminal and navigate to B4i-Builder folder.
5. Run it with: java -jar B4iBuildServer.jar
6. Set the builder IP address in the IDE under Tools - Build Server - Server Settings
7. Install Apple configurator 2: https://www.b4x.com/android/forum/threads/installing-apps-with-apple-configurator-2.128397/#content
It is not possible to make an over the air installation with the local builder.
8. You might be asked for a password during a build (codesign step). The password is 111111

Notes & Tips

-
By default ports numbers 51041 (http) and 51042 (https) are used.
- The firewall should be either disabled or allow incoming connections on these two ports.
- You can test that the server is running by going to the following link: http://<server ip>:51041/test
- You can kill the server with: http://<server ip>:51041/kill
- It is recommended to set your Mac server ip address to a static address. This can be done in your router settings or in the Mac under Network settings.
- A single Mac builder can serve multiple developers as long as they are all connected to the same local network. Note that you are not allowed to host builders for developers outside of your organization.


Troubleshooting

BuildServer v1.02 includes a new test page which provides information about the server, including the SSL key ip address and the libraries versions.
You can access this page with: <Mac ip>:51041/test
 
Last edited:

Rattigan_Roger

Member
Licensed User
Longtime User
I am obviously missing the obvious.

I often do and apologize in advance.

I cannot find the link to download MacBuilder
I have my certificates and java installed.
Kindly point me in the right direction.
 

moore_it

Well-Known Member
Licensed User
Longtime User
Hi all,

i have started a local mac server that work fine if i connect via browser ... but from my iphone it's not view why ????
 

moore_it

Well-Known Member
Licensed User
Longtime User
My problem is that, the iphone is not to be able to connnect to the local server on mac all the rest work perfectly ...
When i create a b4ibridge from my parallel 11 win10 emulation, the local server work perfectly and create a .ipa file but not be able to download from mobile browser (the ipa work and is possible to load on my iphone but the ip not 192.168.0.x but 10.19.18.190 .... ??????????)
The app created with b4i in final mode work perfectly on my iphone if i load in it with itunes ...

Mah !
 

MikeH

Well-Known Member
Licensed User
Longtime User
I recently bought a Mac Mini and transferred my whole system over to OSX and Win7 with Parallels.

So far, I am having great success compiling to the Xcode simulator. Everything works fine there.

My problem lies in compiling to my iPad and iPhone. I get error: "The network path was not found."

This seems strange because the layout designer works fine, I can surf to the test page and I can ping the correct url for my devices without any problem.

I have tried resetting and deleting the key file, sharing wifi from my Mac Mini, deleting and re-installing B4i-Bridge and restarting my iPad. None of these have helped. Of course, I wasnt able to install B4i-Bridge because B4i couldnt locate my iPad on the network.

Does anyone have a solution to this? Im sure it'll be something simple that I'm overlooking in the network.

Thanks in advance.
 

MikeH

Well-Known Member
Licensed User
Longtime User
Where / when do you get this error?

In B4i IDE when I compile (f5):

upload_2016-1-6_9-0-47.png



The address is 192.168.0.5 which Im assuming is correct because the layout designer works and that is the address shown by B4i-Bridge on the device.

If I do the same thing with the simulator enabled instead of a device IP address, it works fine.

Further exploring, Im getting this when I run B4iServer:

B4X:
Last login: Wed Jan  6 09:25:10 on ttys000
Mikes-Mac-mini:~ mike$ cd /Applications/Utilities/macserver
Mikes-Mac-mini:macserver mike$ java -jar B4iBuildServer.jar
Build server version: 2.3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2016-01-06 09:27:17.081:INFO::main: Logging initialized @153ms
Loading default configuration file.
AppPath=/Applications/Utilities/macserver
Creating key for: 10.37.129.2
2016-01-06 09:27:19.058:INFO:oejs.Server:main: jetty-9.1.z-SNAPSHOT
2016-01-06 09:27:19.079:WARN:oejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle for base name org/eclipse/jetty/http/encoding, locale en_US
2016-01-06 09:27:19.097:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@6fb554cc{/,file:/Applications/Utilities/macserver/www,AVAILABLE}
2016-01-06 09:27:19.099:INFO:oejs.AbstractNCSARequestLog:main: Opened /Applications/Utilities/macserver/logs/b4j-2016_01_06.request.log
2016-01-06 09:27:19.114:WARN:oejuc.AbstractLifeCycle:main: FAILED ServerConnector@68837a77{HTTP/1.1}{0.0.0.0:51041}: java.net.BindException: Address already in use
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:279)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:218)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:337)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:151)
    at b4j.example.main._appstart(main.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.main(main.java:29)
2016-01-06 09:27:19.115:WARN:oejuc.AbstractLifeCycle:main: FAILED ServerConnector@6be46e8f{SSL-http/1.1}{0.0.0.0:51042}: java.net.BindException: Address already in use
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:279)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:218)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:337)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:151)
    at b4j.example.main._appstart(main.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.main(main.java:29)
2016-01-06 09:27:19.116:WARN:oejuc.AbstractLifeCycle:main: FAILED org.eclipse.jetty.server.Server@3567135c: MultiException[java.net.BindException: Address already in use, java.net.BindException: Address already in use]
MultiException[java.net.BindException: Address already in use, java.net.BindException: Address already in use]
    at org.eclipse.jetty.server.Server.doStart(Server.java:303)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:151)
    at b4j.example.main._appstart(main.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.main(main.java:29)
main._appstart (java line: 127)
MultiException[java.net.BindException: Address already in use, java.net.BindException: Address already in use]
    at org.eclipse.jetty.server.Server.doStart(Server.java:303)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:151)
    at b4j.example.main._appstart(main.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.main(main.java:29)
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:279)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:218)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:337)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:151)
    at b4j.example.main._appstart(main.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.main(main.java:29)
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:279)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:218)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:337)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:151)
    at b4j.example.main._appstart(main.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.main(main.java:29)

main.main (java line: 29)
java.lang.RuntimeException: MultiException[java.net.BindException: Address already in use, java.net.BindException: Address already in use]
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.main(main.java:29)
Caused by: MultiException[java.net.BindException: Address already in use, java.net.BindException: Address already in use]
    at org.eclipse.jetty.server.Server.doStart(Server.java:303)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:151)
    at b4j.example.main._appstart(main.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    ... 2 more

More:
Ive reset my router, got new ip addresses and set up the build server settings but Im back to where I was before. Compile to simulator works, compile to device gives the error as shown in the image.
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
The address in use error means that there is already a server running. You can kill a server from the browser with <ip address>:51041/kill

The address is 192.168.0.5 which Im assuming is correct because the layout designer works and that is the address shown by B4i-Bridge on the device.
I think that you are confusing the device ip address with the mac address.
 

MikeH

Well-Known Member
Licensed User
Longtime User
The address in use error means that there is already a server running. You can kill a server from the browser with <ip address>:51041/kill

I got past this by resetting things and got back to the original problem.

I think that you are confusing the device ip address with the mac address.

The compiler is working for the simulator, and as you can see, the server settings are correct:

upload_2016-1-6_11-23-28.png


The mac address is 192.168.0.10 and my device addresses are 192.168.0.3 and 192.168.0.7 but I cant compile to these.

Youre right about me being confused though!
 

MikeH

Well-Known Member
Licensed User
Longtime User
B4X:
B4i version: 2.31
Parsing code.    (0.02s)
Compiling code.    (0.84s)
Compiling layouts code.    (0.00s)
Compiling debugger engine code.    (2.37s)
Building Xcode project    (0.61s)
Sending data to remote compiler.    Error
The network path was not found.

The terminal shows this:

B4X:
Last login: Wed Jan  6 10:10:16 on ttys000
Mikes-Mac-mini:~ mike$ cd /Applications/Utilities/macserver
Mikes-Mac-mini:macserver mike$ java -jar B4iBuildServer.jar
Build server version: 2.3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2016-01-06 11:33:16.342:INFO::main: Logging initialized @158ms
Loading default configuration file.
AppPath=/Applications/Utilities/macserver
Creating key for: 192.168.0.10
2016-01-06 11:33:18.119:INFO:oejs.Server:main: jetty-9.1.z-SNAPSHOT
2016-01-06 11:33:18.137:WARN:oejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle for base name org/eclipse/jetty/http/encoding, locale en_US
2016-01-06 11:33:18.154:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@6fb554cc{/,file:/Applications/Utilities/macserver/www,AVAILABLE}
2016-01-06 11:33:18.157:INFO:oejs.AbstractNCSARequestLog:main: Opened /Applications/Utilities/macserver/logs/b4j-2016_01_06.request.log
2016-01-06 11:33:18.181:INFO:oejs.ServerConnector:main: Started ServerConnector@52af6cff{HTTP/1.1}{0.0.0.0:51041}
2016-01-06 11:33:18.804:INFO:oejs.ServerConnector:main: Started ServerConnector@1fc2b765{SSL-http/1.1}{0.0.0.0:51042}
2016-01-06 11:33:18.805:INFO:oejs.Server:main: Started @2626ms
Build server is ready
https://192.168.0.10:51042
http://192.168.0.10:51041
Build server version: 2.3
11:40:46| Compilation time: 3169, b4i_default, queue: 0, success: true

This line followed a successful compilation to the simulator:
B4X:
11:40:46| Compilation time: 3169, b4i_default, queue: 0, success: true

If I compile to a device, there is no output.
 
Last edited:

MikeH

Well-Known Member
Licensed User
Longtime User

MikeH

Well-Known Member
Licensed User
Longtime User
Erel, Thank you for your help. I discovered my dev certificate expired yesterday. I'll renew them and hopefully all will be well.
 
Status
Not open for further replies.
Top