Skip to content

Commit

Permalink
Update master to build with Xcode 8.3 beta 1, OS X 10.12, iOS 10, tvO…
Browse files Browse the repository at this point in the history
…S 10, and watchOS 3 SDKs.
  • Loading branch information
shahmishal committed Jan 26, 2017
1 parent e21597d commit 92ef777
Show file tree
Hide file tree
Showing 25 changed files with 942 additions and 479 deletions.
6 changes: 6 additions & 0 deletions apinotes/Intents.apinotes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ Name: Intents
Tags:
- Name: INIntentErrorCode
NSErrorDomain: INIntentErrorDomain
Classes:
- Name: INRequestRideIntent
Methods:
- Selector: 'initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:'
MethodKind: Instance
SwiftPrivate: true
6 changes: 5 additions & 1 deletion stdlib/public/SDK/Intents/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
add_swift_library(swiftIntents ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
INBooleanResolutionResult.swift
INDoubleResolutionResult.swift
INGetCarLockStatusIntentResponse.swift
INGetCarPowerLevelStatusIntentResponse.swift
INIntegerResolutionResult.swift
INRequestRideIntent.swift
INSaveProfileInCarIntent.swift
INSearchForPhotosIntentResponse.swift
INSetCarLockStatusIntent.swift
INSetClimateSettingsInCarIntent.swift
INSetDefrosterSettingsInCarIntent.swift
INSetProfileInCarIntent.swift
Expand All @@ -15,9 +18,10 @@ add_swift_library(swiftIntents ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_O

SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
TARGET_SDKS OSX IOS IOS_SIMULATOR
TARGET_SDKS OSX IOS IOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics CoreLocation Dispatch Foundation IOKit ObjectiveC # auto-updated
SWIFT_MODULE_DEPENDS_IOS Darwin CoreLocation Dispatch Foundation ObjectiveC # auto-updated
SWIFT_MODULE_DEPENDS_WATCHOS Foundation CoreLocation UIKit
FRAMEWORK_DEPENDS_WEAK Intents

DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_INTENTS_OSX}
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/SDK/Intents/INBooleanResolutionResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@_exported import Intents
import Foundation

#if os(iOS)
@available(iOS 10.0, *)
#if os(iOS) || os(watchOS)
@available(iOS 10.0, watchOS 3.2, *)
extension INBooleanResolutionResult {
@nonobjc public
static func confirmationRequired(with valueToConfirm: Bool?) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/SDK/Intents/INDoubleResolutionResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@_exported import Intents
import Foundation

#if os(iOS)
@available(iOS 10.0, *)
#if os(iOS) || os(watchOS)
@available(iOS 10.0, watchOS 3.2, *)
extension INDoubleResolutionResult {
@nonobjc public
static func confirmationRequired(with valueToConfirm: Double?) -> Self {
Expand Down
29 changes: 29 additions & 0 deletions stdlib/public/SDK/Intents/INGetCarLockStatusIntentResponse.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import Intents
import Foundation

#if os(iOS) || os(watchOS)
@available(iOS 10.3, watchOS 3.2, *)
extension INGetCarLockStatusIntentResponse {
@nonobjc
public final var locked: Bool? {
get {
return __locked?.boolValue
}
set(newLocked) {
__locked = newLocked.map { NSNumber(value: $0) }
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import Intents
import Foundation

#if os(iOS) || os(watchOS)
@available(iOS 10.3, watchOS 3.2, *)
extension INGetCarPowerLevelStatusIntentResponse {
@nonobjc
public final var fuelPercentRemaining: Float? {
get {
return __fuelPercentRemaining?.floatValue
}
set(newPercent) {
__fuelPercentRemaining = newPercent.map { NSNumber(value: $0) }
}
}

@nonobjc
public final var chargePercentRemaining: Float? {
get {
return __chargePercentRemaining?.floatValue
}
set(newPercent) {
__chargePercentRemaining = newPercent.map { NSNumber(value: $0) }
}
}
}
#endif
4 changes: 2 additions & 2 deletions stdlib/public/SDK/Intents/INIntegerResolutionResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@_exported import Intents
import Foundation

#if os(iOS)
@available(iOS 10.0, *)
#if os(iOS) || os(watchOS)
@available(iOS 10.0, watchOS 3.2, *)
extension INIntegerResolutionResult {
@nonobjc public
static func confirmationRequired(with valueToConfirm: Int?) -> Self {
Expand Down
26 changes: 18 additions & 8 deletions stdlib/public/SDK/Intents/INRequestRideIntent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,32 @@
@_exported import Intents
import Foundation

#if os(iOS)
@available(iOS 10.0, *)
#if os(iOS) || os(watchOS)
@available(iOS 10.0, watchOS 3.2, *)
extension INRequestRideIntent {
@nonobjc
public convenience init(
pickupLocation: CLPlacemark? = nil,
dropOffLocation: CLPlacemark? = nil,
rideOptionName: INSpeakableString? = nil,
partySize: Int? = nil,
paymentMethod: INPaymentMethod? = nil
paymentMethod: INPaymentMethod? = nil,
scheduledPickupTime: INDateComponentsRange? = nil
) {
self.init(__pickupLocation: pickupLocation,
dropOffLocation: dropOffLocation,
rideOptionName: rideOptionName,
partySize: partySize.map { NSNumber(value: $0) },
paymentMethod: paymentMethod)
if #available(iOS 10.3, watchOS 3.2, *) {
self.init(__pickupLocation: pickupLocation,
dropOffLocation: dropOffLocation,
rideOptionName: rideOptionName,
partySize: partySize.map { NSNumber(value: $0) },
paymentMethod: paymentMethod,
scheduledPickupTime: scheduledPickupTime)
} else {
self.init(__pickupLocation: pickupLocation,
dropOffLocation: dropOffLocation,
rideOptionName: rideOptionName,
partySize: partySize.map { NSNumber(value: $0) },
paymentMethod: paymentMethod)
}
}

@nonobjc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@_exported import Intents
import Foundation

#if os(iOS)
@available(iOS 10.0, *)
#if os(iOS) || os(watchOS)
@available(iOS 10.0, watchOS 3.2, *)
extension INSearchForPhotosIntentResponse {
@nonobjc
public final var searchResultsCount: Int? {
Expand Down
29 changes: 29 additions & 0 deletions stdlib/public/SDK/Intents/INSetCarLockStatusIntent.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import Intents
import Foundation

#if os(iOS) || os(watchOS)
@available(iOS 10.3, watchOS 3.2, *)
extension INSetCarLockStatusIntent {
@nonobjc
public convenience init(locked: Bool?, carName: INSpeakableString?) {
self.init(__locked:locked as NSNumber?, carName:carName)
}

@nonobjc
public final var locked: Bool? {
return __locked?.boolValue
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@_exported import Intents
import Foundation

#if os(iOS)
@available(iOS 10.0, *)
#if os(iOS) || os(watchOS)
@available(iOS 10.0, watchOS 3.2, *)
extension INStartPhotoPlaybackIntentResponse {
@nonobjc
public final var searchResultsCount: Int? {
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/SDK/Intents/INStartWorkoutIntent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@_exported import Intents
import Foundation

#if os(iOS)
@available(iOS 10.0, *)
#if os(iOS) || os(watchOS)
@available(iOS 10.0, watchOS 3.2, *)
extension INStartWorkoutIntent {
@nonobjc
public convenience init(
Expand Down
8 changes: 6 additions & 2 deletions stdlib/public/SDK/SafariServices/SafariServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
@_exported import SafariServices // Clang module
import _SwiftSafariServicesOverlayShims

#if os(OSX)

@available(OSX, introduced: 10.11)
public func SFSafariServicesAvailable() -> Bool {
return _swift_SafariServices_isSafariServicesAvailable()
public func SFSafariServicesAvailable(_ version: SFSafariServicesVersion = SFSafariServicesVersion.version10_0) -> Bool {
return _swift_SafariServices_isSafariServicesAvailable(version)
}

#endif
4 changes: 3 additions & 1 deletion stdlib/public/SDK/os/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
add_swift_library(swiftos ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
os_log.swift
os.mm
os_log.m
os_trace_blob.c
thunks.mm

SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
Expand Down
Loading

0 comments on commit 92ef777

Please sign in to comment.