JSPM

maxleap-social-react-native

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q29161F
  • License ISC

MaxLeap SDK for ReactNative

Package Exports

  • maxleap-social-react-native

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (maxleap-social-react-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MaxSocial RN npm version

集成 SDK

  1. 重要:先安装 maxleap-react-native, 参照 MaxLeap RN 开发文档

  2. 安装 maxsocial-react-native

    npm install --save maxsocial-react-native
  3. 打开 Finder,找到本项目的根目录,使用 Xcode 打开 iOS 工程(双击 .xcodeproj 文件即可),然后导航到 /node_modules/maxlogin-react-native/ios/lib 目录,把该目录下的 frameworks 都拖到 Xcode 工程中

集成 Android 环境

  1. 按照 MaxLeap 文档 添加项目依赖。

  2. 修改父工程目录下的 build.gradle 文件(与 settings.gradle 位于同级目录)。

    repositories {
        flatDir{
            dirs '../../node_modules/maxleap-social-react-native/dist/android'
        }
    }
  3. 修改应用目录下的 build.gradle 文件,添加以下依赖

    dependencies {
        compile(name:'maxleap-social-react-native', ext:'aar')
    }
  4. 修改工程的主 Activity 文件。

     @Override
    protected void onCreate(Bundle savedInstanceState) {
        MaxLeap.initialize(this, APP_ID, API_KEY, MaxLeap.REGION_CN);
        super.onCreate(savedInstanceState);
    }
    
    @Override
    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
                new MainReactPackage(),
                new MLInAppSocialReactPackage()
        );
    }