Skip to content

onesignal

Community Action Reference: Inspected directly from Fastlane core ruby gem definitions.

Supported Platforms: ios, android

Create or update a new OneSignal application

Details

You can use this action to automatically create or update a OneSignal application. You can also upload a .p12 with password, a GCM key, or both.

Parameters & Options

Total options available: 10

Key Type Env Variable Default Required Description
app_id String ONE_SIGNAL_APP_ID - No OneSignal App ID. Setting this updates an existing app
auth_token String ONE_SIGNAL_AUTH_KEY - Yes OneSignal Authorization Key
app_name String ONE_SIGNAL_APP_NAME - No OneSignal App Name. This is required when creating an app (in other words, when :app_id is not set, and optional when updating an app
android_token String ANDROID_TOKEN - No ANDROID GCM KEY
android_gcm_sender_id String ANDROID_GCM_SENDER_ID - No GCM SENDER ID
fcm_json String FCM_JSON - No FCM Service Account JSON File (in .json format)
apns_p12 String APNS_P12 - No APNS P12 File (in .p12 format)
apns_p12_password String APNS_P12_PASSWORD - No APNS P12 password
apns_env String APNS_ENV production No APNS environment
organization_id String ONE_SIGNAL_ORGANIZATION_ID - No OneSignal Organization ID

Lane Context Shared Values

This action writes the following values to Actions.lane_context[SharedValues::...]:

Key Description
SharedValues::ONE_SIGNAL_APP_ID The app ID of the newly created or updated app
SharedValues::ONE_SIGNAL_APP_AUTH_KEY The auth token for the newly created or updated app

Examples

onesignal(
auth_token: "Your OneSignal Auth Token",
app_name: "Name for OneSignal App",
android_token: "Your Android GCM key (optional)",
android_gcm_sender_id: "Your Android GCM Sender ID (optional)",
fcm_json: "Path to FCM Service Account JSON File (optional)",
apns_p12: "Path to Apple .p12 file (optional)",
apns_p12_password: "Password for .p12 file (optional)",
apns_env: "production/sandbox (defaults to production)",
organization_id: "Onesignal organization id (optional)"
)
onesignal(
app_id: "Your OneSignal App ID",
auth_token: "Your OneSignal Auth Token",
app_name: "New Name for OneSignal App",
android_token: "Your Android GCM key (optional)",
android_gcm_sender_id: "Your Android GCM Sender ID (optional)",
fcm_json: "Path to FCM Service Account JSON File (optional)",
apns_p12: "Path to Apple .p12 file (optional)",
apns_p12_password: "Password for .p12 file (optional)",
apns_env: "production/sandbox (defaults to production)",
organization_id: "Onesignal organization id (optional)"
)

Source & Upstream