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:

alvinmb

Member
Licensed User
Longtime User
Erel,
I will double check and start a fresh and see what happens. Thanks for the prompt reply and I will let you know later today.
Thanks

Erel,
The socket number was wrong. I have changed that and know I get further, but I still dont get a successful compile. The error message I get now is

Building Xcode project 0.01
Sending data to remote compiler. Error
Out: === CLEAN TARGET B4iProject OF PROJECT B4iProject WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies
[BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'

Create product structure
/bin/mkdir -p /Users/alvinbrown/Desktop/B4iBuild-Server/UploadedProjects/beta600/build/Release-iphoneos/B4iProject.app
error: Unable to create directory: /Users/alvinbrown/Desktop/B4iBuild-Server/UploadedProjects/beta600/build/Release-iphoneos/B4iProject.app (Permission denied)


Error: ** CLEAN FAILED **


The following build commands failed:
Create product structure
(1 failure)
 

alvinmb

Member
Licensed User
Longtime User
Erel,
The socket number was wrong. I have changed that and know I get further, but I still dont get a successful compile. The error message I get now is

Building Xcode project 0.01
Sending data to remote compiler. Error
Out: === CLEAN TARGET B4iProject OF PROJECT B4iProject WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies
[BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'

Create product structure
/bin/mkdir -p /Users/alvinbrown/Desktop/B4iBuild-Server/UploadedProjects/beta600/build/Release-iphoneos/B4iProject.app
error: Unable to create directory: /Users/alvinbrown/Desktop/B4iBuild-Server/UploadedProjects/beta600/build/Release-iphoneos/B4iProject.app (Permission denied)


Error: ** CLEAN FAILED **


The following build commands failed:
Create product structure
(1 failure)

I can now compile on the local mac. However I deleted by bridge app from my Ipad and then went to build a new one using the local MAC build. The app builds and I get the message to go and download the app using the WEB page. However when I click on the button nothings happens, so I cant rebuild and install the bridge app. How can I get past this hurdle?
 

alvinmb

Member
Licensed User
Longtime User
No. In the IDE I get the message to download the app after the build is successful. . I go to that address and I see the big button, I click on the button and nothing happens.
 

alvinmb

Member
Licensed User
Longtime User
The b4i bridge was installed. I deleted it.
The b4i certificate was and is installed.
 

alvinmb

Member
Licensed User
Longtime User
Ok I will try that. I did test the network connection by hitting the / test page, successful, But I will try you suggestion tomorrow.
 

imbault

Well-Known Member
Licensed User
Longtime User
Hi Erel,
I've just bought a new iPhone6, I modified my iOs Provisioning stuff and... everything goes right : My apps run well and are built locally on my Mac, on my iPhone4s, iPhone5s, iPad air and the new iPhone6

Perfect, just need the tableview (I'm teasing you)

Patrick
 
Last edited:

Luis Felipe

Member
Licensed User
Longtime User
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 (7 or 8): http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. Install Xcode 6.
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

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.

Multiple IPs

When the server is started it takes the first IP address reported by the OS and uses it as its own IP address. You can see this address in the server messages.
In most cases this is the correct address. However if it is not the correct IP address then the server will not be usable.
In that case you need to explicitly set the correct address:
- Open the key folder and delete all files.
- Edit key.txt and change it to:
B4X:
manual:<correct ip address>
For example:
manual:192.168.0.199

Hi Erel,

It's clear that we need a Mac to compile, OK, but What is not clear for me is in what platform works the B4i IDE: windows o Mac ?

Good job. There is a price (99$) for the launch of the product : 'till when?
What would be the "regular" price after ?

Thanx
 

Valtron

Member
Licensed User
Longtime User
Hi Erel,

It's clear that we need a Mac to compile, OK, but What is not clear for me is in what platform works the B4i IDE: windows o Mac ?

Good job. There is a price (99$) for the launch of the product : 'till when?
What would be the "regular" price after ?

Thanx
$ 119
 

netkomm

Active Member
Licensed User
Longtime User
hi Erel,

can I use a public ip to connect to my MAC? also, instead of the IP can I use a domain name?

reason is I have my mac at home (but is up 24/7) but the only way so far to access it is to use a DDNS address. In that case, which port would I need to open up in the firewall?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
It's clear that we need a Mac to compile, OK, but What is not clear for me is in what platform works the B4i IDE: windows o Mac ?
Not exactly. You can use our Mac builder service.

The IDE runs on Windows.

can I use a public ip to connect to my MAC? also, instead of the IP can I use a domain name?

reason is I have my mac at home (but is up 24/7) but the only way so far to access it is to use a DDNS address. In that case, which port would I need to open up in the firewall?
Yes. You need to manually set the ip address (or host) as described in the multiple ips section: http://www.b4x.com/android/forum/threads/local-mac-builder-installation.46402/

You need to open ports 51042 and 51041.

Note that you can use the remote builder service when you are not near the computer.
 

Luis Felipe

Member
Licensed User
Longtime User
Not exactly. You can use our Mac builder service.

The IDE runs on Windows.
OK. My question was because I work on Mac usually ;-).
Someone told me that in the future it will be available a OS X version of the IDE for B4i : any date planned ?
Thanx Erel
 
Status
Not open for further replies.
Top