From 7a1d505fb9f0b9da1edc5e727e9b433235d73731 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 09:05:16 +0300 Subject: [PATCH 01/39] chore: Validate release post check job --- .circleci/config.yml | 57 ++++++++++++++++++- .../HybridSampleApp.xcodeproj/project.pbxproj | 15 +---- 2 files changed, 58 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index efca5acab3..a57d607de6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -154,6 +154,23 @@ commands: - run: name: Post comment on GitHub command: ./scripts/notify-github.sh "<< parameters.data >>" + pack_and_build_sdk: + parameters: + working_directory: + type: string + default: ~/project + steps: + - install_node_modules + - run: + command: yarn build + working_directory: ~/project + - run: + command: yarn pack --filename InstabugSDK.tgz + working_directory: ~/project + - run: + command: yarn add file:../../InstabugSDK.tgz + working_directory: ~/project/examples/hybrid + jobs: danger: @@ -295,7 +312,7 @@ jobs: -scheme InstabugExample \ -resultBundlePath coverage/result.xcresult \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 13 Pro Max,OS=15.5' \ + -destination 'platform=iOS Simulator,name=any' \ test | xcpretty - when: condition: << parameters.collect_coverage >> @@ -487,6 +504,38 @@ jobs: replace: $SNAPSHOT_VERSION - notify_github: data: "$(jq -Rcs '{ body: . }' scripts/snapshot-comment.md)" + build_android_release: + working_directory: ~/project + executor: + name: android/android-machine + tag: '2024.01.1' + steps: + - advanced-checkout/shallow-checkout + - pack_and_build_sdk + - run: + name: Build Android + command: | + cd examples/hybrid/android + ./gradlew assembleDebug + + build_ios_release: + macos: + xcode: 13.4.1 + resource_class: macos.m1.medium.gen1 + steps: + - advanced-checkout/shallow-checkout + - pack_and_build_sdk + - install_pods: + working_directory: examples/hybrid/ios + - run: + name: Build iOS + command: | + cd examples/hybrid/ios + xcodebuild -workspace HybridSampleApp.xcworkspace \ + -scheme HybridSampleApp \ + -configuration Debug \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 11' workflows: publish: @@ -607,12 +656,16 @@ workflows: filters: branches: only: dream11 + - build_ios_release + - build_android_release - release_custom_package: name: release_dream11 requires: + - build_android_release + - build_ios_release - hold_release_dream11 filters: branches: only: dream11 prepare_steps: - - prepare_dream11 + - prepare_dream11 \ No newline at end of file diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 8fda671329..779c3859f4 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -177,7 +177,6 @@ 0CFE4DC32CC818D30003EEA7 /* Resources */, ED32AADC33B0BCC494C5A17C /* [CP] Embed Pods Frameworks */, 2066411646711027106388D1 /* [CP] Copy Pods Resources */, - 184F1656F78FFBA87258D53F /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -294,16 +293,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 184F1656F78FFBA87258D53F /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; - }; 2066411646711027106388D1 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -566,6 +555,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -594,6 +584,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -712,4 +703,4 @@ /* End XCConfigurationList section */ }; rootObject = 0CFE4DBD2CC818D30003EEA7 /* Project object */; -} +} \ No newline at end of file From 1003681e919124fe451d1d8e11b3dc2d32b04351 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 09:15:16 +0300 Subject: [PATCH 02/39] fix: remove instabug-reactnative from package.json --- .../HybridSampleApp.xcodeproj/project.pbxproj | 13 +++- examples/hybrid/ios/Podfile | 1 - examples/hybrid/ios/Podfile.lock | 3 +- examples/hybrid/package.json | 1 - examples/hybrid/yarn.lock | 73 +++++++++---------- 5 files changed, 49 insertions(+), 42 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 779c3859f4..e87ed1e076 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -177,6 +177,7 @@ 0CFE4DC32CC818D30003EEA7 /* Resources */, ED32AADC33B0BCC494C5A17C /* [CP] Embed Pods Frameworks */, 2066411646711027106388D1 /* [CP] Copy Pods Resources */, + 78AD15F1557BF78EBC539D2D /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -310,6 +311,16 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; + 78AD15F1557BF78EBC539D2D /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; + }; E7BE9A3A8F017BA7CFE4AE55 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -703,4 +714,4 @@ /* End XCConfigurationList section */ }; rootObject = 0CFE4DBD2CC818D30003EEA7 /* Project object */; -} \ No newline at end of file +} diff --git a/examples/hybrid/ios/Podfile b/examples/hybrid/ios/Podfile index 4439ed6499..9cebb10135 100644 --- a/examples/hybrid/ios/Podfile +++ b/examples/hybrid/ios/Podfile @@ -18,7 +18,6 @@ target 'HybridSampleApp' do # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) - pod 'Instabug', '~> 13.4.2' post_install do |installer| react_native_post_install( diff --git a/examples/hybrid/ios/Podfile.lock b/examples/hybrid/ios/Podfile.lock index 3df1c81db1..725d25067e 100644 --- a/examples/hybrid/ios/Podfile.lock +++ b/examples/hybrid/ios/Podfile.lock @@ -400,7 +400,6 @@ DEPENDENCIES: - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - Instabug (~> 13.4.2) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) @@ -567,6 +566,6 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce -PODFILE CHECKSUM: 8525ac134601619ad9f58f4e06a4300c9e7593fa +PODFILE CHECKSUM: 53b308ae08a9cd107fad0a2338b53b5f40922534 COCOAPODS: 1.15.2 diff --git a/examples/hybrid/package.json b/examples/hybrid/package.json index 8b52a16eb7..d781e234a0 100644 --- a/examples/hybrid/package.json +++ b/examples/hybrid/package.json @@ -12,7 +12,6 @@ "dependencies": { "@react-native-community/cli": "^14.1.1", "@react-native-community/cli-platform-android": "^14.1.1", - "instabug-reactnative": "^13.4.2", "react": "18.2.0", "react-native": "0.72.3" }, diff --git a/examples/hybrid/yarn.lock b/examples/hybrid/yarn.lock index 8f81eac99e..0f059f8b64 100644 --- a/examples/hybrid/yarn.lock +++ b/examples/hybrid/yarn.lock @@ -11,18 +11,18 @@ "@jridgewell/trace-mapping" "^0.3.24" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.0.tgz#9374b5cd068d128dac0b94ff482594273b1c2815" - integrity sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g== + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== dependencies: "@babel/helper-validator-identifier" "^7.25.9" js-tokens "^4.0.0" picocolors "^1.0.0" "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.25.9", "@babel/compat-data@^7.26.0": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.0.tgz#f02ba6d34e88fadd5e8861e8b38902f43cc1c819" - integrity sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA== + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.2.tgz#278b6b13664557de95b8f35b90d96785850bb56e" + integrity sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.13.16", "@babel/core@^7.20.0", "@babel/core@^7.23.9": version "7.26.0" @@ -46,11 +46,11 @@ semver "^6.3.1" "@babel/generator@^7.20.0", "@babel/generator@^7.25.9", "@babel/generator@^7.26.0", "@babel/generator@^7.7.2": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.0.tgz#505cc7c90d92513f458a477e5ef0703e7c91b8d7" - integrity sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w== + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.2.tgz#87b75813bec87916210e5e01939a4c823d6bb74f" + integrity sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw== dependencies: - "@babel/parser" "^7.26.0" + "@babel/parser" "^7.26.2" "@babel/types" "^7.26.0" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" @@ -225,10 +225,10 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.20.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0": - version "7.26.1" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.1.tgz#44e02499960df2cdce2c456372a3e8e0c3c5c975" - integrity sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw== +"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.20.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.2.tgz#fd7b6f487cfea09889557ef5d4eeb9ff9a5abd11" + integrity sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ== dependencies: "@babel/types" "^7.26.0" @@ -1851,9 +1851,9 @@ metro-runtime "^0.80.3" "@react-native/normalize-colors@*": - version "0.76.0" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.0.tgz#5cf89da962bcd2680eccbbceba6144ea6cf035c3" - integrity sha512-r+pjeIhzehb+bJUUUrztOQb+n6J9DeaLbF6waLgiHa5mFOiwP/4/iWS68inSZnnBtmXHkN2IYiMXzExx8hieWA== + version "0.76.1" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.1.tgz#df8d54d78917a9f075283382fec834f5ccaecefd" + integrity sha512-/+CUk/wGWIdXbJYVLw/q6Fs8Z0x91zzfXIbNiZUdSW1TNEDmytkF371H8a1/Nx3nWa1RqCMVsaZHCG4zqxeDvg== "@react-native/normalize-colors@^0.72.0": version "0.72.0" @@ -1969,9 +1969,9 @@ "@types/istanbul-lib-report" "*" "@types/node@*": - version "22.8.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.1.tgz#b39d4b98165e2ae792ce213f610c7c6108ccfa16" - integrity sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg== + version "22.8.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.5.tgz#a978fb6755dbb32889b0bc3e37554dbc04f261a6" + integrity sha512-5iYk6AMPtsMbkZqCO1UGF9W5L38twq11S2pYWkybGHH2ogPUvXWNlQqJBzuEZWKj/WRH+QTeiv6ySWqJtvIEgA== dependencies: undici-types "~6.19.8" @@ -2319,7 +2319,7 @@ braces@^3.0.3: dependencies: fill-range "^7.1.1" -browserslist@^4.23.3, browserslist@^4.24.0: +browserslist@^4.24.0, browserslist@^4.24.2: version "4.24.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== @@ -2389,9 +2389,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001669: - version "1.0.30001672" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001672.tgz#02ac296ad4765c6c4f93031525f60cf8bdf4a44f" - integrity sha512-XhW1vRo1ob6aeK2w3rTohwTPBLse/rvjq+s3RTSBwnlZqoFFjx9cHsShJjAIbLsLjyoacaTxpLZy9v3gg6zypw== + version "1.0.30001676" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001676.tgz#fe133d41fe74af8f7cc93b8a714c3e86a86e6f04" + integrity sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw== chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" @@ -2570,11 +2570,11 @@ convert-source-map@^2.0.0: integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== core-js-compat@^3.38.0, core-js-compat@^3.38.1: - version "3.38.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.1.tgz#2bc7a298746ca5a7bcb9c164bcb120f2ebc09a09" - integrity sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw== + version "3.39.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.39.0.tgz#b12dccb495f2601dc860bdbe7b4e3ffa8ba63f61" + integrity sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw== dependencies: - browserslist "^4.23.3" + browserslist "^4.24.2" core-util-is@~1.0.0: version "1.0.3" @@ -2709,9 +2709,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.5.41: - version "1.5.47" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.47.tgz#ef0751bc19b28be8ee44cd8405309de3bf3b20c7" - integrity sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ== + version "1.5.49" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz#9358f514ab6eeed809a8689f4b39ea5114ae729c" + integrity sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A== emittery@^0.13.1: version "0.13.1" @@ -2936,9 +2936,9 @@ flow-enums-runtime@^0.0.6: integrity sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw== flow-parser@0.*: - version "0.250.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.250.0.tgz#11fee8836664c5df489b8d93079fd50ab36be5d8" - integrity sha512-8mkLh/CotlvqA9vCyQMbhJoPx2upEg9oKxARAayz8zQ58wCdABnTZy6U4xhMHvHvbTUFgZQk4uH2cglOCOel5A== + version "0.251.1" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.251.1.tgz#b561c765baff1a93d85c510360d2d9c78f81ed86" + integrity sha512-8ZuLqJPlL/T9K3zFdr1m88Lx8JOoJluTTdyvN4uH5NT9zoIIFqbCDoXVhkHh022k2lhuAyFF27cu0BYKh5SmDA== flow-parser@^0.206.0: version "0.206.0" @@ -3153,10 +3153,9 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -instabug-reactnative@^13.4.2: +instabug-reactnative@../../instabug-reactnative-v13.4.0.tgz: version "13.4.0" - resolved "https://registry.yarnpkg.com/instabug-reactnative/-/instabug-reactnative-13.4.0.tgz#c5b17ac23016e98babd8f7abeb0686ec68713fc5" - integrity sha512-n7hfWyiOJM7+XYrAKQv2GAG3/0l5tVtNU1i/FswRJqR7Mh/2WmHsRIrcuw7nobGXGOBJHG7SdGQ/QxU47wBehA== + resolved "../../instabug-reactnative-v13.4.0.tgz#28ab43c8cdfad286b2280118658f280bd159175b" invariant@*, invariant@^2.2.4: version "2.2.4" From 0fdffe54d0521e72ae340e774a42d2f9df2f0c18 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 09:18:35 +0300 Subject: [PATCH 03/39] fix: enhance formatter --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a57d607de6..86e0e6108a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -171,7 +171,6 @@ commands: command: yarn add file:../../InstabugSDK.tgz working_directory: ~/project/examples/hybrid - jobs: danger: executor: @@ -668,4 +667,4 @@ workflows: branches: only: dream11 prepare_steps: - - prepare_dream11 \ No newline at end of file + - prepare_dream11 From 45c0a3c0b4b11f708afa8935db4d31b098794025 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 09:59:57 +0300 Subject: [PATCH 04/39] fix: ios failure --- .../HybridSampleApp.xcodeproj/project.pbxproj | 65 +++++-------------- examples/hybrid/ios/Podfile.lock | 10 --- examples/hybrid/yarn.lock | 4 -- 3 files changed, 18 insertions(+), 61 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index e87ed1e076..67ce00de53 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -18,7 +18,7 @@ 0CFE4DEF2CC818D50003EEA7 /* HybridSampleAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */; }; 0CFE4DF12CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */; }; 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */; }; - 7552011623DF6FA7BAA9396D /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 191F7CF905384E260945F1BC /* libPods-HybridSampleApp.a */; }; + 893F229E868A4DDF11127DF0 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70B496154FFE5F483F8F8412 /* libPods-HybridSampleApp.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,9 +57,9 @@ 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITests.m; sourceTree = ""; }; 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITestsLaunchTests.m; sourceTree = ""; }; 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Instabug.xcframework; path = Pods/Instabug/Instabug.xcframework; sourceTree = ""; }; - 191F7CF905384E260945F1BC /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - CDAF6F0831B59FBF78EF5CD3 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; - DD8BC6C32D0FF637C576BA5F /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; + 6C92FEE679097F4AEE7E1BA7 /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; + 70B496154FFE5F483F8F8412 /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 85FCDE1C375028F9A337B502 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +68,7 @@ buildActionMask = 2147483647; files = ( 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */, - 7552011623DF6FA7BAA9396D /* libPods-HybridSampleApp.a in Frameworks */, + 893F229E868A4DDF11127DF0 /* libPods-HybridSampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,8 +149,8 @@ 2DDC8407773CA2FAF348AF0C /* Pods */ = { isa = PBXGroup; children = ( - DD8BC6C32D0FF637C576BA5F /* Pods-HybridSampleApp.debug.xcconfig */, - CDAF6F0831B59FBF78EF5CD3 /* Pods-HybridSampleApp.release.xcconfig */, + 6C92FEE679097F4AEE7E1BA7 /* Pods-HybridSampleApp.debug.xcconfig */, + 85FCDE1C375028F9A337B502 /* Pods-HybridSampleApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -159,7 +159,7 @@ isa = PBXGroup; children = ( 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */, - 191F7CF905384E260945F1BC /* libPods-HybridSampleApp.a */, + 70B496154FFE5F483F8F8412 /* libPods-HybridSampleApp.a */, ); name = Frameworks; sourceTree = ""; @@ -171,13 +171,11 @@ isa = PBXNativeTarget; buildConfigurationList = 0CFE4DF42CC818D50003EEA7 /* Build configuration list for PBXNativeTarget "HybridSampleApp" */; buildPhases = ( - E7BE9A3A8F017BA7CFE4AE55 /* [CP] Check Pods Manifest.lock */, + 193AA2BE22AFAD81ED55FCDD /* [CP] Check Pods Manifest.lock */, 0CFE4DC12CC818D30003EEA7 /* Sources */, 0CFE4DC22CC818D30003EEA7 /* Frameworks */, 0CFE4DC32CC818D30003EEA7 /* Resources */, - ED32AADC33B0BCC494C5A17C /* [CP] Embed Pods Frameworks */, - 2066411646711027106388D1 /* [CP] Copy Pods Resources */, - 78AD15F1557BF78EBC539D2D /* [CP-User] [instabug-reactnative] Upload Sourcemap */, + A00728C931971A05DEBF433C /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -294,34 +292,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2066411646711027106388D1 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 78AD15F1557BF78EBC539D2D /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; - }; - E7BE9A3A8F017BA7CFE4AE55 /* [CP] Check Pods Manifest.lock */ = { + 193AA2BE22AFAD81ED55FCDD /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -343,21 +314,21 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - ED32AADC33B0BCC494C5A17C /* [CP] Embed Pods Frameworks */ = { + A00728C931971A05DEBF433C /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -552,7 +523,7 @@ }; 0CFE4DF52CC818D50003EEA7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DD8BC6C32D0FF637C576BA5F /* Pods-HybridSampleApp.debug.xcconfig */; + baseConfigurationReference = 6C92FEE679097F4AEE7E1BA7 /* Pods-HybridSampleApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -581,7 +552,7 @@ }; 0CFE4DF62CC818D50003EEA7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CDAF6F0831B59FBF78EF5CD3 /* Pods-HybridSampleApp.release.xcconfig */; + baseConfigurationReference = 85FCDE1C375028F9A337B502 /* Pods-HybridSampleApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; diff --git a/examples/hybrid/ios/Podfile.lock b/examples/hybrid/ios/Podfile.lock index 725d25067e..b1c09ba130 100644 --- a/examples/hybrid/ios/Podfile.lock +++ b/examples/hybrid/ios/Podfile.lock @@ -11,7 +11,6 @@ PODS: - ReactCommon/turbomodule/core (= 0.72.3) - fmt (6.2.1) - glog (0.3.5) - - Instabug (13.4.2) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -388,9 +387,6 @@ PODS: - React-jsi (= 0.72.3) - React-logger (= 0.72.3) - React-perflogger (= 0.72.3) - - RNInstabug (13.4.0): - - Instabug (= 13.4.2) - - React-Core - SocketRocket (0.6.1) - Yoga (1.14.0) @@ -433,13 +429,11 @@ DEPENDENCIES: - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - RNInstabug (from `../node_modules/instabug-reactnative`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: - fmt - - Instabug - SocketRocket EXTERNAL SOURCES: @@ -517,8 +511,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/react/utils" ReactCommon: :path: "../node_modules/react-native/ReactCommon" - RNInstabug: - :path: "../node_modules/instabug-reactnative" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" @@ -529,7 +521,6 @@ SPEC CHECKSUMS: FBReactNativeSpec: c6bd9e179757b3c0ecf815864fae8032377903ef fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - Instabug: 7a71890217b97b1e32dbca96661845396b66da2f RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18 RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3 @@ -562,7 +553,6 @@ SPEC CHECKSUMS: React-runtimescheduler: af0b24628c1d543a3f87251c9efa29c5a589e08a React-utils: bcb57da67eec2711f8b353f6e3d33bd8e4b2efa3 ReactCommon: d7d63a5b3c3ff29304a58fc8eb3b4f1b077cd789 - RNInstabug: 8e7eb1df3f35b935dda661f5bb475f37cef595e6 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce diff --git a/examples/hybrid/yarn.lock b/examples/hybrid/yarn.lock index 0f059f8b64..58073b6eb7 100644 --- a/examples/hybrid/yarn.lock +++ b/examples/hybrid/yarn.lock @@ -3153,10 +3153,6 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -instabug-reactnative@../../instabug-reactnative-v13.4.0.tgz: - version "13.4.0" - resolved "../../instabug-reactnative-v13.4.0.tgz#28ab43c8cdfad286b2280118658f280bd159175b" - invariant@*, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" From 6e0de65f856ec90792b8298085981136d4d70863 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 10:13:05 +0300 Subject: [PATCH 05/39] fix: add ios version --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 86e0e6108a..57ff643e07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -534,7 +534,7 @@ jobs: -scheme HybridSampleApp \ -configuration Debug \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 11' + -destination 'platform=iOS OS:15.5, name=iPhone 11 Pro Max' workflows: publish: From f54489785ad5e4f7914dfc1a84ca9af1982f789a Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 10:18:16 +0300 Subject: [PATCH 06/39] fix: fix config.yml formatting --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 57ff643e07..13a803a3e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -534,7 +534,7 @@ jobs: -scheme HybridSampleApp \ -configuration Debug \ -sdk iphonesimulator \ - -destination 'platform=iOS OS:15.5, name=iPhone 11 Pro Max' + -destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max" workflows: publish: From 05a8e7109439037ecdce783478b6da94a679c400 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 10:29:45 +0300 Subject: [PATCH 07/39] fix: e2e test failure --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 13a803a3e8..514d5c8dcc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -311,7 +311,7 @@ jobs: -scheme InstabugExample \ -resultBundlePath coverage/result.xcresult \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=any' \ + -destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max" \ test | xcpretty - when: condition: << parameters.collect_coverage >> From efb893a19bb6464233ee88db70e2d15a58b31569 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 10:40:55 +0300 Subject: [PATCH 08/39] fix: project.pbxproj --- .../HybridSampleApp.xcodeproj/project.pbxproj | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 67ce00de53..84bd0ba04f 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -176,6 +176,8 @@ 0CFE4DC22CC818D30003EEA7 /* Frameworks */, 0CFE4DC32CC818D30003EEA7 /* Resources */, A00728C931971A05DEBF433C /* [CP] Copy Pods Resources */, + C1FC0017F6036463F3DC7AF3 /* [CP] Embed Pods Frameworks */, + 20FEA470BF508E33AC8B5946 /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -314,6 +316,16 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 20FEA470BF508E33AC8B5946 /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; + }; A00728C931971A05DEBF433C /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -331,6 +343,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; + C1FC0017F6036463F3DC7AF3 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ From 4353768f388d60fe878aa19bbc9f86fcd45cdee6 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 10:49:34 +0300 Subject: [PATCH 09/39] chore: restrict on master branch --- .circleci/config.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 514d5c8dcc..2a07a0ea05 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -655,8 +655,14 @@ workflows: filters: branches: only: dream11 - - build_ios_release - - build_android_release + - build_ios_release: + filters: + branches: + only: master + - build_android_release: + filters: + branches: + only: master - release_custom_package: name: release_dream11 requires: From eb168edf828c2f0ee14bbfa0919f9c517ce95978 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 12:52:33 +0300 Subject: [PATCH 10/39] fix: symlink instabug-reactnative --- examples/hybrid/ios/Podfile.lock | 10 ++++++++++ examples/hybrid/package.json | 1 + examples/hybrid/yarn.lock | 4 ++++ package.json | 3 ++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/examples/hybrid/ios/Podfile.lock b/examples/hybrid/ios/Podfile.lock index b1c09ba130..725d25067e 100644 --- a/examples/hybrid/ios/Podfile.lock +++ b/examples/hybrid/ios/Podfile.lock @@ -11,6 +11,7 @@ PODS: - ReactCommon/turbomodule/core (= 0.72.3) - fmt (6.2.1) - glog (0.3.5) + - Instabug (13.4.2) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -387,6 +388,9 @@ PODS: - React-jsi (= 0.72.3) - React-logger (= 0.72.3) - React-perflogger (= 0.72.3) + - RNInstabug (13.4.0): + - Instabug (= 13.4.2) + - React-Core - SocketRocket (0.6.1) - Yoga (1.14.0) @@ -429,11 +433,13 @@ DEPENDENCIES: - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - RNInstabug (from `../node_modules/instabug-reactnative`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: - fmt + - Instabug - SocketRocket EXTERNAL SOURCES: @@ -511,6 +517,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/react/utils" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + RNInstabug: + :path: "../node_modules/instabug-reactnative" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" @@ -521,6 +529,7 @@ SPEC CHECKSUMS: FBReactNativeSpec: c6bd9e179757b3c0ecf815864fae8032377903ef fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + Instabug: 7a71890217b97b1e32dbca96661845396b66da2f RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18 RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3 @@ -553,6 +562,7 @@ SPEC CHECKSUMS: React-runtimescheduler: af0b24628c1d543a3f87251c9efa29c5a589e08a React-utils: bcb57da67eec2711f8b353f6e3d33bd8e4b2efa3 ReactCommon: d7d63a5b3c3ff29304a58fc8eb3b4f1b077cd789 + RNInstabug: 8e7eb1df3f35b935dda661f5bb475f37cef595e6 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce diff --git a/examples/hybrid/package.json b/examples/hybrid/package.json index d781e234a0..fe927c39e2 100644 --- a/examples/hybrid/package.json +++ b/examples/hybrid/package.json @@ -12,6 +12,7 @@ "dependencies": { "@react-native-community/cli": "^14.1.1", "@react-native-community/cli-platform-android": "^14.1.1", + "instabug-reactnative": "file:../../InstabugSDK.tgz", "react": "18.2.0", "react-native": "0.72.3" }, diff --git a/examples/hybrid/yarn.lock b/examples/hybrid/yarn.lock index 58073b6eb7..6452b420d1 100644 --- a/examples/hybrid/yarn.lock +++ b/examples/hybrid/yarn.lock @@ -3153,6 +3153,10 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +"instabug-reactnative@file:../../InstabugSDK.tgz": + version "13.4.0" + resolved "file:../../InstabugSDK.tgz#2dd1fac6ff1821ef5ae056142920ce1b2f4e67a3" + invariant@*, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" diff --git a/package.json b/package.json index c068413fe2..e6cb004f96 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "example": "yarn --cwd examples/default", "hybrid": "yarn --cwd examples/hybrid", "pods": "cd examples/default && pod-install --quiet && cd ../hybrid && pod-install --quiet ", - "bootstrap": "yarn example && yarn hybrid && yarn && yarn pods" + "packSDK":"yarn build && yarn pack --filename InstabugSDK.tgz", + "bootstrap": "yarn packSDK && yarn example && yarn hybrid && yarn && yarn pods" }, "peerDependencies": { "react": ">=16.8.6", From 4fa1ad5f1531008d32209039949bf6ee2a2ca5d1 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 12:52:59 +0300 Subject: [PATCH 11/39] fix: rename jobs --- .circleci/config.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a07a0ea05..e83f21fc82 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -154,7 +154,7 @@ commands: - run: name: Post comment on GitHub command: ./scripts/notify-github.sh "<< parameters.data >>" - pack_and_build_sdk: + build_and_pack_sdk: parameters: working_directory: type: string @@ -169,7 +169,7 @@ commands: working_directory: ~/project - run: command: yarn add file:../../InstabugSDK.tgz - working_directory: ~/project/examples/hybrid + working_directory: <> jobs: danger: @@ -503,27 +503,29 @@ jobs: replace: $SNAPSHOT_VERSION - notify_github: data: "$(jq -Rcs '{ body: . }' scripts/snapshot-comment.md)" - build_android_release: + build_check_android: working_directory: ~/project executor: name: android/android-machine tag: '2024.01.1' steps: - advanced-checkout/shallow-checkout - - pack_and_build_sdk + - build_and_pack_sdk: + working_directory: ~/project/examples/hybrid - run: name: Build Android command: | cd examples/hybrid/android ./gradlew assembleDebug - build_ios_release: + build_check_ios: macos: xcode: 13.4.1 resource_class: macos.m1.medium.gen1 steps: - advanced-checkout/shallow-checkout - - pack_and_build_sdk + - build_and_pack_sdk: + working_directory: ~/project/examples/hybrid - install_pods: working_directory: examples/hybrid/ios - run: @@ -655,19 +657,19 @@ workflows: filters: branches: only: dream11 - - build_ios_release: + - build_check_ios: filters: branches: only: master - - build_android_release: + - build_check_android: filters: branches: only: master - release_custom_package: name: release_dream11 requires: - - build_android_release - - build_ios_release + - build_check_android + - build_check_ios - hold_release_dream11 filters: branches: From c54e888391b1a03d8f97bb67af8c01f54f0e2300 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 12:55:41 +0300 Subject: [PATCH 12/39] fix: lint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e6cb004f96..a880ad2a67 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "example": "yarn --cwd examples/default", "hybrid": "yarn --cwd examples/hybrid", "pods": "cd examples/default && pod-install --quiet && cd ../hybrid && pod-install --quiet ", - "packSDK":"yarn build && yarn pack --filename InstabugSDK.tgz", + "packSDK": "yarn build && yarn pack --filename InstabugSDK.tgz", "bootstrap": "yarn packSDK && yarn example && yarn hybrid && yarn && yarn pods" }, "peerDependencies": { From d526791996a636314c85f579593578ae69a053bb Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 13:45:46 +0300 Subject: [PATCH 13/39] fix: generalize release jobs --- .circleci/config.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e83f21fc82..83e41a10c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -504,37 +504,46 @@ jobs: - notify_github: data: "$(jq -Rcs '{ body: . }' scripts/snapshot-comment.md)" build_check_android: - working_directory: ~/project + parameters: + working_directory: + type: string + android_path: + type: string executor: - name: android/android-machine - tag: '2024.01.1' + name: android/android-machine + tag: '2024.01.1' steps: - advanced-checkout/shallow-checkout - build_and_pack_sdk: - working_directory: ~/project/examples/hybrid + working_directory: << parameters.working_directory >> - run: name: Build Android command: | - cd examples/hybrid/android - ./gradlew assembleDebug + cd << parameters.android_path >> + ./gradlew assembleRelease build_check_ios: + parameters: + working_directory: + type: string + ios_path: + type: string macos: xcode: 13.4.1 resource_class: macos.m1.medium.gen1 steps: - advanced-checkout/shallow-checkout - build_and_pack_sdk: - working_directory: ~/project/examples/hybrid + working_directory: << parameters.working_directory >> - install_pods: - working_directory: examples/hybrid/ios + working_directory: << parameters.ios_path >> - run: name: Build iOS command: | - cd examples/hybrid/ios + cd << parameters.ios_path >> xcodebuild -workspace HybridSampleApp.xcworkspace \ -scheme HybridSampleApp \ - -configuration Debug \ + -configuration Release \ -sdk iphonesimulator \ -destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max" @@ -658,10 +667,14 @@ workflows: branches: only: dream11 - build_check_ios: + working_directory: ~/project/examples/hybrid + ios_path: examples/hybrid/ios filters: branches: only: master - build_check_android: + working_directory: ~/project/examples/hybrid + android_path: examples/hybrid/android filters: branches: only: master From 22982347ae227ecdcd62e1df4e22d20b3acdae5b Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 13:47:40 +0300 Subject: [PATCH 14/39] fix: enhnace package.json --- examples/hybrid/package.json | 2 +- examples/hybrid/yarn.lock | 6 +++--- package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/hybrid/package.json b/examples/hybrid/package.json index fe927c39e2..59567a1dbd 100644 --- a/examples/hybrid/package.json +++ b/examples/hybrid/package.json @@ -12,7 +12,7 @@ "dependencies": { "@react-native-community/cli": "^14.1.1", "@react-native-community/cli-platform-android": "^14.1.1", - "instabug-reactnative": "file:../../InstabugSDK.tgz", + "instabug-reactnative": "link:../..", "react": "18.2.0", "react-native": "0.72.3" }, diff --git a/examples/hybrid/yarn.lock b/examples/hybrid/yarn.lock index 6452b420d1..5169fb8e15 100644 --- a/examples/hybrid/yarn.lock +++ b/examples/hybrid/yarn.lock @@ -3153,9 +3153,9 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -"instabug-reactnative@file:../../InstabugSDK.tgz": - version "13.4.0" - resolved "file:../../InstabugSDK.tgz#2dd1fac6ff1821ef5ae056142920ce1b2f4e67a3" +"instabug-reactnative@link:../..": + version "0.0.0" + uid "" invariant@*, invariant@^2.2.4: version "2.2.4" diff --git a/package.json b/package.json index a880ad2a67..6589388125 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "example": "yarn --cwd examples/default", "hybrid": "yarn --cwd examples/hybrid", "pods": "cd examples/default && pod-install --quiet && cd ../hybrid && pod-install --quiet ", - "packSDK": "yarn build && yarn pack --filename InstabugSDK.tgz", - "bootstrap": "yarn packSDK && yarn example && yarn hybrid && yarn && yarn pods" + "pack:sdk": "yarn build && yarn pack --filename InstabugSDK.tgz", + "bootstrap": "yarn example && yarn hybrid && yarn && yarn pods" }, "peerDependencies": { "react": ">=16.8.6", From 52a22ece6cf027c5aa2967e76521257fc8a0c1e2 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 13:49:03 +0300 Subject: [PATCH 15/39] fix: validate config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 83e41a10c2..2a75a1cfaa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -510,8 +510,8 @@ jobs: android_path: type: string executor: - name: android/android-machine - tag: '2024.01.1' + name: android/android-machine + tag: '2024.01.1' steps: - advanced-checkout/shallow-checkout - build_and_pack_sdk: From aea4f539b83bdb756968c93966e83b389560af9e Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 13:55:05 +0300 Subject: [PATCH 16/39] revert: just checking the ci jobs --- .circleci/config.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a75a1cfaa..b31bdfc465 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -669,15 +669,9 @@ workflows: - build_check_ios: working_directory: ~/project/examples/hybrid ios_path: examples/hybrid/ios - filters: - branches: - only: master - build_check_android: working_directory: ~/project/examples/hybrid android_path: examples/hybrid/android - filters: - branches: - only: master - release_custom_package: name: release_dream11 requires: From f0c260cad95c0be0b5982300ad398e92b456c452 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 14:16:40 +0300 Subject: [PATCH 17/39] fix: run on release scheme --- .../xcshareddata/xcschemes/HybridSampleApp.xcscheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme b/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme index 1d42675048..08fcfd6909 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme @@ -55,7 +55,7 @@ Date: Thu, 31 Oct 2024 14:26:36 +0300 Subject: [PATCH 18/39] fix: add bundling command --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b31bdfc465..5336085354 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -541,6 +541,7 @@ jobs: name: Build iOS command: | cd << parameters.ios_path >> + yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios xcodebuild -workspace HybridSampleApp.xcworkspace \ -scheme HybridSampleApp \ -configuration Release \ From c5782c0186e0f59f54f301fec91204a0f966c48b Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 14:33:12 +0300 Subject: [PATCH 19/39] fix: metro.config.js --- examples/hybrid/metro.config.js | 37 ++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/examples/hybrid/metro.config.js b/examples/hybrid/metro.config.js index 72fcb3cbf0..1e26bfda73 100644 --- a/examples/hybrid/metro.config.js +++ b/examples/hybrid/metro.config.js @@ -1,11 +1,32 @@ -const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); +const path = require('path'); +const escape = require('escape-string-regexp'); +const { mergeConfig, getDefaultConfig } = require('@react-native/metro-config'); +const exclusionList = require('metro-config/src/defaults/exclusionList'); -/** - * Metro configuration - * https://reactnative.dev/docs/metro - * - * @type {import('metro-config').MetroConfig} - */ -const config = {}; +const root = path.resolve(__dirname, '../..'); +const pkg = require(path.join(root, 'package.json')); +const peerDependencies = Object.keys(pkg.peerDependencies); +const modules = [...peerDependencies, '@babel/runtime']; + +const config = { + watchFolders: [root], + transformer: { + getTransformOptions: async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, + }, + }), + }, + resolver: { + blacklistRE: exclusionList( + modules.map((m) => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)), + ), + extraNodeModules: modules.reduce((acc, name) => { + acc[name] = path.join(__dirname, 'node_modules', name); + return acc; + }, {}), + }, +}; module.exports = mergeConfig(getDefaultConfig(__dirname), config); From 7d8922882789f89a7a065dfaac76b4aab6b88fdb Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 14:39:13 +0300 Subject: [PATCH 20/39] fix: project.pbxproj --- .../HybridSampleApp.xcodeproj/project.pbxproj | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 84bd0ba04f..ab9500ae8e 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -18,7 +18,7 @@ 0CFE4DEF2CC818D50003EEA7 /* HybridSampleAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */; }; 0CFE4DF12CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */; }; 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */; }; - 893F229E868A4DDF11127DF0 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70B496154FFE5F483F8F8412 /* libPods-HybridSampleApp.a */; }; + 58F75FA0EFC56D033E71462D /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B35448804DA6F80A13F2D9AE /* libPods-HybridSampleApp.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,9 +57,9 @@ 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITests.m; sourceTree = ""; }; 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITestsLaunchTests.m; sourceTree = ""; }; 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Instabug.xcframework; path = Pods/Instabug/Instabug.xcframework; sourceTree = ""; }; - 6C92FEE679097F4AEE7E1BA7 /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; - 70B496154FFE5F483F8F8412 /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 85FCDE1C375028F9A337B502 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; + 6BC76B00FFA6897EB4373495 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; + A256A3B806A92AC674BD0DBA /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; + B35448804DA6F80A13F2D9AE /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +68,7 @@ buildActionMask = 2147483647; files = ( 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */, - 893F229E868A4DDF11127DF0 /* libPods-HybridSampleApp.a in Frameworks */, + 58F75FA0EFC56D033E71462D /* libPods-HybridSampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,8 +149,8 @@ 2DDC8407773CA2FAF348AF0C /* Pods */ = { isa = PBXGroup; children = ( - 6C92FEE679097F4AEE7E1BA7 /* Pods-HybridSampleApp.debug.xcconfig */, - 85FCDE1C375028F9A337B502 /* Pods-HybridSampleApp.release.xcconfig */, + A256A3B806A92AC674BD0DBA /* Pods-HybridSampleApp.debug.xcconfig */, + 6BC76B00FFA6897EB4373495 /* Pods-HybridSampleApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -159,7 +159,7 @@ isa = PBXGroup; children = ( 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */, - 70B496154FFE5F483F8F8412 /* libPods-HybridSampleApp.a */, + B35448804DA6F80A13F2D9AE /* libPods-HybridSampleApp.a */, ); name = Frameworks; sourceTree = ""; @@ -171,13 +171,13 @@ isa = PBXNativeTarget; buildConfigurationList = 0CFE4DF42CC818D50003EEA7 /* Build configuration list for PBXNativeTarget "HybridSampleApp" */; buildPhases = ( - 193AA2BE22AFAD81ED55FCDD /* [CP] Check Pods Manifest.lock */, + B6DDE3454EE5CDF456CAC2CB /* [CP] Check Pods Manifest.lock */, 0CFE4DC12CC818D30003EEA7 /* Sources */, 0CFE4DC22CC818D30003EEA7 /* Frameworks */, 0CFE4DC32CC818D30003EEA7 /* Resources */, - A00728C931971A05DEBF433C /* [CP] Copy Pods Resources */, - C1FC0017F6036463F3DC7AF3 /* [CP] Embed Pods Frameworks */, - 20FEA470BF508E33AC8B5946 /* [CP-User] [instabug-reactnative] Upload Sourcemap */, + 0A9E19FC192E9D8A6D758EE8 /* [CP] Embed Pods Frameworks */, + 81261F74E72016DC2902BF48 /* [CP] Copy Pods Resources */, + 804672912EC13C650B43F44A /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -294,29 +294,24 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 193AA2BE22AFAD81ED55FCDD /* [CP] Check Pods Manifest.lock */ = { + 0A9E19FC192E9D8A6D758EE8 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HybridSampleApp-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 20FEA470BF508E33AC8B5946 /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { + 804672912EC13C650B43F44A /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -326,7 +321,7 @@ shellPath = /bin/sh; shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; }; - A00728C931971A05DEBF433C /* [CP] Copy Pods Resources */ = { + 81261F74E72016DC2902BF48 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -343,21 +338,26 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; - C1FC0017F6036463F3DC7AF3 /* [CP] Embed Pods Frameworks */ = { + B6DDE3454EE5CDF456CAC2CB /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-HybridSampleApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -552,7 +552,7 @@ }; 0CFE4DF52CC818D50003EEA7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6C92FEE679097F4AEE7E1BA7 /* Pods-HybridSampleApp.debug.xcconfig */; + baseConfigurationReference = A256A3B806A92AC674BD0DBA /* Pods-HybridSampleApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -581,7 +581,7 @@ }; 0CFE4DF62CC818D50003EEA7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 85FCDE1C375028F9A337B502 /* Pods-HybridSampleApp.release.xcconfig */; + baseConfigurationReference = 6BC76B00FFA6897EB4373495 /* Pods-HybridSampleApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; From 138f1f55dd5199a3906da1e6fe2dd21ce43ae605 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 15:09:42 +0300 Subject: [PATCH 21/39] fix: update build file --- .../HybridSampleApp.xcodeproj/project.pbxproj | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index ab9500ae8e..5518c91b35 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -18,7 +18,7 @@ 0CFE4DEF2CC818D50003EEA7 /* HybridSampleAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */; }; 0CFE4DF12CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */; }; 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */; }; - 58F75FA0EFC56D033E71462D /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B35448804DA6F80A13F2D9AE /* libPods-HybridSampleApp.a */; }; + 6089C93A14E66F4356C05041 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 446882904D7155DA4349907B /* libPods-HybridSampleApp.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,9 +57,9 @@ 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITests.m; sourceTree = ""; }; 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITestsLaunchTests.m; sourceTree = ""; }; 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Instabug.xcframework; path = Pods/Instabug/Instabug.xcframework; sourceTree = ""; }; - 6BC76B00FFA6897EB4373495 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; - A256A3B806A92AC674BD0DBA /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; - B35448804DA6F80A13F2D9AE /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 446882904D7155DA4349907B /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4BE40C83666A9D44DA053B37 /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; + D1CB1771DEB50E8E7F83A3E3 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +68,7 @@ buildActionMask = 2147483647; files = ( 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */, - 58F75FA0EFC56D033E71462D /* libPods-HybridSampleApp.a in Frameworks */, + 6089C93A14E66F4356C05041 /* libPods-HybridSampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,8 +149,8 @@ 2DDC8407773CA2FAF348AF0C /* Pods */ = { isa = PBXGroup; children = ( - A256A3B806A92AC674BD0DBA /* Pods-HybridSampleApp.debug.xcconfig */, - 6BC76B00FFA6897EB4373495 /* Pods-HybridSampleApp.release.xcconfig */, + 4BE40C83666A9D44DA053B37 /* Pods-HybridSampleApp.debug.xcconfig */, + D1CB1771DEB50E8E7F83A3E3 /* Pods-HybridSampleApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -159,7 +159,7 @@ isa = PBXGroup; children = ( 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */, - B35448804DA6F80A13F2D9AE /* libPods-HybridSampleApp.a */, + 446882904D7155DA4349907B /* libPods-HybridSampleApp.a */, ); name = Frameworks; sourceTree = ""; @@ -171,13 +171,13 @@ isa = PBXNativeTarget; buildConfigurationList = 0CFE4DF42CC818D50003EEA7 /* Build configuration list for PBXNativeTarget "HybridSampleApp" */; buildPhases = ( - B6DDE3454EE5CDF456CAC2CB /* [CP] Check Pods Manifest.lock */, + BC0E6FB259E2EA3243D759F7 /* [CP] Check Pods Manifest.lock */, 0CFE4DC12CC818D30003EEA7 /* Sources */, 0CFE4DC22CC818D30003EEA7 /* Frameworks */, 0CFE4DC32CC818D30003EEA7 /* Resources */, - 0A9E19FC192E9D8A6D758EE8 /* [CP] Embed Pods Frameworks */, - 81261F74E72016DC2902BF48 /* [CP] Copy Pods Resources */, - 804672912EC13C650B43F44A /* [CP-User] [instabug-reactnative] Upload Sourcemap */, + B4B906745EEDFD8EE83F9B8C /* [CP] Embed Pods Frameworks */, + F787F6D0450FB42EE8F76811 /* [CP] Copy Pods Resources */, + 0A299E49D0B30D0A2F8BCBB6 /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -294,24 +294,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0A9E19FC192E9D8A6D758EE8 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 804672912EC13C650B43F44A /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { + 0A299E49D0B30D0A2F8BCBB6 /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -321,24 +304,24 @@ shellPath = /bin/sh; shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; }; - 81261F74E72016DC2902BF48 /* [CP] Copy Pods Resources */ = { + B4B906745EEDFD8EE83F9B8C /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - B6DDE3454EE5CDF456CAC2CB /* [CP] Check Pods Manifest.lock */ = { + BC0E6FB259E2EA3243D759F7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -360,6 +343,23 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + F787F6D0450FB42EE8F76811 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -552,7 +552,7 @@ }; 0CFE4DF52CC818D50003EEA7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A256A3B806A92AC674BD0DBA /* Pods-HybridSampleApp.debug.xcconfig */; + baseConfigurationReference = 4BE40C83666A9D44DA053B37 /* Pods-HybridSampleApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -581,7 +581,7 @@ }; 0CFE4DF62CC818D50003EEA7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6BC76B00FFA6897EB4373495 /* Pods-HybridSampleApp.release.xcconfig */; + baseConfigurationReference = D1CB1771DEB50E8E7F83A3E3 /* Pods-HybridSampleApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; From 4603f51bb3c8c98d542f031357ab41b48d70bbd9 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 19:46:50 +0300 Subject: [PATCH 22/39] fix: release mode --- .../HybridSampleApp.xcodeproj/project.pbxproj | 51 +++++++++++++++++-- .../xcschemes/HybridSampleApp.xcscheme | 2 +- examples/hybrid/ios/Podfile.lock | 2 +- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 5518c91b35..4aaf35ebb9 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -7,12 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 0C21903C2CD3E63C00D7A037 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0CFE4DD12CC818D30003EEA7 /* Main.storyboard */; }; + 0C3BA7932CD3D7380012085A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0CFE4DD62CC818D40003EEA7 /* LaunchScreen.storyboard */; }; 0CFE4DCA2CC818D30003EEA7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DC92CC818D30003EEA7 /* AppDelegate.m */; }; 0CFE4DCD2CC818D30003EEA7 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DCC2CC818D30003EEA7 /* SceneDelegate.m */; }; 0CFE4DD02CC818D30003EEA7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DCF2CC818D30003EEA7 /* MainViewController.m */; }; - 0CFE4DD32CC818D30003EEA7 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 0CFE4DD22CC818D30003EEA7 /* Base */; }; 0CFE4DD52CC818D40003EEA7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0CFE4DD42CC818D40003EEA7 /* Assets.xcassets */; }; - 0CFE4DD82CC818D40003EEA7 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 0CFE4DD72CC818D40003EEA7 /* Base */; }; 0CFE4DDB2CC818D40003EEA7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DDA2CC818D40003EEA7 /* main.m */; }; 0CFE4DE52CC818D50003EEA7 /* HybridSampleAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DE42CC818D50003EEA7 /* HybridSampleAppTests.m */; }; 0CFE4DEF2CC818D50003EEA7 /* HybridSampleAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */; }; @@ -178,6 +178,8 @@ B4B906745EEDFD8EE83F9B8C /* [CP] Embed Pods Frameworks */, F787F6D0450FB42EE8F76811 /* [CP] Copy Pods Resources */, 0A299E49D0B30D0A2F8BCBB6 /* [CP-User] [instabug-reactnative] Upload Sourcemap */, + 0C3BA78F2CD3CC490012085A /* Start Packager */, + 0C3BA7902CD3CD1D0012085A /* Run Script */, ); buildRules = ( ); @@ -271,9 +273,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0C21903C2CD3E63C00D7A037 /* Main.storyboard in Resources */, + 0C3BA7932CD3D7380012085A /* LaunchScreen.storyboard in Resources */, 0CFE4DD52CC818D40003EEA7 /* Assets.xcassets in Resources */, - 0CFE4DD82CC818D40003EEA7 /* Base in Resources */, - 0CFE4DD32CC818D30003EEA7 /* Base in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -304,6 +306,45 @@ shellPath = /bin/sh; shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; }; + 0C3BA78F2CD3CC490012085A /* Start Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Start Packager"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; + }; + 0C3BA7902CD3CD1D0012085A /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", + ); + name = "Run Script"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Type a script or drag a script file from set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; + }; B4B906745EEDFD8EE83F9B8C /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -556,6 +597,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + "BUNDLE_LOADER[arch=*]" = ""; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; ENABLE_USER_SCRIPT_SANDBOXING = NO; @@ -586,6 +628,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 1; ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme b/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme index 08fcfd6909..1d42675048 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme @@ -55,7 +55,7 @@ Date: Thu, 31 Oct 2024 19:55:15 +0300 Subject: [PATCH 23/39] fix: update podfile --- examples/hybrid/ios/Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/hybrid/ios/Podfile.lock b/examples/hybrid/ios/Podfile.lock index 85bdc6eac5..725d25067e 100644 --- a/examples/hybrid/ios/Podfile.lock +++ b/examples/hybrid/ios/Podfile.lock @@ -566,6 +566,6 @@ SPEC CHECKSUMS: SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce -PODFILE CHECKSUM: 0363c7ffd96a826d9e75b79899da57da035c4872 +PODFILE CHECKSUM: 53b308ae08a9cd107fad0a2338b53b5f40922534 COCOAPODS: 1.15.2 From b8eab91ee65e5050137bc8300c76ef4cb3e57739 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 20:02:51 +0300 Subject: [PATCH 24/39] fix: update build file --- .../HybridSampleApp.xcodeproj/project.pbxproj | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 4aaf35ebb9..675f88d086 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -18,7 +18,7 @@ 0CFE4DEF2CC818D50003EEA7 /* HybridSampleAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */; }; 0CFE4DF12CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */; }; 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */; }; - 6089C93A14E66F4356C05041 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 446882904D7155DA4349907B /* libPods-HybridSampleApp.a */; }; + 67BC31B880921D20EF6E6DC5 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D12E514CC12B188BB754907 /* libPods-HybridSampleApp.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,9 +57,9 @@ 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITests.m; sourceTree = ""; }; 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITestsLaunchTests.m; sourceTree = ""; }; 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Instabug.xcframework; path = Pods/Instabug/Instabug.xcframework; sourceTree = ""; }; - 446882904D7155DA4349907B /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 4BE40C83666A9D44DA053B37 /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; - D1CB1771DEB50E8E7F83A3E3 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; + 3FD568011CA6C8BE30A8D76F /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; + 4C55B7B4A752E0879F817E12 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; + 5D12E514CC12B188BB754907 /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +68,7 @@ buildActionMask = 2147483647; files = ( 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */, - 6089C93A14E66F4356C05041 /* libPods-HybridSampleApp.a in Frameworks */, + 67BC31B880921D20EF6E6DC5 /* libPods-HybridSampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,8 +149,8 @@ 2DDC8407773CA2FAF348AF0C /* Pods */ = { isa = PBXGroup; children = ( - 4BE40C83666A9D44DA053B37 /* Pods-HybridSampleApp.debug.xcconfig */, - D1CB1771DEB50E8E7F83A3E3 /* Pods-HybridSampleApp.release.xcconfig */, + 3FD568011CA6C8BE30A8D76F /* Pods-HybridSampleApp.debug.xcconfig */, + 4C55B7B4A752E0879F817E12 /* Pods-HybridSampleApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -159,7 +159,7 @@ isa = PBXGroup; children = ( 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */, - 446882904D7155DA4349907B /* libPods-HybridSampleApp.a */, + 5D12E514CC12B188BB754907 /* libPods-HybridSampleApp.a */, ); name = Frameworks; sourceTree = ""; @@ -171,15 +171,15 @@ isa = PBXNativeTarget; buildConfigurationList = 0CFE4DF42CC818D50003EEA7 /* Build configuration list for PBXNativeTarget "HybridSampleApp" */; buildPhases = ( - BC0E6FB259E2EA3243D759F7 /* [CP] Check Pods Manifest.lock */, + 9D5A9C50AE7AD6F17AF26F8A /* [CP] Check Pods Manifest.lock */, 0CFE4DC12CC818D30003EEA7 /* Sources */, 0CFE4DC22CC818D30003EEA7 /* Frameworks */, 0CFE4DC32CC818D30003EEA7 /* Resources */, - B4B906745EEDFD8EE83F9B8C /* [CP] Embed Pods Frameworks */, - F787F6D0450FB42EE8F76811 /* [CP] Copy Pods Resources */, - 0A299E49D0B30D0A2F8BCBB6 /* [CP-User] [instabug-reactnative] Upload Sourcemap */, 0C3BA78F2CD3CC490012085A /* Start Packager */, 0C3BA7902CD3CD1D0012085A /* Run Script */, + 8B47F95A139C5F96B0FDE38E /* [CP] Embed Pods Frameworks */, + 3FD69E47EE0B0B2AC54D80AE /* [CP] Copy Pods Resources */, + 204EA280AEE4DC9053E93C2A /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -296,16 +296,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0A299E49D0B30D0A2F8BCBB6 /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; - }; 0C3BA78F2CD3CC490012085A /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -345,7 +335,34 @@ shellPath = /bin/sh; shellScript = "# Type a script or drag a script file from set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - B4B906745EEDFD8EE83F9B8C /* [CP] Embed Pods Frameworks */ = { + 204EA280AEE4DC9053E93C2A /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; + }; + 3FD69E47EE0B0B2AC54D80AE /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 8B47F95A139C5F96B0FDE38E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -362,7 +379,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - BC0E6FB259E2EA3243D759F7 /* [CP] Check Pods Manifest.lock */ = { + 9D5A9C50AE7AD6F17AF26F8A /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -384,23 +401,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - F787F6D0450FB42EE8F76811 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -593,7 +593,7 @@ }; 0CFE4DF52CC818D50003EEA7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4BE40C83666A9D44DA053B37 /* Pods-HybridSampleApp.debug.xcconfig */; + baseConfigurationReference = 3FD568011CA6C8BE30A8D76F /* Pods-HybridSampleApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -623,7 +623,7 @@ }; 0CFE4DF62CC818D50003EEA7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D1CB1771DEB50E8E7F83A3E3 /* Pods-HybridSampleApp.release.xcconfig */; + baseConfigurationReference = 4C55B7B4A752E0879F817E12 /* Pods-HybridSampleApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; From 22de17cd66f3d96646002a7c853207347ed3bac3 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 20:48:03 +0300 Subject: [PATCH 25/39] fix: fix build project --- .../ios/HybridSampleApp.xcodeproj/project.pbxproj | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 675f88d086..72ddcb363c 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -179,7 +179,6 @@ 0C3BA7902CD3CD1D0012085A /* Run Script */, 8B47F95A139C5F96B0FDE38E /* [CP] Embed Pods Frameworks */, 3FD69E47EE0B0B2AC54D80AE /* [CP] Copy Pods Resources */, - 204EA280AEE4DC9053E93C2A /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -335,16 +334,6 @@ shellPath = /bin/sh; shellScript = "# Type a script or drag a script file from set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 204EA280AEE4DC9053E93C2A /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; - }; 3FD69E47EE0B0B2AC54D80AE /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; From 4911a6248f7a888470a4a647b5aabe690412ba87 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 21:15:04 +0300 Subject: [PATCH 26/39] fix: add remove drived data --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5336085354..9af5c808b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -542,11 +542,12 @@ jobs: command: | cd << parameters.ios_path >> yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios + rm -rf ~/Library/Developer/Xcode/DerivedData/* xcodebuild -workspace HybridSampleApp.xcworkspace \ -scheme HybridSampleApp \ -configuration Release \ -sdk iphonesimulator \ - -destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max" + -destination "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro Max" workflows: publish: From 9dc493bb9f13ddc37170349740c6a18d29cd5def Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Thu, 31 Oct 2024 21:19:15 +0300 Subject: [PATCH 27/39] fix: fix simulator version --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9af5c808b7..4f3fac2058 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -547,7 +547,7 @@ jobs: -scheme HybridSampleApp \ -configuration Release \ -sdk iphonesimulator \ - -destination "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro Max" + -destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max" workflows: publish: From e0e0f436a95b886284c78dfb4977cfed9a991fce Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Sat, 2 Nov 2024 02:17:13 +0200 Subject: [PATCH 28/39] fix: running hybrid app in release mode --- .../HybridSampleApp.xcodeproj/project.pbxproj | 83 +++++++++++-------- .../xcschemes/HybridSampleApp.xcscheme | 2 +- .../hybrid/ios/HybridSampleApp/AppDelegate.h | 2 +- .../ios/HybridSampleApp/MainViewController.m | 36 +++++--- examples/hybrid/yarn.lock | 61 +++++++------- 5 files changed, 105 insertions(+), 79 deletions(-) diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 72ddcb363c..9fcdf25f9b 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -18,7 +18,7 @@ 0CFE4DEF2CC818D50003EEA7 /* HybridSampleAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */; }; 0CFE4DF12CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */; }; 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */; }; - 67BC31B880921D20EF6E6DC5 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D12E514CC12B188BB754907 /* libPods-HybridSampleApp.a */; }; + 142FF951A3708118A8819932 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 950B8F04F7C3625C04291153 /* libPods-HybridSampleApp.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,9 +57,9 @@ 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITests.m; sourceTree = ""; }; 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITestsLaunchTests.m; sourceTree = ""; }; 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Instabug.xcframework; path = Pods/Instabug/Instabug.xcframework; sourceTree = ""; }; - 3FD568011CA6C8BE30A8D76F /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; - 4C55B7B4A752E0879F817E12 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; - 5D12E514CC12B188BB754907 /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 950B8F04F7C3625C04291153 /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 99477D28A21E8B0B94AC3AA8 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; + D3E48438021676A5CDA0AFBE /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +68,7 @@ buildActionMask = 2147483647; files = ( 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */, - 67BC31B880921D20EF6E6DC5 /* libPods-HybridSampleApp.a in Frameworks */, + 142FF951A3708118A8819932 /* libPods-HybridSampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,8 +149,8 @@ 2DDC8407773CA2FAF348AF0C /* Pods */ = { isa = PBXGroup; children = ( - 3FD568011CA6C8BE30A8D76F /* Pods-HybridSampleApp.debug.xcconfig */, - 4C55B7B4A752E0879F817E12 /* Pods-HybridSampleApp.release.xcconfig */, + D3E48438021676A5CDA0AFBE /* Pods-HybridSampleApp.debug.xcconfig */, + 99477D28A21E8B0B94AC3AA8 /* Pods-HybridSampleApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -159,7 +159,7 @@ isa = PBXGroup; children = ( 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */, - 5D12E514CC12B188BB754907 /* libPods-HybridSampleApp.a */, + 950B8F04F7C3625C04291153 /* libPods-HybridSampleApp.a */, ); name = Frameworks; sourceTree = ""; @@ -171,14 +171,15 @@ isa = PBXNativeTarget; buildConfigurationList = 0CFE4DF42CC818D50003EEA7 /* Build configuration list for PBXNativeTarget "HybridSampleApp" */; buildPhases = ( - 9D5A9C50AE7AD6F17AF26F8A /* [CP] Check Pods Manifest.lock */, + DC438267AD8AB127B7791556 /* [CP] Check Pods Manifest.lock */, 0CFE4DC12CC818D30003EEA7 /* Sources */, 0CFE4DC22CC818D30003EEA7 /* Frameworks */, 0CFE4DC32CC818D30003EEA7 /* Resources */, - 0C3BA78F2CD3CC490012085A /* Start Packager */, - 0C3BA7902CD3CD1D0012085A /* Run Script */, - 8B47F95A139C5F96B0FDE38E /* [CP] Embed Pods Frameworks */, - 3FD69E47EE0B0B2AC54D80AE /* [CP] Copy Pods Resources */, + 0C3BA78F2CD3CC490012085A /* start */, + 0C3BA7902CD3CD1D0012085A /* Bundle React Native code and images */, + E986F205655CF33E7D43492E /* [CP] Embed Pods Frameworks */, + 6658FF5757F4FD7FF3C7C187 /* [CP] Copy Pods Resources */, + FBE0CEBD86AA22DF3F4D98FD /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -295,7 +296,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0C3BA78F2CD3CC490012085A /* Start Packager */ = { + 0C3BA78F2CD3CC490012085A /* start */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -304,7 +305,7 @@ ); inputPaths = ( ); - name = "Start Packager"; + name = start; outputFileListPaths = ( ); outputPaths = ( @@ -314,7 +315,7 @@ shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; showEnvVarsInLog = 0; }; - 0C3BA7902CD3CD1D0012085A /* Run Script */ = { + 0C3BA7902CD3CD1D0012085A /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -325,16 +326,16 @@ "$(SRCROOT)/.xcode.env.local", "$(SRCROOT)/.xcode.env", ); - name = "Run Script"; + name = "Bundle React Native code and images"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; + shellScript = "# Type a script or drag a script file from your workspace\nexport NODE_BINARY=node\nexport ENTRY_FILE=\"index.js\"\n\n# This is the path to your project's root, where \"package.json\" lives\nexport PROJECT_ROOT=\"$PROJECT_DIR/..\"\n\nWITH_ENVIRONMENT=\"${PROJECT_ROOT}/node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"${PROJECT_ROOT}/node_modules/react-native/scripts/react-native-xcode.sh\"\n\nif [[ -f \"$WITH_ENVIRONMENT\" ]]; then\n /bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\nelse\n echo \"error: File $WITH_ENVIRONMENT does not exist. Are you sure React Native is installed in your project?\"\n exit 1\nfi\n"; }; - 3FD69E47EE0B0B2AC54D80AE /* [CP] Copy Pods Resources */ = { + 6658FF5757F4FD7FF3C7C187 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -351,45 +352,55 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 8B47F95A139C5F96B0FDE38E /* [CP] Embed Pods Frameworks */ = { + DC438267AD8AB127B7791556 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-HybridSampleApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 9D5A9C50AE7AD6F17AF26F8A /* [CP] Check Pods Manifest.lock */ = { + E986F205655CF33E7D43492E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HybridSampleApp-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + FBE0CEBD86AA22DF3F4D98FD /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] [instabug-reactnative] Upload Sourcemap"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -582,7 +593,7 @@ }; 0CFE4DF52CC818D50003EEA7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3FD568011CA6C8BE30A8D76F /* Pods-HybridSampleApp.debug.xcconfig */; + baseConfigurationReference = D3E48438021676A5CDA0AFBE /* Pods-HybridSampleApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -612,7 +623,7 @@ }; 0CFE4DF62CC818D50003EEA7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4C55B7B4A752E0879F817E12 /* Pods-HybridSampleApp.release.xcconfig */; + baseConfigurationReference = 99477D28A21E8B0B94AC3AA8 /* Pods-HybridSampleApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme b/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme index 1d42675048..08fcfd6909 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/xcshareddata/xcschemes/HybridSampleApp.xcscheme @@ -55,7 +55,7 @@ @interface AppDelegate : UIResponder - +@property (nonatomic, strong) UIWindow *window; // Add this property @end diff --git a/examples/hybrid/ios/HybridSampleApp/MainViewController.m b/examples/hybrid/ios/HybridSampleApp/MainViewController.m index 25f7843093..bb98b9f3d1 100644 --- a/examples/hybrid/ios/HybridSampleApp/MainViewController.m +++ b/examples/hybrid/ios/HybridSampleApp/MainViewController.m @@ -2,29 +2,39 @@ #import #import #import -@interface MainViewController () - +#import +#import +@interface MainViewController () +@property (nonatomic, strong) RCTBridge *bridge; @end @implementation MainViewController - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view. + self.bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil]; } -- (IBAction)startReactNative:(UIButton *)sender { - NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"]; - RCTRootView *rootView = - [[RCTRootView alloc] initWithBundleURL: jsCodeLocation - moduleName: @"HybridSampleApp" - initialProperties:nil -launchOptions: nil]; - UIViewController *vc = [[UIViewController alloc] init]; - vc.view = rootView; - [self presentViewController:vc animated:YES completion:nil]; +- (IBAction)startReactNative:(UIButton *)sender { + RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:self.bridge + moduleName:@"HybridSampleApp" + initialProperties:nil]; + + UIViewController *vc = [[UIViewController alloc] init]; + vc.view = rootView; + [self presentViewController:vc animated:YES completion:nil]; } +// This will now be called by the bridge +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + NSLog(@"sourceURLForBridge called!"); // This will now print +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} - (IBAction)throwHandled:(UIButton *)sender { NSException *exception = [NSException exceptionWithName:@"Objective-C Handled Exception" reason:@"no reason" diff --git a/examples/hybrid/yarn.lock b/examples/hybrid/yarn.lock index 5169fb8e15..026f245279 100644 --- a/examples/hybrid/yarn.lock +++ b/examples/hybrid/yarn.lock @@ -1969,9 +1969,9 @@ "@types/istanbul-lib-report" "*" "@types/node@*": - version "22.8.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.5.tgz#a978fb6755dbb32889b0bc3e37554dbc04f261a6" - integrity sha512-5iYk6AMPtsMbkZqCO1UGF9W5L38twq11S2pYWkybGHH2ogPUvXWNlQqJBzuEZWKj/WRH+QTeiv6ySWqJtvIEgA== + version "22.8.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.6.tgz#e8a0c0871623283d8b3ef7d7b9b1bfdfd3028e22" + integrity sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw== dependencies: undici-types "~6.19.8" @@ -2033,7 +2033,7 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.7: +accepts@^1.3.7, accepts@~1.3.7: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -2349,10 +2349,10 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== caller-callsite@^2.0.0: version "2.0.0" @@ -2529,7 +2529,7 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== -compressible@~2.0.16: +compressible@~2.0.18: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== @@ -2537,16 +2537,16 @@ compressible@~2.0.16: mime-db ">= 1.43.0 < 2" compression@^1.7.1: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + version "1.7.5" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.5.tgz#fdd256c0a642e39e314c478f6c2cd654edd74c93" + integrity sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q== dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" + bytes "3.1.2" + compressible "~2.0.18" debug "2.6.9" + negotiator "~0.6.4" on-headers "~1.0.2" - safe-buffer "5.1.2" + safe-buffer "5.2.1" vary "~1.1.2" concat-map@0.0.1: @@ -2709,9 +2709,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.5.41: - version "1.5.49" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz#9358f514ab6eeed809a8689f4b39ea5114ae729c" - integrity sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A== + version "1.5.50" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.50.tgz#d9ba818da7b2b5ef1f3dd32bce7046feb7e93234" + integrity sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw== emittery@^0.13.1: version "0.13.1" @@ -4453,6 +4453,11 @@ negotiator@0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== +negotiator@~0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" + integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== + neo-async@^2.5.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -5059,16 +5064,16 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + scheduler@0.24.0-canary-efb381bbf-20230505: version "0.24.0-canary-efb381bbf-20230505" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.24.0-canary-efb381bbf-20230505.tgz#5dddc60e29f91cd7f8b983d7ce4a99c2202d178f" @@ -5406,9 +5411,9 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== tslib@^2.0.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b" - integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== type-detect@4.0.8: version "4.0.8" From 11f7031b5eac516ea99fe2c59ab13823823f7075 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Sat, 2 Nov 2024 02:29:05 +0200 Subject: [PATCH 29/39] fix: update pod file --- .circleci/config.yml | 1 - .../HybridSampleApp.xcodeproj/project.pbxproj | 72 +++++------ examples/hybrid/ios/Podfile | 10 +- examples/hybrid/ios/Podfile.lock | 118 ++++++++++++------ 4 files changed, 127 insertions(+), 74 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f3fac2058..5336085354 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -542,7 +542,6 @@ jobs: command: | cd << parameters.ios_path >> yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios - rm -rf ~/Library/Developer/Xcode/DerivedData/* xcodebuild -workspace HybridSampleApp.xcworkspace \ -scheme HybridSampleApp \ -configuration Release \ diff --git a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj index 9fcdf25f9b..c94af611ea 100644 --- a/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj +++ b/examples/hybrid/ios/HybridSampleApp.xcodeproj/project.pbxproj @@ -18,7 +18,7 @@ 0CFE4DEF2CC818D50003EEA7 /* HybridSampleAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */; }; 0CFE4DF12CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */; }; 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */; }; - 142FF951A3708118A8819932 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 950B8F04F7C3625C04291153 /* libPods-HybridSampleApp.a */; }; + 24F1A11806F4547221CF6E11 /* libPods-HybridSampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D0458663D7BAABBABDB0B9C /* libPods-HybridSampleApp.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,9 +57,9 @@ 0CFE4DEE2CC818D50003EEA7 /* HybridSampleAppUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITests.m; sourceTree = ""; }; 0CFE4DF02CC818D50003EEA7 /* HybridSampleAppUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HybridSampleAppUITestsLaunchTests.m; sourceTree = ""; }; 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Instabug.xcframework; path = Pods/Instabug/Instabug.xcframework; sourceTree = ""; }; - 950B8F04F7C3625C04291153 /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 99477D28A21E8B0B94AC3AA8 /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; - D3E48438021676A5CDA0AFBE /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; + 3D0458663D7BAABBABDB0B9C /* libPods-HybridSampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HybridSampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 614400A952B784B947664B2C /* Pods-HybridSampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.release.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.release.xcconfig"; sourceTree = ""; }; + A376FD618DE05CFA57EA4D4F /* Pods-HybridSampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HybridSampleApp.debug.xcconfig"; path = "Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +68,7 @@ buildActionMask = 2147483647; files = ( 0CFE4DFE2CC81A4D0003EEA7 /* Instabug.xcframework in Frameworks */, - 142FF951A3708118A8819932 /* libPods-HybridSampleApp.a in Frameworks */, + 24F1A11806F4547221CF6E11 /* libPods-HybridSampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -149,8 +149,8 @@ 2DDC8407773CA2FAF348AF0C /* Pods */ = { isa = PBXGroup; children = ( - D3E48438021676A5CDA0AFBE /* Pods-HybridSampleApp.debug.xcconfig */, - 99477D28A21E8B0B94AC3AA8 /* Pods-HybridSampleApp.release.xcconfig */, + A376FD618DE05CFA57EA4D4F /* Pods-HybridSampleApp.debug.xcconfig */, + 614400A952B784B947664B2C /* Pods-HybridSampleApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -159,7 +159,7 @@ isa = PBXGroup; children = ( 0CFE4DFD2CC81A4D0003EEA7 /* Instabug.xcframework */, - 950B8F04F7C3625C04291153 /* libPods-HybridSampleApp.a */, + 3D0458663D7BAABBABDB0B9C /* libPods-HybridSampleApp.a */, ); name = Frameworks; sourceTree = ""; @@ -171,15 +171,15 @@ isa = PBXNativeTarget; buildConfigurationList = 0CFE4DF42CC818D50003EEA7 /* Build configuration list for PBXNativeTarget "HybridSampleApp" */; buildPhases = ( - DC438267AD8AB127B7791556 /* [CP] Check Pods Manifest.lock */, + 116131B8C7E8ADAF5F06F762 /* [CP] Check Pods Manifest.lock */, 0CFE4DC12CC818D30003EEA7 /* Sources */, 0CFE4DC22CC818D30003EEA7 /* Frameworks */, 0CFE4DC32CC818D30003EEA7 /* Resources */, 0C3BA78F2CD3CC490012085A /* start */, 0C3BA7902CD3CD1D0012085A /* Bundle React Native code and images */, - E986F205655CF33E7D43492E /* [CP] Embed Pods Frameworks */, - 6658FF5757F4FD7FF3C7C187 /* [CP] Copy Pods Resources */, - FBE0CEBD86AA22DF3F4D98FD /* [CP-User] [instabug-reactnative] Upload Sourcemap */, + 6AFC5A8980050AE9A1A4C771 /* [CP] Embed Pods Frameworks */, + F5FBFBB7F9F6C87245724652 /* [CP] Copy Pods Resources */, + 9724AB1457B47B9CCA29CF6E /* [CP-User] [instabug-reactnative] Upload Sourcemap */, ); buildRules = ( ); @@ -335,24 +335,7 @@ shellPath = /bin/sh; shellScript = "# Type a script or drag a script file from your workspace\nexport NODE_BINARY=node\nexport ENTRY_FILE=\"index.js\"\n\n# This is the path to your project's root, where \"package.json\" lives\nexport PROJECT_ROOT=\"$PROJECT_DIR/..\"\n\nWITH_ENVIRONMENT=\"${PROJECT_ROOT}/node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"${PROJECT_ROOT}/node_modules/react-native/scripts/react-native-xcode.sh\"\n\nif [[ -f \"$WITH_ENVIRONMENT\" ]]; then\n /bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\nelse\n echo \"error: File $WITH_ENVIRONMENT does not exist. Are you sure React Native is installed in your project?\"\n exit 1\nfi\n"; }; - 6658FF5757F4FD7FF3C7C187 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - DC438267AD8AB127B7791556 /* [CP] Check Pods Manifest.lock */ = { + 116131B8C7E8ADAF5F06F762 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -374,7 +357,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - E986F205655CF33E7D43492E /* [CP] Embed Pods Frameworks */ = { + 6AFC5A8980050AE9A1A4C771 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -391,7 +374,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - FBE0CEBD86AA22DF3F4D98FD /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { + 9724AB1457B47B9CCA29CF6E /* [CP-User] [instabug-reactnative] Upload Sourcemap */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -401,6 +384,23 @@ shellPath = /bin/sh; shellScript = "#!/bin/sh\n\nmain() {\n # Read environment variables from ios/.xcode.env if it exists\n env_path=\"$PODS_ROOT/../.xcode.env\"\n if [ -f \"$env_path\" ]; then\n source \"$env_path\"\n fi\n\n # Read environment variables from ios/.xcode.env.local if it exists\n local_env_path=\"${ENV_PATH}.local\"\n if [ -f \"$local_env_path\" ]; then\n source \"$local_env_path\"\n fi\n\n if [[ \"$INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\" = true ]]; then\n echo \"[Info] \\`INSTABUG_SOURCEMAPS_UPLOAD_DISABLE\\` was set to true, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ \"$CONFIGURATION\" = \"Debug\" ]]; then\n echo \"[Info] Building in debug mode, skipping sourcemaps upload...\"\n exit 0\n fi\n\n if [[ -z \"$INFOPLIST_FILE\" ]] || [[ -z \"$PROJECT_DIR\" ]]; then\n echo \"[Error] Instabug sourcemaps script must be invoked by Xcode\"\n exit 0\n fi\n\n local source_map_file=$(generate_sourcemaps | tail -n 1)\n\n local js_project_dir=\"$PROJECT_DIR/..\"\n local instabug_dir=$(dirname $(node -p \"require.resolve('instabug-reactnative/package.json')\"))\n local inferred_token=$(cd $js_project_dir && source $instabug_dir/scripts/find-token.sh)\n local app_token=$(resolve_var \"App Token\" \"INSTABUG_APP_TOKEN\" \"$inferred_token\" | tail -n 1)\n\n local inferred_name=$(/usr/libexec/PlistBuddy -c 'print CFBundleShortVersionString' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_name=$(resolve_var \"Version Name\" \"INSTABUG_APP_VERSION_NAME\" \"$inferred_name\" | tail -n 1)\n\n local inferred_code=$(/usr/libexec/PlistBuddy -c 'print CFBundleVersion' \"$PROJECT_DIR/$INFOPLIST_FILE\")\n local version_code=$(resolve_var \"Version Code\" \"INSTABUG_APP_VERSION_CODE\" \"$inferred_code\" | tail -n 1)\n\n node $instabug_dir/bin/index.js upload-sourcemaps \\\n --platform ios \\\n --file $source_map_file \\\n --token $app_token \\\n --name $version_name \\\n --code $version_code\n}\n\ngenerate_sourcemaps() {\n local react_native_dir=$(dirname $(node -p \"require.resolve('react-native/package.json')\"))\n\n # Fixes an issue with react-native prior to v0.67.0\n # For more info: https://github.com/facebook/react-native/issues/32168\n export RN_DIR=$react_native_dir\n\n # Used withing `react-native-xcode.sh` to generate sourcemap file\n export SOURCEMAP_FILE=\"$(pwd)/main.jsbundle.map\";\n\n source \"$react_native_dir/scripts/react-native-xcode.sh\"\n\n if [[ ! -f \"$SOURCEMAP_FILE\" ]]; then\n echo \"[Error] Unable to find source map file at: $SOURCEMAP_FILE\"\n exit 0\n fi\n\n echo $SOURCEMAP_FILE\n}\n\nresolve_var() {\n local name=$1\n local env_key=$2\n local default_value=$3\n\n local env_value=\"${!env_key}\"\n\n if [[ -n \"$env_value\" ]] && [[ -n \"$default_value\" ]] && [[ \"$env_value\" != default_value ]]; then\n echo \"[Warning] Environment variable \\`$env_key\\` might have incorrect value, make sure this was intentional:\"\n echo \" Environment Value: $env_value\"\n echo \" Default Value: $default_value\"\n fi\n\n local value=\"${env_value:-$default_value}\"\n\n if [[ -z \"$value\" ]]; then\n echo \"[Error] Unable to find $name! Set the environment variable \\`$env_key\\` and try again.\"\n exit 0\n fi\n\n echo $value\n}\n\nmain \"$@\"; exit\n"; }; + F5FBFBB7F9F6C87245724652 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HybridSampleApp/Pods-HybridSampleApp-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -505,7 +505,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu17; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -570,7 +570,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu17; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -593,7 +593,7 @@ }; 0CFE4DF52CC818D50003EEA7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D3E48438021676A5CDA0AFBE /* Pods-HybridSampleApp.debug.xcconfig */; + baseConfigurationReference = A376FD618DE05CFA57EA4D4F /* Pods-HybridSampleApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -623,7 +623,7 @@ }; 0CFE4DF62CC818D50003EEA7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 99477D28A21E8B0B94AC3AA8 /* Pods-HybridSampleApp.release.xcconfig */; + baseConfigurationReference = 614400A952B784B947664B2C /* Pods-HybridSampleApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; diff --git a/examples/hybrid/ios/Podfile b/examples/hybrid/ios/Podfile index 9cebb10135..9c8bd67e2d 100644 --- a/examples/hybrid/ios/Podfile +++ b/examples/hybrid/ios/Podfile @@ -5,16 +5,24 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ platform :ios, '13.4' 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 +end target 'HybridSampleApp' do config = use_native_modules! + # Flags change depending on the env values. + flags = get_default_flags() use_react_native!( :path => config[:reactNativePath], - :hermes_enabled => false, # Hermes is now enabled by default. Disable by setting this flag to false. # Upcoming versions of React Native may rely on get_default_flags(), but # we make it explicit here to aid in the React Native upgrade process. + :hermes_enabled => flags[:hermes_enabled], + :fabric_enabled => flags[:fabric_enabled], # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) diff --git a/examples/hybrid/ios/Podfile.lock b/examples/hybrid/ios/Podfile.lock index 725d25067e..746e864f3c 100644 --- a/examples/hybrid/ios/Podfile.lock +++ b/examples/hybrid/ios/Podfile.lock @@ -11,7 +11,11 @@ PODS: - ReactCommon/turbomodule/core (= 0.72.3) - fmt (6.2.1) - glog (0.3.5) + - hermes-engine (0.72.3): + - hermes-engine/Pre-built (= 0.72.3) + - hermes-engine/Pre-built (0.72.3) - Instabug (13.4.2) + - libevent (2.1.12) - RCT-Folly (2021.07.22.00): - boost - DoubleConversion @@ -23,6 +27,12 @@ PODS: - DoubleConversion - fmt (~> 6.2.1) - glog + - RCT-Folly/Futures (2021.07.22.00): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - libevent - RCTRequired (0.72.3) - RCTTypeSafety (0.72.3): - FBLazyVector (= 0.72.3) @@ -46,11 +56,11 @@ PODS: - DoubleConversion - FBReactNativeSpec - glog + - hermes-engine - RCT-Folly - RCTRequired - RCTTypeSafety - React-Core - - React-jsc - React-jsi - React-jsiexecutor - React-NativeModulesApple @@ -59,10 +69,11 @@ PODS: - ReactCommon/turbomodule/core - React-Core (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default (= 0.72.3) - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -72,10 +83,11 @@ PODS: - Yoga - React-Core/CoreModulesHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -85,9 +97,10 @@ PODS: - Yoga - React-Core/Default (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -97,11 +110,12 @@ PODS: - Yoga - React-Core/DevSupport (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default (= 0.72.3) - React-Core/RCTWebSocket (= 0.72.3) - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector (= 0.72.3) @@ -112,10 +126,11 @@ PODS: - Yoga - React-Core/RCTActionSheetHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -125,10 +140,11 @@ PODS: - Yoga - React-Core/RCTAnimationHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -138,10 +154,11 @@ PODS: - Yoga - React-Core/RCTBlobHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -151,10 +168,11 @@ PODS: - Yoga - React-Core/RCTImageHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -164,10 +182,11 @@ PODS: - Yoga - React-Core/RCTLinkingHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -177,10 +196,11 @@ PODS: - Yoga - React-Core/RCTNetworkHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -190,10 +210,11 @@ PODS: - Yoga - React-Core/RCTSettingsHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -203,10 +224,11 @@ PODS: - Yoga - React-Core/RCTTextHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -216,10 +238,11 @@ PODS: - Yoga - React-Core/RCTVibrationHeaders (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -229,10 +252,11 @@ PODS: - Yoga - React-Core/RCTWebSocket (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default (= 0.72.3) - React-cxxreact - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-perflogger @@ -254,6 +278,7 @@ PODS: - boost (= 1.76.0) - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-callinvoker (= 0.72.3) - React-debug (= 0.72.3) @@ -263,19 +288,27 @@ PODS: - React-perflogger (= 0.72.3) - React-runtimeexecutor (= 0.72.3) - React-debug (0.72.3) - - React-jsc (0.72.3): - - React-jsc/Fabric (= 0.72.3) - - React-jsi (= 0.72.3) - - React-jsc/Fabric (0.72.3): - - React-jsi (= 0.72.3) + - React-hermes (0.72.3): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - RCT-Folly/Futures (= 2021.07.22.00) + - React-cxxreact (= 0.72.3) + - React-jsi + - React-jsiexecutor (= 0.72.3) + - React-jsinspector (= 0.72.3) + - React-perflogger (= 0.72.3) - React-jsi (0.72.3): - boost (= 1.76.0) - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-jsiexecutor (0.72.3): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-cxxreact (= 0.72.3) - React-jsi (= 0.72.3) @@ -284,6 +317,7 @@ PODS: - React-logger (0.72.3): - glog - React-NativeModulesApple (0.72.3): + - hermes-engine - React-callinvoker - React-Core - React-cxxreact @@ -307,13 +341,14 @@ PODS: - RCTTypeSafety - React-Core - React-CoreModules - - React-jsc + - React-hermes - React-NativeModulesApple - React-RCTImage - React-RCTNetwork - React-runtimescheduler - ReactCommon/turbomodule/core - React-RCTBlob (0.72.3): + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Codegen (= 0.72.3) - React-Core/RCTBlobHeaders (= 0.72.3) @@ -361,6 +396,7 @@ PODS: - React-jsi (= 0.72.3) - React-runtimescheduler (0.72.3): - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-callinvoker - React-debug @@ -373,6 +409,7 @@ PODS: - ReactCommon/turbomodule/bridging (0.72.3): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-callinvoker (= 0.72.3) - React-cxxreact (= 0.72.3) @@ -382,6 +419,7 @@ PODS: - ReactCommon/turbomodule/core (0.72.3): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-callinvoker (= 0.72.3) - React-cxxreact (= 0.72.3) @@ -400,6 +438,8 @@ DEPENDENCIES: - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) + - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) + - libevent (~> 2.1.12) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) @@ -411,7 +451,7 @@ DEPENDENCIES: - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) - - React-jsc (from `../node_modules/react-native/ReactCommon/jsc`) + - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) @@ -440,6 +480,7 @@ SPEC REPOS: trunk: - fmt - Instabug + - libevent - SocketRocket EXTERNAL SOURCES: @@ -453,6 +494,9 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/React/FBReactNativeSpec" glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" + hermes-engine: + :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :tag: hermes-2023-03-20-RNv0.72.0-49794cfc7c81fb8f69fd60c3bbf85a7480cc5a77 RCT-Folly: :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -473,8 +517,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/cxxreact" React-debug: :path: "../node_modules/react-native/ReactCommon/react/debug" - React-jsc: - :path: "../node_modules/react-native/ReactCommon/jsc" + React-hermes: + :path: "../node_modules/react-native/ReactCommon/hermes" React-jsi: :path: "../node_modules/react-native/ReactCommon/jsi" React-jsiexecutor: @@ -529,28 +573,30 @@ SPEC CHECKSUMS: FBReactNativeSpec: c6bd9e179757b3c0ecf815864fae8032377903ef fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + hermes-engine: 10fbd3f62405c41ea07e71973ea61e1878d07322 Instabug: 7a71890217b97b1e32dbca96661845396b66da2f + libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18 RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3 React: 13109005b5353095c052f26af37413340ccf7a5d React-callinvoker: c8c87bce983aa499c13cb06d4447c025a35274d6 - React-Codegen: 264b1022063f27ccccfd38f4ce29cc8217b1e812 - React-Core: 2688f9f07b65379352fe49670458e8e0d683e336 + React-Codegen: 712d523524d89d71f1cf7cc624854941be983c4d + React-Core: 688f88b7f3a3d30b4848036223f8b07102c687e5 React-CoreModules: 63c063a3ade8fb3b1bec5fd9a50f17b0421558c6 - React-cxxreact: 55d0f7cb6b4cc09ba9190797f1da87182d1a2fb6 + React-cxxreact: 37765b4975541105b2a3322a4b473417c158c869 React-debug: 51f11ef8db14b47f24e71c42a4916d4192972156 - React-jsc: 0db8e8cc2074d979c37ffa7b8d7c914833960497 - React-jsi: 58677ff4848ceb6aeb9118fe03448a843ea5e16a - React-jsiexecutor: 2c15ba1bace70177492368d5180b564f165870fd + React-hermes: 935ae71fb3d7654e947beba8498835cd5e479707 + React-jsi: ec628dc7a15ffea969f237b0ea6d2fde212b19dd + React-jsiexecutor: 59d1eb03af7d30b7d66589c410f13151271e8006 React-jsinspector: b511447170f561157547bc0bef3f169663860be7 React-logger: c5b527272d5f22eaa09bb3c3a690fee8f237ae95 - React-NativeModulesApple: bfbb84f3e6a1b919791b57303524de557ba45fef + React-NativeModulesApple: c57f3efe0df288a6532b726ad2d0322a9bf38472 React-perflogger: 6bd153e776e6beed54c56b0847e1220a3ff92ba5 React-RCTActionSheet: c0b62af44e610e69d9a2049a682f5dba4e9dff17 React-RCTAnimation: f9bf9719258926aea9ecb8a2aa2595d3ff9a6022 - React-RCTAppDelegate: 41b778ee7b1f76566fa1b1ebffe9837a01a3a18d - React-RCTBlob: afc0e14539eb7a76a713332340aee21bf23c76b5 + React-RCTAppDelegate: e5ac35d4dbd1fae7df3a62b47db04b6a8d151592 + React-RCTBlob: c4f1e69a6ef739aa42586b876d637dab4e3b5bed React-RCTImage: e5798f01aba248416c02a506cf5e6dfcba827638 React-RCTLinking: f5b6227c879e33206f34e68924c458f57bbb96d9 React-RCTNetwork: d5554fbfac1c618da3c8fa29933108ea22837788 @@ -559,13 +605,13 @@ SPEC CHECKSUMS: React-RCTVibration: 388ac0e1455420895d1ca2548401eed964b038a6 React-rncore: 755a331dd67b74662108f2d66a384454bf8dc1a1 React-runtimeexecutor: 369ae9bb3f83b65201c0c8f7d50b72280b5a1dbc - React-runtimescheduler: af0b24628c1d543a3f87251c9efa29c5a589e08a + React-runtimescheduler: 837c1bebd2f84572db17698cd702ceaf585b0d9a React-utils: bcb57da67eec2711f8b353f6e3d33bd8e4b2efa3 - ReactCommon: d7d63a5b3c3ff29304a58fc8eb3b4f1b077cd789 + ReactCommon: 3ccb8fb14e6b3277e38c73b0ff5e4a1b8db017a9 RNInstabug: 8e7eb1df3f35b935dda661f5bb475f37cef595e6 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce -PODFILE CHECKSUM: 53b308ae08a9cd107fad0a2338b53b5f40922534 +PODFILE CHECKSUM: 9e86de5165c9a0f2ea9b5a8ad836b6b78b78a086 COCOAPODS: 1.15.2 From 301530241b6507f2174f64fba654b645f153991b Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Sat, 2 Nov 2024 02:58:42 +0200 Subject: [PATCH 30/39] fix: try remove cache --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5336085354..4f3fac2058 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -542,6 +542,7 @@ jobs: command: | cd << parameters.ios_path >> yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios + rm -rf ~/Library/Developer/Xcode/DerivedData/* xcodebuild -workspace HybridSampleApp.xcworkspace \ -scheme HybridSampleApp \ -configuration Release \ From 50cabc75a40c667e7fd0dca92de79af51da14159 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Sat, 2 Nov 2024 03:20:26 +0200 Subject: [PATCH 31/39] revert: restrict jobs on master only --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f3fac2058..848b37bf9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -671,9 +671,15 @@ workflows: - build_check_ios: working_directory: ~/project/examples/hybrid ios_path: examples/hybrid/ios + filters: + branches: + only: master - build_check_android: working_directory: ~/project/examples/hybrid android_path: examples/hybrid/android + filters: + branches: + only: master - release_custom_package: name: release_dream11 requires: From 45aaf665a172abe13f4e7630acf45710c4a4d792 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Sun, 3 Nov 2024 13:40:13 +0200 Subject: [PATCH 32/39] fix: using working directory instead of passing ios and android paths --- .circleci/config.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 848b37bf9f..01d7aa518a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -507,8 +507,6 @@ jobs: parameters: working_directory: type: string - android_path: - type: string executor: name: android/android-machine tag: '2024.01.1' @@ -519,15 +517,13 @@ jobs: - run: name: Build Android command: | - cd << parameters.android_path >> ./gradlew assembleRelease + working_directory: <>/android build_check_ios: parameters: working_directory: type: string - ios_path: - type: string macos: xcode: 13.4.1 resource_class: macos.m1.medium.gen1 @@ -536,11 +532,11 @@ jobs: - build_and_pack_sdk: working_directory: << parameters.working_directory >> - install_pods: - working_directory: << parameters.ios_path >> + working_directory: <>/ios - run: name: Build iOS command: | - cd << parameters.ios_path >> + working_directory: <>/ios yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios rm -rf ~/Library/Developer/Xcode/DerivedData/* xcodebuild -workspace HybridSampleApp.xcworkspace \ @@ -670,13 +666,11 @@ workflows: only: dream11 - build_check_ios: working_directory: ~/project/examples/hybrid - ios_path: examples/hybrid/ios filters: branches: only: master - build_check_android: working_directory: ~/project/examples/hybrid - android_path: examples/hybrid/android filters: branches: only: master From 2fd707ca69b18227541e4ebe8dd4a33967c41533 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Mon, 4 Nov 2024 09:37:13 +0200 Subject: [PATCH 33/39] fix: run build check on default example app --- .circleci/config.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01d7aa518a..c85f71e9e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -516,9 +516,8 @@ jobs: working_directory: << parameters.working_directory >> - run: name: Build Android - command: | - ./gradlew assembleRelease - working_directory: <>/android + working_directory: <>/android + command: ./gradlew assembleRelease build_check_ios: parameters: @@ -535,8 +534,8 @@ jobs: working_directory: <>/ios - run: name: Build iOS + working_directory: <>/ios command: | - working_directory: <>/ios yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios rm -rf ~/Library/Developer/Xcode/DerivedData/* xcodebuild -workspace HybridSampleApp.xcworkspace \ @@ -664,21 +663,27 @@ workflows: filters: branches: only: dream11 + - build_check_android: + name: build_check_default_android + working_directory: ~/project/examples/default + type: approval - build_check_ios: + name: build_check_default_ios working_directory: ~/project/examples/hybrid - filters: - branches: - only: master + type: approval - build_check_android: + name: build_check_hybrid_android working_directory: ~/project/examples/hybrid - filters: - branches: - only: master + type: approval + - build_check_ios: + name: build_check_hybrid_ios + working_directory: ~/project/examples/default + type: approval - release_custom_package: name: release_dream11 requires: - - build_check_android - - build_check_ios + - build_check_hybrid_android + - build_check_hybrid_ios - hold_release_dream11 filters: branches: From b7cf03f6e01fc75147dc1fa9803183f6d6cf428b Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Mon, 4 Nov 2024 12:50:17 +0200 Subject: [PATCH 34/39] fix: rename jobs based on guidelines --- .circleci/config.yml | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c85f71e9e5..c665f024e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -663,27 +663,43 @@ workflows: filters: branches: only: dream11 + - hold_build_check_android: + name: hold_build_check_android_default + type: approval + - hold_build_check_ios: + name: hold_build_check_ios_default + type: approval + - hold_build_check_android: + name: hold_build_check_android_hybrid + type: approval + - hold_build_check_ios: + name: hold_build_check_ios_hybrid + type: approval - build_check_android: - name: build_check_default_android + name: build_check_android_default working_directory: ~/project/examples/default - type: approval + requires: + - hold_build_check_android_default - build_check_ios: - name: build_check_default_ios - working_directory: ~/project/examples/hybrid - type: approval + name: build_check_ios_default + working_directory: ~/project/examples/default + requires: + - hold_build_check_ios_default - build_check_android: - name: build_check_hybrid_android + name: build_check_android_hybrid working_directory: ~/project/examples/hybrid - type: approval + requires: + - hold_build_check_android_hybrid - build_check_ios: - name: build_check_hybrid_ios - working_directory: ~/project/examples/default - type: approval + name: build_check_ios_hybrid + working_directory: ~/project/examples/hybrid + requires: + - hold_build_check_ios_hybrid - release_custom_package: name: release_dream11 requires: - - build_check_hybrid_android - - build_check_hybrid_ios + - build_check_android_hybrid + - build_check_ios_hybrid - hold_release_dream11 filters: branches: From c476aa50096b2d8e3f59817ddf31a213b7e24b0a Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Mon, 4 Nov 2024 12:51:39 +0200 Subject: [PATCH 35/39] fix: formatter --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c665f024e3..6bdb2c3f60 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -678,22 +678,22 @@ workflows: - build_check_android: name: build_check_android_default working_directory: ~/project/examples/default - requires: + requires: - hold_build_check_android_default - build_check_ios: name: build_check_ios_default working_directory: ~/project/examples/default - requires: + requires: - hold_build_check_ios_default - build_check_android: name: build_check_android_hybrid working_directory: ~/project/examples/hybrid - requires: + requires: - hold_build_check_android_hybrid - build_check_ios: name: build_check_ios_hybrid working_directory: ~/project/examples/hybrid - requires: + requires: - hold_build_check_ios_hybrid - release_custom_package: name: release_dream11 From 3daf7fb121b58769713744652f038315b56789ba Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Mon, 4 Nov 2024 13:07:25 +0200 Subject: [PATCH 36/39] fix: add dynamic path for ios paths --- .circleci/config.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6bdb2c3f60..fb85492ed8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -523,6 +523,10 @@ jobs: parameters: working_directory: type: string + scheme: + type: string + workspace_path: + type: string macos: xcode: 13.4.1 resource_class: macos.m1.medium.gen1 @@ -538,8 +542,8 @@ jobs: command: | yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios rm -rf ~/Library/Developer/Xcode/DerivedData/* - xcodebuild -workspace HybridSampleApp.xcworkspace \ - -scheme HybridSampleApp \ + xcodebuild -workspace <>.xcworkspace \ + -scheme <> \ -configuration Release \ -sdk iphonesimulator \ -destination "platform=iOS Simulator,OS=15.5,name=iPhone 11 Pro Max" @@ -683,6 +687,8 @@ workflows: - build_check_ios: name: build_check_ios_default working_directory: ~/project/examples/default + scheme: InstabugExample + workspace_path: InstabugExample requires: - hold_build_check_ios_default - build_check_android: @@ -693,6 +699,8 @@ workflows: - build_check_ios: name: build_check_ios_hybrid working_directory: ~/project/examples/hybrid + scheme: HybridSampleApp + workspace_path: HybridSampleApp requires: - hold_build_check_ios_hybrid - release_custom_package: From bedab83df8d5acdf2f56f69ce791bbba35b5c45f Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Mon, 4 Nov 2024 13:20:00 +0200 Subject: [PATCH 37/39] trying revert removing drived data --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fb85492ed8..8c4830938e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -541,7 +541,6 @@ jobs: working_directory: <>/ios command: | yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios - rm -rf ~/Library/Developer/Xcode/DerivedData/* xcodebuild -workspace <>.xcworkspace \ -scheme <> \ -configuration Release \ From 2109ea6a9ce8b6dc10ed2b92c365f96b855bfc4d Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Mon, 4 Nov 2024 13:46:45 +0200 Subject: [PATCH 38/39] fix: delete unnicessary jobs --- .circleci/config.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c4830938e..c5eb44fdd7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -666,42 +666,32 @@ workflows: filters: branches: only: dream11 - - hold_build_check_android: - name: hold_build_check_android_default - type: approval - - hold_build_check_ios: - name: hold_build_check_ios_default - type: approval - - hold_build_check_android: - name: hold_build_check_android_hybrid - type: approval - - hold_build_check_ios: - name: hold_build_check_ios_hybrid + - hold_build_check: type: approval - build_check_android: name: build_check_android_default working_directory: ~/project/examples/default requires: - - hold_build_check_android_default + - hold_build_check - build_check_ios: name: build_check_ios_default working_directory: ~/project/examples/default scheme: InstabugExample workspace_path: InstabugExample requires: - - hold_build_check_ios_default + - hold_build_check - build_check_android: name: build_check_android_hybrid working_directory: ~/project/examples/hybrid requires: - - hold_build_check_android_hybrid + - hold_build_check - build_check_ios: name: build_check_ios_hybrid working_directory: ~/project/examples/hybrid scheme: HybridSampleApp workspace_path: HybridSampleApp requires: - - hold_build_check_ios_hybrid + - hold_build_check - release_custom_package: name: release_dream11 requires: From f066ba874934248d25ee7d9b11eabffff03ce0d8 Mon Sep 17 00:00:00 2001 From: AyaMahmoud148 Date: Mon, 4 Nov 2024 15:28:36 +0200 Subject: [PATCH 39/39] revert deleting dervied data --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c5eb44fdd7..aa906f25f2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -541,6 +541,7 @@ jobs: working_directory: <>/ios command: | yarn react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle --assets-dest ios + rm -rf ~/Library/Developer/Xcode/DerivedData/* xcodebuild -workspace <>.xcworkspace \ -scheme <> \ -configuration Release \