diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 342b62c..2d83a60 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -2,7 +2,7 @@ name: Build and Test macOS on: pull_request: - branches: [main] + branches: [ main ] jobs: build: @@ -10,15 +10,15 @@ jobs: steps: - name: Checkout Project uses: actions/checkout@v4 - - name: 'Select Latest Xcode' + - name: "Select Latest Xcode" uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: latest-stable - - name: 'Set SSH key' - uses: webfactory/ssh-agent@v0.9.0 + - name: "Set SSH key" + uses: webfactory/ssh-agent@v0.8.0 with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: 'Carthage Cached Bootstrap' + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + - name: "Carthage Cached Bootstrap" uses: DevCycleHQ/carthage-bootstrap@xcframeworks2 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -32,4 +32,4 @@ jobs: TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}' APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}' - APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}' + APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}' \ No newline at end of file diff --git a/DevCycle/Models/PlatformDetails.swift b/DevCycle/Models/PlatformDetails.swift index 975bf9b..6507f65 100644 --- a/DevCycle/Models/PlatformDetails.swift +++ b/DevCycle/Models/PlatformDetails.swift @@ -17,11 +17,11 @@ import IOKit struct PlatformDetails { #if os(iOS) || os(tvOS) - var deviceModel = getDeviceModel() + var deviceModel: String { UIDevice.current.model } var systemVersion: String { UIDevice.current.systemVersion } var systemName: String { UIDevice.current.systemName } #elseif os(watchOS) - var deviceModel = getDeviceModel() + var deviceModel: String { WKInterfaceDevice.current().model } var systemVersion: String { WKInterfaceDevice.current().systemVersion } var systemName: String { WKInterfaceDevice.current().systemName } #elseif os(macOS) @@ -56,14 +56,3 @@ func getMacOSModelIdentifier() -> String { } } #endif - -#if os(iOS) || os(tvOS) || os(watchOS) -func getDeviceModel() -> String { - if let simulatorModelIdentifier = ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] { - return "Simulator " + simulatorModelIdentifier - } - var sysinfo = utsname() - uname(&sysinfo) // ignore return value - return String(bytes: Data(bytes: &sysinfo.machine, count: Int(_SYS_NAMELEN)), encoding: .ascii)!.trimmingCharacters(in: .controlCharacters) -} -#endif diff --git a/DevCycleTests/Models/DevCycleUserTest.swift b/DevCycleTests/Models/DevCycleUserTest.swift index c6f8c81..bea15e3 100644 --- a/DevCycleTests/Models/DevCycleUserTest.swift +++ b/DevCycleTests/Models/DevCycleUserTest.swift @@ -13,11 +13,11 @@ class DevCycleUserTest: XCTestCase { #if os(tvOS) XCTAssert(user.platform == "tvOS") XCTAssertNotNil(user.platformVersion) - XCTAssert(user.deviceModel.contains("AppleTV")) + XCTAssert(user.deviceModel.contains("Apple TV")) #elseif os(iOS) XCTAssert(user.platform == "iOS" || user.platform == "iPadOS") XCTAssertNotNil(user.platformVersion) - XCTAssert(user.deviceModel.contains("iPhone") || user.deviceModel.contains("iPad")) + XCTAssert(user.deviceModel.contains("iPhone")) #elseif os(watchOS) XCTAssert(user.platform == "watchOS") XCTAssertNotNil(user.platformVersion) diff --git a/fastlane/README.md b/fastlane/README.md index 3a802c1..7d245c4 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -39,19 +39,6 @@ run tvOS DevCycle tests ---- -## watchos - -### watchos tests - -```sh -[bundle exec] fastlane watchos tests -``` - -run watchOS DevCycle tests - ----- - - ## Mac ### mac tests