Skip to content

Commit cbdf0ff

Browse files
authored
Merge pull request #11248 from apple/update-master-for-xcode-9-beta-4
Update master to build with Xcode 9 beta 4
2 parents 111adf9 + 9a956dd commit cbdf0ff

22 files changed

+1153
-226
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,9 +1553,17 @@ function(add_swift_library name)
15531553
endif()
15541554

15551555
# Add PrivateFrameworks, rdar://28466433
1556+
set(swiftlib_link_flags_all ${SWIFTLIB_LINK_FLAGS})
15561557
if(SWIFTLIB_IS_SDK_OVERLAY)
15571558
list(APPEND swiftlib_swift_compile_flags_all "-Fsystem" "${SWIFT_SDK_${sdk}_PATH}/System/Library/PrivateFrameworks/")
15581559
endif()
1560+
1561+
if("${sdk}" STREQUAL "IOS_SIMULATOR")
1562+
if("${name}" STREQUAL "swiftMediaPlayer")
1563+
message("DISABLING AUTOLINK FOR swiftMediaPlayer")
1564+
list(APPEND swiftlib_link_flags_all "-Xlinker" "-ignore_auto_link")
1565+
endif()
1566+
endif()
15591567

15601568
# Add this library variant.
15611569
_add_swift_library_single(
@@ -1576,7 +1584,7 @@ function(add_swift_library name)
15761584
FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets}
15771585
C_COMPILE_FLAGS ${SWIFTLIB_C_COMPILE_FLAGS}
15781586
SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all}
1579-
LINK_FLAGS ${SWIFTLIB_LINK_FLAGS}
1587+
LINK_FLAGS ${swiftlib_link_flags_all}
15801588
PRIVATE_LINK_LIBRARIES ${swiftlib_private_link_libraries_targets}
15811589
INCORPORATE_OBJECT_LIBRARIES ${SWIFTLIB_INCORPORATE_OBJECT_LIBRARIES}
15821590
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY ${SWIFTLIB_INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY}

