Compile React Native source code

Compile React Native source code

Requirements

  1. NodeJS, Watchman, Cocoa Pods (for iOS only)
  2. Android Studio & XCode
  3. A SimiCart account
  4. A Magento website with SimiCart Connector installed. You can get SimiCart Connector at the links below:
    1. Magento version 2.3.4 and above: https://github.com/Simicart/SimiCart-Magento2.x/archive/1.0.17.zip
    2. Magento version below 2.3.4: https://github.com/Simicart/SimiCart-Magento2.x/archive/1.0.16-marketplace.zip
  5. The following Magento plugins are also required:
    https://github.com/Simicart/Magento-plugins 
    1. Standard package:
      1. Version4.0/M2/paypalexpress
    2. Professional package: All plugins from Standard plus:
      1. Version4.0/M2/custompayment, Version4.0/M2/Simifbconnect, Version4.0/M2/Simideeplink, Version4.0/M1/Simistorelocator

How to compile source code

Extract the source code package.
1. Open file src/core/helper/simicart.js

  1. Replace YOUR_MAGENTO_SITE with your Magento base URL
  2. SECRET_KEY & TOKEN_KEY: get these keys from your backend > SimiCart > General Settings
2. Open your terminal, navigate to your source folder location
3. Run this command:  npm install
4. To run app on Android
  1. Open Android Studio and select Open an existing Android Studio project.
  2. Choose android folder under your source
  3. On terminal, at your source folder path, run the following command:
    react-native bundle --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --dev false --reset-cache --assets-dest android/app/src/main/res/
  4. Navigate to android folder and run this: npx jetify
  5. Select your target device then click button Run
If you change anything in JS, you need to re-run the command from step c.

5. To run app on iOS
  1. Navigate to ios folder under your source, then run this command: pod install
  2. Open Xcode for this project by double clicking SimiCart.xcworkspace file
  3. Select your target device (virtual or physical device) then click button Run on Xcode.

    • Related Articles

    • Integrate Tapita into other platforms

      After you publish a page, go to Page Settings. Scroll down to Generated HTML field and copy the whole HTML content. Now, just insert this code into your website page's HTML. You can put our library simi-pagebuilder-react@1.3.8.umd.js  to body tag but ...
    • General Frontend Integration Guide

      Magento PWA Studio Clone Tapita PWA Studio repo Scenario 1: If you use @magento/create-pwa package From the root directory of your PWA Studio project, clone the repository: git ...
    • Install SimiCart Mobile App Connector

      After purchasing SimiCart mobile app and logging into your account, click App Management to go to your Dashboard. To get started, on the navigation bar, click on Integration. The Connector needs to be installed in the Magento backend to sync your app ...
    • Create and send push notifications

      In your OneSignal dashboard, go to Messages > New Push. Optional: Input a Message Name for internal recognition of the message. See Message Name for more details. Step 1. Audience The Segments of devices in which you wish to include and exclude from ...
    • Install Tapita for Vue Storefront

      From your Vue project folder, install vuera to use ReactJS in Vue yarn add vuera Install Tapita Page Builder module npm install --save simi-pagebuilder-react Install React npm install --save react react-dom Then run this command yarn install Now we ...