New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

aiactiv-sdk-react-native

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aiactiv-sdk-react-native

AiactivSDK is a client side module for AiActiv platform.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

AiactivSDK React Native (IOS/ANDROID)

AiactivSDK is a client side module for AiActiv platform.

Analytics helps you measure your users, product, and business. It unlocks insights into your app's funnel, core business metrics, and whether you have product-market fit.

Installation

$ yarn add aiactiv-sdk-react-native
$ cd ios && pod install && cd .. # CocoaPods on iOS

Usage

import aiactivSDK from 'aiactiv-sdk-react-native'

aiactivSDK
    .setup('writeKey', {
        recordScreenViews: true,
        trackAppLifecycleEvents: true,
        android: {
            flushInterval: 60000,
            collectDeviceId: true
        },
        ios: {
            trackAdvertising: true,
            trackDeepLinks: true
        }
    })
    .then(() =>
        console.log('AiactivSDK is ready')
    )
    .catch(err =>
        console.error('Something went wrong', err)
    );

aiactivSDK.track('Watch video');
aiactivSDK.screen('Home');

Troubleshooting (just in case 😅)

"Failed to load [...] native module"

If you're getting a Failed to load [...] native module error, it means that some native code hasn't been injected to your native project.

iOS

If you're using Cocoapods, check that your ios/Podfile file contains the right pods :

  • Failed to load Analytics native module, look for the core native module:
    pod 'RNAnalytics', :path => '../node_modules/aiactiv-sdk-react-native'
    

Also check that your Podfile is synchronized with your workspace, run pod install in your ios folder.

If you're not using Cocoapods please check that you followed the iOS support without CocoaPods instructions carefully.

Android

Check that android/app/src/main/.../MainApplication.java contains a reference to the native module:

  • Failed to load Analytics native module, look for the core native module:

    import io.aiactiv.sdk.reactnative.core.RNAnalyticsPackage;
    
    // ...
    
    @Override
    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
            new MainReactPackage(),
            // ...
            new RNAnalyticsPackage()
        );
    }
    

FAQs

Package last updated on 04 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts