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:

Paulux

Member
Licensed User
Longtime User
Hello,
Sorry but i don't understand.
Where a can found the B4i-Builder ?

Regards
 

Paulux

Member
Licensed User
Longtime User
Hello Erel,

I´m beta tester and i have tested with your server.

I'm interressing for build m'y release on my Mac and buying the appropriated licence.

I'm not sure it's work, if the Link come after purchase it's possible to switch licence ?

Nb : this link is not on the mail for the beta.

Best regards
 
Last edited:

cirollo

Active Member
Licensed User
Longtime User
Hi! I'm having some problems with local mac builder, I followed the tutorials and now on mac I have:

B4X:
MBPdiCiMarciano:macserver-aa cirollo$ java -jar B4iBuildServer.jar

Build server version: 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2014-11-12 21:12:00.321:INFO::main: Logging initialized @396ms

Loading default configuration file.

AppPath=/Users/cirollo/macserver-aa

Creating key for: 192.168.1.7

2014-11-12 21:12:02.976:INFO:oejs.Server:main: jetty-9.1.z-SNAPSHOT

2014-11-12 21:12:03.006:WARN:oejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle for base name org/eclipse/jetty/http/encoding, locale it_IT

2014-11-12 21:12:03.037:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@45c8e616{/,file:/Users/cirollo/macserver-aa/www,AVAILABLE}

2014-11-12 21:12:03.043:INFO:oejs.AbstractNCSARequestLog:main: Opened /Users/cirollo/macserver-aa/logs/b4j-2014_11_12.request.log

2014-11-12 21:12:03.086:INFO:oejs.ServerConnector:main: Started ServerConnector@48140564{HTTP/1.1}{0.0.0.0:51041}

2014-11-12 21:12:03.496:INFO:oejs.ServerConnector:main: Started ServerConnector@582ccbc9{SSL-http/1.1}{0.0.0.0:51042}

2014-11-12 21:12:03.497:INFO:oejs.Server:main: Started @3589ms

Build server is ready

https://192.168.1.7:51042

http://192.168.1.7:51041

If i Try to reach the urls from win pc or from iphone connected via wi-fi I get:

No build is currently available. Refresh the page if you have already compiled the project.

If I try to compile or build the bridge app from the ide I get the invalid token message.

PS I was using the beta version until today (when i purchase the full version!) and with remote compiler I didn't get any issue, so I take the keys subfolder from the beta and pasted it in the 1.0 version, something I'm missing???

regards,
ciro

UPDATE
after putting mac ip into server setting (what do i should insert into user id, the mac user?) now I get these errors:

Building designer app. 1.25
Building Xcode project 0.31
Sending data to remote compiler. Error
Error: security: SecKeychainDelete: The specified keychain could not be found.

Error:

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

I'm a windows user, So i need some help to make this working!
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm not sure it's work, if the Link come after purchase it's possible to switch licence ?
Not sure that I understand your question...

Nobody can help?
Please be more patient. We are all in different time zones.

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Try to start Xcode on your Mac. You need to do it once and then it will work.

Click on the Launchpad app icon (grey spaceship) and write Xcode.
 

Paulux

Member
Licensed User
Longtime User
@Erel : No Problem.
i'm ordering B4i + Hosted Mac Builder and i 'm testing with local Mac computer when i receive the link to the builder.

Regards
 

drponciano

Member
Licensed User
Longtime User
Hello Erel. Congratulations for the much needed B4i. I'm also an old and happy B4A developer and purchased B4i (perhaps one of the first), but have a problem. IDE is installed and working in a MacMini with Parallels VM running Windows 7 (Same setup used for B4A). The builder seems to be working fine with manual-fixed ip address 192.168.100.102. Testing 192.168.100.102:51041/test in OSX browser and also in Windows VM browser works fine. Server settings are:

User Id: b4i_default, ip: 192.168.100.102 (ip address of Mac OSX side),port 51041.

