diff --git a/apinotes/CMakeLists.txt b/apinotes/CMakeLists.txt index 83e2c4be5be3c..c8aeccbd983ca 100644 --- a/apinotes/CMakeLists.txt +++ b/apinotes/CMakeLists.txt @@ -2,6 +2,7 @@ set(SWIFT_API_NOTES_INPUTS AVFoundation AppKit AudioToolbox + CallKit CloudKit CoreBluetooth CoreData diff --git a/apinotes/CallKit.apinotes b/apinotes/CallKit.apinotes new file mode 100644 index 0000000000000..4bc3f52bd2799 --- /dev/null +++ b/apinotes/CallKit.apinotes @@ -0,0 +1,16 @@ +--- +Name: CallKit +Classes: +- Name: CXProviderConfiguration + Properties: + - Name: 'supportedHandleTypes' + SwiftPrivate: true +Tags: +- Name: CXErrorCode + NSErrorDomain: CXErrorDomain +- Name: CXErrorCodeIncomingCallError + NSErrorDomain: CXErrorDomainIncomingCall +- Name: CXErrorCodeRequestTransactionError + NSErrorDomain: CXErrorDomainRequestTransaction +- Name: CXErrorCodeCallDirectoryManagerError + NSErrorDomain: CXErrorDomainCallDirectoryManager diff --git a/stdlib/public/SDK/CMakeLists.txt b/stdlib/public/SDK/CMakeLists.txt index cade42a225827..4fe3d387ba466 100644 --- a/stdlib/public/SDK/CMakeLists.txt +++ b/stdlib/public/SDK/CMakeLists.txt @@ -11,6 +11,7 @@ endif() # Please keep this list sorted. add_subdirectory(AppKit) add_subdirectory(AssetsLibrary) +add_subdirectory(CallKit) add_subdirectory(CoreAudio) add_subdirectory(CoreData) add_subdirectory(CoreGraphics) diff --git a/stdlib/public/SDK/CallKit/CMakeLists.txt b/stdlib/public/SDK/CallKit/CMakeLists.txt new file mode 100644 index 0000000000000..3b111873c06d5 --- /dev/null +++ b/stdlib/public/SDK/CallKit/CMakeLists.txt @@ -0,0 +1,7 @@ +add_swift_library(swiftCallKit ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY + CallKit.swift + CXProviderConfiguration.swift + + TARGET_SDKS IOS IOS_SIMULATOR + SWIFT_MODULE_DEPENDS Foundation + FRAMEWORK_DEPENDS_WEAK CallKit) diff --git a/stdlib/public/SDK/CallKit/CXProviderConfiguration.swift b/stdlib/public/SDK/CallKit/CXProviderConfiguration.swift new file mode 100644 index 0000000000000..c0ff775491f8b --- /dev/null +++ b/stdlib/public/SDK/CallKit/CXProviderConfiguration.swift @@ -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 http://swift.org/LICENSE.txt for license information +// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===// + +@_exported import CallKit +import Foundation + +@available(iOS 10.0, *) +extension CXProviderConfiguration { + @nonobjc + public final var supportedHandleTypes: Set { + get { + return Set(__supportedHandleTypes.map { + CXHandleType(rawValue: $0.intValue)! + }) + } + set { + __supportedHandleTypes = Set(newValue.map { $0.rawValue }) + } + } +} diff --git a/stdlib/public/SDK/CallKit/CallKit.swift b/stdlib/public/SDK/CallKit/CallKit.swift new file mode 100644 index 0000000000000..db2665351c454 --- /dev/null +++ b/stdlib/public/SDK/CallKit/CallKit.swift @@ -0,0 +1,11 @@ +//===----------------------------------------------------------------------===// +// +// 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 http://swift.org/LICENSE.txt for license information +// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===----------------------------------------------------------------------===//