@getquip/expo-nordic-dfu 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +2 -23
- package/.github/workflows/audit.yml +3 -6
- package/.github/workflows/conf-traffic.yml +102 -0
- package/.github/workflows/lint.yml +11 -22
- package/.github/workflows/test.yml +4 -8
- package/.nvmrc +1 -1
- package/.prettierignore +1 -0
- package/README.md +3 -3
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/results.bin +1 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/BuildConfig.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/DfuService.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$1$1.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$1$2.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$1.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$2.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$3.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$1.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$2.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$3.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$4.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$5.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$6.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$7.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$8.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule$dfuProgressListener$1.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/ExpoNordicDfuModule.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/getquip/nordic/NotificationActivity.dex +0 -0
- package/android/build/.transforms/576c59059c5ad48575c7ca8b06b65f9b/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/758c7658fec337f3b4bcf2d457b86828/results.bin +1 -0
- package/android/build/.transforms/758c7658fec337f3b4bcf2d457b86828/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +1 -1
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +5 -5
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/getquip-expo-nordic-dfu_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/DfuService.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$1$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$1$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$5.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$6.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$7.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$8.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule$dfuProgressListener$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/ExpoNordicDfuModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/getquip/nordic/NotificationActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/getquip-expo-nordic-dfu_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/DfuService.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$1$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$1$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunction$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$5.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$6.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$7.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$definition$lambda$10$$inlined$AsyncFunctionWithPromise$8.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule$dfuProgressListener$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/ExpoNordicDfuModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/getquip/nordic/NotificationActivity.class +0 -0
- package/eslint.config.mjs +34 -0
- package/example/.nvmrc +1 -1
- package/example/App.tsx +6 -4
- package/example/android/app/build.gradle +16 -10
- package/example/android/app/src/debugOptimized/AndroidManifest.xml +7 -0
- package/example/android/app/src/main/AndroidManifest.xml +1 -7
- package/example/android/app/src/main/java/expo/modules/nordicdfu/example/MainApplication.kt +15 -16
- package/example/android/app/src/main/res/values/styles.xml +2 -8
- package/example/android/build.gradle +17 -34
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +10 -1
- package/example/android/gradlew +3 -4
- package/example/android/gradlew.bat +2 -2
- package/example/android/settings.gradle +25 -24
- package/example/ios/Podfile +14 -20
- package/example/ios/Podfile.lock +909 -730
- package/example/ios/exponordicdfuexample/AppDelegate.swift +70 -0
- package/example/ios/exponordicdfuexample/Info.plist +2 -0
- package/example/ios/exponordicdfuexample/SplashScreen.storyboard +8 -4
- package/example/ios/exponordicdfuexample/exponordicdfuexample-Bridging-Header.h +1 -1
- package/example/ios/exponordicdfuexample.xcodeproj/project.pbxproj +88 -86
- package/example/package-lock.json +1930 -4350
- package/example/package.json +13 -7
- package/package.json +18 -14
- package/example/ios/exponordicdfuexample/AppDelegate.h +0 -7
- package/example/ios/exponordicdfuexample/AppDelegate.mm +0 -62
- package/example/ios/exponordicdfuexample/main.m +0 -10
- package/example/ios/exponordicdfuexample/noop-file.swift +0 -4
- /package/example/ios/exponordicdfuexample/Images.xcassets/{SplashScreenLogo.imageset → SplashScreenLegacy.imageset}/Contents.json +0 -0
- /package/example/ios/exponordicdfuexample/Images.xcassets/{SplashScreenLogo.imageset → SplashScreenLegacy.imageset}/image.png +0 -0
- /package/example/ios/exponordicdfuexample/Images.xcassets/{SplashScreenLogo.imageset → SplashScreenLegacy.imageset}/image@2x.png +0 -0
- /package/example/ios/exponordicdfuexample/Images.xcassets/{SplashScreenLogo.imageset → SplashScreenLegacy.imageset}/image@3x.png +0 -0
package/example/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
20.19.
|
|
1
|
+
20.19.5
|
package/example/App.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import ExpoNordicDfu from 'expo-nordic-dfu';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import { Alert, KeyboardAvoidingView, PermissionsAndroid, Platform,
|
|
3
|
+
import { Alert, KeyboardAvoidingView, PermissionsAndroid, Platform, ScrollView, TouchableOpacity, View, ViewStyle } from 'react-native';
|
|
4
|
+
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
4
5
|
import BleManager, { Peripheral } from 'react-native-ble-manager'
|
|
5
6
|
import { Text, Button } from 'react-native-paper'
|
|
6
7
|
import * as DocumentPicker from 'expo-document-picker';
|
|
7
|
-
import
|
|
8
|
+
import { File } from 'expo-file-system';
|
|
8
9
|
|
|
9
10
|
const SERVICE_UUIDS = process.env.EXPO_PUBLIC_BLUETOOTH_SERVICE_UUIDS.split(',').map((uuid: string) => uuid.trim())
|
|
10
11
|
const ANDROID_BONDING_ENABLED = process.env.EXPO_PUBLIC_ANDROID_BONDING_ENABLED === 'true'
|
|
@@ -201,7 +202,8 @@ export default function App() {
|
|
|
201
202
|
return;
|
|
202
203
|
}
|
|
203
204
|
|
|
204
|
-
const fileInfo =
|
|
205
|
+
const fileInfo = new File(file.uri).info()
|
|
206
|
+
|
|
205
207
|
if (!fileInfo.exists) {
|
|
206
208
|
throw new Error('File does not exist');
|
|
207
209
|
}
|
|
@@ -233,7 +235,7 @@ export default function App() {
|
|
|
233
235
|
fileUri: firmwareFile.uri,
|
|
234
236
|
// These optional values are set to useful values for quip.
|
|
235
237
|
// Change them to your needs.
|
|
236
|
-
packetReceiptNotificationParameter:
|
|
238
|
+
packetReceiptNotificationParameter: 1,
|
|
237
239
|
android: {
|
|
238
240
|
deviceName: peripheral.name,
|
|
239
241
|
},
|
|
@@ -14,6 +14,7 @@ react {
|
|
|
14
14
|
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
|
|
15
15
|
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
|
|
16
16
|
|
|
17
|
+
enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean()
|
|
17
18
|
// Use Expo CLI to bundle the app, this ensures the Metro config
|
|
18
19
|
// works correctly with Expo projects.
|
|
19
20
|
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
|
|
@@ -63,9 +64,9 @@ react {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
|
-
* Set this to true
|
|
67
|
+
* Set this to true in release builds to optimize the app using [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization).
|
|
67
68
|
*/
|
|
68
|
-
def
|
|
69
|
+
def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBuilds') ?: false).toBoolean()
|
|
69
70
|
|
|
70
71
|
/**
|
|
71
72
|
* The preferred build flavor of JavaScriptCore (JSC)
|
|
@@ -78,7 +79,7 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
|
|
|
78
79
|
* give correct results when using with locales other than en-US. Note that
|
|
79
80
|
* this variant is about 6MiB larger per architecture than default.
|
|
80
81
|
*/
|
|
81
|
-
def jscFlavor = '
|
|
82
|
+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
|
|
82
83
|
|
|
83
84
|
android {
|
|
84
85
|
ndkVersion rootProject.ext.ndkVersion
|
|
@@ -93,6 +94,8 @@ android {
|
|
|
93
94
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
94
95
|
versionCode 1
|
|
95
96
|
versionName "1.0.0"
|
|
97
|
+
|
|
98
|
+
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
|
96
99
|
}
|
|
97
100
|
signingConfigs {
|
|
98
101
|
debug {
|
|
@@ -110,15 +113,18 @@ android {
|
|
|
110
113
|
// Caution! In production, you need to generate your own keystore file.
|
|
111
114
|
// see https://reactnative.dev/docs/signed-apk-android.
|
|
112
115
|
signingConfig signingConfigs.debug
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
|
|
117
|
+
shrinkResources enableShrinkResources.toBoolean()
|
|
118
|
+
minifyEnabled enableMinifyInReleaseBuilds
|
|
115
119
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
116
|
-
|
|
120
|
+
def enablePngCrunchInRelease = findProperty('android.enablePngCrunchInReleaseBuilds') ?: 'true'
|
|
121
|
+
crunchPngs enablePngCrunchInRelease.toBoolean()
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
packagingOptions {
|
|
120
125
|
jniLibs {
|
|
121
|
-
|
|
126
|
+
def enableLegacyPackaging = findProperty('expo.useLegacyPackaging') ?: 'false'
|
|
127
|
+
useLegacyPackaging enableLegacyPackaging.toBoolean()
|
|
122
128
|
}
|
|
123
129
|
}
|
|
124
130
|
androidResources {
|
|
@@ -156,15 +162,15 @@ dependencies {
|
|
|
156
162
|
|
|
157
163
|
if (isGifEnabled) {
|
|
158
164
|
// For animated gif support
|
|
159
|
-
implementation("com.facebook.fresco:animated-gif:${
|
|
165
|
+
implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}")
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
if (isWebpEnabled) {
|
|
163
169
|
// For webp support
|
|
164
|
-
implementation("com.facebook.fresco:webpsupport:${
|
|
170
|
+
implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}")
|
|
165
171
|
if (isWebpAnimatedEnabled) {
|
|
166
172
|
// Animated webp support
|
|
167
|
-
implementation("com.facebook.fresco:animated-webp:${
|
|
173
|
+
implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}")
|
|
168
174
|
}
|
|
169
175
|
}
|
|
170
176
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
xmlns:tools="http://schemas.android.com/tools">
|
|
3
|
+
|
|
4
|
+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
5
|
+
|
|
6
|
+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
|
|
7
|
+
</manifest>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<data android:scheme="https"/>
|
|
21
21
|
</intent>
|
|
22
22
|
</queries>
|
|
23
|
-
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true">
|
|
23
|
+
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:enableOnBackInvokedCallback="false">
|
|
24
24
|
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
|
|
25
25
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
|
|
26
26
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
|
|
@@ -29,12 +29,6 @@
|
|
|
29
29
|
<action android:name="android.intent.action.MAIN"/>
|
|
30
30
|
<category android:name="android.intent.category.LAUNCHER"/>
|
|
31
31
|
</intent-filter>
|
|
32
|
-
<intent-filter>
|
|
33
|
-
<action android:name="android.intent.action.VIEW"/>
|
|
34
|
-
<category android:name="android.intent.category.DEFAULT"/>
|
|
35
|
-
<category android:name="android.intent.category.BROWSABLE"/>
|
|
36
|
-
<data android:scheme="expo.modules.nordicdfu.example"/>
|
|
37
|
-
</intent-filter>
|
|
38
32
|
</activity>
|
|
39
33
|
</application>
|
|
40
34
|
</manifest>
|
|
@@ -5,13 +5,13 @@ import android.content.res.Configuration
|
|
|
5
5
|
|
|
6
6
|
import com.facebook.react.PackageList
|
|
7
7
|
import com.facebook.react.ReactApplication
|
|
8
|
+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
|
|
8
9
|
import com.facebook.react.ReactNativeHost
|
|
9
10
|
import com.facebook.react.ReactPackage
|
|
10
11
|
import com.facebook.react.ReactHost
|
|
11
|
-
import com.facebook.react.
|
|
12
|
+
import com.facebook.react.common.ReleaseLevel
|
|
13
|
+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
|
|
12
14
|
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
13
|
-
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
|
14
|
-
import com.facebook.soloader.SoLoader
|
|
15
15
|
|
|
16
16
|
import expo.modules.ApplicationLifecycleDispatcher
|
|
17
17
|
import expo.modules.ReactNativeHostWrapper
|
|
@@ -19,21 +19,19 @@ import expo.modules.ReactNativeHostWrapper
|
|
|
19
19
|
class MainApplication : Application(), ReactApplication {
|
|
20
20
|
|
|
21
21
|
override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
22
|
+
this,
|
|
23
|
+
object : DefaultReactNativeHost(this) {
|
|
24
|
+
override fun getPackages(): List<ReactPackage> =
|
|
25
|
+
PackageList(this).packages.apply {
|
|
26
|
+
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
27
|
+
// add(MyReactNativePackage())
|
|
28
|
+
}
|
|
30
29
|
|
|
31
30
|
override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry"
|
|
32
31
|
|
|
33
32
|
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
|
|
34
33
|
|
|
35
34
|
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
|
|
36
|
-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
|
37
35
|
}
|
|
38
36
|
)
|
|
39
37
|
|
|
@@ -42,11 +40,12 @@ class MainApplication : Application(), ReactApplication {
|
|
|
42
40
|
|
|
43
41
|
override fun onCreate() {
|
|
44
42
|
super.onCreate()
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
DefaultNewArchitectureEntryPoint.releaseLevel = try {
|
|
44
|
+
ReleaseLevel.valueOf(BuildConfig.REACT_NATIVE_RELEASE_LEVEL.uppercase())
|
|
45
|
+
} catch (e: IllegalArgumentException) {
|
|
46
|
+
ReleaseLevel.STABLE
|
|
49
47
|
}
|
|
48
|
+
loadReactNative(this)
|
|
50
49
|
ApplicationLifecycleDispatcher.onApplicationCreate(this)
|
|
51
50
|
}
|
|
52
51
|
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
2
|
-
<style name="AppTheme" parent="Theme.AppCompat.
|
|
3
|
-
<item name="android:
|
|
4
|
-
<item name="android:editTextStyle">@style/ResetEditText</item>
|
|
2
|
+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
|
3
|
+
<item name="android:enforceNavigationBarContrast" tools:targetApi="29">true</item>
|
|
5
4
|
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
|
6
5
|
<item name="colorPrimary">@color/colorPrimary</item>
|
|
7
6
|
<item name="android:statusBarColor">#ffffff</item>
|
|
8
7
|
</style>
|
|
9
|
-
<style name="ResetEditText" parent="@android:style/Widget.EditText">
|
|
10
|
-
<item name="android:padding">0dp</item>
|
|
11
|
-
<item name="android:textColorHint">#c8c8c8</item>
|
|
12
|
-
<item name="android:textColor">@android:color/black</item>
|
|
13
|
-
</style>
|
|
14
8
|
<style name="Theme.App.SplashScreen" parent="AppTheme">
|
|
15
9
|
<item name="android:windowBackground">@drawable/ic_launcher_background</item>
|
|
16
10
|
</style>
|
|
@@ -1,41 +1,24 @@
|
|
|
1
1
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
2
|
|
|
3
3
|
buildscript {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
repositories {
|
|
14
|
-
google()
|
|
15
|
-
mavenCentral()
|
|
16
|
-
}
|
|
17
|
-
dependencies {
|
|
18
|
-
classpath('com.android.tools.build:gradle')
|
|
19
|
-
classpath('com.facebook.react:react-native-gradle-plugin')
|
|
20
|
-
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
|
|
21
|
-
}
|
|
4
|
+
repositories {
|
|
5
|
+
google()
|
|
6
|
+
mavenCentral()
|
|
7
|
+
}
|
|
8
|
+
dependencies {
|
|
9
|
+
classpath('com.android.tools.build:gradle')
|
|
10
|
+
classpath('com.facebook.react:react-native-gradle-plugin')
|
|
11
|
+
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
|
|
12
|
+
}
|
|
22
13
|
}
|
|
23
14
|
|
|
24
|
-
apply plugin: "com.facebook.react.rootproject"
|
|
25
|
-
|
|
26
15
|
allprojects {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
maven {
|
|
33
|
-
// Android JSC is installed from npm
|
|
34
|
-
url(new File(['node', '--print', "require.resolve('jsc-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), '../dist'))
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
google()
|
|
38
|
-
mavenCentral()
|
|
39
|
-
maven { url 'https://www.jitpack.io' }
|
|
40
|
-
}
|
|
16
|
+
repositories {
|
|
17
|
+
google()
|
|
18
|
+
mavenCentral()
|
|
19
|
+
maven { url 'https://www.jitpack.io' }
|
|
20
|
+
}
|
|
41
21
|
}
|
|
22
|
+
|
|
23
|
+
apply plugin: "expo-root-project"
|
|
24
|
+
apply plugin: "com.facebook.react.rootproject"
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
|
@@ -15,7 +15,7 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
|
|
15
15
|
# When configured, Gradle will run in incubating parallel mode.
|
|
16
16
|
# This option should only be used with decoupled projects. More details, visit
|
|
17
17
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
18
|
-
|
|
18
|
+
org.gradle.parallel=true
|
|
19
19
|
|
|
20
20
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
|
21
21
|
# Android operating system, and which are packaged with your app's APK
|
|
@@ -41,6 +41,11 @@ newArchEnabled=true
|
|
|
41
41
|
# If set to false, you will be using JSC instead.
|
|
42
42
|
hermesEnabled=true
|
|
43
43
|
|
|
44
|
+
# Use this property to enable edge-to-edge display support.
|
|
45
|
+
# This allows your app to draw behind system bars for an immersive UI.
|
|
46
|
+
# Note: Only works with ReactActivity and should not be used with custom Activity.
|
|
47
|
+
edgeToEdgeEnabled=true
|
|
48
|
+
|
|
44
49
|
# Enable GIF support in React Native images (~200 B increase)
|
|
45
50
|
expo.gif.enabled=true
|
|
46
51
|
# Enable webp support in React Native images (~85 KB increase)
|
|
@@ -54,3 +59,7 @@ EX_DEV_CLIENT_NETWORK_INSPECTOR=true
|
|
|
54
59
|
|
|
55
60
|
# Use legacy packaging to compress native libraries in the resulting APK.
|
|
56
61
|
expo.useLegacyPackaging=false
|
|
62
|
+
|
|
63
|
+
# Specifies whether the app is configured to use edge-to-edge via the app config or plugin
|
|
64
|
+
# WARNING: This property has been deprecated and will be removed in Expo SDK 55. Use `edgeToEdgeEnabled` or `react.edgeToEdgeEnabled` to determine whether the project is using edge-to-edge.
|
|
65
|
+
expo.edgeToEdgeEnabled=true
|
package/example/android/gradlew
CHANGED
|
@@ -86,8 +86,7 @@ done
|
|
|
86
86
|
# shellcheck disable=SC2034
|
|
87
87
|
APP_BASE_NAME=${0##*/}
|
|
88
88
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
89
|
-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
|
90
|
-
' "$PWD" ) || exit
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
|
91
90
|
|
|
92
91
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
93
92
|
MAX_FD=maximum
|
|
@@ -115,7 +114,7 @@ case "$( uname )" in #(
|
|
|
115
114
|
NONSTOP* ) nonstop=true ;;
|
|
116
115
|
esac
|
|
117
116
|
|
|
118
|
-
CLASSPATH
|
|
117
|
+
CLASSPATH="\\\"\\\""
|
|
119
118
|
|
|
120
119
|
|
|
121
120
|
# Determine the Java command to use to start the JVM.
|
|
@@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
|
214
213
|
set -- \
|
|
215
214
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
216
215
|
-classpath "$CLASSPATH" \
|
|
217
|
-
|
|
216
|
+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
|
218
217
|
"$@"
|
|
219
218
|
|
|
220
219
|
# Stop when "xargs" is not available.
|
|
@@ -70,11 +70,11 @@ goto fail
|
|
|
70
70
|
:execute
|
|
71
71
|
@rem Setup the command line
|
|
72
72
|
|
|
73
|
-
set CLASSPATH
|
|
73
|
+
set CLASSPATH=
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
@rem Execute Gradle
|
|
77
|
-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%"
|
|
77
|
+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
|
78
78
|
|
|
79
79
|
:end
|
|
80
80
|
@rem End local scope for the variables with windows NT shell
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
pluginManagement {
|
|
2
|
-
|
|
2
|
+
def reactNativeGradlePlugin = new File(
|
|
3
|
+
providers.exec {
|
|
4
|
+
workingDir(rootDir)
|
|
5
|
+
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
|
|
6
|
+
}.standardOutput.asText.get().trim()
|
|
7
|
+
).getParentFile().absolutePath
|
|
8
|
+
includeBuild(reactNativeGradlePlugin)
|
|
9
|
+
|
|
10
|
+
def expoPluginsPath = new File(
|
|
11
|
+
providers.exec {
|
|
12
|
+
workingDir(rootDir)
|
|
13
|
+
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
|
|
14
|
+
}.standardOutput.asText.get().trim(),
|
|
15
|
+
"../android/expo-gradle-plugin"
|
|
16
|
+
).absolutePath
|
|
17
|
+
includeBuild(expoPluginsPath)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
plugins {
|
|
21
|
+
id("com.facebook.react.settings")
|
|
22
|
+
id("expo-autolinking-settings")
|
|
3
23
|
}
|
|
4
|
-
plugins { id("com.facebook.react.settings") }
|
|
5
24
|
|
|
6
25
|
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
|
|
7
26
|
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') {
|
|
8
27
|
ex.autolinkLibrariesFromCommand()
|
|
9
28
|
} else {
|
|
10
|
-
|
|
11
|
-
'node',
|
|
12
|
-
'--no-warnings',
|
|
13
|
-
'--eval',
|
|
14
|
-
'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
|
|
15
|
-
'react-native-config',
|
|
16
|
-
'--json',
|
|
17
|
-
'--platform',
|
|
18
|
-
'android'
|
|
19
|
-
].toList()
|
|
20
|
-
ex.autolinkLibrariesFromCommand(command)
|
|
29
|
+
ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
|
|
21
30
|
}
|
|
22
31
|
}
|
|
32
|
+
expoAutolinking.useExpoModules()
|
|
23
33
|
|
|
24
34
|
rootProject.name = 'expo-nordic-dfu-example'
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
versionCatalogs {
|
|
28
|
-
reactAndroidLibs {
|
|
29
|
-
from(files(new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../gradle/libs.versions.toml")))
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle");
|
|
35
|
-
useExpoModules()
|
|
36
|
+
expoAutolinking.useExpoVersionCatalog()
|
|
36
37
|
|
|
37
38
|
include ':app'
|
|
38
|
-
includeBuild(
|
|
39
|
+
includeBuild(expoAutolinking.reactNativeGradlePlugin)
|
package/example/ios/Podfile
CHANGED
|
@@ -4,12 +4,19 @@ require File.join(File.dirname(`node --print "require.resolve('react-native/pack
|
|
|
4
4
|
require 'json'
|
|
5
5
|
podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
def ccache_enabled?(podfile_properties)
|
|
8
|
+
# Environment variable takes precedence
|
|
9
|
+
return ENV['USE_CCACHE'] == '1' if ENV['USE_CCACHE']
|
|
10
|
+
|
|
11
|
+
# Fall back to Podfile properties
|
|
12
|
+
podfile_properties['apple.ccacheEnabled'] == 'true'
|
|
13
|
+
end
|
|
9
14
|
|
|
15
|
+
ENV['RCT_NEW_ARCH_ENABLED'] ||= '0' if podfile_properties['newArchEnabled'] == 'false'
|
|
16
|
+
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] ||= podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']
|
|
17
|
+
ENV['RCT_USE_RN_DEP'] ||= '1' if podfile_properties['ios.buildReactNativeFromSource'] != 'true' && podfile_properties['newArchEnabled'] != 'false'
|
|
18
|
+
ENV['RCT_USE_PREBUILT_RNCORE'] ||= '1' if podfile_properties['ios.buildReactNativeFromSource'] != 'true' && podfile_properties['newArchEnabled'] != 'false'
|
|
10
19
|
platform :ios, podfile_properties['ios.deploymentTarget'] || '15.1'
|
|
11
|
-
install! 'cocoapods',
|
|
12
|
-
:deterministic_uuids => false
|
|
13
20
|
|
|
14
21
|
prepare_react_native_project!
|
|
15
22
|
|
|
@@ -20,10 +27,8 @@ target 'exponordicdfuexample' do
|
|
|
20
27
|
config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"];
|
|
21
28
|
else
|
|
22
29
|
config_command = [
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'--eval',
|
|
26
|
-
'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
|
|
30
|
+
'npx',
|
|
31
|
+
'expo-modules-autolinking',
|
|
27
32
|
'react-native-config',
|
|
28
33
|
'--json',
|
|
29
34
|
'--platform',
|
|
@@ -49,18 +54,7 @@ target 'exponordicdfuexample' do
|
|
|
49
54
|
installer,
|
|
50
55
|
config[:reactNativePath],
|
|
51
56
|
:mac_catalyst_enabled => false,
|
|
52
|
-
:ccache_enabled => podfile_properties
|
|
57
|
+
:ccache_enabled => ccache_enabled?(podfile_properties),
|
|
53
58
|
)
|
|
54
|
-
|
|
55
|
-
# This is necessary for Xcode 14, because it signs resource bundles by default
|
|
56
|
-
# when building for devices.
|
|
57
|
-
installer.target_installation_results.pod_target_installation_results
|
|
58
|
-
.each do |pod_name, target_installation_result|
|
|
59
|
-
target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
|
|
60
|
-
resource_bundle_target.build_configurations.each do |config|
|
|
61
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
59
|
end
|
|
66
60
|
end
|