Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.63 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.63 KB

SegmentMobileDemoReactNative

js-standard-style

  • React Native App Utilizing Ignite

⬆️ How to Setup

Step 1: git clone this repo

Step 2: cd to the cloned repo

Step 3: yarn install

Step 4: cd ./ios && pod install (make sure you have Cocoapods set up)

If you are updating from an old version of this app - you may want to delete all of your Pods and reinstall them and rebuild the app (iOS only).

Make sure that you are using the Cocapods-generated .workspace file when working with xcode otherwise you will have problems.

In order for this app to be built and deployed to a simulator, you will need to enable a developer profile in xcode, even when using the command line build tools.

▶️ How to Run App

  1. cd to the repo
  2. Run Build for either OS
  • for iOS
    • run react-native run-ios
  • for Android
    • Run Genymotion
    • run react-native run-android

🔐 Secrets

This project uses react-native-config to expose config variables to your javascript code in React Native.

You have to provide a .env file with at least the following entries:

SEGMENT_WRITE_KEY= <your Segment write key>
SHOPIFY_API_URL= <your shopify API endpoint>
SHOPIFY_AUTH_TOKEN= <your shopify auth token>

For the app to work out of the box, you will want to copy the Shopify data format used in this app: Segment Demo eCommerce Store.