diff --git a/packages/react-native-editor/bin/build_e2e_ios_app b/packages/react-native-editor/bin/build_e2e_ios_app new file mode 100755 index 0000000000000..282bc2c86ef07 --- /dev/null +++ b/packages/react-native-editor/bin/build_e2e_ios_app @@ -0,0 +1,27 @@ +#!/bin/bash -eu + +DEFAULT_DESTINATION='platform=iOS Simulator,name=iPhone 13' +if [[ -z "${RN_EDITOR_E2E_IOS_DESTINATION-}" ]]; then + DESTINATION="$DEFAULT_DESTINATION" +else + DESTINATION="$RN_EDITOR_E2E_IOS_DESTINATION" +fi + +# Define xcodebuild in a variable so that we can conditionally pipe it through +# the xcbeautify output parser +XCODEBUILD_CMD="SKIP_BUNDLING=true \ + xcodebuild \ + -workspace ios/GutenbergDemo.xcworkspace \ + -configuration Release \ + -scheme GutenbergDemo \ + -derivedDataPath ios/build/GutenbergDemo \ + -destination '$DESTINATION'" + +# Check if xcbeautify is available +if command -v xcbeautify >/dev/null 2>&1; then + # Pipe the output to xcbeautify + eval "$XCODEBUILD_CMD" | xcbeautify +else + # Run xcodebuild without piping the output + eval "$XCODEBUILD_CMD" +fi diff --git a/packages/react-native-editor/ios/.ruby-version b/packages/react-native-editor/ios/.ruby-version index a603bb50a29e3..a4dd9dba4fbfc 100644 --- a/packages/react-native-editor/ios/.ruby-version +++ b/packages/react-native-editor/ios/.ruby-version @@ -1 +1 @@ -2.7.5 +2.7.4 diff --git a/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj b/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj index 13bcf886bb1c8..a4e179d3baa74 100644 --- a/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj +++ b/packages/react-native-editor/ios/GutenbergDemo.xcodeproj/project.pbxproj @@ -702,7 +702,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; @@ -744,7 +743,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = PZYM8XX95Q; @@ -789,7 +787,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; @@ -833,7 +830,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index a84aba86afc54..7ad697fed7c4a 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -112,7 +112,7 @@ "test:e2e:build-app:android": "cd android && ./gradlew clean && ./gradlew assembleDebug", "test:e2e:android:local": "npm run test:e2e:bundle:android && npm run test:e2e:build-app:android && TEST_RN_PLATFORM=android npm run device-tests:local", "test:e2e:bundle:ios": "mkdir -p ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app && npm run rn-bundle -- --reset-cache --platform=ios --dev=false --minify false --entry-file=index.js --bundle-output=./ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle --assets-dest=./ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app", - "test:e2e:build-app:ios": "npm run preios && SKIP_BUNDLING=true xcodebuild -workspace ios/GutenbergDemo.xcworkspace -configuration Release -scheme GutenbergDemo -destination 'platform=iOS Simulator,name=iPhone 13' -derivedDataPath ios/build/GutenbergDemo", + "test:e2e:build-app:ios": "npm run preios && ./bin/build_e2e_ios_app", "test:e2e:build-wda": "xcodebuild -project ../../node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'platform=iOS Simulator,name=iPhone 13' -derivedDataPath ios/build/WDA", "test:e2e:ios:local": "npm run test:e2e:bundle:ios && npm run test:e2e:build-app:ios && npm run test:e2e:build-wda && TEST_RN_PLATFORM=ios npm run device-tests:local", "build:gutenberg": "cd gutenberg && npm ci && npm run build",