Skip to content

Commit

Permalink
Merge pull request Quick#687 from Quick/fix-ios-tvos-device-builds
Browse files Browse the repository at this point in the history
Fix device builds for iOS and tvOS
  • Loading branch information
ikesyo authored Sep 10, 2019
2 parents ed9881d + 13fbf84 commit d831761
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//

#if os(macOS) || os(iOS)
#if (os(macOS) || os(iOS)) && arch(x86_64)

import Foundation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//

#if os(macOS) || os(iOS)
#if (os(macOS) || os(iOS)) && arch(x86_64)

import Foundation
import Swift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//

#if os(tvOS)
#if os(tvOS) && targetEnvironment(simulator)

import Foundation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//

#if os(macOS) || os(iOS)
#if (os(macOS) || os(iOS)) && arch(x86_64)

import Darwin

Expand Down
4 changes: 4 additions & 0 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ function run {
}

function test_ios {
run set -o pipefail && xcodebuild -project Nimble.xcodeproj -scheme "Nimble-iOS" -configuration "Debug" -destination "generic/platform=iOS" OTHER_SWIFT_FLAGS='$(inherited) -suppress-warnings' build | xcpretty

run osascript -e 'tell app "Simulator" to quit'
run set -o pipefail && xcodebuild -project Nimble.xcodeproj -scheme "Nimble-iOS" -configuration "Debug" -sdk "iphonesimulator$BUILD_IOS_SDK_VERSION" -destination "name=iPad Pro (11-inch),OS=$RUNTIME_IOS_SDK_VERSION" OTHER_SWIFT_FLAGS='$(inherited) -suppress-warnings' build-for-testing test-without-building | xcpretty

Expand All @@ -62,6 +64,8 @@ function test_ios {
}

function test_tvos {
run set -o pipefail && xcodebuild -project Nimble.xcodeproj -scheme "Nimble-tvOS" -configuration "Debug" -destination "generic/platform=tvOS" OTHER_SWIFT_FLAGS='$(inherited) -suppress-warnings' build | xcpretty

run osascript -e 'tell app "Simulator" to quit'
run set -o pipefail && xcodebuild -project Nimble.xcodeproj -scheme "Nimble-tvOS" -configuration "Debug" -sdk "appletvsimulator$BUILD_TVOS_SDK_VERSION" -destination "name=Apple TV,OS=$RUNTIME_TVOS_SDK_VERSION" OTHER_SWIFT_FLAGS='$(inherited) -suppress-warnings' build-for-testing test-without-building | xcpretty
}
Expand Down

0 comments on commit d831761

Please sign in to comment.