gradle-xcodePlugin icon indicating copy to clipboard operation
gradle-xcodePlugin copied to clipboard

Question: Distribution Method - Development

Open serhii-pokrovskyi opened this issue 4 years ago • 1 comments

How can I build *.ipa with this option? i'v found https://github.com/openbakery/gradle-xcodePlugin/blob/main/libxcode/src/main/groovy/org/openbakery/codesign/ProvisioningProfileReader.groovy ProvisioningProfileType

But, I can't figure out how to use it.

Regards, Serhii

serhii-pokrovskyi avatar Jan 17 '22 14:01 serhii-pokrovskyi

First you have to configure to perform a device build:

xcodebuild {
  configuration = 'Release'
  type = 'iOS'
  simulator = false

  ...
}

Then you have to specify also the sign settings. You need to export your certificate from your keychain.

xcodebuild {
	  ... // values from above

	signing {
		certificateURI = 'file:///path/you/your/certificate.p12' // that you have to export from your keychain
		certificatePassword = 'secret' // the password for the  certificate.p12
		mobileProvisionURI = 'file:///path/you/your/mobile_provisioning_file' // that you have created at the apple developer protal
    }
}

When you to run than the 'archive' and the 'package' task. The 'archive' task creates a xcarchive that the 'package' task use to create the 'ipa'.

PS. The ProvisioninProfileReader is use the extract information that is needed for the build from the mobile provisioning profile.

renep avatar Jan 17 '22 15:01 renep