Skip to content

Commit 553ae8c

Browse files
authored
Merge pull request #3422 from moiseev/callkit-overlay
2 parents 4bf1c34 + 29d7e66 commit 553ae8c

File tree

6 files changed

+65
-0
lines changed

6 files changed

+65
-0
lines changed

apinotes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ set(SWIFT_API_NOTES_INPUTS
22
AVFoundation
33
AppKit
44
AudioToolbox
5+
CallKit
56
CloudKit
67
CoreBluetooth
78
CoreData

apinotes/CallKit.apinotes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
Name: CallKit
3+
Classes:
4+
- Name: CXProviderConfiguration
5+
Properties:
6+
- Name: 'supportedHandleTypes'
7+
SwiftPrivate: true
8+
Tags:
9+
- Name: CXErrorCode
10+
NSErrorDomain: CXErrorDomain
11+
- Name: CXErrorCodeIncomingCallError
12+
NSErrorDomain: CXErrorDomainIncomingCall
13+
- Name: CXErrorCodeRequestTransactionError
14+
NSErrorDomain: CXErrorDomainRequestTransaction
15+
- Name: CXErrorCodeCallDirectoryManagerError
16+
NSErrorDomain: CXErrorDomainCallDirectoryManager

stdlib/public/SDK/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ endif()
1111
# Please keep this list sorted.
1212
add_subdirectory(AppKit)
1313
add_subdirectory(AssetsLibrary)
14+
add_subdirectory(CallKit)
1415
add_subdirectory(CoreAudio)
1516
add_subdirectory(CoreData)
1617
add_subdirectory(CoreGraphics)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
add_swift_library(swiftCallKit ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
2+
CallKit.swift
3+
CXProviderConfiguration.swift
4+
5+
TARGET_SDKS IOS IOS_SIMULATOR
6+
SWIFT_MODULE_DEPENDS Foundation
7+
FRAMEWORK_DEPENDS_WEAK CallKit)
Lines changed: 29 additions & 0 deletions
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 http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
@_exported import CallKit
14+
import Foundation
15+
16+
@available(iOS 10.0, *)
17+
extension CXProviderConfiguration {
18+
@nonobjc
19+
public final var supportedHandleTypes: Set<CXHandleType> {
20+
get {
21+
return Set(__supportedHandleTypes.map {
22+
CXHandleType(rawValue: $0.intValue)!
23+
})
24+
}
25+
set {
26+
__supportedHandleTypes = Set(newValue.map { $0.rawValue })
27+
}
28+
}
29+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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 http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)