How does one release to a staging environment or create a release for Enterprise/Ad Hoc distribution?
This is different from an AppStore release and requires a different provisioning profile, and optionally a different bundle id.
You'll need to add a conditional in your Rakefile
and make sure that you have all the correct certificates and provisioning profiles for each type of build you want.
app.release do
if ENV['staging'] == "true"
app.codesign_certificate = "iPhone Distribution: Your Company's Enterprise Certificate"
app.provisioning_profile = "distribution/Enterprise.mobileprovision"
app.identifier = "com.yourcompany.appnameenterprise"
else
app.codesign_certificate = "iPhone Distribution: Your Company's App Store Release Certificate"
app.provisioning_profile = "distribution/AppStore.mobileprovision"
app.identifier = "com.yourcompany.appname"
end
end
To set up the staging ENV
variable I have another rake task that sets it:
task :set_staging do
ENV['staging'] = "true"
end
Then to actually release:
desc "Release Enterprise build"
task :enterprise_release => [
:set_staging,
"archive:distribution",
]