iOS Tutorial Loading B4i on Mac with Parallels and Windows 7

Thought I'd share this sequence of tasks on how to set up B4i from scratch - hope it helps anybody just starting.

1. Windows

1.1 Create a Keys Folder e.g. C:\Users\User1\Documents\B4i\Keys

1.2 Set Path Configuration for Keys folder

Run B4i - Tools - Path Configuration - Keys - C:\Users\User1\Documents\B4i \Keys

1.3 Create a Private Sign Key

B4i - Create Private Sign Key - Tools - Private Sign Key
Check Keys folder for 2 files - B4i.p12 and certSigningRequest.csr

1.4. Apple Developer - Create Certificate

Internet Explorer - Apple Developer - Certificate - iOS - Request Certificate Manually - certificate signing request in blue) - iOS development - generate certificate - use .csr file from Keys Folder - Download Certificate ios- development.cer and save in Keys folder

1.5 Apple Developer - Create Identifier

Internet Explorer - Apple Developer - Identifiers - App ID e.g. MyApp Wildcard App ID e.g co.uk.mydomainname.*

1.6 Apple Developer Create Devices (must be iOS7+)

You will need the UDID of the iOS devices being used before completing this task.

Mac - iTunes - plug in device - Select the iOS device in iTunes (just below the volume at the top) - Summary - Click Serial Number and UDID will appear - right click the udid number and ‘copy’ will appear - click copy - run TextEdit - paste for safe keeping.

Windows - Internet Explorer - Apple Developer - Devices - Register Device e.g MyIpad UDID - paste the udid from task above - continue

1.7 Create Provisioning Provisioning Profile

Internet Explorer - Apple Developer - Provisioning Profiles - Development - — Manually generate profiles - iOS Development - Select Apple ID created in 1.5 ( must be one with .* at end) - Select Certificate created in 1.4 - Select Devices created in 1.6 - Name Profile e.g Development Select App id from task 1.5 - generate - Download and save in Keys folder. (File will end with .mobileprovision)

2. Mac

2.1 Create a folder to hold B4i files on the Mac e.g Documents/B4i

2.2 Copy os_development.cer .mobileprovision and B4i.p12 file from Keys to the folder just created on the mac

2.3 Double click os_development.cer .mobileprovision B4i.p12

2.3 Download macserver-aa and copy to the same folder on the Mac

2.4 Run the Build Server

Quit Parallels at this stage before running server otherwise server ip will not be correct

Mac - Terminal - change directory to where macserver-aa folder is located e.g. cd Documents/B4i/macserver-aa then run up the server from that folder

java -jar B4iBuildServer.jar

Notes the results e.g
https://192.168.1.15:51042
http://192.168.1.15:51041

3. Run Parallels - Windows - B4i

3.1 Set Build Server settings in B4i

B4i - Tools - Build Server - Server Settings - enter Server IP from 2.4 above e.g. 192.168.1.15 - Enter Server Port number from 2.4 use 51042

3.2 Build Configuration

B4i Project - Build Configuration - package name must tally with Identifier created in Apple Developer i.e if identifier = .co.uk.domain.* B4i package name is .co.uk.domain.<app name>

3.3 Set the iOS ip Address for B4i Bridge

B4i Tools - Device IP address e.g IOS Device 192.168.1.4

4. Compile

4.1. Load B4I Profile on iOS device

IOS Device - Safari - www.basic4ppc.com/ca.pem - check Settings - Profiles

4.2 Run Bridge

Safari - ip address as 2.4 above e.g 192.168.1.15:51041 (note 51041 not 51042)



5. B4i Compile

Compile - if all OK looks something like

Compilation completed successfully.

Make sure that B4i-Bridge is started (192.168.1.4).

Manually launch the app after installation.



6. Go to iOS device - Safari - Install App - Would you like to install- Install - Go to new app icon - click to install.



Error Messages

Provisioning profile must be exactly 1 file.

If you used Safari to access Apple Developer then files are downloaded to the Mac. The .mobileprovisioning file must be copied to the Keys folder in Windows. When transferring a file from the Mac to Windows an additional file beginning with a . then same name is saved as well. Check the Keys folder and delete any files beginning with a . otherwise an error will occur during compilation indicating provisioning profile must be exactly 1 file.



Can’t find provisioning file.

The provisioning profile file in the Keys folder in Windows must be the one double clicked on the Mac otherwise the compilation will stop with an error indicating can’t find provisioning file.



Pre-compiled Headers

Remove a folder

cd /var/folders/7f/lj13260j44946mmbxwbm16r00000gn/C/com.apple.DeveloperTools/6.1-6A1052d/Xcode/SharedPrecompiledHeaders

rm -R B4iProject-Prefix-donzuetjbxjmrbckuqacyvcwmirm
 

Bruno.im

Member
Licensed User
Thank you very much Robby, this was so helpful. I am using Vmware but your instructions are perfect. The only thing I would add is to be careful when creating the certSigningRequest.csr , it has to be created with B4i and NOT from the Keychain, I did make the mistakes of reading your instructions too fast. Thanks again
 

gjt211

Member
Licensed User
Hi Robby,

Thank you for such a great post, however I can't get past step 1.3

My setup, is MacMini, latest OS X, Fresh Win7 running in VM Ware Fusion. I will be using my own local builder, not the hosted one.

I have installed B4i in Win. I put my first and last name in both the name and organisation, my country code AU, and a password of my choosing. I then click Create New button and wait, wait, wait, then I get a response "An error occurred. Error creating keystore file. Communication error: Connect failure"

I am very new to this, so don't know what I am doing wrong.
Can anyone help please?
 
Top