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:

pezhooman

Member
Licensed User
Longtime User
No .just i turn off my computer for 4 days.and then now something is wrong
howevere what should i do?how can fix it?
 

pezhooman

Member
Licensed User
Longtime User
this is all my server logs :

Last login: Thu Jul 23 10:49:20 on console
mostafas-Mac:~ mostafapezhooman$ cd desktop
mostafas-Mac:desktop mostafapezhooman$ cd macserver-2b
mostafas-Mac:macserver-2b mostafapezhooman$ java -jar b4ibuildserver.jar
Build server version: 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-07-23 10:52:08.908:INFO::main: Logging initialized @2487ms
Loading default configuration file.
AppPath=/Users/mostafapezhooman/Desktop/macserver-2b
Creating key for: 192.168.0.17
2015-07-23 10:52:13.543:INFO:eek:ejs.Server:main: jetty-9.1.z-SNAPSHOT
2015-07-23 10:52:13.583:WARN:eek:ejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle for base name org/eclipse/jetty/http/encoding, locale en_US
2015-07-23 10:52:13.660:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@3f2a3a5{/,file:/Users/mostafapezhooman/Desktop/macserver-2b/www,AVAILABLE}
2015-07-23 10:52:13.665:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened /Users/mostafapezhooman/Desktop/macserver-2b/logs/b4j-2015_07_23.request.log
2015-07-23 10:52:13.928:INFO:eek:ejs.ServerConnector:main: Started ServerConnector@531be3c5{HTTP/1.1}{0.0.0.0:51041}
2015-07-23 10:52:14.624:INFO:eek:ejs.ServerConnector:main: Started ServerConnector@76cb15c2{SSL-http/1.1}{0.0.0.0:51042}
2015-07-23 10:52:14.625:INFO:eek:ejs.Server:main: Started @8264ms
Build server is ready
https://192.168.0.17:51042
http://192.168.0.17:51041
Adding user to keychain: b4i_default
success: true, 65
10:53:15| Compilation time: 7047, b4i_default, queue: 0, success: false
 

Adilson Jacinto

Active Member
Licensed User
Longtime User
if i run server test its ok, also if i open the site in google chrom in my PC i see the Intsall app button, but not in safari, maybe something with the b4i certificate is wrong...

Hi @ilan, can you help me please, I am trying to install b4i on my mac but first of all I don't have the B4i full version file for mac then I tried to run http://192.168.0.13:51041/test and an error message come up saying safary cannot find page. So don't really know what do to.

Thanks
 

Adilson Jacinto

Active Member
Licensed User
Longtime User
If you already know it then you should update your question.

What happens after you run this command? What happens when you try to navigate to the test page?

It created config_example.txt, Key folder, UploadedProjects folder, key.txt and logs folder...

When I the test page I get an error saying safari can't connect to the server
 

ilan

Expert
Licensed User
Longtime User
Are your windows pc and mac connected to the same network?

What i do is, connect lan to mac and in my mac i share wifi connection (i use my mac as a wifi router) and then connect my windows pc to my mac...

Then run b4i server on your mac and the ip you get you should put in your windows internet explorer... (../test)
 

Adilson Jacinto

Active Member
Licensed User
Longtime User
Are your windows pc and mac connected to the same network?

What i do is, connect lan to mac and in my mac i share wifi connection (i use my mac as a wifi router) and then connect my windows pc to my mac...

Then run b4i server on your mac and the ip you get you should put in your windows internet explorer... (../test)

Yes both mac and windows are connected to the same network, my mac is on wifi and windows on lan.

How do i even run b4i server? I don't see this file in the folder
 

ilan

Expert
Licensed User
Longtime User
i recommend you to connect your lan to the mac and your windows pc to your mac

to share connection in your mac go to (Apple signe left top corner) > system preferences > sharing > and check Internet Sharing

after you do this you should see an arrow up in your wifi symbol (top right corner)

-

connect now your windows pc to your mac network (you will connect also all your iphone devices and ipads to your mac)

now to load b4i server, you need to open Terminal: click on Launchpad > others > Terminal

now you will need to unzip the b4i server to a directory (name it "macserver") in directory let say DOWNLOADS and then in terminal you will need to cd (change directory) to this directory like this

(you will need to enter 2 lines)

cd downloads/macserver

and now we will run the server like this:

java -jar B4IBuildServer.jar

the server should now run and everything should work...

Good Luck :)
 

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
You can get my script to start the MacBuilder, is usefully to me:


http://www.visualnet.inf.br/download/b4x/MacB4iServer.zip

Just change your MacBuilder path and start, just this!

B4Builder.jpg
 

carchek

Member
Licensed User
Longtime User
When trying to build my first app i get an error: "Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance" Using OS X 10.10.5 and xcode 7.0
Please help
 

abarnett

Member
Licensed User
Longtime User
How is the best way to allow remote app load when using local mac builder. My apple device can see the app install file via safari but trying to install it 'calls up the local mac server ip address'. Remote compile works fine.
 

abarnett

Member
Licensed User
Longtime User
Which error do you get when you try to install B4i-Bridge?
There is no error. All compiles fine but when I am not in the office and need to get an update to the iPhone the browser link shows an update available but clicking on the install icon reports the 'local' IP address of the server which obviously I cannot connect to. So I can remote compile, great but then cannot install and test.

Your hosted service works great but I cannot use bought libraries using it. A bit of a problem.

Any ideas would be welcome..
 

abarnett

Member
Licensed User
Longtime User
Commercial libraries can be uploaded to the hosted builder.

You will need to use a dynamic dns service and configure your router and computer firewall.
The library I am using at the moment is Alberto's iComboBox but my understanding is that I have a paid version, so only the trial version would get loaded to the hosted builder.

I have a fixed IP address for the site and Mac server. My B4i can see it and will compile to it without problems, just cant debug or install remotely.
 
Status
Not open for further replies.
Top