Skip to content

Commit

Permalink
Update to Xcode 14 & dependencies (#2228)
Browse files Browse the repository at this point in the history
Fixes #2214.

## Summary
Updates to building with Xcode 14 as the minimum. Updates all
dependencies (as many both require Xcode 14 to update and would not work
with it without updating).

## Any other notes
This excludes `arm64` (new in Xcode 14) from watchOS builds. This is due
to App Store Connect having a bad heuristic for file size:

> ITMS-90389: Size Limit Exceeded - The size of watch application
'/Payload/Home Assistant.app/Watch/HomeAssistant-WatchApp.app' (102MB)
has exceeded the 75MB size limit.

Our binary file is larger than 75 MB unthinned and our thinned install
size is sub-25 MB, so I don't think this is testing the right thing. In
either case, we're somehow below whatever the limit actually is with
just `arm64_32_v8` and `arm_v7k` slices.

The first build on TF using the Xcode 14 build for distribution is
2022.413.
  • Loading branch information
zacwest authored Oct 19, 2022
1 parent 471b27e commit d51a2d6
Show file tree
Hide file tree
Showing 37 changed files with 184 additions and 460 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- master

env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
FASTLANE_SKIP_UPDATE_CHECK: true
FASTLANE_XCODE_LIST_TIMEOUT: 60
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: macos-12
timeout-minutes: 60
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
steps:
- uses: actions/checkout@v3

Expand All @@ -85,20 +85,6 @@ jobs:
key: >-
${{ runner.os }}-gems-${{ env.ImageVersion }}-${{ env.DEVELOPER_DIR }}-${{ hashFiles('**/Gemfile.lock') }}
- uses: actions/cache@v3
name: "Cache Derived Data"
with:
path: |
~/Library/Developer/Xcode/DerivedData/HomeAssistant-*/Build
~/Library/Developer/Xcode/DerivedData/HomeAssistant-*/SourcePackages
key: ${{ runner.os }}-derivedData-cache-${{ hashFiles('**/Podfile.lock',
'HomeAssistant.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
restore-keys: |
${{ runner.os }}-derivedData-cache
- name: Avoid inode changes for DerivedData
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES

- name: Install Brews
# right now, we don't need anything from brew for tests, so save some time
if: ${{ false }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- master

env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
FASTLANE_SKIP_UPDATE_CHECK: true
FASTLANE_XCODE_LIST_TIMEOUT: 60
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
Expand Down
3 changes: 3 additions & 0 deletions Configuration/HomeAssistant.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ SKIP_INSTALL = YES
PRODUCT_NAME = HomeAssistant-$(TARGET_NAME)
PRODUCT_MODULE_NAME = $(TARGET_NAME:c99extidentifier)

// watchOS-specific, to keep us under the 75 MB size limit
EXCLUDED_ARCHS[sdk=watchos*] = arm64

// Catalyst-specific
ENABLE_HARDENED_RUNTIME[sdk=macosx*] = YES

Expand Down
24 changes: 12 additions & 12 deletions Configuration/Podspecs/Firebase.podspec.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Firebase",
"version": "8.9.1",
"version": "10.0.0",
"summary": "Firebase",
"description": "Simplify your app development, grow your user base, and monetize more effectively with Firebase.",
"homepage": "https://firebase.google.com",
Expand All @@ -10,33 +10,33 @@
},
"authors": "Google, Inc.",
"source": {
"http": "https://github.com/firebase/firebase-ios-sdk/releases/download/v8.9.1/Firebase.zip"
"http": "https://github.com/firebase/firebase-ios-sdk/releases/download/10.0.0/Firebase.zip"
},
"preserve_paths": [
"Firebase/NOTICES",
"Firebase/FirebaseAnalytics/FBLPromises.xcframework",
"Firebase/FirebaseAnalytics/FirebaseCore.xcframework",
"Firebase/FirebaseAnalytics/FirebaseCoreDiagnostics.xcframework",
"Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework",
"Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework",
"Firebase/FirebaseAnalytics/GoogleDataTransport.xcframework",
"Firebase/FirebaseAnalytics/GoogleUtilities.xcframework",
"Firebase/FirebaseAnalytics/nanopb.xcframework",
"Firebase/FirebaseAnalytics/PromisesObjC.xcframework",
"Firebase/FirebaseMessaging/FirebaseMessaging.xcframework"
"Firebase/FirebaseMessaging/FirebaseMessaging.xcframework",
"Firebase/FirebaseMessaging/GoogleDataTransport.xcframework"
],
"vendored_frameworks": [
"Firebase/FirebaseAnalytics/FBLPromises.xcframework",
"Firebase/FirebaseAnalytics/FirebaseCore.xcframework",
"Firebase/FirebaseAnalytics/FirebaseCoreDiagnostics.xcframework",
"Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework",
"Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework",
"Firebase/FirebaseAnalytics/GoogleDataTransport.xcframework",
"Firebase/FirebaseAnalytics/GoogleUtilities.xcframework",
"Firebase/FirebaseAnalytics/nanopb.xcframework",
"Firebase/FirebaseAnalytics/PromisesObjC.xcframework",
"Firebase/FirebaseMessaging/FirebaseMessaging.xcframework"
"Firebase/FirebaseMessaging/FirebaseMessaging.xcframework",
"Firebase/FirebaseMessaging/GoogleDataTransport.xcframework"
],
"social_media_url": "https://twitter.com/Firebase",
"platforms": {
"ios": "11.0",
"osx": "1.13",
"tvos": "11.0"
"osx": "10.13",
"tvos": "12.0"
}
}
14 changes: 7 additions & 7 deletions Configuration/Podspecs/Realm.podspec.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "RealmSwift",
"version": "10.20.1",
"version": "10.32.0",
"summary": "Realm is a modern data framework & database for iOS, macOS, tvOS & watchOS.",
"description": "The Realm Mobile Database, for Swift. (If you want to use Realm from Objective-C, see the “Realm” pod.)\n\nThe Realm Mobile Database is a fast, easy-to-use replacement for Core Data & SQLite. Use it with the Realm Mobile Platform for realtime, automatic data sync. Works on iOS, macOS, tvOS & watchOS. Learn more and get help at https://realm.io.",
"homepage": "https://realm.io",
"source": {
"http": "https://static.realm.io/downloads/swift/realm-swift-10.20.1.zip"
"http": "https://static.realm.io/downloads/swift/realm-swift-10.32.0.zip"
},
"authors": {
"Realm": "help@realm.io"
},
"license": {
"type": "Apache 2.0",
"file": "realm-swift-10.20.1/LICENSE"
"file": "realm-swift-10.32.0/LICENSE"
},
"preserve_paths": [
"realm-swift-10.20.1/13.2",
"realm-swift-10.20.1/LICENSE"
"realm-swift-10.32.0/14.0.1",
"realm-swift-10.32.0/LICENSE"
],
"vendored_frameworks": [
"realm-swift-10.20.1/13.2/RealmSwift.xcframework",
"realm-swift-10.20.1/13.2/Realm.xcframework"
"realm-swift-10.32.0/14.0.1/RealmSwift.xcframework",
"realm-swift-10.32.0/14.0.1/Realm.xcframework"
],
"platforms": {
"ios": "9.0",
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

# cocoapods 1.11.x breaks Clibsodium compilation/linking
gem 'cocoapods', '1.10.2'
gem 'cocoapods'
gem 'cocoapods-acknowledgements'
gem 'fastlane'
gem 'rubocop', require: false
Expand Down
47 changes: 24 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ GEM
specs:
CFPropertyList (3.0.5)
rexml
activesupport (5.2.8.1)
activesupport (6.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
Expand All @@ -34,10 +35,10 @@ GEM
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
cocoapods (1.10.2)
addressable (~> 2.6)
cocoapods (1.11.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.10.2)
cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -48,23 +49,23 @@ GEM
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.19.0, < 2.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-acknowledgements (1.3.0)
cocoapods
redcarpet (~> 3.3)
xcodeproj
cocoapods-core (1.10.2)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
Expand Down Expand Up @@ -217,8 +218,8 @@ GEM
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.2)
minitest (5.16.2)
molinillo (0.6.6)
minitest (5.16.3)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
Expand Down Expand Up @@ -255,7 +256,7 @@ GEM
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
parser (>= 3.1.1.0)
ruby-macho (1.4.0)
ruby-macho (2.5.1)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand All @@ -270,16 +271,15 @@ GEM
naturally
terminal-notifier (2.0.0)
terminal-table (1.6.0)
thread_safe (0.3.6)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.10)
thread_safe (~> 0.1)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
Expand All @@ -298,14 +298,15 @@ GEM
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
zeitwerk (2.6.1)

PLATFORMS
arm64-darwin-21
x86_64-darwin-20
x86_64-darwin-21

DEPENDENCIES
cocoapods (= 1.10.2)
cocoapods
cocoapods-acknowledgements
fastlane
fastlane-plugin-appicon
Expand Down
17 changes: 11 additions & 6 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ plugin 'cocoapods-acknowledgements'

system('./Tools/BuildMaterialDesignIconsFont.sh')

# alamofire can be upgraded when Apple stops breaking iOS 12 builds when Concurrency is referenced
pod 'Alamofire', '5.4.4'
pod 'Alamofire', '~> 5.6'
pod 'Communicator', git: 'https://github.com/zacwest/Communicator.git', branch: 'observation-memory-direct'
pod 'KeychainAccess'
pod 'ObjectMapper', git: 'https://github.com/tristanhimmelman/ObjectMapper.git', branch: 'master'
pod 'PromiseKit'

pod 'RealmSwift', git: 'https://github.com/zacwest/realm-swift', branch: 'noasync-v10.20.1'
pod 'RealmSwift', podspec: 'Configuration/Podspecs/Realm.podspec.json'
pod 'UIColor_Hex_Swift'
pod 'Version'
pod 'XCGLogger'
Expand All @@ -45,7 +44,7 @@ def test_pods
end

def shared_fwk_pods
pod 'Sodium', git: 'https://github.com/jedisct1/swift-sodium.git', branch: 'master'
pod 'Sodium', git: 'https://github.com/zacwest/swift-sodium.git', branch: 'xcode-14.0.1'
end

abstract_target 'iOS' do
Expand All @@ -54,6 +53,9 @@ abstract_target 'iOS' do
pod 'MBProgressHUD', '~> 1.2.0'
pod 'ReachabilitySwift'

# fixes newer cocoapods search path issues for Clibsodium build failures
shared_fwk_pods

target 'Shared-iOS' do
shared_fwk_pods
pod 'ZIPFoundation', '~> 0.9'
Expand All @@ -70,8 +72,7 @@ abstract_target 'iOS' do
pod 'CPDAcknowledgements', git: 'https://github.com/CocoaPods/CPDAcknowledgements', branch: 'master'
pod 'Eureka', git: 'https://github.com/xmartlabs/Eureka', branch: 'master'

pod 'Firebase'
pod 'Firebase/Messaging'
pod 'Firebase', podspec: 'Configuration/Podspecs/Firebase.podspec.json'

pod 'lottie-ios'
pod 'SwiftMessages'
Expand Down Expand Up @@ -112,6 +113,9 @@ post_install do |installer|
config.build_settings['WATCHOS_DEPLOYMENT_TARGET'] = '5.0'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
config.build_settings['SWIFT_INSTALL_OBJC_HEADER'] = 'NO'

# disabled arch to stay under the 75 MB limit imposed by apple
config.build_settings['EXCLUDED_ARCHS[sdk=watchos*]'] = 'arm64'
end

# Fix bundle targets' 'Signing Certificate' to 'Sign to Run Locally'
Expand All @@ -120,6 +124,7 @@ post_install do |installer|
if target.respond_to?(:product_type) && (target.product_type == 'com.apple.product-type.bundle')
target.build_configurations.each do |config|
config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = '-'
config.build_settings['CODE_SIGNING_ALLOWED[sdk=iphoneos*]'] = 'NO'
end
end
# rubocop:enable Style/Next
Expand Down
Loading

0 comments on commit d51a2d6

Please sign in to comment.