Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 13 support + iOS 15 fixes #17415

Merged
merged 39 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
67a3fac
FIx: tab bar background on iOS 15
leandroalonso Sep 27, 2021
b54678a
Add: sets iOS 15 new sectionHeaderTopPadding to zero
leandroalonso Sep 27, 2021
b8df857
Merge pull request #17225 from wordpress-mobile/issue/17172_fix_tab_b…
leandroalonso Sep 28, 2021
4d5f673
Merge pull request #17227 from wordpress-mobile/issue/ios_15_table_vi…
leandroalonso Sep 28, 2021
33746be
Change: Xcode image from 12 to 13
leandroalonso Sep 28, 2021
bdcec49
Fix: image name
leandroalonso Sep 28, 2021
49b0ed0
Bump CircleCI Xcode image version to `13.0.0`
mokagio Sep 29, 2021
6e08748
Bump `.xcversion` value from `12.5` to `13.0`
mokagio Sep 29, 2021
136f4ee
Use latest Ruby version in CircleCI, `2.7.4`
mokagio Sep 29, 2021
52ebbd0
Remove MockContext from unit tests
Sep 29, 2021
432ed7c
Rearrange project files
Sep 29, 2021
5b15ec1
Replace the use of MockContext with TestContextManager.mainContext in…
Sep 29, 2021
202c76a
Update Simulator device and iOS version to use in CircleCI
mokagio Oct 1, 2021
b5a75cc
Update Fastlane from 2.184.1 to 2.195.0
mokagio Oct 1, 2021
4de57a1
Merge branch 'develop' into issue/xcode_13
ScoutHarris Oct 27, 2021
56f8c73
Fix sheet being fullscreen in iOS15.
ScoutHarris Oct 27, 2021
a99d8c6
Use new Automattic Xcode 13 image in Buildkite
mokagio Oct 28, 2021
b5418e5
Run tests on iOS 15 in Buildkite
mokagio Oct 28, 2021
4a3b43a
Merge pull request #17379 from wordpress-mobile/fix/17378-user_profil…
ScoutHarris Oct 28, 2021
e337922
fastlane: filter tests to prevent test crashes
leandroalonso Oct 29, 2021
fc376fd
Fix Ruby Issue
jkmassel Oct 29, 2021
21f4d52
Merge branch 'develop' into issue/xcode_13
ScoutHarris Oct 29, 2021
0e2ed80
Merge branch 'develop' into issue/xcode_13
ScoutHarris Oct 29, 2021
54d07bd
Update translations
oguzkocer Oct 29, 2021
dc57a07
Update metadata translations
oguzkocer Oct 29, 2021
3fffe76
Update Jetpack metadata translations
oguzkocer Oct 29, 2021
db41dd5
Bump version number
oguzkocer Oct 29, 2021
73737bd
Update translations
oguzkocer Oct 29, 2021
1307f9b
Bump version number
oguzkocer Oct 29, 2021
a7ecaed
Remove subtitle.txt files from jetpack_metadata
oguzkocer Oct 29, 2021
518508f
Merge branch 'issue/xcode_13' into issue/xcode_13_change_buildkite_image
leandroalonso Nov 1, 2021
e404d15
Add note with rationale for skipping some tests in Fastlane
mokagio Nov 3, 2021
2d6618a
Merge pull request #17233 from wordpress-mobile/issue/xcode_13_change…
leandroalonso Nov 3, 2021
7fcc280
Merge branch 'develop' into issue/xcode_13
leandroalonso Nov 3, 2021
f963937
Read Ruby version for chruby from .ruby-version in CircleCI
mokagio Nov 4, 2021
3fdcc22
Bump Ruby version to latest 2.x stable: 2.7.4
mokagio Nov 4, 2021
5aa63b3
Merge pull request #17418 from wordpress-mobile/ruby-version-source-o…
AliSoftware Nov 4, 2021
5c830f7
Update .buildkite/commands/build-for-testing.sh
jkmassel Nov 4, 2021
d27e39b
Add fixit note
jkmassel Nov 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .buildkite/cache-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ common_params:
repo: "wordpress-mobile/wordpress-ios/"
# Common environment values to use with the `env` key.
- &common_env
IMAGE_ID: xcode-12.5.1
IMAGE_ID: xcode-13

steps:

#################
# Build the CocoaPods Base Cache
#
#
# This prevents the base cache from infinite growth caused by storing every
# version of every pod we've ever used.
#################
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/commands/build-for-testing.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash -eu

