Skip to content

This application demonstrates how to integrate the Segment react-native library with a mobile application running on Android and iOS. This application also uses the Shopify GraphQL APIs.

License

Notifications You must be signed in to change notification settings

segment-boneyard/SegmentMobileDemoReactNative

Repository files navigation

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.

About

This application demonstrates how to integrate the Segment react-native library with a mobile application running on Android and iOS. This application also uses the Shopify GraphQL APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published