diff --git a/.circleci/config.yml b/.circleci/config.yml index fa3fbf102e9..aa6abb99688 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ executors: reactnativeios: <<: *defaults macos: - xcode: "10.3.0" + xcode: "11.2.1" # ------------------------- # COMMANDS diff --git a/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testLayoutExample_1-iOS13@2x.png b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testLayoutExample_1-iOS13@2x.png new file mode 100644 index 00000000000..271e80d3f6b Binary files /dev/null and b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testLayoutExample_1-iOS13@2x.png differ diff --git a/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testScrollViewExample_1-iOS13@2x.png b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testScrollViewExample_1-iOS13@2x.png new file mode 100644 index 00000000000..809bc84dcc1 Binary files /dev/null and b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testScrollViewExample_1-iOS13@2x.png differ diff --git a/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testSwitchExample_1-iOS13@2x.png b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testSwitchExample_1-iOS13@2x.png new file mode 100644 index 00000000000..aed52e7e36e Binary files /dev/null and b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testSwitchExample_1-iOS13@2x.png differ diff --git a/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testTextExample_1-iOS13@2x.png b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testTextExample_1-iOS13@2x.png new file mode 100644 index 00000000000..65c4c620679 Binary files /dev/null and b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testTextExample_1-iOS13@2x.png differ diff --git a/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testViewExample_1-iOS13@2x.png b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testViewExample_1-iOS13@2x.png new file mode 100644 index 00000000000..c7f4f4da964 Binary files /dev/null and b/RNTester/RNTesterIntegrationTests/ReferenceImages/RNTester-js-RNTesterApp.ios/testViewExample_1-iOS13@2x.png differ diff --git a/RNTester/RNTesterUnitTests/RCTJSONTests.m b/RNTester/RNTesterUnitTests/RCTJSONTests.m index 1b57668cb87..2488e6acc9c 100644 --- a/RNTester/RNTesterUnitTests/RCTJSONTests.m +++ b/RNTester/RNTesterUnitTests/RCTJSONTests.m @@ -105,15 +105,14 @@ XCTAssertEqualObjects(json, RCTJSONStringify(obj, NULL)); } -// TODO: This test crashes iOS 13 for bad access, please investigate and re-enable. -// - (void)testNotUTF8Convertible -// { -// //see https://gist.github.com/0xced/56035d2f57254cf518b5 -// NSString *string = [[NSString alloc] initWithBytes:"\xd8\x00" length:2 encoding:NSUTF16StringEncoding]; -// NSDictionary *obj = @{@"foo": string}; -// NSString *json = @"{\"foo\":null}"; -// XCTAssertEqualObjects(json, RCTJSONStringify(obj, NULL)); -// } +- (void)testNotUTF8Convertible +{ + //see https://gist.github.com/0xced/56035d2f57254cf518b5 + NSString *string = [[NSString alloc] initWithBytes:"\xd8\x00" length:2 encoding:NSUTF16StringEncoding]; + NSDictionary *obj = @{@"foo": string}; + NSString *json = @"{\"foo\":null}"; + XCTAssertEqualObjects(json, RCTJSONStringify(obj, NULL)); +} - (void)testErrorPointer { diff --git a/scripts/.tests.env b/scripts/.tests.env index 4b51b7246a4..1495605b04d 100644 --- a/scripts/.tests.env +++ b/scripts/.tests.env @@ -17,7 +17,7 @@ export AVD_NAME="testAVD" export AVD_ABI=x86 ## IOS ## -export IOS_TARGET_OS="13.3" +export IOS_TARGET_OS="13.2.2" export IOS_DEVICE="iPhone 8" export TVOS_DEVICE="Apple TV" diff --git a/scripts/objc-test.sh b/scripts/objc-test.sh index cc81e1f24d3..f729d8dea53 100755 --- a/scripts/objc-test.sh +++ b/scripts/objc-test.sh @@ -14,6 +14,11 @@ SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ROOT=$(dirname "$SCRIPTS") +SKIPPED_TESTS=() +# TODO: T60408036 This test crashes iOS 13 for bad access, please investigate +# and re-enable. See https://gist.github.com/0xced/56035d2f57254cf518b5. +SKIPPED_TESTS+=("-skip-testing:RNTesterUnitTests/testNotUTF8Convertible") + # Create cleanup handler cleanup() { EXIT=$? @@ -56,7 +61,8 @@ runTests() { -workspace RNTester/RNTesterPods.xcworkspace \ -scheme RNTester \ -sdk iphonesimulator \ - -destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_TARGET_OS" + -destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_TARGET_OS" \ + "${SKIPPED_TESTS[@]}" } buildProject() { diff --git a/scripts/run-ci-e2e-tests.js b/scripts/run-ci-e2e-tests.js index fabe50b206b..d2e59662819 100644 --- a/scripts/run-ci-e2e-tests.js +++ b/scripts/run-ci-e2e-tests.js @@ -210,14 +210,15 @@ try { describe('Test: ' + iosTestType + ' end-to-end test'); if ( + // TODO: Get target OS and simulator from .tests.env tryExecNTimes( () => { - let destination = 'platform=iOS Simulator,name=iPhone 8,OS=13.3'; + let destination = 'platform=iOS Simulator,name=iPhone 8,OS=13.2.2'; let sdk = 'iphonesimulator'; let scheme = 'HelloWorld'; if (argv.tvos) { - destination = 'platform=tvOS Simulator,name=Apple TV,OS=13.3'; + destination = 'platform=tvOS Simulator,name=Apple TV,OS=13.2.2'; sdk = 'appletvsimulator'; scheme = 'HelloWorld-tvOS'; }