When trying to build the B4i-Bridge App I get an error in "Sending data to remote computer" with "Mobile provision file not found". Any idea what could be wrong? Help is much appreciated.
 

davepamn

Active Member
Licensed User
Longtime User
I have xcode 6.1

I ran java -jar b4ibuildserver.jar

I get a message, "Build server is ready"

What next?

I don't think the installation completed. Do you have a youtube that shows what to expect after installation?

Should I use the Win7 b4i approach to building apps? recommendations
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
When trying to build the B4i-Bridge App I get an error in "Sending data to remote computer" with "Mobile provision file not found". Any idea what could be wrong
Seems like haven't created a certificate and provisioning file. See this tutorial:
Creating a certificate and provisioning profile

What next?
You need to create a certificate and install B4i-Bridge.
Creating a certificate and provisioning profile
Installing B4i-Bridge and debugging first app


Development is done with the IDE on the Windows computer.
 

davepamn

Active Member
Licensed User
Longtime User
I installed the b4i application on my win7 box and registered the software

I have an existing provisioning and certificate for my development profile for Xcode

Can use use the existing Xcode provision and certificate documents?

I put the two files under by c:\b4i\keys directory

I will next setup the bridge software on the iOS device
 

alvinmb

Member
Licensed User
Longtime User
It might be a network issue. It did work with the remote compiler, right?

Try to access the https port instead of the http port in the browser. You can see the link when you start the server.
Erel,
I have tried multiple times, removed and reinstalled everything including certs and profiles. I can build successfully on the local build server, however I can not install the bridge app on my target device ( Ipad running IOS 8.1 (12b410)). I can get to the page with the install button but when I click it it does nothing. Im now at a point where I don't know what next to try. I have purchase B4i and now im thinking rather than beat my head against the wall can I purchase access to the hosted server version so I can see if this is a local build issue or something wacky on my system that will prevent me from using the hosted server as well?

Thanks
 

davepamn

Active Member
Licensed User
Longtime User
Try to export the private key from Keychain Access and put it in B4i keys folder. It should be named B4i.p12.

You need to have three files in the keys folder: B4i.p12, ios_development.cer and <provision>.mobileprovision.

Check dependencies
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“iOS Team Provisioning Profile: *”) were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'

Does this message mean, I have the wrong b4i.p12?
 

davepamn

Active Member
Licensed User
Longtime User
Try to export the private key from Keychain Access and put it in B4i keys folder. It should be named B4i.p12.

You need to have three files in the keys folder: B4i.p12, ios_development.cer and <provision>.mobileprovision.


What goes in the <provision> for a name?
 

davepamn

Active Member
Licensed User
Longtime User
Try to export the private key from Keychain Access and put it in B4i keys folder. It should be named B4i.p12.

You need to have three files in the keys folder: B4i.p12, ios_development.cer and <provision>.mobileprovision.

1. I downloaded the development certificate from Apple
2. I exported the Key, gave it a password, and renamed it to b4i.p12

The compile worked. Yeah

Then click on the Install button.
Troubleshooting:
1. Make sure that B4I certificate is installed (www.b4x.com/ca.pem).
2. Make sure that the provisioning file includes the target device UDID.
3. Check the link for typos.
Compilation completed successfully.
 

fernandodotnet

Member
Licensed User
Longtime User
Hi,

1 - I did the installation on a Windows copied the exported keys to the windows address
2 - Insert the UDID and I generated the certificate provisioning
3 - The Application Bridge was generated and only managed to install using Itunes.
4 - I created a new HelloWorld application and sent it to run in Debug mode and let the app open the bridge at 6. Iphone with iOS 8.1. In execution using the IDE and get a warning ára verify that the server is the local Mac is running.

What to do about the Bridge App not accept direct execution by the IDE?
I noticed also that the design mode is working, I could draw a button and a label
 
Status
Not open for further replies.
Top