# Temporary fix until we're on the Xcode 13.1 VM
jkmassel marked this conversation as resolved.
Show resolved Hide resolved
echo "--- :rubygems: Fixing Ruby Setup"
gem install bundler

echo "--- :rubygems: Setting up Gems"
restore_cache "$(hash_file .ruby-version)-$(hash_file Gemfile.lock)"
install_gems
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/commands/run-ui-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ echo "--- :wrench: Fixing VM"
brew install openjdk@11
sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk

# Temporary fix until we're on the Xcode 13.1 VM
echo "--- :rubygems: Fixing Ruby Setup"
gem install bundler

echo "--- :rubygems: Setting up Gems"
install_gems

Expand Down
4 changes: 4 additions & 0 deletions .buildkite/commands/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ echo "--- 📦 Downloading Build Artifacts"
download_artifact build-products.tar
tar -xf build-products.tar

# Temporary fix until we're on the Xcode 13.1 VM
echo "--- :rubygems: Fixing Ruby Setup"
gem install bundler

echo "--- :rubygems: Setting up Gems"
install_gems

Expand Down
6 changes: 3 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ common_params:
repo: "wordpress-mobile/wordpress-ios/"
# Common environment values to use with the `env` key.
- &common_env
IMAGE_ID: xcode-12.5.1
IMAGE_ID: xcode-13

# This is the default pipeline – it will build and test the app
steps:
Expand Down Expand Up @@ -45,7 +45,7 @@ steps:
# UI Tests
#################
- label: "🧪 UI Tests (iPhone)"
command: .buildkite/commands/run-ui-tests.sh WordPressUITests 'iPhone 11' 14.1
command: .buildkite/commands/run-ui-tests.sh WordPressUITests 'iPhone 13' 15.0
depends_on: "build"
env: *common_env
plugins: *common_plugins
Expand All @@ -54,7 +54,7 @@ steps:


- label: "🧪 UI Tests (iPad)"
command: .buildkite/commands/run-ui-tests.sh WordPressUITests "iPad Air (4th generation)" 14.1
command: .buildkite/commands/run-ui-tests.sh WordPressUITests "iPad Air (4th generation)" 15.0
depends_on: "build"
env: *common_env
plugins: *common_plugins
Expand Down
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ parameters:
default: false

xcode_version: &xcode_version
xcode-version: "12.5.0"
xcode-version: "13.0.0"

iphone_test_device: &iphone_test_device
device: iPhone 11
ios-version: "14.4"
device: iPhone 12
ios-version: "15.0"

ipad_test_device: &ipad_test_device
device: iPad Air (4th generation)
ios-version: "14.4"
ios-version: "15.0"

commands:
fix-image:
Expand All @@ -39,7 +39,7 @@ commands:
echo $PATH
fi

chruby ruby-2.6.6
chruby ruby-$(cat .ruby-version)
gem install bundler

