diff --git a/.github/workflows/swiftformat.yml b/.github/workflows/swiftformat.yml index 175d12df3b9..7d6d192c789 100644 --- a/.github/workflows/swiftformat.yml +++ b/.github/workflows/swiftformat.yml @@ -29,6 +29,7 @@ jobs: if: ${{ steps.changes.outputs.swift == 'true' }} - name: Install SwiftFormat 0.58.3 + if: ${{ steps.changes.outputs.swift == 'true' }} run: | curl -L -o swiftformat.zip https://github.com/nicklockwood/SwiftFormat/releases/download/0.58.3/swiftformat_linux.zip unzip swiftformat.zip -d swiftformat_bin @@ -36,4 +37,5 @@ jobs: chmod +x /usr/local/bin/swiftformat - name: Run SwiftFormat + if: ${{ steps.changes.outputs.swift == 'true' }} run: swiftformat --lint . --reporter github-actions-log --config .swiftformat diff --git a/WireAnalytics/Package.swift b/WireAnalytics/Package.swift index 1144db07581..fb7237b645f 100644 --- a/WireAnalytics/Package.swift +++ b/WireAnalytics/Package.swift @@ -4,6 +4,7 @@ import Foundation import PackageDescription // You can enable/disable Datadog for debugging by overriding the boolean. +// open --env ENABLE_DATADOG=true --env ENABLE_COUNTLY=true wire-ios-mono.xcworkspace let isDatadogEnabled = hasEnvironmentVariable("ENABLE_DATADOG", "true") let isCountlyEnabled = hasEnvironmentVariable("ENABLE_COUNTLY", "true") diff --git a/WireAuthentication/Package.swift b/WireAuthentication/Package.swift index 4c70e12f416..0939cd9f92f 100644 --- a/WireAuthentication/Package.swift +++ b/WireAuthentication/Package.swift @@ -21,7 +21,7 @@ let package = Package( .package(path: "../WireUI"), .package(path: "../WirePlugins"), .package(url: "https://github.com/uber/needle.git", .upToNextMinor(from: "0.25.1")), - .package(url: "https://github.com/siteline/swiftui-introspect", from: "1.0.0") + .package(url: "https://github.com/siteline/swiftui-introspect", from: "26.0.0"), ], targets: [ .target( diff --git a/WireLogging/Package.swift b/WireLogging/Package.swift index d65eaa8998d..6b1d48c94b2 100644 --- a/WireLogging/Package.swift +++ b/WireLogging/Package.swift @@ -1,5 +1,6 @@ // swift-tools-version: 6.2 +import Foundation import PackageDescription let package = Package( @@ -26,11 +27,17 @@ let package = Package( ] ) +// open --env CI wire-ios-mono.xcworkspace +// or +// CI= swift build +let isCI = ProcessInfo.processInfo.environment["CI"] != nil + for target in package.targets { target.swiftSettings = (target.swiftSettings ?? []) + [ .enableUpcomingFeature("ExistentialAny"), .enableUpcomingFeature("InternalImportsByDefault"), .enableUpcomingFeature("MemberImportVisibility"), .enableUpcomingFeature("StrictMemorySafety"), - ] + isCI ? .unsafeFlags(["-warnings-as-errors"]) : nil + ].compactMap(\.self) } diff --git a/WireLogging/Tests/TestPlans/AllTests.xctestplan b/WireLogging/Tests/TestPlans/AllTests.xctestplan index ac2c1a8e298..c207acddbfe 100644 --- a/WireLogging/Tests/TestPlans/AllTests.xctestplan +++ b/WireLogging/Tests/TestPlans/AllTests.xctestplan @@ -1,20 +1,20 @@ { "configurations" : [ { - "id" : "8C7B2297-3D36-4CFC-9B55-BF2CC1C85BF4", - "name" : "Configuration 1", + "id" : "8DA8C849-71C0-4072-92BA-9AF39BAA1039", + "name" : "Test Scheme Action", "options" : { } } ], "defaultOptions" : { - + "performanceAntipatternCheckerEnabled" : true }, "testTargets" : [ { "target" : { - "containerPath" : "container:", + "containerPath" : "container:WireLogging", "identifier" : "WireLoggingTests", "name" : "WireLoggingTests" } diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 85da9d882ae..8b53648f798 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -477,7 +477,14 @@ platform :ios do if build.for_simulator Dir.chdir("..") do # Build the app for simulator - sh "xcodebuild -workspace 'wire-ios-mono.xcworkspace' -scheme 'Wire-iOS' -configuration 'Debug' -destination \"generic/platform=iOS Simulator\" -derivedDataPath DerivedData -quiet build BUILD_NUMBER=#{build.build_number}" + sh "xcodebuild " \ + "-workspace 'wire-ios-mono.xcworkspace' " \ + "-scheme 'Wire-iOS' " \ + "-configuration 'Debug' " \ + "-destination \"generic/platform=iOS Simulator\" " \ + "-derivedDataPath DerivedData " \ + "-quiet build " \ + "BUILD_NUMBER=#{build.build_number}" # make a "fake" .ipa package that QA will use for installing to simulator sh "mkdir -p debug/Payload" diff --git a/fastlane/framework.rb b/fastlane/framework.rb index 8362d19b819..0890b01ccdb 100644 --- a/fastlane/framework.rb +++ b/fastlane/framework.rb @@ -176,7 +176,7 @@ def to_scheme(name) when "WireAnalytics" "WireAnalyticsAll" # if a package has multiple targets, fastlane does not found -Package when "WireLogging" - "WireLogging" + "WireLoggingAll" # if a package has multiple targets, fastlane does not find -Package when "wire-ios-mocktransport" "WireMockTransport" else diff --git a/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved b/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved index 09a6e9e494e..7c4b6c95cd9 100644 --- a/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -204,8 +204,8 @@ "repositoryURL": "https://github.com/swiftlang/swift-docc-plugin", "state": { "branch": null, - "revision": "85e4bb4e1cd62cec64a4b8e769dcefdf0c5b9d64", - "version": "1.4.3" + "revision": "3e4f133a77e644a5812911a0513aeb7288b07d06", + "version": "1.4.5" } }, { @@ -258,8 +258,8 @@ "repositoryURL": "https://github.com/siteline/swiftui-introspect", "state": { "branch": null, - "revision": "807f73ce09a9b9723f12385e592b4e0aaebd3336", - "version": "1.3.0" + "revision": "a08b87f96b41055577721a6e397562b21ad52454", + "version": "26.0.0" } }, { diff --git a/WireLogging/.swiftpm/xcode/xcshareddata/xcschemes/WireLogging.xcscheme b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme similarity index 64% rename from WireLogging/.swiftpm/xcode/xcshareddata/xcschemes/WireLogging.xcscheme rename to wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme index 6b7d5c03bed..d35138b815f 100644 --- a/WireLogging/.swiftpm/xcode/xcshareddata/xcschemes/WireLogging.xcscheme +++ b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme @@ -1,6 +1,6 @@ + ReferencedContainer = "container:WireLogging"> + + + + @@ -30,10 +44,22 @@ shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + + ReferencedContainer = "container:WireLogging">