diff --git a/samples/react-native/_bundle/config b/samples/react-native/.bundle/config similarity index 100% rename from samples/react-native/_bundle/config rename to samples/react-native/.bundle/config diff --git a/samples/react-native/Gemfile.lock b/samples/react-native/Gemfile.lock index 3c1f2ae202..b7d1f1fd5f 100644 --- a/samples/react-native/Gemfile.lock +++ b/samples/react-native/Gemfile.lock @@ -5,11 +5,12 @@ GEM base64 nkf rexml - activesupport (7.0.8.6) + activesupport (6.1.7.10) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) algoliasearch (1.27.5) @@ -83,13 +84,14 @@ GEM declarative (0.0.20) digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.6.20240107) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) dotenv (2.8.1) emoji_regex (3.2.3) escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) - excon (0.112.0) + excon (0.109.0) faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -161,6 +163,8 @@ GEM xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) ffi (1.17.0) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86_64-darwin) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) @@ -180,28 +184,27 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-storage_v1 (0.31.0) google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.7.1) - google-cloud-env (>= 1.0, < 3.a) - google-cloud-errors (~> 1.0) + google-cloud-core (1.4.1) + google-cloud-env (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.4.0) - google-cloud-storage (1.47.0) - addressable (~> 2.8) + google-cloud-storage (1.31.1) + addressable (~> 2.5) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.31.0) - google-cloud-core (~> 1.6) - googleauth (>= 0.16.2, < 2.a) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.2) + googleauth (~> 0.9) mini_mime (~> 1.0) - googleauth (1.8.1) - faraday (>= 0.17.3, < 3.a) + googleauth (0.17.1) + faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) + memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (>= 0.16, < 2.a) + signet (~> 0.15) highline (2.0.3) - http-cookie (1.0.7) + http-cookie (1.0.8) domain_name (~> 0.5) httpclient (2.8.3) i18n (1.14.6) @@ -211,6 +214,7 @@ GEM jwt (2.9.3) base64 logger (1.7.0) + memoist (0.16.2) mini_magick (4.13.2) mini_mime (1.1.5) minitest (5.25.1) @@ -239,7 +243,7 @@ GEM ruby2_keywords (0.0.5) rubyzip (2.3.2) security (0.1.5) - signet (0.19.0) + signet (0.18.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) @@ -260,6 +264,7 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) + unf (0.2.0) unicode-display_width (2.6.0) word_wrap (1.0.0) xcodeproj (1.25.1) @@ -273,11 +278,13 @@ GEM rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) + zeitwerk (2.6.18) PLATFORMS arm64-darwin-22 arm64-darwin-23 arm64-darwin-24 + ruby x86_64-darwin-20 DEPENDENCIES diff --git a/samples/react-native/android/app/build.gradle b/samples/react-native/android/app/build.gradle index ff87002a78..4cec684b99 100644 --- a/samples/react-native/android/app/build.gradle +++ b/samples/react-native/android/app/build.gradle @@ -3,12 +3,6 @@ apply plugin: "org.jetbrains.kotlin.android" apply plugin: "com.facebook.react" apply plugin: "io.sentry.android.gradle" -project.ext.vectoricons = [ - iconFontNames: [ 'Ionicons.ttf' ] // Specify font files -] - -apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle") - def sentryReactNativePath = ["node", "--print", "require('path').dirname(require.resolve('@sentry/react-native/package.json'))"].execute(null, rootDir).text.trim() project.ext.sentryCli = [ diff --git a/samples/react-native/android/app/src/main/java/io/sentry/reactnative/sample/SamplePackage.java b/samples/react-native/android/app/src/main/java/io/sentry/reactnative/sample/SamplePackage.java index 84964536c4..8dfbd44c8b 100644 --- a/samples/react-native/android/app/src/main/java/io/sentry/reactnative/sample/SamplePackage.java +++ b/samples/react-native/android/app/src/main/java/io/sentry/reactnative/sample/SamplePackage.java @@ -2,6 +2,7 @@ import com.facebook.react.ReactPackage; import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; @@ -66,9 +67,9 @@ public void crashOrUndefined() { } @ReactMethod - public int crashOrNumber() { + public void crashOrNumber(Promise promise) { this.crashNow(); - return 42; + promise.resolve(42); } private void crashNow() { diff --git a/samples/react-native/android/gradle.properties b/samples/react-native/android/gradle.properties index 600fea4b77..d1150a1c0c 100644 --- a/samples/react-native/android/gradle.properties +++ b/samples/react-native/android/gradle.properties @@ -22,6 +22,7 @@ org.gradle.logging.level=lifecycle # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true +android.enableJetifier=true # Use this property to specify which architecture you want to build. # You can also override it from the CLI using diff --git a/samples/react-native/android/gradle/wrapper/gradle-wrapper.jar b/samples/react-native/android/gradle/wrapper/gradle-wrapper.jar index 9bbc975c74..1b33c55baa 100644 Binary files a/samples/react-native/android/gradle/wrapper/gradle-wrapper.jar and b/samples/react-native/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/samples/react-native/android/gradle/wrapper/gradle-wrapper.properties b/samples/react-native/android/gradle/wrapper/gradle-wrapper.properties index 37f853b1c8..002b867c48 100644 --- a/samples/react-native/android/gradle/wrapper/gradle-wrapper.properties +++ b/samples/react-native/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/samples/react-native/ios/.xcode.env b/samples/react-native/ios/.xcode.env index 5a3eeeafe2..15de6fcd85 100644 --- a/samples/react-native/ios/.xcode.env +++ b/samples/react-native/ios/.xcode.env @@ -7,7 +7,7 @@ # # Customize the NODE_BINARY variable here. # For example, to use nvm with brew, add the following line -#. "$(brew --prefix nvm)/nvm.sh" --no-use +# . "$(brew --prefix nvm)/nvm.sh" --no-use export NODE_BINARY=$(command -v node) export EXTRA_COMPILER_ARGS="-w" diff --git a/samples/react-native/ios/Podfile b/samples/react-native/ios/Podfile index 43ff907e4e..b0fedd4573 100644 --- a/samples/react-native/ios/Podfile +++ b/samples/react-native/ios/Podfile @@ -7,10 +7,12 @@ require Pod::Executable.execute_command('node', ['-p', platform :ios, min_ios_version_supported prepare_react_native_project! + linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym + pre_install do |installer| installer.pod_targets.each do |pod| # RNScreens and RNReanimated don't work when dynamically linked @@ -22,6 +24,7 @@ if linkage != nil end end end + end target 'sentryreactnativesample' do @@ -43,6 +46,14 @@ target 'sentryreactnativesample' do end post_install do |installer| + # Fix for Coroutine.h being not found: https://github.com/wix/react-native-navigation/issues/7928#issuecomment-2447543509 + # Remove it once the proper fix is done by react-native-navigation + system("chmod -R u+w Pods/RCT-Folly") + Dir.glob("Pods/RCT-Folly/folly/Portability.h").each do |file| + text = File.read(file) + new_contents = text.gsub('#define FOLLY_HAS_COROUTINES 1', '#define FOLLY_HAS_COROUTINES 0') + File.open(file, "w") { |file| file.puts new_contents } + end # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, diff --git a/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj b/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj index 0d2f979cb0..f543e8fbee 100644 --- a/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj +++ b/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj @@ -8,49 +8,39 @@ /* Begin PBXBuildFile section */ 00E356F31AD99517003FC87E /* sentryreactnativesampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* sentryreactnativesampleTests.m */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; + 0C80B921A6F3F58F76C31292 /* libPods-sentryreactnativesample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-sentryreactnativesample.a */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 338BBBC82B614FA10035844C /* NativePlatformSampleModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = 338BBBC62B614FA10035844C /* NativePlatformSampleModule.mm */; }; - 33E2D62A29A7719600B5042B /* RCTAssetsModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E2D62829A7719600B5042B /* RCTAssetsModule.m */; }; 5ACADB1A9924EDD0850FACBA /* libPods-sentryreactnativesample-sentryreactnativesampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AFC2BCCFBDE2DC231B5C04E5 /* libPods-sentryreactnativesample-sentryreactnativesampleTests.a */; }; - 723FB93385E08A7032AE82F4 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 916F55A329D66130A4DFF319 /* PrivacyInfo.xcprivacy */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - F998F5A3F1731876C4EDA235 /* libPods-sentryreactnativesample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA08EE94AE203638B8C8B74B /* libPods-sentryreactnativesample.a */; }; + 9416CD608C927040C56DEF7A /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; + B2FBDDFF2E4A0F6C00B18357 /* NativePlatformSampleModule.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2FBDDFC2E4A0F6C00B18357 /* NativePlatformSampleModule.mm */; }; + B2FBDE002E4A0F6C00B18357 /* RCTAssetsModule.m in Sources */ = {isa = PBXBuildFile; fileRef = B2FBDDFE2E4A0F6C00B18357 /* RCTAssetsModule.m */; }; + B2FBDE052E4A11F800B18357 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B2FBDE042E4A11F800B18357 /* main.m */; }; + B2FBDE062E4A11F800B18357 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2FBDE032E4A11F800B18357 /* AppDelegate.mm */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = sentryreactnativesample; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 00E356EE1AD99517003FC87E /* sentryreactnativesampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = sentryreactnativesampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* sentryreactnativesampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = sentryreactnativesampleTests.m; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* sentryreactnativesample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sentryreactnativesample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = sentryreactnativesample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = sentryreactnativesample/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = sentryreactnativesample/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = sentryreactnativesample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = sentryreactnativesample/main.m; sourceTree = ""; }; - 338BBBC62B614FA10035844C /* NativePlatformSampleModule.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NativePlatformSampleModule.mm; path = sentryreactnativesample/NativePlatformSampleModule.mm; sourceTree = ""; }; - 338BBBC72B614FA10035844C /* NativePlatformSampleModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativePlatformSampleModule.h; path = sentryreactnativesample/NativePlatformSampleModule.h; sourceTree = ""; }; - 33E2D62829A7719600B5042B /* RCTAssetsModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTAssetsModule.m; path = sentryreactnativesample/RCTAssetsModule.m; sourceTree = ""; }; - 33E2D62929A7719600B5042B /* RCTAssetsModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTAssetsModule.h; path = sentryreactnativesample/RCTAssetsModule.h; sourceTree = ""; }; + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = sentryreactnativesample/PrivacyInfo.xcprivacy; sourceTree = ""; }; 3B4392A12AC88292D35C810B /* Pods-sentryreactnativesample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sentryreactnativesample.debug.xcconfig"; path = "Target Support Files/Pods-sentryreactnativesample/Pods-sentryreactnativesample.debug.xcconfig"; sourceTree = ""; }; 5709B34CF0A7D63546082F79 /* Pods-sentryreactnativesample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sentryreactnativesample.release.xcconfig"; path = "Target Support Files/Pods-sentryreactnativesample/Pods-sentryreactnativesample.release.xcconfig"; sourceTree = ""; }; 5B7EB9410499542E8C5724F5 /* Pods-sentryreactnativesample-sentryreactnativesampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sentryreactnativesample-sentryreactnativesampleTests.debug.xcconfig"; path = "Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests.debug.xcconfig"; sourceTree = ""; }; + 5DCACB8F33CDC322A6C60F78 /* libPods-sentryreactnativesample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-sentryreactnativesample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = sentryreactnativesample/LaunchScreen.storyboard; sourceTree = ""; }; 89C6BE57DB24E9ADA2F236DE /* Pods-sentryreactnativesample-sentryreactnativesampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sentryreactnativesample-sentryreactnativesampleTests.release.xcconfig"; path = "Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests.release.xcconfig"; sourceTree = ""; }; - 916F55A329D66130A4DFF319 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = sentryreactnativesample/PrivacyInfo.xcprivacy; sourceTree = ""; }; AFC2BCCFBDE2DC231B5C04E5 /* libPods-sentryreactnativesample-sentryreactnativesampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-sentryreactnativesample-sentryreactnativesampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - CA08EE94AE203638B8C8B74B /* libPods-sentryreactnativesample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-sentryreactnativesample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + B2FBDDFB2E4A0F6C00B18357 /* NativePlatformSampleModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativePlatformSampleModule.h; path = sentryreactnativesample/NativePlatformSampleModule.h; sourceTree = ""; }; + B2FBDDFC2E4A0F6C00B18357 /* NativePlatformSampleModule.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = NativePlatformSampleModule.mm; path = sentryreactnativesample/NativePlatformSampleModule.mm; sourceTree = ""; }; + B2FBDDFD2E4A0F6C00B18357 /* RCTAssetsModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RCTAssetsModule.h; path = sentryreactnativesample/RCTAssetsModule.h; sourceTree = ""; }; + B2FBDDFE2E4A0F6C00B18357 /* RCTAssetsModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RCTAssetsModule.m; path = sentryreactnativesample/RCTAssetsModule.m; sourceTree = ""; }; + B2FBDE022E4A11F800B18357 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = sentryreactnativesample/AppDelegate.h; sourceTree = ""; }; + B2FBDE032E4A11F800B18357 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = sentryreactnativesample/AppDelegate.mm; sourceTree = ""; }; + B2FBDE042E4A11F800B18357 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = main.m; path = sentryreactnativesample/main.m; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -67,7 +57,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F998F5A3F1731876C4EDA235 /* libPods-sentryreactnativesample.a in Frameworks */, + 0C80B921A6F3F58F76C31292 /* libPods-sentryreactnativesample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -94,17 +84,17 @@ 13B07FAE1A68108700A75B9A /* sentryreactnativesample */ = { isa = PBXGroup; children = ( - 338BBBC72B614FA10035844C /* NativePlatformSampleModule.h */, - 338BBBC62B614FA10035844C /* NativePlatformSampleModule.mm */, - 33E2D62929A7719600B5042B /* RCTAssetsModule.h */, - 33E2D62829A7719600B5042B /* RCTAssetsModule.m */, - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, + B2FBDE022E4A11F800B18357 /* AppDelegate.h */, + B2FBDE032E4A11F800B18357 /* AppDelegate.mm */, + B2FBDE042E4A11F800B18357 /* main.m */, + B2FBDDFB2E4A0F6C00B18357 /* NativePlatformSampleModule.h */, + B2FBDDFC2E4A0F6C00B18357 /* NativePlatformSampleModule.mm */, + B2FBDDFD2E4A0F6C00B18357 /* RCTAssetsModule.h */, + B2FBDDFE2E4A0F6C00B18357 /* RCTAssetsModule.m */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, - 13B07FB71A68108700A75B9A /* main.m */, - 916F55A329D66130A4DFF319 /* PrivacyInfo.xcprivacy */, + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, ); name = sentryreactnativesample; sourceTree = ""; @@ -113,7 +103,7 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - CA08EE94AE203638B8C8B74B /* libPods-sentryreactnativesample.a */, + 5DCACB8F33CDC322A6C60F78 /* libPods-sentryreactnativesample.a */, AFC2BCCFBDE2DC231B5C04E5 /* libPods-sentryreactnativesample-sentryreactnativesampleTests.a */, ); name = Frameworks; @@ -130,8 +120,8 @@ isa = PBXGroup; children = ( 13B07FAE1A68108700A75B9A /* sentryreactnativesample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* sentryreactnativesampleTests */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, BBD78D7AC51CEA395F1C20DB /* Pods */, @@ -178,7 +168,6 @@ buildRules = ( ); dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, ); name = sentryreactnativesampleTests; productName = sentryreactnativesampleTests; @@ -195,8 +184,8 @@ 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - 8152B8B60F6641B996EA3E8F /* Upload Debug Symbols to Sentry */, - F952F48BC443834E63A39C54 /* [CP] Copy Pods Resources */, + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + 53F600B32E9740FC884E7AD6 /* Upload Debug Symbols to Sentry */, ); buildRules = ( ); @@ -220,7 +209,7 @@ TestTargetID = 13B07F861A680F5B00A75B9A; }; 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; + LastSwiftMigration = 1640; }; }; }; @@ -257,7 +246,7 @@ files = ( 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 723FB93385E08A7032AE82F4 /* PrivacyInfo.xcprivacy in Resources */, + 9416CD608C927040C56DEF7A /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -266,7 +255,6 @@ /* Begin PBXShellScriptBuildPhase section */ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -279,7 +267,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\n\n# REACT_NATIVE_PATH first used in RN 0.74.0 Template https://github.com/facebook/react-native/commit/289e78388a87408e215a25108cb02511a05f5c80\nLOCAL_REACT_NATIVE_PATH=\"${REACT_NATIVE_PATH:-\"../node_modules/react-native\"}\"\nWITH_ENVIRONMENT=\"${LOCAL_REACT_NATIVE_PATH}/scripts/xcode/with-environment.sh\"\n\nif [ -f \"$WITH_ENVIRONMENT\" ]; then\n # load envs if loader file exists (since rn 0.68)\n . \"$WITH_ENVIRONMENT\"\nfi\n\nLOCAL_NODE_BINARY=${NODE_BINARY:-node}\nREACT_NATIVE_XCODE=`\"$LOCAL_NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\nSENTRY_XCODE=`\"$LOCAL_NODE_BINARY\" --print \"require('path').dirname(require.resolve('@sentry/react-native/package.json')) + '/scripts/sentry-xcode.sh'\"`\nBUNDLE_REACT_NATIVE=\"/bin/sh $SENTRY_XCODE $REACT_NATIVE_XCODE\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT '$BUNDLE_REACT_NATIVE'\"\n"; + shellScript = "set -e\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nSENTRY_XCODE=\"../node_modules/@sentry/react-native/scripts/sentry-xcode.sh\"\nBUNDLE_REACT_NATIVE=\"/bin/sh $SENTRY_XCODE $REACT_NATIVE_XCODE\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT \\\"$BUNDLE_REACT_NATIVE\\\"\"\n"; }; 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; @@ -298,37 +286,36 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample/Pods-sentryreactnativesample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 65A561E97EBED657593E8ABF /* [CP] Copy Pods Resources */ = { + 53F600B32E9740FC884E7AD6 /* Upload Debug Symbols to Sentry */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", + name = "Upload Debug Symbols to Sentry"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests-resources.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh ../node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh\n"; }; - 8152B8B60F6641B996EA3E8F /* Upload Debug Symbols to Sentry */ = { + 65A561E97EBED657593E8ABF /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "Upload Debug Symbols to Sentry"; - outputPaths = ( + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "LOCAL_NODE_BINARY=${NODE_BINARY:-node}\n\n/bin/sh `\"$LOCAL_NODE_BINARY\" --print \"require('path').dirname(require.resolve('@sentry/react-native/package.json')) + '/scripts/sentry-xcode-debug-files.sh'\"`\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests-resources.sh\"\n"; + showEnvVarsInLog = 0; }; A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -391,7 +378,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-sentryreactnativesample-sentryreactnativesampleTests/Pods-sentryreactnativesample-sentryreactnativesampleTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - F952F48BC443834E63A39C54 /* [CP] Copy Pods Resources */ = { + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -423,23 +410,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - 338BBBC82B614FA10035844C /* NativePlatformSampleModule.mm in Sources */, - 33E2D62A29A7719600B5042B /* RCTAssetsModule.m in Sources */, + B2FBDDFF2E4A0F6C00B18357 /* NativePlatformSampleModule.mm in Sources */, + B2FBDE052E4A11F800B18357 /* main.m in Sources */, + B2FBDE062E4A11F800B18357 /* AppDelegate.mm in Sources */, + B2FBDE002E4A0F6C00B18357 /* RCTAssetsModule.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* sentryreactnativesample */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; @@ -499,29 +478,25 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 97JCY7859U; ENABLE_BITCODE = NO; INFOPLIST_FILE = sentryreactnativesample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN"; IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.reactnative.sample; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = sentryreactnativesample; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore io.sentry.reactnative.sample"; - RCT_NEW_ARCH_ENABLED = 1; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -535,28 +510,24 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 97JCY7859U; INFOPLIST_FILE = sentryreactnativesample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN"; IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = io.sentry.reactnative.sample; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = sentryreactnativesample; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore io.sentry.reactnative.sample"; - RCT_NEW_ARCH_ENABLED = 1; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; @@ -566,8 +537,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CC = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh"; - CCACHE_BINARY = /opt/homebrew/bin/ccache; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; @@ -595,10 +564,9 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -614,20 +582,9 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", - "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", - ); IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh"; - LDPLUSPLUS = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh"; + LD = ""; + LDPLUSPLUS = ""; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", @@ -648,12 +605,15 @@ "-DFOLLY_NO_CONFIG", "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", - "-DRN_FABRIC_ENABLED", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + " ", ); - OTHER_LDFLAGS = "$(inherited)"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; - SENTRY_INCLUDE_NATIVE_SOURCES = false; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; USE_HERMES = true; }; @@ -663,8 +623,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CC = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh"; - CCACHE_BINARY = /opt/homebrew/bin/ccache; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; @@ -692,10 +650,9 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; - CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -704,20 +661,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", - "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", - "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", - ); IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang.sh"; - LDPLUSPLUS = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh"; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", @@ -737,12 +681,15 @@ "-DFOLLY_NO_CONFIG", "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", - "-DRN_FABRIC_ENABLED", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + " ", ); - OTHER_LDFLAGS = "$(inherited)"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; - SENTRY_INCLUDE_NATIVE_SOURCES = false; USE_HERMES = true; VALIDATE_PRODUCT = YES; }; diff --git a/samples/react-native/ios/sentryreactnativesample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/react-native/ios/sentryreactnativesample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d..0000000000 --- a/samples/react-native/ios/sentryreactnativesample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/react-native/ios/sentryreactnativesample/Info.plist b/samples/react-native/ios/sentryreactnativesample/Info.plist index 55084f578b..585f47aaca 100644 --- a/samples/react-native/ios/sentryreactnativesample/Info.plist +++ b/samples/react-native/ios/sentryreactnativesample/Info.plist @@ -19,26 +19,28 @@ CFBundlePackageType APPL CFBundleShortVersionString - 6.20.0 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion - 62 + $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS - + NSAppTransportSecurity NSAllowsArbitraryLoads - + NSAllowsLocalNetworking - + NSLocationWhenInUseUsageDescription - + UIAppFonts Ionicons.ttf + RCTNewArchEnabled + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -52,6 +54,6 @@ UIInterfaceOrientationLandscapeRight UIViewControllerBasedStatusBarAppearance - + diff --git a/samples/react-native/ios/sentryreactnativesample/PrivacyInfo.xcprivacy b/samples/react-native/ios/sentryreactnativesample/PrivacyInfo.xcprivacy index 2c388f904c..a074faf248 100644 --- a/samples/react-native/ios/sentryreactnativesample/PrivacyInfo.xcprivacy +++ b/samples/react-native/ios/sentryreactnativesample/PrivacyInfo.xcprivacy @@ -69,5 +69,7 @@ + NSPrivacyTracking + diff --git a/samples/react-native/ios/sentryreactnativesample/RCTAssetsModule.m b/samples/react-native/ios/sentryreactnativesample/RCTAssetsModule.m index 87c570adea..7096c4240a 100644 --- a/samples/react-native/ios/sentryreactnativesample/RCTAssetsModule.m +++ b/samples/react-native/ios/sentryreactnativesample/RCTAssetsModule.m @@ -8,7 +8,7 @@ @implementation RCTAssetsModule { NSDataAsset *data = [[NSDataAsset alloc] initWithName:@"ExampleBinaryData"]; if (data == nil) { - reject(@"SampleSentryReactNative", @"Failed to load exmaple binary data asset.", nil); + reject(@"SampleSentryReactNative", @"Failed to load example binary data asset.", nil); } NSMutableArray *array = [NSMutableArray arrayWithCapacity:data.data.length]; diff --git a/samples/react-native/metro.config.js b/samples/react-native/metro.config.js index da62dfa958..bb5a25d8e5 100644 --- a/samples/react-native/metro.config.js +++ b/samples/react-native/metro.config.js @@ -7,7 +7,7 @@ const { withMonorepo } = require('sentry-react-native-samples-utils/metro'); * Metro configuration * https://reactnative.dev/docs/metro * - * @type {import('metro-config').MetroConfig} + * @type {import('@react-native/metro-config').MetroConfig} */ const config = {}; diff --git a/samples/react-native/package.json b/samples/react-native/package.json index 83f6b82e05..318d4018db 100644 --- a/samples/react-native/package.json +++ b/samples/react-native/package.json @@ -1,6 +1,6 @@ { "name": "sentry-react-native-sample", - "version": "6.20.0", + "version": "6.19.0", "private": true, "scripts": { "android": "react-native run-android", @@ -22,55 +22,52 @@ "build-android-release-splits-flavors": "export SENTRY_SAMPLE_ENABLE_ABI_SPLIT=true; export SENTRY_SAMPLE_ENABLE_FLAVORS=true; cd android; ./gradlew assembleRelease; cd .." }, "dependencies": { - "@react-navigation/bottom-tabs": "7.3.12", - "@react-navigation/native": "7.1.8", - "@react-navigation/native-stack": "7.3.12", - "@react-navigation/stack": "7.3.1", + "@react-native-vector-icons/ionicons": "^12.3.0", + "@react-native/new-app-screen": "0.80.2", + "@react-navigation/bottom-tabs": "^7.4.5", + "@react-navigation/native": "^7.1.17", + "@react-navigation/native-stack": "^7.3.24", + "@react-navigation/stack": "^7.4.5", + "@reduxjs/toolkit": "^2.8.2", "@sentry/core": "8.55.0", + "@sentry/react": "^10.2.0", "@sentry/react-native": "6.20.0", - "@shopify/flash-list": "1.8.0", + "@shopify/flash-list": "^2.0.2", "delay": "^6.0.0", - "react": "19.0.0", - "react-native": "0.79.2", - "react-native-gesture-handler": "^2.24.0", - "react-native-image-picker": "^8.0.0", + "react": "19.1.0", + "react-native": "0.80.2", + "react-native-gesture-handler": "^2.28.0", + "react-native-image-picker": "^8.2.1", "react-native-launch-arguments": "^4.1.0", - "react-native-reanimated": "3.17.1", - "react-native-safe-area-context": "5.2.0", - "react-native-screens": "4.10.0", - "react-native-svg": "15.11.2", - "react-native-vector-icons": "^10.2.0", - "react-redux": "^8.1.3", - "redux": "^4.2.1", + "react-native-reanimated": "3.19.1", + "react-native-safe-area-context": "^5.5.2", + "react-native-screens": "^4.13.1", + "react-native-svg": "^15.12.1", + "react-native-webview": "^13.15.0", + "react-redux": "^9.2.0", "setimmediate": "^1.0.5" }, "devDependencies": { "@babel/core": "^7.26.7", "@babel/preset-env": "^7.26.7", "@babel/runtime": "^7.26.7", - "@react-native-community/cli": "15.1.3", - "@react-native-community/cli-platform-android": "15.1.3", - "@react-native-community/cli-platform-ios": "15.1.3", - "@react-native/babel-preset": "0.77.1", - "@react-native/eslint-config": "0.77.1", - "@react-native/metro-config": "0.77.1", - "@react-native/typescript-config": "0.77.1", - "@sentry/babel-plugin-component-annotate": "4.1.1", + "@react-native-community/cli": "19.1.1", + "@react-native-community/cli-platform-android": "19.1.1", + "@react-native-community/cli-platform-ios": "19.1.1", + "@react-native/babel-preset": "0.80.2", + "@react-native/eslint-config": "0.80.2", + "@react-native/metro-config": "0.80.2", + "@react-native/typescript-config": "0.80.2", + "@sentry/babel-plugin-component-annotate": "4.1.0", "@types/jest": "^29.5.14", - "@types/node": "^22.13.1", - "@types/react": "^19.0.0", - "@types/react-native-vector-icons": "^6.4.18", - "@types/react-test-renderer": "^19.0.0", - "@typescript-eslint/eslint-plugin": "^7.18.0", - "@typescript-eslint/parser": "^7.18.0", - "babel-jest": "^29.6.3", - "babel-plugin-module-resolver": "^5.0.0", + "@types/react": "^19.1.0", + "@types/react-test-renderer": "^19.1.0", "eslint": "^8.19.0", "eslint-plugin-ft-flow": "^3.0.11", "jest": "^29.6.3", "patch-package": "^8.0.0", "prettier": "2.8.8", - "react-test-renderer": "19.0.0", + "react-test-renderer": "19.1.0", "sentry-react-native-samples-utils": "workspace:^", "ts-jest": "^29.2.5", "typescript": "5.0.4" @@ -78,6 +75,10 @@ "engines": { "node": ">=18" }, + "volta": { + "node": "18.20.8", + "yarn": "3.6.4" + }, "codegenConfig": { "name": "AppSpecs", "type": "all", diff --git a/samples/react-native/src/App.tsx b/samples/react-native/src/App.tsx index 5fa60ba887..ecb415dd99 100644 --- a/samples/react-native/src/App.tsx +++ b/samples/react-native/src/App.tsx @@ -1,55 +1,32 @@ import React from 'react'; + +import { Ionicons } from '@react-native-vector-icons/ionicons'; +import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { NavigationContainer, NavigationContainerRef, + TypedNavigator, } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { createStackNavigator } from '@react-navigation/stack'; -import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; -import Animated, { - Easing, - useAnimatedStyle, - useSharedValue, - withRepeat, - withTiming, -} from 'react-native-reanimated'; - -// Import the Sentry React Native SDK import * as Sentry from '@sentry/react-native'; -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { withSentryPlayground } from '@sentry/react-native/playground'; -import { FeedbackWidget } from '@sentry/react-native'; - -import ErrorsScreen from './Screens/ErrorsScreen'; -import PerformanceScreen from './Screens/PerformanceScreen'; -import TrackerScreen from './Screens/TrackerScreen'; -import ManualTrackerScreen from './Screens/ManualTrackerScreen'; -import PerformanceTimingScreen from './Screens/PerformanceTimingScreen'; -import ReduxScreen from './Screens/ReduxScreen'; -import { Provider } from 'react-redux'; -import { store } from './reduxApp'; -import { GestureHandlerRootView } from 'react-native-gesture-handler'; -import GesturesTracingScreen from './Screens/GesturesTracingScreen'; -import { LogBox, Platform, StyleSheet, View } from 'react-native'; -import Ionicons from 'react-native-vector-icons/Ionicons'; -import PlaygroundScreen from './Screens/PlaygroundScreen'; -import { getDsn, logWithoutTracing } from './utils'; -import HeavyNavigationScreen from './Screens/HeavyNavigationScreen'; -import WebviewScreen from './Screens/WebviewScreen'; import { isTurboModuleEnabled } from '@sentry/react-native/dist/js/utils/environment'; +import { Platform } from 'react-native'; import * as ImagePicker from 'react-native-image-picker'; -import SpaceflightNewsScreen from './Screens/SpaceflightNewsScreen'; -/* false by default to avoid issues in e2e tests waiting for the animation end */ -const RUNNING_INDICATOR = false; +import RunningIndicator from './components/RunningIndicator'; +import WebviewScreen from './Screens/WebviewScreen'; +import getErrorsTab from './tabs/ErrorsTab'; +import getPerformanceTab from './tabs/PerformanceTab'; +import getPlaygroundTab from './tabs/PlaygroundTab'; +import { getDsn, logWithoutTracing } from './utils'; + +const isMobileOs = Platform.OS === 'android' || Platform.OS === 'ios'; if (typeof setImmediate === 'undefined') { require('setimmediate'); } -LogBox.ignoreAllLogs(); -const isMobileOs = Platform.OS === 'android' || Platform.OS === 'ios'; - const reactNavigationIntegration = Sentry.reactNavigationIntegration({ routeChangeTimeoutMs: 500, // How long it will wait for the route change to complete. Default is 1000ms enableTimeToInitialDisplay: isMobileOs, @@ -58,8 +35,12 @@ const reactNavigationIntegration = Sentry.reactNavigationIntegration({ useDispatchedActionData: true, }); +const StackNavigator: TypedNavigator = isMobileOs + ? createNativeStackNavigator() + : createStackNavigator(); +const BottomTabNavigator = createBottomTabNavigator(); + Sentry.init({ - // Replace the example DSN below with your own DSN: dsn: getDsn(), debug: true, environment: 'dev', @@ -79,73 +60,69 @@ Sentry.init({ ); }, enableUserInteractionTracing: true, - integrations(integrations) { - integrations.push( - reactNavigationIntegration, - Sentry.reactNativeTracingIntegration({ - // The time to wait in ms until the transaction will be finished, For testing, default is 1000 ms - idleTimeoutMs: 5_000, - }), - Sentry.httpClientIntegration({ - // These options are effective only in JS. - // This array can contain tuples of `[begin, end]` (both inclusive), - // Single status codes, or a combinations of both. - // default: [[500, 599]] - failedRequestStatusCodes: [[400, 599]], - // This array can contain Regexes or strings, or combinations of both. - // default: [/.*/] - failedRequestTargets: [/.*/], - }), - Sentry.mobileReplayIntegration({ - maskAllImages: true, - maskAllVectors: true, - maskAllText: true, - enableViewRendererV2: true, - }), - Sentry.appStartIntegration({ - standalone: false, - }), - Sentry.reactNativeErrorHandlersIntegration({ - patchGlobalPromise: - Platform.OS === 'ios' && isTurboModuleEnabled() - ? // The global patch doesn't work on iOS with the New Architecture in this Sample app - // In - false - : true, - }), - Sentry.feedbackIntegration({ - imagePicker: ImagePicker, - enableScreenshot: true, - enableTakeScreenshot: true, - styles: { - submitButton: { - backgroundColor: '#6a1b9a', - paddingVertical: 15, - borderRadius: 5, - alignItems: 'center', - marginBottom: 10, - }, + integrations: [ + reactNavigationIntegration, + Sentry.reactNativeTracingIntegration({ + // The time to wait in ms until the transaction will be finished, For testing, default is 1000 ms + idleTimeoutMs: 5_000, + }), + Sentry.httpClientIntegration({ + // These options are effective only in JS. + // This array can contain tuples of `[begin, end]` (both inclusive), + // Single status codes, or a combinations of both. + // default: [[500, 599]] + failedRequestStatusCodes: [[400, 599]], + // This array can contain Regexes or strings, or combinations of both. + // default: [/.*/] + failedRequestTargets: [/.*/], + }), + Sentry.mobileReplayIntegration({ + maskAllImages: true, + maskAllVectors: true, + maskAllText: true, + enableViewRendererV2: true, + }), + Sentry.appStartIntegration({ + standalone: false, + }), + Sentry.reactNativeErrorHandlersIntegration({ + patchGlobalPromise: + Platform.OS === 'ios' && isTurboModuleEnabled() + ? // The global patch doesn't work on iOS with the New Architecture in this Sample app + // In + false + : true, + }), + Sentry.feedbackIntegration({ + imagePicker: ImagePicker, + enableScreenshot: true, + enableTakeScreenshot: true, + styles: { + submitButton: { + backgroundColor: '#6a1b9a', + paddingVertical: 15, + borderRadius: 5, + alignItems: 'center', + marginBottom: 10, }, - namePlaceholder: 'Fullname', - buttonOptions: { - styles: { - triggerButton: { - marginBottom: 75, // Place above the tab bar - }, + }, + namePlaceholder: 'Fullname', + buttonOptions: { + styles: { + triggerButton: { + marginBottom: 75, // Place above the tab bar }, }, - screenshotButtonOptions: { - styles: { - triggerButton: { - marginBottom: 75, // Place above the tab bar - }, + }, + screenshotButtonOptions: { + styles: { + triggerButton: { + marginBottom: 75, // Place above the tab bar }, }, - }), - Sentry.extraErrorDataIntegration(), - ); - return integrations.filter(i => i.name !== 'Dedupe'); - }, + }, + }), + ], enableAutoSessionTracking: true, // For testing, session close when 5 seconds (instead of the default 30) in the background. sessionTrackingIntervalMillis: 30000, @@ -177,101 +154,16 @@ Sentry.init({ }, }); -const Stack = isMobileOs - ? createNativeStackNavigator() - : createStackNavigator(); -const Tab = createBottomTabNavigator(); - -const ErrorsTabNavigator = Sentry.withProfiler( - () => { - return ( - - - - - - {props => ( - - )} - - - - - ); - }, - { name: 'ErrorsTab' }, -); - -const PerformanceTabNavigator = Sentry.withProfiler( - () => { - return ( - - - - - - - - - - - - - - - ); - }, - { name: 'PerformanceTab' }, -); - function BottomTabsNavigator() { return ( - - + - - - + ); } @@ -330,17 +222,20 @@ function RootNavigationContainer() { onReady={() => { reactNavigationIntegration.registerNavigationContainer(navigation); }}> - - - + - + ); } @@ -354,63 +249,4 @@ function App() { ); } -function RunningIndicator() { - if (Platform.OS !== 'android' && Platform.OS !== 'ios') { - return null; - } - - if (!RUNNING_INDICATOR) { - return null; - } - - return ; -} - -function RotatingBox() { - const sv = useSharedValue(0); - - React.useEffect(() => { - sv.value = withRepeat( - withTiming(360, { - duration: 1_000_000, - easing: Easing.linear, - }), - -1, - ); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - const animatedStyle = useAnimatedStyle(() => ({ - transform: [{ rotate: `${sv.value * 360}deg` }], - })); - - return ( - - - - ); -} - -const styles = StyleSheet.create({ - wrapper: { - flex: 1, - }, - container: { - position: 'absolute', - left: 30, - top: 30, - }, - box: { - height: 50, - width: 50, - backgroundColor: '#b58df1', - borderRadius: 5, - }, -}); - -// export default withSentryPlayground(Sentry.wrap(App), { -// projectId: '5428561', -// organizationSlug: 'sentry-sdks', -// }); - export default Sentry.wrap(App); diff --git a/samples/react-native/src/Screens/ErrorsScreen.tsx b/samples/react-native/src/Screens/ErrorsScreen.tsx index 107e705a82..bcb5f087a5 100644 --- a/samples/react-native/src/Screens/ErrorsScreen.tsx +++ b/samples/react-native/src/Screens/ErrorsScreen.tsx @@ -1,24 +1,24 @@ import React, { useEffect } from 'react'; import { - StatusBar, - ScrollView, - Text, - Button as NativeButton, - View, ButtonProps, - StyleSheet, + Button as NativeButton, NativeModules, Platform, + ScrollView, + StatusBar, + StyleSheet, + Text, + View, } from 'react-native'; -import * as Sentry from '@sentry/react-native'; - -import { setScopeProperties } from '../setScopeProperties'; import { StackNavigationProp } from '@react-navigation/stack'; -import { UserFeedbackModal } from '../components/UserFeedbackModal'; import { FallbackRender } from '@sentry/react'; -import NativeSampleModule from '../../tm/NativeSampleModule'; +import * as Sentry from '@sentry/react-native'; + import NativePlatformSampleModule from '../../tm/NativePlatformSampleModule'; +import NativeSampleModule from '../../tm/NativeSampleModule'; +import { UserFeedbackModal } from '../components/UserFeedbackModal'; +import { setScopeProperties } from '../setScopeProperties'; import { TimeToFullDisplay } from '../utils'; const { AssetsModule, CppModule, CrashModule } = NativeModules; @@ -31,7 +31,8 @@ const ErrorsScreen = (_props: Props) => { // Show bad code inside error boundary to trigger it. const [showBadCode, setShowBadCode] = React.useState(false); const [isFeedbackVisible, setFeedbackVisible] = React.useState(false); - const [isFeedbackButtonVisible, setFeedbackButtonVisible] = React.useState(false); + const [isFeedbackButtonVisible, setFeedbackButtonVisible] = + React.useState(false); const errorBoundaryFallback: FallbackRender = ({ eventId }) => ( Error boundary caught with event id: {eventId} @@ -74,8 +75,11 @@ const ErrorsScreen = (_props: Props) => {