# Prevent fastlane from checking for updates, also removing the verbose fastlane changelog at the end of each invocation.
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.4
2.7.4
2 changes: 1 addition & 1 deletion .xcversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.5
13.0
93 changes: 48 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
CFPropertyList (3.0.4)
rexml
activesupport (5.2.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
Expand All @@ -14,21 +15,21 @@ GEM
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.1)
aws-partitions (1.465.0)
aws-sdk-core (3.114.1)
aws-eventstream (1.2.0)
aws-partitions (1.509.0)
aws-sdk-core (3.121.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.43.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (1.48.0)
aws-sdk-core (~> 3, >= 3.120.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.96.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-s3 (1.103.0)
aws-sdk-core (~> 3, >= 3.120.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.3)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
bigdecimal (1.4.4)
Expand Down Expand Up @@ -81,16 +82,16 @@ GEM
concurrent-ruby (1.1.9)
declarative (0.0.20)
diffy (3.4.0)
digest-crc (0.6.3)
digest-crc (0.6.4)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.2)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.14.0)
ffi (>= 1.15.0)
excon (0.82.0)
excon (0.85.0)
faraday (1.8.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand All @@ -113,12 +114,12 @@ GEM
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday_middleware (1.0.0)
faraday_middleware (1.1.0)
faraday (~> 1.0)
fastimage (2.2.4)
fastlane (2.184.1)
fastimage (2.2.5)
fastlane (2.195.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
Expand All @@ -133,7 +134,7 @@ GEM
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.1)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
Expand All @@ -142,6 +143,7 @@ GEM
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
Expand Down Expand Up @@ -182,47 +184,46 @@ GEM
gh_inspector (1.1.3)
git (1.9.1)
rchardet (~> 1.8)
google-apis-androidpublisher_v3 (0.5.0)
google-apis-core (~> 0.1)
google-apis-core (0.3.0)
google-apis-androidpublisher_v3 (0.11.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
retriable (>= 2.0, < 4.a)
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.4.0)
google-apis-core (~> 0.1)
google-apis-playcustomapp_v1 (0.3.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.4.0)
google-apis-core (~> 0.1)
google-apis-iamcredentials_v1 (0.7.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-playcustomapp_v1 (0.5.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.8.0)
google-apis-core (>= 0.4, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.1.0)
google-cloud-storage (1.31.1)
google-cloud-errors (1.2.0)
google-cloud-storage (1.34.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (0.16.2)
googleauth (1.0.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.3)
http-cookie (1.0.4)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.8.10)
Expand All @@ -235,7 +236,7 @@ GEM
jwt (2.2.3)
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.0)
mini_mime (1.1.1)
mini_portile2 (2.6.1)
minitest (5.14.4)
molinillo (0.6.6)
Expand All @@ -254,6 +255,7 @@ GEM
oj (3.13.9)
optimist (3.0.1)
options (2.3.2)
optparse (0.1.1)
os (1.1.1)
parallel (1.21.0)
plist (3.6.0)
Expand All @@ -278,13 +280,13 @@ GEM
i18n
ruby-macho (1.4.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.0)
rubyzip (2.3.2)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
security (0.1.3)
signet (0.15.0)
addressable (~> 2.3)
signet (0.16.0)
addressable (~> 2.8)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
Expand All @@ -310,16 +312,17 @@ GEM
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
unf_ext (0.0.8)
unicode-display_width (1.8.0)
webrick (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.19.0)
xcodeproj (1.21.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,26 @@ extension WPStyleGuide {
buttonBarAppearance.tintColor = .appBarTint
}

/// Style `UITableView` in the app
class func configureTableViewAppearance() {
if #available(iOS 15.0, *) {
UITableView.appearance().sectionHeaderTopPadding = 0
}
}

/// Style the tab bar using Muriel colors
class func configureTabBarAppearance() {
UITabBar.appearance().tintColor = .tabSelected
UITabBar.appearance().unselectedItemTintColor = .tabUnselected

if #available(iOS 15.0, *) {
let appearance = UITabBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = .systemBackground

UITabBar.appearance().standardAppearance = appearance
UITabBar.appearance().scrollEdgeAppearance = appearance
}
}

/// Style the `LightNavigationController` UINavigationBar and BarButtonItems
Expand Down
1 change: 1 addition & 0 deletions WordPress/Classes/System/WordPressAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ extension WordPressAppDelegate {

WPStyleGuide.configureTabBarAppearance()
WPStyleGuide.configureNavigationAppearance()
WPStyleGuide.configureTableViewAppearance()
WPStyleGuide.configureDefaultTint()
WPStyleGuide.configureLightNavigationBarAppearance()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class UserProfileSheetViewController: UITableViewController {
size.height += bottomPadding

preferredContentSize = size
presentedVC?.presentedView?.layoutIfNeeded()
}
}

Expand Down
10 changes: 10 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -844,13 +844,23 @@ platform :ios do
UI.user_error!("Unable to find .xctestrun file at #{build_products_path}")
end

# Because of what is likely a bug in `multi_scan`, we need to exclude
# certain tests from the execution.
#
# See more details at:
# - https://github.com/wordpress-mobile/WordPress-iOS/pull/17233#issuecomment-954897098
# - https://github.com/lyndsey-ferguson/fastlane-plugin-test_center/issues/358
all_tests = tests_from_xctestrun(xctestrun: test_plan_path)
only_testing = all_tests["WordPressTest"].reject { |t| t.include?("ContextManagerMock") || t.include?("TestContextManager") || t.include?("OCMLocation") || t.include?("HTTPStubsDescriptor") }

multi_scan(
workspace: WORKSPACE_PATH,
scheme: 'WordPress',
device: options[:device],
deployment_target_version: options[:ios_version],
ensure_devices_found: true,
test_without_building: true,
only_testing: only_testing,
xctestrun: test_plan_path,
try_count: options[:try_count],
output_directory: File.join(PROJECT_ROOT_FOLDER, 'build', 'results'),
Expand Down