What to set for codesign_certificate?
Closed this issue · 10 comments
Sorry, I'm new to building RubyMotion apps. I see in the generated Rakefile
that RedPotion sets some sample values for codesign_certificate
and provisioning_profile
:
app.release do
app.entitlements['get-task-allow'] = false
app.codesign_certificate = 'iPhone Distribution: YOURNAME'
app.provisioning_profile = "signing/myapp.mobileprovision"
app.entitlements['beta-reports-active'] = true # For TestFlight
app.seed_id = "YOUR_SEED_ID"
app.entitlements['application-identifier'] = app.seed_id + '.' + app.identifier
app.entitlements['keychain-access-groups'] = [ app.seed_id + '.' + app.identifier ]
end
I didn't find any documentation on this in the RedPotion docs but it would be really helpful for newcomers like me. I managed to work my way through the Apple Dev Center and iTunes Connect to generate a .certSigningRequest
, .cer
, and .mobileprovision
files. Now I'm trying to build and push to iTunes Connect for Test Flight distribution.
It looks like RedPotion is looking for my provisioning profile in a signing directory which was not generated, so I created one and moved the file there. Seems like maybe this directory should be automatically created and added to the .gitignore
file, but maybe there's a reason that it is not. So now what do I set for codesign_certificate
? Am I supposed to put my name/email in the YOURNAME
placeholder? Or am I supposed to point to the .cer
file?
Also I'm not sure what the seed_id
option is for. I might run into that issue next. Some comments in the Rakefile
would be helpful, or a page on the documentation site (which has been super helpful by the way!).
Any help you can provide would be greatly appreciated. Thanks!
@andrewhavens
In short you want to add the .cer file to your keychain and reference your developer name in the codesign_certificate. app.codesign_certificate = 'iPhone Developer: Your Name (XXXXXXXXXX)'
But read through this how to http://paulsturgess.co.uk/blog/2013/05/10/using-rubymotion-to-provision-an-app-onto-your-iphone/ and you'll be up and running in no time :)
Thanks, I eventually worked my way through it all. Here are some of the key things that were hard to figure out:
- You need to create a Certificate and Provisioning Profile for App Store Distribution (even if you only plan to distribute to testers through TestFlight)
- You need to double-click the
.cer
file to add it to the Keychain Access app 😂. There you will find the name thatcodesign_certificate
will be referencing. - The
SEED_ID
is the "Prefix" displayed when you view your App ID record in the Apple Developer Center. - You don't want to use the
motion-appstore
gem to upload your build. You have to use the Application Loader app. However, it's pretty easy to use. Just select the.ipa
file and upload. It will make it sound like you've uploaded it to the App Store, but really it just uploaded to iTunes Connect. Then log into iTunes Connect and mark the build as enabled for TestFlight.
@andrewhavens I'm curious - why dont you want to use motion-appstore
?
@squidpunch It doesn't work. I tried validating and uploading and it didn't return any output except when uploading to say that my password was wrong (which isn't true unless it's trying to use the wrong Apple ID).
@andrewhavens interesting, I use it on a regular basis without any issue! sounds like something with some digging around would be able to shake out the issue but perhaps a bit hard just replying comments back and forth :)
A page in the docs about this would be awesome Andrew.
👍 to @twerth's suggestion!
I figured it out my issue with motion-appstore
. First issue was not using a certificate/profile for distribution. Once I got that sorted out, I was calling motion validate APP-ID
assuming that APP-ID
was the ID of my App (e.g. 987654). However, replacing with the email address associated with my Apple account solved the problem. It did not matter that my account is associated with multiple teams. I successfully uploaded a build using motion-appstore.
I am working on a doc page for provisioning and distribution right now. =]
thanks for documenting this @andrewhavens im going to close this issue as its solved and now also documented via #120