npm.io
1.0.0 • Published 8 years ago

react-native-auryc

Licence
Copyright (c) 2018, The Auryc SDK is a copyrighted work belonging to Auryc. We or our suppliers exclusively own the information and content made available on or through the Site (other than information or content You provide) and the information and content in any communications Auryc sends You (collectively, “SDK”). You may use the SDK only in accordance with this Agreement. Subject to the terms and conditions of this Agreement (including Your compliance with this Agreement), Auryc grants You a limited, non-exclusive, non-transferable, non-sublicensable, revocable license to view and use the Auryc SDK (other than Software (defined in Section 4 of our Terms of Service) which is licensed only under the terms of Section 4 of our Terms of Service) for Your personal or internal business purposes. You may not use the Auryc SDK except as expressly authorized under this Agreement. You agree that any copy of the Auryc SDK that You make shall retain all copyright and other proprietary notices in the same form and manner as on the original. Except as expressly authorized under this Agreement or to the extent otherwise permitted under applicable law, You may not use, download, upload, print, display, perform, reproduce, publish, license, post, transmit, modify, create derivative works of, reverse engineer, disassemble, decompile, adapt, distribute, transfer, or exploit any Auryc SDK in whole or in part without Our prior written authorization.
Version
1.0.0
Deps
0
Size
2.4 MB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

react-native-auryc

iOS

  1. Go to ./ios folder in your react native project and do the followings

    1.1 Add Auryc to your podfile

    pod 'Auryc'

    1.2 Run the following commands

    pod install
    pod update
  2. Go to the root level and add the Auryc bridge to your project

npm install react-native-auryc --save
react-native link react-native-auryc
  1. Call the following method when your app starts (when your root component loads):
import Auryc from 'react-native-auryc';

componentDidMount () {
  Auryc.initialize(YOUR_SITE_TOKEN, YOUR_SITE_ID);
}
  1. (Optional) Call the available APIs. Please refer to your portal instructions for the complete list of APIs.
Auryc.identify('abc@example.com')
Auryc.addUserProperties({'company': 'Example Inc'});
...

Android

  1. Go to ./android folder in your react native project and add Auryc library

    1.1 In the project level, build.gradle, add Auryc’s maven repository.

    allprojects {
      repositories {
        ...
        maven {
          url "http://maven.auryc.com"
        }
        ...
      }
    }

    1.2 In the module level, build.gradle, define minimum SDK version to 18 and include the packaging options.

    android{
    ...
    defaultConfig {
      ...
      minSdkVersion 18
      multiDexEnabled false
      ...
    }
    packagingOptions {
    pickFirst 'META-INF/*'
    ...
    }
    }

    Then, add the Auryc SDK dependency.

    dependencies {
      compile 'com.auryc:android-sdk:1.1.0'
    }

    1.3 In your res/values/strings.xml, add the token and site_id.

    <string name="auryc_token">YOUR_SITE_TOKEN</string>
    <string name="auryc_site_id">YOUR_SITE_ID</string>
  2. Add the Auryc package to your project

npm install react-native-auryc --save
react-native link react-native-auryc
  1. Open MainApplication.java and change new RNAurycPackage() to new RNAurycPackage(this.getApplication())

  2. Call the following method when your app starts (when your root component loads):

import Auryc from 'react-native-auryc';

componentDidMount () {
  Auryc.initialize(YOUR_SITE_TOKEN, YOUR_SITE_ID);
}
  1. (Optional) Call the available APIs. Please refer to your portal instructions for the complete list of APIs.
Auryc.identify('abc@example.com')
Auryc.addUserProperties({'company': 'Example Inc'});
...

Other notes

Android integration
  1. Use gradle version 4+

  2. React-Native uses Android SDK version 23 which might introduce conflicts when newer version of SDK is used in your project. Consider adding the following block to build.gradle to resolve this.

subprojects {
     afterEvaluate {project ->
         if (project.hasProperty("android")) {
             android {
                 compileSdkVersion 25
                 buildToolsVersion '25.0.0'
            }
         }
    }
}
iOS

If you run into issues regarding

Print: Entry, “:CFBundleIdentifier”, Does Not Exist

follow the answers here: https://stackoverflow.com/a/41854111

Keywords