Skip to content

CallKit overlay #3422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apinotes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(SWIFT_API_NOTES_INPUTS
AVFoundation
AppKit
AudioToolbox
CallKit
CloudKit
CoreBluetooth
CoreData
Expand Down
16 changes: 16 additions & 0 deletions apinotes/CallKit.apinotes
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions stdlib/public/SDK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions stdlib/public/SDK/CallKit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
29 changes: 29 additions & 0 deletions stdlib/public/SDK/CallKit/CXProviderConfiguration.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 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<CXHandleType> {
get {
return Set(__supportedHandleTypes.map {
CXHandleType(rawValue: $0.intValue)!
})
}
set {
__supportedHandleTypes = Set(newValue.map { $0.rawValue })
}
}
}
11 changes: 11 additions & 0 deletions stdlib/public/SDK/CallKit/CallKit.swift
Original file line number Diff line number Diff line change
@@ -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
//
//===----------------------------------------------------------------------===//