diff --git a/DesignKit/Package.swift b/DesignKit/Package.swift index 8124d5be1..b92122157 100644 --- a/DesignKit/Package.swift +++ b/DesignKit/Package.swift @@ -12,7 +12,7 @@ let package = Package( .library(name: "DesignKit", targets: ["DesignKit"]) ], dependencies: [ - .package(url: "https://github.com/vector-im/compound-ios", revision: "e8c097e545a06a2ef3036af33192a07c58fafd1b"), + .package(url: "https://github.com/vector-im/compound-ios", revision: "4d6300e7d9f5fd7e5c448605bd6bf89537add4b8"), .package(url: "https://github.com/vector-im/element-design-tokens", exact: "0.0.3"), .package(url: "https://github.com/siteline/SwiftUI-Introspect", from: "0.9.0") ], diff --git a/DesignKit/Sources/TextFields/ElementTextFieldStyle.swift b/DesignKit/Sources/TextFields/ElementTextFieldStyle.swift index 08b582175..681120924 100644 --- a/DesignKit/Sources/TextFields/ElementTextFieldStyle.swift +++ b/DesignKit/Sources/TextFields/ElementTextFieldStyle.swift @@ -131,7 +131,7 @@ public struct ElementTextFieldStyle: TextFieldStyle { } .onTapGesture { isFocused = true } // Set focus with taps outside of the text field } - .introspect(.textField, on: .iOS(.v16)) { textField in + .introspect(.textField, on: .iOS(.v16, .v17)) { textField in textField.clearButtonMode = .whileEditing textField.attributedPlaceholder = NSAttributedString(string: textField.placeholder ?? "", attributes: [NSAttributedString.Key.foregroundColor: placeholderColor]) diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 1459d3bfc..a3897d7fc 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -5443,6 +5443,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GIT_LFS_SKIP_SMUDGE = on; IPHONEOS_DEPLOYMENT_TARGET = 16.4; KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)"; MACOSX_DEPLOYMENT_TARGET = 13.3; @@ -5518,6 +5519,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GIT_LFS_SKIP_SMUDGE = on; IPHONEOS_DEPLOYMENT_TARGET = 16.4; KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER)"; MACOSX_DEPLOYMENT_TARGET = 13.3; @@ -5819,7 +5821,7 @@ repositoryURL = "https://github.com/vector-im/compound-ios"; requirement = { kind = revision; - revision = e8c097e545a06a2ef3036af33192a07c58fafd1b; + revision = 4d6300e7d9f5fd7e5c448605bd6bf89537add4b8; }; }; 9A472EE0218FE7DCF5283429 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8a0be1eb1..19f38c89f 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -13,7 +13,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/vector-im/compound-ios", "state" : { - "revision" : "e8c097e545a06a2ef3036af33192a07c58fafd1b" + "revision" : "4d6300e7d9f5fd7e5c448605bd6bf89537add4b8" } }, { diff --git a/ElementX/Sources/Application/Application.swift b/ElementX/Sources/Application/Application.swift index daaaeac8b..e7bb7e68e 100644 --- a/ElementX/Sources/Application/Application.swift +++ b/ElementX/Sources/Application/Application.swift @@ -48,7 +48,7 @@ struct Application: App { openURL($0) } } - .introspect(.window, on: .iOS(.v16)) { window in + .introspect(.window, on: .iOS(.v16, .v17)) { window in // Workaround for SwiftUI not consistently applying the tint colour to Alerts/Confirmation Dialogs. window.tintColor = .compound.textActionPrimary } diff --git a/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift b/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift index b60810769..289dd6779 100644 --- a/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift +++ b/ElementX/Sources/Screens/CreatePollScreen/View/CreatePollScreen.swift @@ -52,7 +52,7 @@ struct CreatePollScreen: View { Text(L10n.screenCreatePollQuestionHint) .compoundFormTextFieldPlaceholder() } - .introspect(.textField, on: .iOS(.v16)) { textField in + .introspect(.textField, on: .iOS(.v16, .v17)) { textField in textField.clearButtonMode = .whileEditing } .textFieldStyle(.compoundForm) @@ -151,7 +151,7 @@ private struct CreatePollOptionView: View { Text(placeholder) .compoundFormTextFieldPlaceholder() } - .introspect(.textField, on: .iOS(.v16)) { textField in + .introspect(.textField, on: .iOS(.v16, .v17)) { textField in textField.clearButtonMode = .whileEditing } .textFieldStyle(.compoundForm) diff --git a/ElementX/Sources/Screens/RoomScreen/View/TimelineView.swift b/ElementX/Sources/Screens/RoomScreen/View/TimelineView.swift index 64073434e..cd6c835ec 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/TimelineView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/TimelineView.swift @@ -36,7 +36,7 @@ struct TimelineView: View { var body: some View { ScrollViewReader { scrollView in timelineScrollView - .introspect(.scrollView, on: .iOS(.v16)) { uiScrollView in + .introspect(.scrollView, on: .iOS(.v16, .v17)) { uiScrollView in guard uiScrollView != scrollViewAdapter.scrollView else { return } diff --git a/Gemfile.lock b/Gemfile.lock index 0125903af..d5edff964 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,30 +9,30 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (7.0.5) + activesupport (7.0.8) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.770.0) - aws-sdk-core (3.173.1) + aws-partitions (1.829.0) + aws-sdk-core (3.184.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.64.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-kms (1.72.0) + aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.122.0) - aws-sdk-core (~> 3, >= 3.165.0) + aws-sdk-s3 (1.136.0) + aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.2) + aws-sigv4 (~> 1.6) + aws-sigv4 (1.6.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) @@ -43,13 +43,13 @@ GEM highline (~> 2.0.0) concurrent-ruby (1.2.2) declarative (0.0.20) - digest-crc (0.6.4) + digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.99.0) + excon (0.103.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -79,7 +79,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.7) - fastlane (2.213.0) + fastlane (2.216.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -100,6 +100,7 @@ GEM google-apis-playcustomapp_v1 (~> 0.1) google-cloud-storage (~> 1.31) highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) @@ -111,7 +112,7 @@ GEM security (= 0.1.3) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) @@ -127,9 +128,9 @@ GEM fastlane-plugin-xcodegen (1.1.0) fastlane-plugin-brew (~> 0.1.1) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.42.0) + google-apis-androidpublisher_v3 (0.50.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.0) + google-apis-core (0.11.1) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -158,10 +159,9 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.5.2) + googleauth (1.8.1) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) @@ -170,30 +170,29 @@ GEM http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.13.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) jmespath (1.6.2) json (2.6.3) - jwt (2.7.0) - memoist (0.16.2) - mime-types (3.4.1) + jwt (2.7.1) + mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) + mime-types-data (3.2023.0808) mini_magick (4.12.0) - mini_mime (1.1.2) - minitest (5.18.0) + mini_mime (1.1.5) + minitest (5.20.0) multi_json (1.15.0) multipart-post (2.3.0) nanaimo (0.3.0) naturally (2.2.1) netrc (0.11.0) - nokogiri (1.15.2-arm64-darwin) + nokogiri (1.15.4-arm64-darwin) racc (~> 1.4) optparse (0.1.1) os (1.1.4) plist (3.7.0) - public_suffix (5.0.1) - racc (1.6.2) + public_suffix (5.0.3) + racc (1.7.1) rake (13.0.6) representable (3.2.0) declarative (< 0.1.0) @@ -205,13 +204,13 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rexml (3.2.5) + rexml (3.2.6) rouge (2.0.7) ruby2_keywords (0.0.5) rubyzip (2.3.2) security (0.1.3) semantic (1.6.1) - signet (0.17.0) + signet (0.18.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) @@ -226,8 +225,8 @@ GEM nokogiri (>= 1.13.9) xcodeproj (~> 1.21) terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) trailblazer-option (0.1.2) tty-cursor (0.7.1) tty-screen (0.8.1) @@ -239,13 +238,13 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.8.2) - unicode-display_width (1.8.0) + unicode-display_width (2.4.2) webrick (1.8.1) word_wrap (1.0.0) xcode-install (2.8.1) claide (>= 0.9.1) fastlane (>= 2.1.0, < 3.0.0) - xcodeproj (1.22.0) + xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) diff --git a/Tools/Sources/SetupProject.swift b/Tools/Sources/SetupProject.swift index 728078e08..19c91ab89 100644 --- a/Tools/Sources/SetupProject.swift +++ b/Tools/Sources/SetupProject.swift @@ -11,6 +11,7 @@ struct SetupProject: ParsableCommand { try setupGitHooks() try brewBundleInstall() try mintPackagesInstall() + try linkGitLFS() try xcodegen() } @@ -28,6 +29,19 @@ struct SetupProject: ParsableCommand { func mintPackagesInstall() throws { try Utilities.zsh("mint install Asana/locheck") } + + func linkGitLFS() throws { + guard let gitPath = try Utilities.zsh("git --exec-path")?.replacingOccurrences(of: "\n", with: "") else { return } + + let lfsPath = URL(fileURLWithPath: gitPath).appendingPathComponent("git-lfs").path + + guard !FileManager.default.fileExists(atPath: lfsPath) else { + print("Git LFS already linked.") + return + } + + try Utilities.zsh("ln -s \"$(which git-lfs)\" \"\(lfsPath)\"") + } func xcodegen() throws { try Utilities.zsh("xcodegen") diff --git a/changelog.d/1798.bugfix b/changelog.d/1798.bugfix new file mode 100644 index 000000000..b15057084 --- /dev/null +++ b/changelog.d/1798.bugfix @@ -0,0 +1 @@ +Add remaining iOS 17 introspections. \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d05025811..d8d1a581f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -76,6 +76,9 @@ lane :alpha do end lane :unit_tests do + # Xcode fails to check out Compound snapshots. We don't need them so skip smudging. + ENV["GIT_LFS_SKIP_SMUDGE"] = "true" + run_tests( scheme: "UnitTests", device: 'iPhone 14 (16.4)', @@ -93,6 +96,9 @@ lane :unit_tests do end lane :ui_tests do |options| + # Xcode fails to check out Compound snapshots. We don't need them so skip smudging. + ENV["GIT_LFS_SKIP_SMUDGE"] = "true" + # Use a fresh simulator state to ensure hardware keyboard isn't attached. reset_simulator_contents() @@ -136,6 +142,9 @@ end lane :integration_tests do + # Xcode fails to check out Compound snapshots. We don't need them so skip smudging. + ENV["GIT_LFS_SKIP_SMUDGE"] = "true" + clear_derived_data() create_simulator_if_necessary( diff --git a/project.yml b/project.yml index 566c2c34b..879e161e7 100644 --- a/project.yml +++ b/project.yml @@ -20,6 +20,7 @@ options: postGenCommand: cd Tools/XcodeGen && sh postGenCommand.sh settings: + GIT_LFS_SKIP_SMUDGE: "on" CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: "colors/accent-color" ENABLE_BITCODE: NO @@ -51,7 +52,7 @@ packages: path: DesignKit Compound: url: https://github.com/vector-im/compound-ios - revision: e8c097e545a06a2ef3036af33192a07c58fafd1b + revision: 4d6300e7d9f5fd7e5c448605bd6bf89537add4b8 # path: ../compound-ios AnalyticsEvents: url: https://github.com/matrix-org/matrix-analytics-events