get_push_certificate
Community Action Reference: Inspected directly from Fastlane core ruby gem definitions.
Supported Platforms: ios, mac
Ensure a valid push profile is active, creating a new one if needed (via pem)
Details
Additionally to the available options, you can also specify a block that only gets executed if a new profile was created. You can use it to upload the new profile to your server. Use it like this:| |
get_push_certificate(| new_profile: proc do| # your upload code| end|)||
Parameters & Options
Total options available: 16
| Key | Type | Env Variable | Default | Required | Description |
|---|---|---|---|---|---|
platform |
String |
PEM_PLATFORM |
ios |
Yes | Set certificate’s platform. Used for creation of production & development certificates. Supported platforms: ios, macos |
development |
String |
PEM_DEVELOPMENT |
false |
Yes | Renew the development push certificate instead of the production one |
website_push |
String |
PEM_WEBSITE_PUSH |
false |
Yes | Create a Website Push certificate |
voip_push |
String |
PEM_VOIP_PUSH |
false |
Yes | Create a VoIP Services certificate |
generate_p12 |
String |
PEM_GENERATE_P12_FILE |
true |
Yes | Generate a p12 file additionally to a PEM file |
active_days_limit |
Integer |
PEM_ACTIVE_DAYS_LIMIT |
30 |
Yes | If the current certificate is active for less than this number of days, generate a new one |
force |
String |
PEM_FORCE |
false |
Yes | Create a new push certificate, even if the current one is active for 30 (or PEM_ACTIVE_DAYS_LIMIT) more days |
save_private_key |
String |
PEM_SAVE_PRIVATEKEY |
true |
Yes | Set to save the private RSA key |
app_identifier |
String |
PEM_APP_IDENTIFIER |
- |
Yes | The bundle identifier of your app |
username |
String |
PEM_USERNAME |
- |
Yes | Your Apple ID Username |
team_id |
String |
PEM_TEAM_ID |
- |
No | The ID of your Developer Portal team if you’re in multiple teams |
team_name |
String |
PEM_TEAM_NAME |
- |
No | The name of your Developer Portal team if you’re in multiple teams |
p12_password |
String |
PEM_P12_PASSWORD |
- |
No | The password that is used for your p12 file |
pem_name |
String |
PEM_FILE_NAME |
- |
No | The file name of the generated .pem file |
output_path |
String |
PEM_OUTPUT_PATH |
. |
Yes | The path to a directory in which all certificates and private keys should be stored |
new_profile |
string_callback |
- |
- |
No | Block that is called if there is a new profile |
Examples
get_push_certificatepem # alias for "get_push_certificate"get_push_certificate( force: true, # create a new profile, even if the old one is still valid app_identifier: "net.sunapps.9", # optional app identifier, save_private_key: true, new_profile: proc do |profile_path| # this block gets called when a new profile was generated puts profile_path # the absolute path to the new PEM file # insert the code to upload the PEM file to the serverend)Source & Upstream
- Gem Action:
get_push_certificate.rb - Upstream Source: Inspect Ruby Implementation on GitHub
- Authors:
KrauseFx