Menu
Menu Sheet Overlay
Search
Search Sheet

Setup Requirement

Deployment requirements.

Amazon Web Services (AWS) Credentials

Push Notifications projects are hosted on AWS S3. Mobify manages all deployment credentials. Please contact your Mobify project manager to obtain the required credentials.

Once you got your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, please securely store them on your computer.

Secure AWS credentials storage for Mac

Add both the AWS key and the AWS secret to the keychain:

Now define the following alias in ~/.bash_profile:

alias with_aws='env AWS_ACCESS_KEY_ID=$(security find-generic-password -a AWS_KEY -w) AWS_SECRET_ACCESS_KEY=$(security find-generic-password -a AWS_SECRET_KEY -w) bash -c'

Note This sets the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. This alias also lets you run any bash command in a sub-shell with those environment variables set, and when the command ends, the sub-shell exits and the values are forgotten.

To just run a sub-shell with the environment variables set, use with_aws bash.

Apple Certificate

Before deploying to production, ensure that the apple certificate (.cer) is living in the root folder before deploying to production so that it gets uploaded as well, as the apple certificate is not generated in the initial project generation.

Instructions (for Mobify staff)

1. Install Mobify-push-tools

Mobify-push-tools is a tool that simplifies the work flow for generating Apple Certificates and uploading development bundles to Mobify Cloud.

# Mobify-push-tools: https://github.com/mobify/mobify-push-tools
npm install -g mobify-push-tools

2. Create Apple Webpush ID for a website

Apple Webpush ID can be created at: https://developer.apple.com/account/ios/identifier/websitePushId. For convention, set the Webpush ID to be: web.com.the-name-of-the-website.www.

Example: for www.mobify.com, its Apple Webpush ID will be web.com.mobify.www.

3. Create Certificate Request files

A certificate requestion file (.csr) can be generated by the following command:

mobify-push web-cert web.com.mobify.www

It will generate a file called web.com.mobify.www.csr in your project folder.

4. Create and Save Certificate

  1. Open https://developer.apple.com/account/ios/identifier/websitePushId
  2. Select the Webpush ID created in step 2.
  3. Click edit.
  4. Click create certificate.
  5. Click continue and upload the csr file.
  6. Download the cerfiticate file (.cer) and save it in /custom/production/.