Skip to content

Commit 92ef777

Browse files
committed
Update master to build with Xcode 8.3 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs.
1 parent e21597d commit 92ef777

25 files changed

+942
-479
lines changed

apinotes/Intents.apinotes

+6
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ Name: Intents
33
Tags:
44
- Name: INIntentErrorCode
55
NSErrorDomain: INIntentErrorDomain
6+
Classes:
7+
- Name: INRequestRideIntent
8+
Methods:
9+
- Selector: 'initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:'
10+
MethodKind: Instance
11+
SwiftPrivate: true

stdlib/public/SDK/Intents/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
add_swift_library(swiftIntents ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
22
INBooleanResolutionResult.swift
33
INDoubleResolutionResult.swift
4+
INGetCarLockStatusIntentResponse.swift
5+
INGetCarPowerLevelStatusIntentResponse.swift
46
INIntegerResolutionResult.swift
57
INRequestRideIntent.swift
68
INSaveProfileInCarIntent.swift
79
INSearchForPhotosIntentResponse.swift
10+
INSetCarLockStatusIntent.swift
811
INSetClimateSettingsInCarIntent.swift
912
INSetDefrosterSettingsInCarIntent.swift
1013
INSetProfileInCarIntent.swift
@@ -15,9 +18,10 @@ add_swift_library(swiftIntents ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_O
1518

1619
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
1720
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
18-
TARGET_SDKS OSX IOS IOS_SIMULATOR
21+
TARGET_SDKS OSX IOS IOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
1922
SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics CoreLocation Dispatch Foundation IOKit ObjectiveC # auto-updated
2023
SWIFT_MODULE_DEPENDS_IOS Darwin CoreLocation Dispatch Foundation ObjectiveC # auto-updated
24+
SWIFT_MODULE_DEPENDS_WATCHOS Foundation CoreLocation UIKit
2125
FRAMEWORK_DEPENDS_WEAK Intents
2226

2327
DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_INTENTS_OSX}

stdlib/public/SDK/Intents/INBooleanResolutionResult.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
@_exported import Intents
1414
import Foundation
1515

16-
#if os(iOS)
17-
@available(iOS 10.0, *)
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.0, watchOS 3.2, *)
1818
extension INBooleanResolutionResult {
1919
@nonobjc public
2020
static func confirmationRequired(with valueToConfirm: Bool?) -> Self {

stdlib/public/SDK/Intents/INDoubleResolutionResult.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
@_exported import Intents
1414
import Foundation
1515

16-
#if os(iOS)
17-
@available(iOS 10.0, *)
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.0, watchOS 3.2, *)
1818
extension INDoubleResolutionResult {
1919
@nonobjc public
2020
static func confirmationRequired(with valueToConfirm: Double?) -> Self {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
@_exported import Intents
14+
import Foundation
15+
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.3, watchOS 3.2, *)
18+
extension INGetCarLockStatusIntentResponse {
19+
@nonobjc
20+
public final var locked: Bool? {
21+
get {
22+
return __locked?.boolValue
23+
}
24+
set(newLocked) {
25+
__locked = newLocked.map { NSNumber(value: $0) }
26+
}
27+
}
28+
}
29+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
@_exported import Intents
14+
import Foundation
15+
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.3, watchOS 3.2, *)
18+
extension INGetCarPowerLevelStatusIntentResponse {
19+
@nonobjc
20+
public final var fuelPercentRemaining: Float? {
21+
get {
22+
return __fuelPercentRemaining?.floatValue
23+
}
24+
set(newPercent) {
25+
__fuelPercentRemaining = newPercent.map { NSNumber(value: $0) }
26+
}
27+
}
28+
29+
@nonobjc
30+
public final var chargePercentRemaining: Float? {
31+
get {
32+
return __chargePercentRemaining?.floatValue
33+
}
34+
set(newPercent) {
35+
__chargePercentRemaining = newPercent.map { NSNumber(value: $0) }
36+
}
37+
}
38+
}
39+
#endif

stdlib/public/SDK/Intents/INIntegerResolutionResult.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
@_exported import Intents
1414
import Foundation
1515

16-
#if os(iOS)
17-
@available(iOS 10.0, *)
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.0, watchOS 3.2, *)
1818
extension INIntegerResolutionResult {
1919
@nonobjc public
2020
static func confirmationRequired(with valueToConfirm: Int?) -> Self {

stdlib/public/SDK/Intents/INRequestRideIntent.swift

+18-8
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,32 @@
1313
@_exported import Intents
1414
import Foundation
1515

16-
#if os(iOS)
17-
@available(iOS 10.0, *)
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.0, watchOS 3.2, *)
1818
extension INRequestRideIntent {
1919
@nonobjc
2020
public convenience init(
2121
pickupLocation: CLPlacemark? = nil,
2222
dropOffLocation: CLPlacemark? = nil,
2323
rideOptionName: INSpeakableString? = nil,
2424
partySize: Int? = nil,
25-
paymentMethod: INPaymentMethod? = nil
25+
paymentMethod: INPaymentMethod? = nil,
26+
scheduledPickupTime: INDateComponentsRange? = nil
2627
) {
27-
self.init(__pickupLocation: pickupLocation,
28-
dropOffLocation: dropOffLocation,
29-
rideOptionName: rideOptionName,
30-
partySize: partySize.map { NSNumber(value: $0) },
31-
paymentMethod: paymentMethod)
28+
if #available(iOS 10.3, watchOS 3.2, *) {
29+
self.init(__pickupLocation: pickupLocation,
30+
dropOffLocation: dropOffLocation,
31+
rideOptionName: rideOptionName,
32+
partySize: partySize.map { NSNumber(value: $0) },
33+
paymentMethod: paymentMethod,
34+
scheduledPickupTime: scheduledPickupTime)
35+
} else {
36+
self.init(__pickupLocation: pickupLocation,
37+
dropOffLocation: dropOffLocation,
38+
rideOptionName: rideOptionName,
39+
partySize: partySize.map { NSNumber(value: $0) },
40+
paymentMethod: paymentMethod)
41+
}
3242
}
3343

3444
@nonobjc

stdlib/public/SDK/Intents/INSearchForPhotosIntentResponse.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
@_exported import Intents
1414
import Foundation
1515

16-
#if os(iOS)
17-
@available(iOS 10.0, *)
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.0, watchOS 3.2, *)
1818
extension INSearchForPhotosIntentResponse {
1919
@nonobjc
2020
public final var searchResultsCount: Int? {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
@_exported import Intents
14+
import Foundation
15+
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.3, watchOS 3.2, *)
18+
extension INSetCarLockStatusIntent {
19+
@nonobjc
20+
public convenience init(locked: Bool?, carName: INSpeakableString?) {
21+
self.init(__locked:locked as NSNumber?, carName:carName)
22+
}
23+
24+
@nonobjc
25+
public final var locked: Bool? {
26+
return __locked?.boolValue
27+
}
28+
}
29+
#endif

stdlib/public/SDK/Intents/INStartPhotoPlaybackIntentResponse.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
@_exported import Intents
1414
import Foundation
1515

16-
#if os(iOS)
17-
@available(iOS 10.0, *)
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.0, watchOS 3.2, *)
1818
extension INStartPhotoPlaybackIntentResponse {
1919
@nonobjc
2020
public final var searchResultsCount: Int? {

stdlib/public/SDK/Intents/INStartWorkoutIntent.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
@_exported import Intents
1414
import Foundation
1515

16-
#if os(iOS)
17-
@available(iOS 10.0, *)
16+
#if os(iOS) || os(watchOS)
17+
@available(iOS 10.0, watchOS 3.2, *)
1818
extension INStartWorkoutIntent {
1919
@nonobjc
2020
public convenience init(

stdlib/public/SDK/SafariServices/SafariServices.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
@_exported import SafariServices // Clang module
1414
import _SwiftSafariServicesOverlayShims
1515

16+
#if os(OSX)
17+
1618
@available(OSX, introduced: 10.11)
17-
public func SFSafariServicesAvailable() -> Bool {
18-
return _swift_SafariServices_isSafariServicesAvailable()
19+
public func SFSafariServicesAvailable(_ version: SFSafariServicesVersion = SFSafariServicesVersion.version10_0) -> Bool {
20+
return _swift_SafariServices_isSafariServicesAvailable(version)
1921
}
22+
23+
#endif

stdlib/public/SDK/os/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
add_swift_library(swiftos ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
22
os_log.swift
3-
os.mm
3+
os_log.m
4+
os_trace_blob.c
5+
thunks.mm
46

57
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
68
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"

0 commit comments

Comments
 (0)