stdlib/public/SDK/ARKit/ARKit.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ extension ARCamera {
1919
*/
2020
public enum TrackingState {
2121
public enum Reason {
22+
/** Tracking is limited due to initialization in progress. */
23+
case initializing
24+
2225
/** Tracking is limited due to a excessive motion of the camera. */
2326
case excessiveMotion
2427

@@ -47,6 +50,7 @@ extension ARCamera {
4750
let reason: TrackingState.Reason
4851

4952
switch __trackingStateReason {
53+
case .initializing: reason = .initializing
5054
case .excessiveMotion: reason = .excessiveMotion
5155
default: reason = .insufficientFeatures
5256
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 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 AVFoundation // Clang module
14+
import Foundation
15+
16+
17+
#if os(iOS)
18+
19+
internal protocol _AVCaptureDeviceFormatSupportedColorSpaces {
20+
@available(iOS, introduced: 10.0)
21+
var __supportedColorSpaces: [NSNumber] { get }
22+
}
23+
24+
extension _AVCaptureDeviceFormatSupportedColorSpaces {
25+
@available(swift, obsoleted: 4.0)
26+
@available(iOS, introduced: 10.0)
27+
@nonobjc
28+
public var supportedColorSpaces: [NSNumber]! {
29+
return __supportedColorSpaces
30+
}
31+
32+
@available(swift, introduced: 4.0)
33+
@available(iOS, introduced: 10.0)
34+
@nonobjc
35+
public var supportedColorSpaces: [AVCaptureColorSpace] {
36+
return __supportedColorSpaces.map { AVCaptureColorSpace(rawValue: $0.intValue)! }
37+
}
38+
}
39+
40+
@available(iOS, introduced: 10.0)
41+
extension AVCaptureDevice.Format : _AVCaptureDeviceFormatSupportedColorSpaces {
42+
}
43+
44+
#endif
45+
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 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 AVFoundation // Clang module
14+
import Foundation
15+
16+
17+
#if os(iOS)
18+
19+
internal protocol _AVCapturePhotoOutputSwiftNativeTypes {
20+
var __supportedFlashModes: [NSNumber] { get }
21+
var __availablePhotoPixelFormatTypes: [NSNumber] { get }
22+
var __availableRawPhotoPixelFormatTypes: [NSNumber] { get }
23+
}
24+
25+
extension _AVCapturePhotoOutputSwiftNativeTypes {
26+
@available(swift, obsoleted: 4.0)
27+
@available(iOS, introduced: 10.0)
28+
@nonobjc
29+
public var supportedFlashModes: [NSNumber] {
30+
return __supportedFlashModes
31+
}
32+
33+
@available(swift, introduced: 4.0)
34+
@available(iOS, introduced: 10.0)
35+
@nonobjc
36+
public var supportedFlashModes: [AVCaptureDevice.FlashMode] {
37+
return __supportedFlashModes.map { AVCaptureDevice.FlashMode(rawValue: $0.intValue)! }
38+
}
39+
40+
@available(swift, obsoleted: 4.0)
41+
@available(iOS, introduced: 10.0)
42+
@nonobjc
43+
public var availablePhotoPixelFormatTypes: [NSNumber] {
44+
return __availablePhotoPixelFormatTypes
45+
}
46+
47+
@available(swift, introduced: 4.0)
48+
@available(iOS, introduced: 10.0)
49+
@nonobjc
50+
public var availablePhotoPixelFormatTypes: [OSType] {
51+
return __availablePhotoPixelFormatTypes.map { $0.uint32Value } as [OSType]
52+
}
53+
54+
@available(swift, obsoleted: 4.0)
55+
@available(iOS, introduced: 10.0)
56+
@nonobjc
57+
public var availableRawPhotoPixelFormatTypes: [NSNumber] {
58+
return __availableRawPhotoPixelFormatTypes
59+
}
60+
61+
@available(swift, introduced: 4.0)
62+
@available(iOS, introduced: 10.0)
63+
@nonobjc
64+
public var availableRawPhotoPixelFormatTypes: [OSType] {
65+
return __availableRawPhotoPixelFormatTypes.map { $0.uint32Value } as [OSType]
66+
}
67+
}
68+
69+
@available(iOS, introduced: 10.0)
70+
extension AVCapturePhotoOutput : _AVCapturePhotoOutputSwiftNativeTypes {
71+
}
72+
73+
74+
internal protocol _AVCapturePhotoSettingsSwiftNativeTypes {
75+
var __availablePreviewPhotoPixelFormatTypes: [NSNumber] { get }
76+
}
77+
78+
extension _AVCapturePhotoSettingsSwiftNativeTypes {
79+
@available(swift, obsoleted: 4.0)
80+
@available(iOS, introduced: 10.0)
81+
@nonobjc
82+
public var availablePreviewPhotoPixelFormatTypes: [NSNumber] {
83+
return __availablePreviewPhotoPixelFormatTypes
84+
}
85+
86+
@available(swift, introduced: 4.0)
87+
@available(iOS, introduced: 10.0)
88+
@nonobjc
89+
public var availablePreviewPhotoPixelFormatTypes: [OSType] {
90+
return __availablePreviewPhotoPixelFormatTypes.map { $0.uint32Value } as [OSType]
91+
}
92+
}
93+
94+
@available(iOS, introduced: 10.0)
95+
extension AVCapturePhotoSettings : _AVCapturePhotoSettingsSwiftNativeTypes {
96+
}
97+
98+
#endif

stdlib/public/SDK/AVFoundation/AVCaptureSynchronizedDataCollection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension AVCaptureSynchronizedDataCollection : Sequence {
3030

3131
public mutating func next() -> AVCaptureSynchronizedData? {
3232
guard let nextAny = fastIterator.next() else { return nil }
33-
return nextAny as! AVCaptureSynchronizedData
33+
return (nextAny as! AVCaptureSynchronizedData)
3434
}
3535
}
3636
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 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 AVFoundation // Clang module
14+
import Foundation
15+
16+
17+
#if os(macOS) || os(iOS)
18+
19+
extension AVCaptureVideoDataOutput {
20+
@available(swift, obsoleted: 4.0)
21+
@available(macOS, introduced: 10.7)
22+
@available(iOS, introduced: 5.0)
23+
@nonobjc
24+
public var availableVideoCVPixelFormatTypes: [NSNumber]! {
25+
return __availableVideoCVPixelFormatTypes
26+
}
27+
28+
@available(swift, introduced: 4.0)
29+
@available(macOS, introduced: 10.7)
30+
@available(iOS, introduced: 5.0)
31+
@nonobjc
32+
public var availableVideoPixelFormatTypes: [OSType] {
33+
return __availableVideoCVPixelFormatTypes.map { $0.uint32Value } as [OSType]
34+
}
35+
}
36+
37+
#endif
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 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 AVFoundation // Clang module
14+
import Foundation
15+
import CoreGraphics
16+
17+
18+
#if os(iOS)
19+
20+
extension AVMetadataMachineReadableCodeObject {
21+
@available(swift, obsoleted: 4.0)
22+
@available(iOS, introduced: 7.0)
23+
@nonobjc
24+
public var corners: [Any]! {
25+
return __corners
26+
}
27+
28+
@available(swift, introduced: 4.0)
29+
@available(iOS, introduced: 7.0)
30+
@nonobjc
31+
public var corners: [CGPoint] {
32+
return __corners.map { CGPoint(dictionaryRepresentation: $0 as CFDictionary)! }
33+
}
34+
}
35+
36+
#endif
37+

stdlib/public/SDK/AVFoundation/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ cmake_minimum_required(VERSION 3.4.3)
22
include("../../../../cmake/modules/StandaloneOverlay.cmake")
33

44
add_swift_library(swiftAVFoundation ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
5+
AVCaptureDevice.swift
6+
AVCapturePhotoOutput.swift
57
AVCaptureSynchronizedDataCollection.swift
8+
AVCaptureVideoDataOutput.swift
69
AVError.swift
10+
AVMetadataObject.swift
711
NSValue.swift.gyb
812

913
TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR

stdlib/public/SDK/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ endif()
1010

1111
list(APPEND SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS "${STDLIB_SIL_SERIALIZE_WITNESS_TABLES}")
1212

13-
set(all_overlays "Accelerate;AppKit;ARKit;AssetsLibrary;AVFoundation;CallKit;CloudKit;Contacts;CoreAudio;CoreData;CoreFoundation;CoreGraphics;CoreImage;CoreLocation;CoreMedia;CryptoTokenKit;Dispatch;Foundation;GameplayKit;GLKit;HomeKit;IOKit;Intents;MapKit;ModelIO;ObjectiveC;OpenCL;os;Photos;QuartzCore;SafariServices;SceneKit;simd;SpriteKit;UIKit;WatchKit;XCTest;XPC")
13+
set(all_overlays "Accelerate;AppKit;ARKit;AssetsLibrary;AVFoundation;CallKit;CloudKit;Contacts;CoreAudio;CoreData;CoreFoundation;CoreGraphics;CoreImage;CoreLocation;CoreMedia;CryptoTokenKit;Dispatch;Foundation;GameplayKit;GLKit;HomeKit;IOKit;Intents;MapKit;MediaPlayer;ModelIO;ObjectiveC;OpenCL;os;Photos;QuartzCore;SafariServices;SceneKit;simd;SpriteKit;UIKit;WatchKit;XCTest;XPC")
1414

1515
if(DEFINED SWIFT_OVERLAY_TARGETS)
1616
set(overlays_to_build ${SWIFT_OVERLAY_TARGETS})

stdlib/public/SDK/Intents/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ add_swift_library(swiftIntents ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_O
88
INGetCarLockStatusIntentResponse.swift
99
INGetCarPowerLevelStatusIntentResponse.swift
1010
INIntegerResolutionResult.swift
11+
INNotebookItemTypeResolutionResult.swift
1112
INParameter.swift
1213
INRequestRideIntent.swift
1314
INRideOption.swift
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 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 11.0, watchOS 4.0, *)
18+
extension INNotebookItemTypeResolutionResult {
19+
@nonobjc public
20+
static func disambiguation(with valuesToDisambiguate: [INNotebookItemType]) -> Self {
21+
let numbers = valuesToDisambiguate.map { NSNumber(value: $0.rawValue) }
22+
return __disambiguationWithValues(toDisambiguate: numbers)
23+
}
24+
}
25+
#endif
26+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cmake_minimum_required(VERSION 3.4.3)
2+
include("../../../../cmake/modules/StandaloneOverlay.cmake")
3+
4+
add_swift_library(swiftMediaPlayer ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
5+
MPMusicPlayerPlayParameters.swift
6+
7+
SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
8+
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
9+
TARGET_SDKS IOS IOS_SIMULATOR
10+
11+
SWIFT_MODULE_DEPENDS_IOS Darwin AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMedia Dispatch Foundation ObjectiveC QuartzCore simd UIKit os CoreData # auto-updated
12+
FRAMEWORK_DEPENDS_WEAK MediaPlayer
13+
14+
DEPLOYMENT_VERSION_IOS ${SWIFTLIB_DEPLOYMENT_VERSION_MEDIAPLAYER_IOS}
15+
)

0 commit comments

Comments
 (0)