Skip to content

Commit 97b3ce8

Browse files
Fix React Native builds (#140)
* Fix iOS React Native build * Fix Android React Native build * Remove flipper_config line in Podfile
1 parent 6cc2d95 commit 97b3ce8

File tree

10 files changed

+6182
-9135
lines changed

10 files changed

+6182
-9135
lines changed

react_native/trimblemaps-mobile-sdk-demo-reactnative/react_native/RNMapsSampleApp/android/app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ android {
3131
compileSdkVersion rootProject.ext.compileSdkVersion
3232
buildToolsVersion rootProject.ext.buildToolsVersion
3333

34+
namespace "com.mapssampleapp"
35+
3436
sourceSets {
3537
main {
3638
jniLibs.srcDirs = ['src/jniLibs']

react_native/trimblemaps-mobile-sdk-demo-reactnative/react_native/RNMapsSampleApp/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
compileSdkVersion = 33
99
targetSdkVersion = 33
1010
ndkVersion = "21.4.7075529"
11-
kotlinVersion = "1.8.20"
11+
kotlinVersion = "1.8.10"
1212
}
1313
repositories {
1414
mavenLocal()

react_native/trimblemaps-mobile-sdk-demo-reactnative/react_native/RNMapsSampleApp/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
module.exports = {
2-
presets: ["module:metro-react-native-babel-preset"]
2+
presets: ["module:metro-react-native-babel-preset"],
3+
plugins: [
4+
["@babel/plugin-transform-class-properties", { "loose": true }],
5+
["@babel/plugin-transform-private-methods", { "loose": true }],
6+
["@babel/plugin-transform-private-property-in-object", { "loose": true }]
7+
]
38
}

react_native/trimblemaps-mobile-sdk-demo-reactnative/react_native/RNMapsSampleApp/ios/Podfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,23 @@ setup_permissions([
3434
# dependencies: {
3535
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
3636
# ```
37-
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
3837

3938
linkage = ENV['USE_FRAMEWORKS']
4039
if linkage != nil
4140
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
4241
use_frameworks! :linkage => linkage.to_sym
4342
end
4443

44+
pre_install do |installer|
45+
installer.pod_targets.each do |pod|
46+
if pod.name.eql?('RNReanimated')
47+
def pod.build_type;
48+
Pod::BuildType.static_library
49+
end
50+
end
51+
end
52+
end
53+
4554
target 'RNMapsSampleApp' do
4655
use_frameworks! :linkage => :dynamic
4756
config = use_native_modules!
@@ -82,6 +91,5 @@ target 'RNMapsSampleApp' do
8291
config[:reactNativePath],
8392
:mac_catalyst_enabled => false
8493
)
85-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
8694
end
8795
end

0 commit comments

Comments
 (0)