Search code examples
iphonemacosprovisioning

iphone: create binary that can be installed on test device


I have a situation here I have developers certificate and provisioning profile on my mac ready but these are prepared on some other mac machines

now I want to install this certificate + provisioning profile and create a binary and sent it across to my partner so that he can test this on his device

is this thing possible or is it necessary to connect that device to my mac


Solution

  • First you are going to have to send him the provisioning profile that includes his device id, and have him install that on his iphone. Then you have to create an ipa file, which is basically just a .zip that's been renamed .ipa of the entire .app directory, here is some ruby code I wrote that does basically this (Won't run out of the box, just useful as an example):

    source_dir = Dir.pwd
    build_path = build_directory + "/build/#{config_name}-iphoneos"
    app_path = build_path + "/#{target}.app"
    ipa_path = build_path + "/#{target}.ipa"
    payload = build_path + "/payload/"
    
    # Fail on error here.
    Dir.mkdir(payload)
    FileUtils.cp_r(app_path, payload)
    
    Dir.chdir(build_path)
    ret = `zip -r #{target}.ipa payload`
    Dir.chdir(source_dir);
    
    if($?.exitstatus != 0)
      # This shouldn't fail, figure out when it does and how to fix it.
      unexpected_error(ret)
    end
    
    return ipa_path;
    

    At this point itunes, the iphone configuration utility, It's also possible to do a remote install over the internet, but this is much more difficult.