Showing
23 changed files
with
313 additions
and
281 deletions
| @@ -8,128 +8,112 @@ | @@ -8,128 +8,112 @@ | ||
| 8 | * @format | 8 | * @format |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | -import React, { useState, useEffect } from 'react'; | 11 | +import React from 'react'; |
| 12 | import { | 12 | import { |
| 13 | SafeAreaView, | 13 | SafeAreaView, |
| 14 | - Button, | 14 | + StyleSheet, |
| 15 | - NativeModules, | ||
| 16 | - Picker, | ||
| 17 | ScrollView, | 15 | ScrollView, |
| 18 | - Platform, | 16 | + View, |
| 17 | + Text, | ||
| 18 | + StatusBar, | ||
| 19 | } from 'react-native'; | 19 | } from 'react-native'; |
| 20 | -import { Text, ListItem, Card } from 'react-native-elements'; | ||
| 21 | -import Wechat, { WXShareType, WXShareScene } from './src'; | ||
| 22 | 20 | ||
| 23 | -const { BCWechat } = NativeModules; | 21 | +import { |
| 24 | -Wechat.registerApp('wx32beae1b4606079a', 'https://pm.yfchangketong.com/'); | 22 | + Header, |
| 25 | - | 23 | + LearnMoreLinks, |
| 26 | -const App = () => { | 24 | + Colors, |
| 27 | - const [err, setErr] = useState<Error>(); | 25 | + DebugInstructions, |
| 28 | - const [version, setVersion] = useState(''); | 26 | + ReloadInstructions, |
| 29 | - const [isWXInstalled, setIsWXInstalled] = useState(false); | 27 | +} from 'react-native/Libraries/NewAppScreen'; |
| 30 | - const [apiLevel, setApiLevel] = useState<number | boolean>(); | ||
| 31 | - const [scene, setScene] = useState(WXShareScene.WXSceneSession); | ||
| 32 | 28 | ||
| 33 | - const constants = BCWechat.getConstants(); | 29 | +declare var global: { HermesInternal: null | {} }; |
| 34 | 30 | ||
| 35 | - useEffect(() => { | 31 | +const App = () => { |
| 36 | - Wechat.getApiVersion().then(setVersion); | ||
| 37 | - Wechat.isWXAppInstalled().then(setIsWXInstalled); | ||
| 38 | - if (Platform.OS === 'android') { | ||
| 39 | - Wechat.getWXAppSupportAPI().then(setApiLevel); | ||
| 40 | - } else { | ||
| 41 | - Wechat.isWXAppSupportApi().then(setApiLevel); | ||
| 42 | - } | ||
| 43 | - }, []); | ||
| 44 | return ( | 32 | return ( |
| 45 | - <SafeAreaView style={{ flex: 1 }}> | 33 | + <> |
| 46 | - <Card> | 34 | + <StatusBar barStyle="dark-content" /> |
| 47 | - <Text h4>Error</Text> | 35 | + <SafeAreaView> |
| 48 | - <Text>{`${err?.message}`}</Text> | 36 | + <ScrollView |
| 49 | - </Card> | 37 | + contentInsetAdjustmentBehavior="automatic" |
| 50 | - <ScrollView | 38 | + style={styles.scrollView} |
| 51 | - style={{ flex: 1 }} | 39 | + > |
| 52 | - contentInsetAdjustmentBehavior="automatic" | 40 | + <Header /> |
| 53 | - > | 41 | + {global.HermesInternal == null ? null : ( |
| 54 | - <Text h4>Native</Text> | 42 | + <View style={styles.engine}> |
| 55 | - {Object.keys(BCWechat).map((k, i) => ( | 43 | + <Text style={styles.footer}>Engine: Hermes</Text> |
| 56 | - <Text key={i}>{k}</Text> | 44 | + </View> |
| 57 | - ))} | 45 | + )} |
| 58 | - <Text h4>Info</Text> | 46 | + <View style={styles.body}> |
| 59 | - <ListItem title="version" rightTitle={version} /> | 47 | + <View style={styles.sectionContainer}> |
| 60 | - <ListItem title="wx installed" rightTitle={`${isWXInstalled}`} /> | 48 | + <Text style={styles.sectionTitle}>Step One</Text> |
| 61 | - <ListItem title="api support" rightTitle={`${apiLevel}`} /> | 49 | + <Text style={styles.sectionDescription}> |
| 62 | - <Text h4>Constants</Text> | 50 | + Edit <Text style={styles.highlight}>App.tsx</Text> to change |
| 63 | - {Object.keys(constants).map((k, i) => ( | 51 | + this screen and then come back to see your edits. |
| 64 | - <ListItem key={k} title={k} rightTitle={`${constants[k]}`} /> | 52 | + </Text> |
| 65 | - ))} | 53 | + </View> |
| 66 | - <Button title="open WX" onPress={Wechat.openWXApp} /> | 54 | + <View style={styles.sectionContainer}> |
| 67 | - <Text h4>分享</Text> | 55 | + <Text style={styles.sectionTitle}>See Your Changes</Text> |
| 68 | - <Picker selectedValue={scene} onValueChange={v => setScene(v)}> | 56 | + <Text style={styles.sectionDescription}> |
| 69 | - <Picker.Item label="对话" value={WXShareScene.WXSceneSession} /> | 57 | + <ReloadInstructions /> |
| 70 | - <Picker.Item label="朋友圈" value={WXShareScene.WXSceneTimeline} /> | 58 | + </Text> |
| 71 | - <Picker.Item label="收藏" value={WXShareScene.WXSceneFavorite} /> | 59 | + </View> |
| 72 | - </Picker> | 60 | + <View style={styles.sectionContainer}> |
| 73 | - <Button | 61 | + <Text style={styles.sectionTitle}>Debug</Text> |
| 74 | - title="分享文字" | 62 | + <Text style={styles.sectionDescription}> |
| 75 | - onPress={() => { | 63 | + <DebugInstructions /> |
| 76 | - Wechat.shareMessage({ | 64 | + </Text> |
| 77 | - type: WXShareType.WXShareTypeText, | 65 | + </View> |
| 78 | - text: 'Some test text', | 66 | + <View style={styles.sectionContainer}> |
| 79 | - scene, | 67 | + <Text style={styles.sectionTitle}>Learn More</Text> |
| 80 | - }) | 68 | + <Text style={styles.sectionDescription}> |
| 81 | - .then(resp => { | 69 | + Read the docs to discover what to do next: |
| 82 | - console.log(resp); | 70 | + </Text> |
| 83 | - }) | 71 | + </View> |
| 84 | - .catch(setErr); | 72 | + <LearnMoreLinks /> |
| 85 | - }} | 73 | + </View> |
| 86 | - /> | 74 | + </ScrollView> |
| 87 | - <Button | 75 | + </SafeAreaView> |
| 88 | - title="分享图片" | 76 | + </> |
| 89 | - onPress={() => { | ||
| 90 | - Wechat.shareMessage({ | ||
| 91 | - type: WXShareType.WXShareTypeImage, | ||
| 92 | - title: '标题', | ||
| 93 | - description: '描述', | ||
| 94 | - thumbUrl: '', | ||
| 95 | - scene, | ||
| 96 | - imageUrl: | ||
| 97 | - 'https://i0.hdslb.com/bfs/archive/45b8d2f84ec662df05b829bbe866cf620833cce5.jpg@412w_232h_1c_100q.jpg', | ||
| 98 | - }); | ||
| 99 | - }} | ||
| 100 | - /> | ||
| 101 | - <Button | ||
| 102 | - title="分享音乐" | ||
| 103 | - onPress={() => { | ||
| 104 | - Wechat.shareMessage({ | ||
| 105 | - type: WXShareType.WXShareTypeMusic, | ||
| 106 | - musicUrl: 'https://music.163.com/#/song?id=1410448577', | ||
| 107 | - title: '标题', | ||
| 108 | - description: '描述', | ||
| 109 | - thumbUrl: | ||
| 110 | - 'https://i0.hdslb.com/bfs/archive/45b8d2f84ec662df05b829bbe866cf620833cce5.jpg@412w_232h_1c_100q.jpg', | ||
| 111 | - scene, | ||
| 112 | - }); | ||
| 113 | - }} | ||
| 114 | - /> | ||
| 115 | - <Button | ||
| 116 | - title="分享视频" | ||
| 117 | - onPress={() => { | ||
| 118 | - Wechat.shareMessage({ | ||
| 119 | - type: WXShareType.WXShareTypeVideo, | ||
| 120 | - videoUrl: | ||
| 121 | - 'https://www.bilibili.com/video/BV1o7411177j?spm_id_from=333.851.b_7265706f7274466972737431.8', | ||
| 122 | - title: '标题', | ||
| 123 | - description: '描述', | ||
| 124 | - thumbUrl: | ||
| 125 | - 'https://i0.hdslb.com/bfs/archive/45b8d2f84ec662df05b829bbe866cf620833cce5.jpg@412w_232h_1c_100q.jpg', | ||
| 126 | - scene, | ||
| 127 | - }); | ||
| 128 | - }} | ||
| 129 | - /> | ||
| 130 | - </ScrollView> | ||
| 131 | - </SafeAreaView> | ||
| 132 | ); | 77 | ); |
| 133 | }; | 78 | }; |
| 134 | 79 | ||
| 80 | +const styles = StyleSheet.create({ | ||
| 81 | + scrollView: { | ||
| 82 | + backgroundColor: Colors.lighter, | ||
| 83 | + }, | ||
| 84 | + engine: { | ||
| 85 | + position: 'absolute', | ||
| 86 | + right: 0, | ||
| 87 | + }, | ||
| 88 | + body: { | ||
| 89 | + backgroundColor: Colors.white, | ||
| 90 | + }, | ||
| 91 | + sectionContainer: { | ||
| 92 | + marginTop: 32, | ||
| 93 | + paddingHorizontal: 24, | ||
| 94 | + }, | ||
| 95 | + sectionTitle: { | ||
| 96 | + fontSize: 24, | ||
| 97 | + fontWeight: '600', | ||
| 98 | + color: Colors.black, | ||
| 99 | + }, | ||
| 100 | + sectionDescription: { | ||
| 101 | + marginTop: 8, | ||
| 102 | + fontSize: 18, | ||
| 103 | + fontWeight: '400', | ||
| 104 | + color: Colors.dark, | ||
| 105 | + }, | ||
| 106 | + highlight: { | ||
| 107 | + fontWeight: '700', | ||
| 108 | + }, | ||
| 109 | + footer: { | ||
| 110 | + color: Colors.dark, | ||
| 111 | + fontSize: 12, | ||
| 112 | + fontWeight: '600', | ||
| 113 | + padding: 4, | ||
| 114 | + paddingRight: 12, | ||
| 115 | + textAlign: 'right', | ||
| 116 | + }, | ||
| 117 | +}); | ||
| 118 | + | ||
| 135 | export default App; | 119 | export default App; |
android/app/_BUCK
100755 → 100644
File mode changed
android/app/build.gradle
100755 → 100644
| 1 | apply plugin: "com.android.application" | 1 | apply plugin: "com.android.application" |
| 2 | -apply plugin: 'kotlin-android-extensions' | ||
| 3 | -apply plugin: 'kotlin-android' | ||
| 4 | 2 | ||
| 5 | import com.android.build.OutputFile | 3 | import com.android.build.OutputFile |
| 6 | 4 | ||
| @@ -17,7 +15,9 @@ import com.android.build.OutputFile | @@ -17,7 +15,9 @@ import com.android.build.OutputFile | ||
| 17 | * // the name of the generated asset file containing your JS bundle | 15 | * // the name of the generated asset file containing your JS bundle |
| 18 | * bundleAssetName: "index.android.bundle", | 16 | * bundleAssetName: "index.android.bundle", |
| 19 | * | 17 | * |
| 20 | - * // the entry file for bundle generation | 18 | + * // the entry file for bundle generation. If none specified and |
| 19 | + * // "index.android.js" exists, it will be used. Otherwise "index.js" is | ||
| 20 | + * // default. Can be overridden with ENTRY_FILE environment variable. | ||
| 21 | * entryFile: "index.android.js", | 21 | * entryFile: "index.android.js", |
| 22 | * | 22 | * |
| 23 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format | 23 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format |
| @@ -164,6 +164,14 @@ android { | @@ -164,6 +164,14 @@ android { | ||
| 164 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | 164 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" |
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | + | ||
| 168 | + packagingOptions { | ||
| 169 | + pickFirst "lib/armeabi-v7a/libc++_shared.so" | ||
| 170 | + pickFirst "lib/arm64-v8a/libc++_shared.so" | ||
| 171 | + pickFirst "lib/x86/libc++_shared.so" | ||
| 172 | + pickFirst "lib/x86_64/libc++_shared.so" | ||
| 173 | + } | ||
| 174 | + | ||
| 167 | // applicationVariants are e.g. debug, release | 175 | // applicationVariants are e.g. debug, release |
| 168 | applicationVariants.all { variant -> | 176 | applicationVariants.all { variant -> |
| 169 | variant.outputs.each { output -> | 177 | variant.outputs.each { output -> |
| @@ -181,11 +189,24 @@ android { | @@ -181,11 +189,24 @@ android { | ||
| 181 | } | 189 | } |
| 182 | 190 | ||
| 183 | dependencies { | 191 | dependencies { |
| 184 | - implementation 'androidx.appcompat:appcompat:1.1.0-rc01' | ||
| 185 | - implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' | ||
| 186 | implementation fileTree(dir: "libs", include: ["*.jar"]) | 192 | implementation fileTree(dir: "libs", include: ["*.jar"]) |
| 193 | + //noinspection GradleDynamicVersion | ||
| 187 | implementation "com.facebook.react:react-native:+" // From node_modules | 194 | implementation "com.facebook.react:react-native:+" // From node_modules |
| 188 | 195 | ||
| 196 | + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" | ||
| 197 | + | ||
| 198 | + debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { | ||
| 199 | + exclude group:'com.facebook.fbjni' | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { | ||
| 203 | + exclude group:'com.facebook.flipper' | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { | ||
| 207 | + exclude group:'com.facebook.flipper' | ||
| 208 | + } | ||
| 209 | + | ||
| 189 | if (enableHermes) { | 210 | if (enableHermes) { |
| 190 | def hermesPath = "../../node_modules/hermes-engine/android/"; | 211 | def hermesPath = "../../node_modules/hermes-engine/android/"; |
| 191 | debugImplementation files(hermesPath + "hermes-debug.aar") | 212 | debugImplementation files(hermesPath + "hermes-debug.aar") |
| @@ -193,8 +214,6 @@ dependencies { | @@ -193,8 +214,6 @@ dependencies { | ||
| 193 | } else { | 214 | } else { |
| 194 | implementation jscFlavor | 215 | implementation jscFlavor |
| 195 | } | 216 | } |
| 196 | - implementation "androidx.core:core-ktx:+" | ||
| 197 | - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
| 198 | } | 217 | } |
| 199 | 218 | ||
| 200 | // Run this once to be able to run the application with BUCK | 219 | // Run this once to be able to run the application with BUCK |
| @@ -205,6 +224,3 @@ task copyDownloadableDepsToLibs(type: Copy) { | @@ -205,6 +224,3 @@ task copyDownloadableDepsToLibs(type: Copy) { | ||
| 205 | } | 224 | } |
| 206 | 225 | ||
| 207 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) | 226 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) |
| 208 | -repositories { | ||
| 209 | - mavenCentral() | ||
| 210 | -} |
| 1 | +/** | ||
| 2 | + * Copyright (c) Facebook, Inc. and its affiliates. | ||
| 3 | + * | ||
| 4 | + * <p>This source code is licensed under the MIT license found in the LICENSE file in the root | ||
| 5 | + * directory of this source tree. | ||
| 6 | + */ | ||
| 7 | +package com.ngplay; | ||
| 8 | + | ||
| 9 | +import android.content.Context; | ||
| 10 | +import com.facebook.flipper.android.AndroidFlipperClient; | ||
| 11 | +import com.facebook.flipper.android.utils.FlipperUtils; | ||
| 12 | +import com.facebook.flipper.core.FlipperClient; | ||
| 13 | +import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; | ||
| 14 | +import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; | ||
| 15 | +import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; | ||
| 16 | +import com.facebook.flipper.plugins.inspector.DescriptorMapping; | ||
| 17 | +import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; | ||
| 18 | +import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; | ||
| 19 | +import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; | ||
| 20 | +import com.facebook.flipper.plugins.react.ReactFlipperPlugin; | ||
| 21 | +import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; | ||
| 22 | +import com.facebook.react.ReactInstanceManager; | ||
| 23 | +import com.facebook.react.bridge.ReactContext; | ||
| 24 | +import com.facebook.react.modules.network.NetworkingModule; | ||
| 25 | +import okhttp3.OkHttpClient; | ||
| 26 | + | ||
| 27 | +public class ReactNativeFlipper { | ||
| 28 | + public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { | ||
| 29 | + if (FlipperUtils.shouldEnableFlipper(context)) { | ||
| 30 | + final FlipperClient client = AndroidFlipperClient.getInstance(context); | ||
| 31 | + | ||
| 32 | + client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); | ||
| 33 | + client.addPlugin(new ReactFlipperPlugin()); | ||
| 34 | + client.addPlugin(new DatabasesFlipperPlugin(context)); | ||
| 35 | + client.addPlugin(new SharedPreferencesFlipperPlugin(context)); | ||
| 36 | + client.addPlugin(CrashReporterPlugin.getInstance()); | ||
| 37 | + | ||
| 38 | + NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); | ||
| 39 | + NetworkingModule.setCustomClientBuilder( | ||
| 40 | + new NetworkingModule.CustomClientBuilder() { | ||
| 41 | + @Override | ||
| 42 | + public void apply(OkHttpClient.Builder builder) { | ||
| 43 | + builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); | ||
| 44 | + } | ||
| 45 | + }); | ||
| 46 | + client.addPlugin(networkFlipperPlugin); | ||
| 47 | + client.start(); | ||
| 48 | + | ||
| 49 | + // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized | ||
| 50 | + // Hence we run if after all native modules have been initialized | ||
| 51 | + ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); | ||
| 52 | + if (reactContext == null) { | ||
| 53 | + reactInstanceManager.addReactInstanceEventListener( | ||
| 54 | + new ReactInstanceManager.ReactInstanceEventListener() { | ||
| 55 | + @Override | ||
| 56 | + public void onReactContextInitialized(ReactContext reactContext) { | ||
| 57 | + reactInstanceManager.removeReactInstanceEventListener(this); | ||
| 58 | + reactContext.runOnNativeModulesQueueThread( | ||
| 59 | + new Runnable() { | ||
| 60 | + @Override | ||
| 61 | + public void run() { | ||
| 62 | + client.addPlugin(new FrescoFlipperPlugin()); | ||
| 63 | + } | ||
| 64 | + }); | ||
| 65 | + } | ||
| 66 | + }); | ||
| 67 | + } else { | ||
| 68 | + client.addPlugin(new FrescoFlipperPlugin()); | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + } | ||
| 72 | +} |
android/app/src/main/AndroidManifest.xml
100755 → 100644
| @@ -13,7 +13,8 @@ | @@ -13,7 +13,8 @@ | ||
| 13 | <activity | 13 | <activity |
| 14 | android:name=".MainActivity" | 14 | android:name=".MainActivity" |
| 15 | android:label="@string/app_name" | 15 | android:label="@string/app_name" |
| 16 | - android:configChanges="keyboard|keyboardHidden|orientation|screenSize" | 16 | + android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" |
| 17 | + android:launchMode="singleTask" | ||
| 17 | android:windowSoftInputMode="adjustResize"> | 18 | android:windowSoftInputMode="adjustResize"> |
| 18 | <intent-filter> | 19 | <intent-filter> |
| 19 | <action android:name="android.intent.action.MAIN" /> | 20 | <action android:name="android.intent.action.MAIN" /> |
| @@ -4,6 +4,7 @@ import android.app.Application; | @@ -4,6 +4,7 @@ import android.app.Application; | ||
| 4 | import android.content.Context; | 4 | import android.content.Context; |
| 5 | import com.facebook.react.PackageList; | 5 | import com.facebook.react.PackageList; |
| 6 | import com.facebook.react.ReactApplication; | 6 | import com.facebook.react.ReactApplication; |
| 7 | +import com.facebook.react.ReactInstanceManager; | ||
| 7 | import com.facebook.react.ReactNativeHost; | 8 | import com.facebook.react.ReactNativeHost; |
| 8 | import com.facebook.react.ReactPackage; | 9 | import com.facebook.react.ReactPackage; |
| 9 | import com.facebook.soloader.SoLoader; | 10 | import com.facebook.soloader.SoLoader; |
| @@ -43,23 +44,28 @@ public class MainApplication extends Application implements ReactApplication { | @@ -43,23 +44,28 @@ public class MainApplication extends Application implements ReactApplication { | ||
| 43 | public void onCreate() { | 44 | public void onCreate() { |
| 44 | super.onCreate(); | 45 | super.onCreate(); |
| 45 | SoLoader.init(this, /* native exopackage */ false); | 46 | SoLoader.init(this, /* native exopackage */ false); |
| 46 | - initializeFlipper(this); // Remove this line if you don't want Flipper enabled | 47 | + initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | /** | 50 | /** |
| 50 | - * Loads Flipper in React Native templates. | 51 | + * Loads Flipper in React Native templates. Call this in the onCreate method with something like |
| 52 | + * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); | ||
| 51 | * | 53 | * |
| 52 | * @param context | 54 | * @param context |
| 55 | + * @param reactInstanceManager | ||
| 53 | */ | 56 | */ |
| 54 | - private static void initializeFlipper(Context context) { | 57 | + private static void initializeFlipper( |
| 58 | + Context context, ReactInstanceManager reactInstanceManager) { | ||
| 55 | if (BuildConfig.DEBUG) { | 59 | if (BuildConfig.DEBUG) { |
| 56 | try { | 60 | try { |
| 57 | /* | 61 | /* |
| 58 | We use reflection here to pick up the class that initializes Flipper, | 62 | We use reflection here to pick up the class that initializes Flipper, |
| 59 | since Flipper library is not available in release mode | 63 | since Flipper library is not available in release mode |
| 60 | */ | 64 | */ |
| 61 | - Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper"); | 65 | + Class<?> aClass = Class.forName("com.ngplay.ReactNativeFlipper"); |
| 62 | - aClass.getMethod("initializeFlipper", Context.class).invoke(null, context); | 66 | + aClass |
| 67 | + .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) | ||
| 68 | + .invoke(null, context, reactInstanceManager); | ||
| 63 | } catch (ClassNotFoundException e) { | 69 | } catch (ClassNotFoundException e) { |
| 64 | e.printStackTrace(); | 70 | e.printStackTrace(); |
| 65 | } catch (NoSuchMethodException e) { | 71 | } catch (NoSuchMethodException e) { |
| 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. | 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. |
| 2 | 2 | ||
| 3 | buildscript { | 3 | buildscript { |
| 4 | - ext.kotlin_version = '1.3.71' | ||
| 5 | ext { | 4 | ext { |
| 6 | buildToolsVersion = "28.0.3" | 5 | buildToolsVersion = "28.0.3" |
| 7 | minSdkVersion = 16 | 6 | minSdkVersion = 16 |
| @@ -13,8 +12,7 @@ buildscript { | @@ -13,8 +12,7 @@ buildscript { | ||
| 13 | jcenter() | 12 | jcenter() |
| 14 | } | 13 | } |
| 15 | dependencies { | 14 | dependencies { |
| 16 | - classpath("com.android.tools.build:gradle:3.4.2") | 15 | + classpath("com.android.tools.build:gradle:3.5.2") |
| 17 | - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
| 18 | 16 | ||
| 19 | // NOTE: Do not place your application dependencies here; they belong | 17 | // NOTE: Do not place your application dependencies here; they belong |
| 20 | // in the individual module build.gradle files | 18 | // in the individual module build.gradle files |
| @@ -35,6 +33,6 @@ allprojects { | @@ -35,6 +33,6 @@ allprojects { | ||
| 35 | 33 | ||
| 36 | google() | 34 | google() |
| 37 | jcenter() | 35 | jcenter() |
| 38 | - maven { url 'https://jitpack.io' } | 36 | + maven { url 'https://www.jitpack.io' } |
| 39 | } | 37 | } |
| 40 | } | 38 | } |
| @@ -17,5 +17,12 @@ | @@ -17,5 +17,12 @@ | ||
| 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects |
| 18 | # org.gradle.parallel=true | 18 | # org.gradle.parallel=true |
| 19 | 19 | ||
| 20 | +# AndroidX package structure to make it clearer which packages are bundled with the | ||
| 21 | +# Android operating system, and which are packaged with your app's APK | ||
| 22 | +# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
| 20 | android.useAndroidX=true | 23 | android.useAndroidX=true |
| 24 | +# Automatically convert third-party libraries to use AndroidX | ||
| 21 | android.enableJetifier=true | 25 | android.enableJetifier=true |
| 26 | + | ||
| 27 | +# Version of flipper SDK to use with React Native | ||
| 28 | +FLIPPER_VERSION=0.33.1 |
| 1 | distributionBase=GRADLE_USER_HOME | 1 | distributionBase=GRADLE_USER_HOME |
| 2 | distributionPath=wrapper/dists | 2 | distributionPath=wrapper/dists |
| 3 | -distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip | 3 | +distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip |
| 4 | zipStoreBase=GRADLE_USER_HOME | 4 | zipStoreBase=GRADLE_USER_HOME |
| 5 | zipStorePath=wrapper/dists | 5 | zipStorePath=wrapper/dists |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | # you may not use this file except in compliance with the License. | 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at | 8 | # You may obtain a copy of the License at |
| 9 | # | 9 | # |
| 10 | -# http://www.apache.org/licenses/LICENSE-2.0 | 10 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # | 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software | 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, | 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| @@ -125,8 +125,8 @@ if $darwin; then | @@ -125,8 +125,8 @@ if $darwin; then | ||
| 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" | 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" |
| 126 | fi | 126 | fi |
| 127 | 127 | ||
| 128 | -# For Cygwin, switch paths to Windows format before running java | 128 | +# For Cygwin or MSYS, switch paths to Windows format before running java |
| 129 | -if $cygwin ; then | 129 | +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then |
| 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` | 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` |
| 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` | 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` |
| 132 | JAVACMD=`cygpath --unix "$JAVACMD"` | 132 | JAVACMD=`cygpath --unix "$JAVACMD"` |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | @rem you may not use this file except in compliance with the License. | 5 | @rem you may not use this file except in compliance with the License. |
| 6 | @rem You may obtain a copy of the License at | 6 | @rem You may obtain a copy of the License at |
| 7 | @rem | 7 | @rem |
| 8 | -@rem http://www.apache.org/licenses/LICENSE-2.0 | 8 | +@rem https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | @rem | 9 | @rem |
| 10 | @rem Unless required by applicable law or agreed to in writing, software | 10 | @rem Unless required by applicable law or agreed to in writing, software |
| 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, | 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, |
android/settings.gradle
100755 → 100644
File mode changed
This diff is collapsed. Click to expand it.
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <Scheme | 2 | <Scheme |
| 3 | - LastUpgradeVersion = "0940" | 3 | + LastUpgradeVersion = "1130" |
| 4 | version = "1.3"> | 4 | version = "1.3"> |
| 5 | <BuildAction | 5 | <BuildAction |
| 6 | - parallelizeBuildables = "NO" | 6 | + parallelizeBuildables = "YES" |
| 7 | buildImplicitDependencies = "YES"> | 7 | buildImplicitDependencies = "YES"> |
| 8 | <BuildActionEntries> | 8 | <BuildActionEntries> |
| 9 | <BuildActionEntry | 9 | <BuildActionEntry |
| @@ -14,40 +14,12 @@ | @@ -14,40 +14,12 @@ | ||
| 14 | buildForAnalyzing = "YES"> | 14 | buildForAnalyzing = "YES"> |
| 15 | <BuildableReference | 15 | <BuildableReference |
| 16 | BuildableIdentifier = "primary" | 16 | BuildableIdentifier = "primary" |
| 17 | - BlueprintIdentifier = "2D2A28121D9B038B00D4039D" | ||
| 18 | - BuildableName = "libReact.a" | ||
| 19 | - BlueprintName = "React-tvOS" | ||
| 20 | - ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj"> | ||
| 21 | - </BuildableReference> | ||
| 22 | - </BuildActionEntry> | ||
| 23 | - <BuildActionEntry | ||
| 24 | - buildForTesting = "YES" | ||
| 25 | - buildForRunning = "YES" | ||
| 26 | - buildForProfiling = "YES" | ||
| 27 | - buildForArchiving = "YES" | ||
| 28 | - buildForAnalyzing = "YES"> | ||
| 29 | - <BuildableReference | ||
| 30 | - BuildableIdentifier = "primary" | ||
| 31 | BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" | 17 | BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" |
| 32 | BuildableName = "NGPlay-tvOS.app" | 18 | BuildableName = "NGPlay-tvOS.app" |
| 33 | BlueprintName = "NGPlay-tvOS" | 19 | BlueprintName = "NGPlay-tvOS" |
| 34 | ReferencedContainer = "container:NGPlay.xcodeproj"> | 20 | ReferencedContainer = "container:NGPlay.xcodeproj"> |
| 35 | </BuildableReference> | 21 | </BuildableReference> |
| 36 | </BuildActionEntry> | 22 | </BuildActionEntry> |
| 37 | - <BuildActionEntry | ||
| 38 | - buildForTesting = "YES" | ||
| 39 | - buildForRunning = "YES" | ||
| 40 | - buildForProfiling = "NO" | ||
| 41 | - buildForArchiving = "NO" | ||
| 42 | - buildForAnalyzing = "YES"> | ||
| 43 | - <BuildableReference | ||
| 44 | - BuildableIdentifier = "primary" | ||
| 45 | - BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7" | ||
| 46 | - BuildableName = "NGPlay-tvOSTests.xctest" | ||
| 47 | - BlueprintName = "NGPlay-tvOSTests" | ||
| 48 | - ReferencedContainer = "container:NGPlay.xcodeproj"> | ||
| 49 | - </BuildableReference> | ||
| 50 | - </BuildActionEntry> | ||
| 51 | </BuildActionEntries> | 23 | </BuildActionEntries> |
| 52 | </BuildAction> | 24 | </BuildAction> |
| 53 | <TestAction | 25 | <TestAction |
| @@ -67,17 +39,6 @@ | @@ -67,17 +39,6 @@ | ||
| 67 | </BuildableReference> | 39 | </BuildableReference> |
| 68 | </TestableReference> | 40 | </TestableReference> |
| 69 | </Testables> | 41 | </Testables> |
| 70 | - <MacroExpansion> | ||
| 71 | - <BuildableReference | ||
| 72 | - BuildableIdentifier = "primary" | ||
| 73 | - BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7" | ||
| 74 | - BuildableName = "NGPlay-tvOS.app" | ||
| 75 | - BlueprintName = "NGPlay-tvOS" | ||
| 76 | - ReferencedContainer = "container:NGPlay.xcodeproj"> | ||
| 77 | - </BuildableReference> | ||
| 78 | - </MacroExpansion> | ||
| 79 | - <AdditionalOptions> | ||
| 80 | - </AdditionalOptions> | ||
| 81 | </TestAction> | 42 | </TestAction> |
| 82 | <LaunchAction | 43 | <LaunchAction |
| 83 | buildConfiguration = "Debug" | 44 | buildConfiguration = "Debug" |
| @@ -99,8 +60,6 @@ | @@ -99,8 +60,6 @@ | ||
| 99 | ReferencedContainer = "container:NGPlay.xcodeproj"> | 60 | ReferencedContainer = "container:NGPlay.xcodeproj"> |
| 100 | </BuildableReference> | 61 | </BuildableReference> |
| 101 | </BuildableProductRunnable> | 62 | </BuildableProductRunnable> |
| 102 | - <AdditionalOptions> | ||
| 103 | - </AdditionalOptions> | ||
| 104 | </LaunchAction> | 63 | </LaunchAction> |
| 105 | <ProfileAction | 64 | <ProfileAction |
| 106 | buildConfiguration = "Release" | 65 | buildConfiguration = "Release" |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <Scheme | 2 | <Scheme |
| 3 | - LastUpgradeVersion = "0940" | 3 | + LastUpgradeVersion = "1130" |
| 4 | version = "1.3"> | 4 | version = "1.3"> |
| 5 | <BuildAction | 5 | <BuildAction |
| 6 | - parallelizeBuildables = "NO" | 6 | + parallelizeBuildables = "YES" |
| 7 | buildImplicitDependencies = "YES"> | 7 | buildImplicitDependencies = "YES"> |
| 8 | <BuildActionEntries> | 8 | <BuildActionEntries> |
| 9 | <BuildActionEntry | 9 | <BuildActionEntry |
| @@ -14,40 +14,12 @@ | @@ -14,40 +14,12 @@ | ||
| 14 | buildForAnalyzing = "YES"> | 14 | buildForAnalyzing = "YES"> |
| 15 | <BuildableReference | 15 | <BuildableReference |
| 16 | BuildableIdentifier = "primary" | 16 | BuildableIdentifier = "primary" |
| 17 | - BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192" | ||
| 18 | - BuildableName = "libReact.a" | ||
| 19 | - BlueprintName = "React" | ||
| 20 | - ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj"> | ||
| 21 | - </BuildableReference> | ||
| 22 | - </BuildActionEntry> | ||
| 23 | - <BuildActionEntry | ||
| 24 | - buildForTesting = "YES" | ||
| 25 | - buildForRunning = "YES" | ||
| 26 | - buildForProfiling = "YES" | ||
| 27 | - buildForArchiving = "YES" | ||
| 28 | - buildForAnalyzing = "YES"> | ||
| 29 | - <BuildableReference | ||
| 30 | - BuildableIdentifier = "primary" | ||
| 31 | BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | 17 | BlueprintIdentifier = "13B07F861A680F5B00A75B9A" |
| 32 | BuildableName = "NGPlay.app" | 18 | BuildableName = "NGPlay.app" |
| 33 | BlueprintName = "NGPlay" | 19 | BlueprintName = "NGPlay" |
| 34 | ReferencedContainer = "container:NGPlay.xcodeproj"> | 20 | ReferencedContainer = "container:NGPlay.xcodeproj"> |
| 35 | </BuildableReference> | 21 | </BuildableReference> |
| 36 | </BuildActionEntry> | 22 | </BuildActionEntry> |
| 37 | - <BuildActionEntry | ||
| 38 | - buildForTesting = "YES" | ||
| 39 | - buildForRunning = "YES" | ||
| 40 | - buildForProfiling = "NO" | ||
| 41 | - buildForArchiving = "NO" | ||
| 42 | - buildForAnalyzing = "YES"> | ||
| 43 | - <BuildableReference | ||
| 44 | - BuildableIdentifier = "primary" | ||
| 45 | - BlueprintIdentifier = "00E356ED1AD99517003FC87E" | ||
| 46 | - BuildableName = "NGPlayTests.xctest" | ||
| 47 | - BlueprintName = "NGPlayTests" | ||
| 48 | - ReferencedContainer = "container:NGPlay.xcodeproj"> | ||
| 49 | - </BuildableReference> | ||
| 50 | - </BuildActionEntry> | ||
| 51 | </BuildActionEntries> | 23 | </BuildActionEntries> |
| 52 | </BuildAction> | 24 | </BuildAction> |
| 53 | <TestAction | 25 | <TestAction |
| @@ -67,17 +39,6 @@ | @@ -67,17 +39,6 @@ | ||
| 67 | </BuildableReference> | 39 | </BuildableReference> |
| 68 | </TestableReference> | 40 | </TestableReference> |
| 69 | </Testables> | 41 | </Testables> |
| 70 | - <MacroExpansion> | ||
| 71 | - <BuildableReference | ||
| 72 | - BuildableIdentifier = "primary" | ||
| 73 | - BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | ||
| 74 | - BuildableName = "NGPlay.app" | ||
| 75 | - BlueprintName = "NGPlay" | ||
| 76 | - ReferencedContainer = "container:NGPlay.xcodeproj"> | ||
| 77 | - </BuildableReference> | ||
| 78 | - </MacroExpansion> | ||
| 79 | - <AdditionalOptions> | ||
| 80 | - </AdditionalOptions> | ||
| 81 | </TestAction> | 42 | </TestAction> |
| 82 | <LaunchAction | 43 | <LaunchAction |
| 83 | buildConfiguration = "Debug" | 44 | buildConfiguration = "Debug" |
| @@ -99,8 +60,6 @@ | @@ -99,8 +60,6 @@ | ||
| 99 | ReferencedContainer = "container:NGPlay.xcodeproj"> | 60 | ReferencedContainer = "container:NGPlay.xcodeproj"> |
| 100 | </BuildableReference> | 61 | </BuildableReference> |
| 101 | </BuildableProductRunnable> | 62 | </BuildableProductRunnable> |
| 102 | - <AdditionalOptions> | ||
| 103 | - </AdditionalOptions> | ||
| 104 | </LaunchAction> | 63 | </LaunchAction> |
| 105 | <ProfileAction | 64 | <ProfileAction |
| 106 | buildConfiguration = "Release" | 65 | buildConfiguration = "Release" |
| @@ -12,10 +12,33 @@ | @@ -12,10 +12,33 @@ | ||
| 12 | #import <React/RCTLinkingManager.h> | 12 | #import <React/RCTLinkingManager.h> |
| 13 | #import <React/RCTRootView.h> | 13 | #import <React/RCTRootView.h> |
| 14 | 14 | ||
| 15 | +#if DEBUG | ||
| 16 | +#import <FlipperKit/FlipperClient.h> | ||
| 17 | +#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h> | ||
| 18 | +#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h> | ||
| 19 | +#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h> | ||
| 20 | +#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h> | ||
| 21 | +#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h> | ||
| 22 | + | ||
| 23 | +static void InitializeFlipper(UIApplication *application) { | ||
| 24 | + FlipperClient *client = [FlipperClient sharedClient]; | ||
| 25 | + SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; | ||
| 26 | + [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; | ||
| 27 | + [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; | ||
| 28 | + [client addPlugin:[FlipperKitReactPlugin new]]; | ||
| 29 | + [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; | ||
| 30 | + [client start]; | ||
| 31 | +} | ||
| 32 | +#endif | ||
| 33 | + | ||
| 15 | @implementation AppDelegate | 34 | @implementation AppDelegate |
| 16 | 35 | ||
| 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | 36 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
| 18 | { | 37 | { |
| 38 | +#if DEBUG | ||
| 39 | + InitializeFlipper(application); | ||
| 40 | +#endif | ||
| 41 | + | ||
| 19 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; | 42 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; |
| 20 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge | 43 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge |
| 21 | moduleName:@"NGPlay" | 44 | moduleName:@"NGPlay" |
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES"> | 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> |
| 3 | - <device id="retina6_1" orientation="portrait" appearance="light"/> | ||
| 4 | <dependencies> | 3 | <dependencies> |
| 5 | <deployment identifier="iOS"/> | 4 | <deployment identifier="iOS"/> |
| 6 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/> | 5 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/> |
| 7 | - <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | 6 | + <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/> |
| 8 | </dependencies> | 7 | </dependencies> |
| 9 | <objects> | 8 | <objects> |
| 10 | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | 9 | <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> |
| @@ -13,20 +12,20 @@ | @@ -13,20 +12,20 @@ | ||
| 13 | <rect key="frame" x="0.0" y="0.0" width="480" height="480"/> | 12 | <rect key="frame" x="0.0" y="0.0" width="480" height="480"/> |
| 14 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 13 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| 15 | <subviews> | 14 | <subviews> |
| 16 | - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> | 15 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> |
| 17 | <rect key="frame" x="20" y="439" width="441" height="21"/> | 16 | <rect key="frame" x="20" y="439" width="441" height="21"/> |
| 18 | <fontDescription key="fontDescription" type="system" pointSize="17"/> | 17 | <fontDescription key="fontDescription" type="system" pointSize="17"/> |
| 19 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | 18 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
| 20 | <nil key="highlightedColor"/> | 19 | <nil key="highlightedColor"/> |
| 21 | </label> | 20 | </label> |
| 22 | - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="NGPlay" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> | 21 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NGPlay" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> |
| 23 | <rect key="frame" x="20" y="140" width="441" height="43"/> | 22 | <rect key="frame" x="20" y="140" width="441" height="43"/> |
| 24 | <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> | 23 | <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> |
| 25 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> | 24 | <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
| 26 | <nil key="highlightedColor"/> | 25 | <nil key="highlightedColor"/> |
| 27 | </label> | 26 | </label> |
| 28 | </subviews> | 27 | </subviews> |
| 29 | - <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | 28 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> |
| 30 | <constraints> | 29 | <constraints> |
| 31 | <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/> | 30 | <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/> |
| 32 | <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> | 31 | <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/> |
| @@ -20,29 +20,8 @@ | @@ -20,29 +20,8 @@ | ||
| 20 | <string>1.0</string> | 20 | <string>1.0</string> |
| 21 | <key>CFBundleSignature</key> | 21 | <key>CFBundleSignature</key> |
| 22 | <string>????</string> | 22 | <string>????</string> |
| 23 | - <key>CFBundleURLTypes</key> | ||
| 24 | - <array> | ||
| 25 | - <dict> | ||
| 26 | - <key>CFBundleTypeRole</key> | ||
| 27 | - <string>Editor</string> | ||
| 28 | - <key>CFBundleURLName</key> | ||
| 29 | - <string>weixin</string> | ||
| 30 | - <key>CFBundleURLSchemes</key> | ||
| 31 | - <array> | ||
| 32 | - <string>wx32beae1b4606079a</string> | ||
| 33 | - </array> | ||
| 34 | - </dict> | ||
| 35 | - </array> | ||
| 36 | <key>CFBundleVersion</key> | 23 | <key>CFBundleVersion</key> |
| 37 | <string>1</string> | 24 | <string>1</string> |
| 38 | - <key>LSApplicationCategoryType</key> | ||
| 39 | - <string></string> | ||
| 40 | - <key>LSApplicationQueriesSchemes</key> | ||
| 41 | - <array> | ||
| 42 | - <string>weixin</string> | ||
| 43 | - <string>wechat</string> | ||
| 44 | - <string>weixinULAPI</string> | ||
| 45 | - </array> | ||
| 46 | <key>LSRequiresIPhoneOS</key> | 25 | <key>LSRequiresIPhoneOS</key> |
| 47 | <true/> | 26 | <true/> |
| 48 | <key>NSAppTransportSecurity</key> | 27 | <key>NSAppTransportSecurity</key> |
| 1 | platform :ios, '9.0' | 1 | platform :ios, '9.0' |
| 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' | 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' |
| 3 | 3 | ||
| 4 | +def add_flipper_pods! | ||
| 5 | + version = '~> 0.33.1' | ||
| 6 | + pod 'FlipperKit', version, :configuration => 'Debug' | ||
| 7 | + pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug' | ||
| 8 | + pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug' | ||
| 9 | + pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug' | ||
| 10 | + pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug' | ||
| 11 | +end | ||
| 12 | + | ||
| 13 | +# Post Install processing for Flipper | ||
| 14 | +def flipper_post_install(installer) | ||
| 15 | + installer.pods_project.targets.each do |target| | ||
| 16 | + if target.name == 'YogaKit' | ||
| 17 | + target.build_configurations.each do |config| | ||
| 18 | + config.build_settings['SWIFT_VERSION'] = '4.1' | ||
| 19 | + end | ||
| 20 | + end | ||
| 21 | + end | ||
| 22 | +end | ||
| 23 | + | ||
| 4 | target 'NGPlay' do | 24 | target 'NGPlay' do |
| 5 | # Pods for NGPlay | 25 | # Pods for NGPlay |
| 6 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" | 26 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" |
| @@ -26,20 +46,29 @@ target 'NGPlay' do | @@ -26,20 +46,29 @@ target 'NGPlay' do | ||
| 26 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' | 46 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' |
| 27 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' | 47 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' |
| 28 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' | 48 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' |
| 29 | - pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" | 49 | + pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon" |
| 30 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" | 50 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" |
| 31 | - pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' | 51 | + pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true |
| 32 | 52 | ||
| 33 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' | 53 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' |
| 34 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' | 54 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' |
| 35 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' | 55 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' |
| 36 | 56 | ||
| 37 | target 'NGPlayTests' do | 57 | target 'NGPlayTests' do |
| 38 | - inherit! :search_paths | 58 | + inherit! :complete |
| 39 | # Pods for testing | 59 | # Pods for testing |
| 40 | end | 60 | end |
| 41 | 61 | ||
| 42 | use_native_modules! | 62 | use_native_modules! |
| 63 | + | ||
| 64 | + # Enables Flipper. | ||
| 65 | + # | ||
| 66 | + # Note that if you have use_frameworks! enabled, Flipper will not work and | ||
| 67 | + # you should disable these next few lines. | ||
| 68 | + add_flipper_pods! | ||
| 69 | + post_install do |installer| | ||
| 70 | + flipper_post_install(installer) | ||
| 71 | + end | ||
| 43 | end | 72 | end |
| 44 | 73 | ||
| 45 | target 'NGPlay-tvOS' do | 74 | target 'NGPlay-tvOS' do |
| @@ -49,5 +78,4 @@ target 'NGPlay-tvOS' do | @@ -49,5 +78,4 @@ target 'NGPlay-tvOS' do | ||
| 49 | inherit! :search_paths | 78 | inherit! :search_paths |
| 50 | # Pods for testing | 79 | # Pods for testing |
| 51 | end | 80 | end |
| 52 | - | ||
| 53 | end | 81 | end |
This diff is collapsed. Click to expand it.
| @@ -12,47 +12,46 @@ | @@ -12,47 +12,46 @@ | ||
| 12 | }, | 12 | }, |
| 13 | "dependencies": { | 13 | "dependencies": { |
| 14 | "@react-native-community/masked-view": "^0.1.7", | 14 | "@react-native-community/masked-view": "^0.1.7", |
| 15 | - "@react-navigation/bottom-tabs": "^5.1.0", | 15 | + "@react-navigation/bottom-tabs": "^5.2.5", |
| 16 | - "@react-navigation/drawer": "^5.1.0", | 16 | + "@react-navigation/drawer": "^5.4.0", |
| 17 | - "@react-navigation/material-top-tabs": "^5.1.0", | 17 | + "@react-navigation/material-top-tabs": "^5.1.7", |
| 18 | - "@react-navigation/native": "^5.0.8", | 18 | + "@react-navigation/native": "^5.1.4", |
| 19 | - "@react-navigation/stack": "^5.1.0", | 19 | + "@react-navigation/stack": "^5.2.9", |
| 20 | - "react": "16.9.0", | 20 | + "react": "16.11.0", |
| 21 | - "react-native": "0.61.5", | 21 | + "react-native": "0.62.1", |
| 22 | "react-native-elements": "^1.2.7", | 22 | "react-native-elements": "^1.2.7", |
| 23 | - "react-native-gesture-handler": "^1.6.0", | 23 | + "react-native-gesture-handler": "^1.6.1", |
| 24 | - "react-native-reanimated": "^1.7.0", | 24 | + "react-native-reanimated": "^1.7.1", |
| 25 | "react-native-safe-area-context": "^0.7.3", | 25 | "react-native-safe-area-context": "^0.7.3", |
| 26 | - "react-native-screens": "^2.2.0", | 26 | + "react-native-screens": "^2.4.0", |
| 27 | "react-native-tab-view": "^2.13.0", | 27 | "react-native-tab-view": "^2.13.0", |
| 28 | - "react-native-vector-icons": "^6.6.0", | 28 | + "react-native-vector-icons": "^6.6.0" |
| 29 | - "rn-wechat": "file:../rn-wechat" | ||
| 30 | }, | 29 | }, |
| 31 | "devDependencies": { | 30 | "devDependencies": { |
| 32 | "@babel/core": "^7.6.2", | 31 | "@babel/core": "^7.6.2", |
| 33 | "@babel/runtime": "^7.6.2", | 32 | "@babel/runtime": "^7.6.2", |
| 34 | "@commitlint/cli": "^8.3.5", | 33 | "@commitlint/cli": "^8.3.5", |
| 35 | "@commitlint/config-conventional": "^8.3.4", | 34 | "@commitlint/config-conventional": "^8.3.4", |
| 36 | - "@react-native-community/eslint-config": "^0.0.5", | 35 | + "@react-native-community/eslint-config": "^1.0.0", |
| 37 | "@types/jest": "^24.0.24", | 36 | "@types/jest": "^24.0.24", |
| 38 | - "@types/react-native": "^0.60.25", | 37 | + "@types/react-native": "^0.62.0", |
| 39 | - "@types/react-test-renderer": "16.9.1", | 38 | + "@types/react-test-renderer": "16.9.2", |
| 40 | - "@typescript-eslint/eslint-plugin": "^2.12.0", | 39 | + "@typescript-eslint/eslint-plugin": "^2.27.0", |
| 41 | - "@typescript-eslint/parser": "^2.12.0", | 40 | + "@typescript-eslint/parser": "^2.27.0", |
| 42 | "babel-jest": "^24.9.0", | 41 | "babel-jest": "^24.9.0", |
| 43 | "commitizen": "^4.0.3", | 42 | "commitizen": "^4.0.3", |
| 44 | "cz-conventional-changelog": "^3.1.0", | 43 | "cz-conventional-changelog": "^3.1.0", |
| 45 | - "eslint": "^6.5.1", | 44 | + "eslint": "^6.8.0", |
| 46 | - "eslint-config-prettier": "^6.10.0", | 45 | + "eslint-config-prettier": "^6.10.1", |
| 47 | "eslint-plugin-prettier": "^3.1.2", | 46 | "eslint-plugin-prettier": "^3.1.2", |
| 48 | "husky": "^4.2.3", | 47 | "husky": "^4.2.3", |
| 49 | "jest": "^24.9.0", | 48 | "jest": "^24.9.0", |
| 50 | - "lint-staged": ">=10", | 49 | + "lint-staged": "^10.1.2", |
| 51 | - "metro-react-native-babel-preset": "^0.56.0", | 50 | + "metro-react-native-babel-preset": "^0.58.0", |
| 52 | - "prettier": "1.19.1", | 51 | + "prettier": "^2.0.4", |
| 53 | - "react-test-renderer": "16.9.0", | 52 | + "react-test-renderer": "16.11.0", |
| 54 | "standard-version": "^7.1.0", | 53 | "standard-version": "^7.1.0", |
| 55 | - "typescript": "^3.7.3" | 54 | + "typescript": "^3.8.3" |
| 56 | }, | 55 | }, |
| 57 | "jest": { | 56 | "jest": { |
| 58 | "preset": "react-native", | 57 | "preset": "react-native", |
This diff could not be displayed because it is too large.
-
Please register or login to post a comment