Skip to content

Commit 3d7d46e

Browse files
committed
Update to Xcode 15.0.1
1 parent 36608a6 commit 3d7d46e

File tree

11 files changed

+375
-19
lines changed

11 files changed

+375
-19
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ jobs:
259259
- lint
260260

261261
env:
262-
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
262+
DEVELOPER_DIR: /Applications/Xcode_15.0.1.app/Contents/Developer
263263

264264
steps:
265265
- uses: actions/checkout@v3

crates/header-translator/src/availability.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ struct Unavailable {
1414
maccatalyst: bool,
1515
watchos: bool,
1616
tvos: bool,
17+
visionos: bool,
1718
}
1819

1920
#[derive(Debug, Clone, PartialEq, Default)]
@@ -25,6 +26,7 @@ struct Versions {
2526
maccatalyst: Option<Version>,
2627
watchos: Option<Version>,
2728
tvos: Option<Version>,
29+
visionos: Option<Version>,
2830
}
2931

3032
#[derive(Debug, Clone, PartialEq)]
@@ -116,6 +118,12 @@ impl Availability {
116118
&mut introduced.tvos,
117119
&mut deprecated.tvos,
118120
),
121+
"xros" => set(
122+
availability,
123+
&mut unavailable.visionos,
124+
&mut introduced.visionos,
125+
&mut deprecated.visionos,
126+
),
119127
"swift" => {
120128
_swift = Some(availability);
121129
}
@@ -144,6 +152,7 @@ impl fmt::Display for Availability {
144152
maccatalyst: None,
145153
watchos: None,
146154
tvos: None,
155+
visionos: None,
147156
} => {
148157
// Not deprecated
149158
}

crates/header-translator/src/rust_type.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,8 @@ impl fmt::Display for Ty {
16841684
}
16851685
}
16861686
Inner::C99Bool => {
1687-
panic!("C99's bool as Objective-C method return is unsupported")
1687+
warn!("C99's bool as Objective-C method return is ill supported");
1688+
write!(f, "bool")
16881689
}
16891690
Inner::ObjcBool => write!(f, "bool"),
16901691
ty => write!(f, "{ty}"),

crates/header-translator/src/unexposed_attr.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,15 @@ impl UnexposedAttr {
9898
| "__WATCHOS_AVAILABLE"
9999
| "API_AVAILABLE_BEGIN"
100100
| "API_AVAILABLE"
101-
| "API_DEPRECATED_WITH_REPLACEMENT"
102101
| "API_DEPRECATED"
102+
| "API_DEPRECATED_BEGIN"
103+
| "API_DEPRECATED_WITH_REPLACEMENT"
103104
| "API_UNAVAILABLE_BEGIN"
104105
| "API_UNAVAILABLE"
105106
| "CF_SWIFT_UNAVAILABLE"
106107
| "CG_AVAILABLE_BUT_DEPRECATED"
107108
| "CG_AVAILABLE_STARTING"
109+
| "CK_UNAVAILABLE"
108110
| "FPUI_AVAILABLE"
109111
| "MP_API"
110112
| "MP_DEPRECATED_WITH_REPLACEMENT"
@@ -140,6 +142,9 @@ impl UnexposedAttr {
140142
let _ = get_arguments();
141143
None
142144
}
145+
// For some reason we don't need to extract the arguments for
146+
// these, perhaps because they simply delegate to other macros.
147+
"AS_API_AVAILABLE" | "AS_HEADER_AUDIT_BEGIN" => None,
143148
"__IOS_PROHIBITED"
144149
| "__IOS_UNAVAILABLE"
145150
| "__OSX_AVAILABLE_BUT_DEPRECATED"

crates/header-translator/translation-config.toml

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ name = "metal"
354354
description = "Drawing a rotating triangle"
355355

356356
[library.MetalFX]
357-
imports = ["Metal"]
357+
imports = ["Foundation", "Metal"]
358358
macos = "13.0"
359359
maccatalyst = "16.0"
360360
ios = "16.0"
@@ -734,6 +734,10 @@ skipped = true
734734
skipped = true
735735
[class.NSString.methods.initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error]
736736
skipped = true
737+
[class.NSAttributedString.methods.initWithFormat_options_locale_context_arguments]
738+
skipped = true
739+
[class.NSMutableAttributedString.methods.initWithFormat_options_locale_context_arguments]
740+
skipped = true
737741
[fn.NSLogv]
738742
skipped = true
739743

@@ -747,6 +751,14 @@ skipped = true
747751
[class.NSUserNotification.methods.setContentImage]
748752
skipped = true
749753

754+
# Uses , which is only available in CoreAnimation
755+
[class.NSView.methods.displayLinkWithTarget_selector]
756+
skipped = true
757+
[class.NSWindow.methods.displayLinkWithTarget_selector]
758+
skipped = true
759+
[class.NSScreen.methods.displayLinkWithTarget_selector]
760+
skipped = true
761+
750762
# Outlier that really should have been part of the original enum
751763
[enum.anonymous.constants.NSProprietaryStringEncoding]
752764
skipped = true
@@ -907,6 +919,12 @@ skipped = true
907919
skipped = true
908920
[class.NSBezierPath.methods.appendBezierPathWithCGGlyphs_count_inFont]
909921
skipped = true
922+
[class.NSBezierPath.methods.bezierPathWithCGPath]
923+
skipped = true
924+
[class.NSBezierPath.methods.CGPath]
925+
skipped = true
926+
[class.NSBezierPath.methods.setCGPath]
927+
skipped = true
910928
[class.NSBitmapImageRep.methods.initWithCGImage]
911929
skipped = true
912930
[class.NSBitmapImageRep.methods.initWithCIImage]
@@ -1206,6 +1224,20 @@ skipped = true
12061224
skipped = true
12071225
[protocol.GCDevice.methods.setHandlerQueue]
12081226
skipped = true
1227+
# Needs `dispatch_queue_t`
1228+
[class.CLLocationUpdater.methods.liveUpdaterWithQueue_handler]
1229+
skipped = true
1230+
[class.CLLocationUpdater.methods.liveUpdaterWithConfiguration_queue_handler]
1231+
skipped = true
1232+
[class.CLMonitorConfiguration.methods.queue]
1233+
skipped = true
1234+
[class.CLMonitorConfiguration.methods.configWithMonitorName_queue_eventHandler]
1235+
skipped = true
1236+
# Needs `dispatch_queue_t`
1237+
[protocol.GCDevicePhysicalInput.methods.queue]
1238+
skipped = true
1239+
[protocol.GCDevicePhysicalInput.methods.setQueue]
1240+
skipped = true
12091241
# Needs `CFIndex` (fixed locally for now)
12101242
[typedef.GCKeyCode]
12111243
skipped = true
@@ -1222,11 +1254,33 @@ skipped = true
12221254
skipped = true
12231255
[class.SNClassificationResult.methods.timeRange]
12241256
skipped = true
1225-
# NEeds `CMTime`
1257+
[class._SFSpeechAnalyzer.methods.initWithClientIdentifier_inputSequence_audioFormat_transcriberResultDelegate_endpointingResultDelegate_queue_transcriberOptions_commandRecognizerOptions_options_restrictedLogging_geoLMRegionID_contextualNamedEntities_didChangeVolatileRange]
1258+
skipped = true
1259+
[class._SFTranscriberResult.methods.range]
1260+
skipped = true
1261+
[class._SFTranscriberResult.methods.initWithRange_normalizedTranscriberMultisegmentResult_normalizedCommandRecognizerResult_contextualizedTranscriberMultisegmentResult_contextualizedCommandRecognizerResult]
1262+
skipped = true
1263+
[class._STTranscriberMultisegmentResult.methods.recognitionAudioRange]
1264+
skipped = true
1265+
[class._STTranscriberMultisegmentResult.methods.initWithSegments_transcriptions_earResultType_nBestChoices_recognitionAudioRange]
1266+
skipped = true
1267+
[class._SFEndpointingResult.methods.range]
1268+
skipped = true
1269+
[class._SFEndpointingResult.methods.initWithRange_wordCount_eosLikelihood_pauseCounts_silencePosterior]
1270+
skipped = true
1271+
# Needs `CMTime`
12261272
[class.SNClassifySoundRequest.methods.setWindowDuration]
12271273
skipped = true
12281274
[class.SNClassifySoundRequest.methods.windowDuration]
12291275
skipped = true
1276+
[class._SFSpeechAnalyzer.methods.getNextBufferStartTimeWithCompletion]
1277+
skipped = true
1278+
[class._SFSpeechAnalyzer.methods.setDidChangeVolatileRange_completion]
1279+
skipped = true
1280+
[class._SFSpeechAnalyzer.methods.finalizeThrough_completion]
1281+
skipped = true
1282+
[class._SFSpeechAnalyzer.methods.finalizeAndFinishThrough_completion]
1283+
skipped = true
12301284
# Needs `SecAccessControlRef` from Security
12311285
[class.LAContext.methods.evaluateAccessControl_operation_localizedReason_reply]
12321286
skipped = true
@@ -1251,6 +1305,11 @@ skipped = true
12511305
skipped = true
12521306
[class.LAPublicKey.methods.verifyData_signature_secKeyAlgorithm_completion]
12531307
skipped = true
1308+
# Needs `SecKeyRef` from Security
1309+
[class.ASAuthorizationProviderExtensionLoginConfiguration.methods.loginRequestEncryptionPublicKey]
1310+
skipped = true
1311+
[class.ASAuthorizationProviderExtensionLoginConfiguration.methods.setLoginRequestEncryptionPublicKey]
1312+
skipped = true
12541313
# Needs `CGImagePropertyOrientation` from `ImageIO`
12551314
[class.PHLivePhotoEditingContext.methods.orientation]
12561315
skipped = true
@@ -1290,6 +1349,13 @@ skipped = true
12901349
[protocol.ASAuthorizationWebBrowserExternallyAuthenticatableRequest.methods]
12911350
authenticatedContext = { skipped = true }
12921351
setAuthenticatedContext = { skipped = true }
1352+
# Needs `pid_t`
1353+
[class.MXMetaData.methods.pid]
1354+
skipped = true
1355+
# Needs `nw_proxy_config_t`
1356+
[class.WKWebsiteDataStore.methods]
1357+
proxyConfigurations = { skipped = true }
1358+
setProxyConfigurations = { skipped = true }
12931359

12941360
# Uses a pointer to SEL, which doesn't implement Encode yet
12951361
[protocol.NSMenuDelegate.methods]
@@ -1551,6 +1617,10 @@ skipped = true
15511617
[static.GCInputRightPaddle]
15521618
skipped = true
15531619

1620+
# Uses GCInputButtonName
1621+
[fn.GCInputArcadeButtonName]
1622+
skipped = true
1623+
15541624
# tries to derive with `PartialEq` which fails because of `Bool` fields; manually define for now
15551625
[struct.GCExtendedGamepadSnapshotData]
15561626
skipped = true

crates/icrate/CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2424
be more efficient than the previous insertion methods.
2525

2626
### Changed
27+
* Updated SDK from Xcode 14.2 to 15.0.1.
28+
29+
View the release notes to learn more details:
30+
- [14.3](https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes)
31+
- [14.3.1](https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3_1-release-notes)
32+
- [15.0](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes)
33+
- [15.0.1](https://developer.apple.com/documentation/xcode-release-notes/xcode-15_0_1-release-notes)
34+
35+
Breaking changes are noted elsewhere in this changelog entry.
2736
* Moved the `ns_string!` macro to `icrate::Foundation::ns_string`. The old
2837
location in the crate root is deprecated.
29-
* Use SDK from Xcode 14.3.1 (previously Xcode 14.2).
3038
* **BREAKING**: The following two methods on
3139
`MTLAccelerationStructureCommandEncoder` now take a nullable scratch buffer:
3240
- `refitAccelerationStructure_descriptor_destination_scratchBuffer_scratchBufferOffset`
@@ -54,12 +62,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5462
`NS[Mutable]Dictionary::from_vec`.
5563
* **BREAKING**: Renamed `NSMutableDictionary::insert` and
5664
`NSMutableSet::insert` to `insert_id`.
65+
- **BREAKING**: `CWWiFiClient::interfaceNames` has been renamed to `CWWiFiClient::interfaceNames_class`.
5766

5867
### Removed
5968
* **BREAKING**: Removed the `MainThreadMarker` argument from the closure
6069
passed to `MainThreadBound::get_on_main`.
6170
* **BREAKING**: Removed `Foundation::CopyHelper` since it is superseded by
6271
`objc2::mutability::CounterpartOrSelf`.
72+
* **BREAKING**: Removed the following APIs, as they are no longer available in macOS 14 / iOS 17:
73+
- `NSFileProviderDomain::volumeUUID`
74+
- `CLBeaconIdentityConstraint::UUID`
75+
- `CLBeaconIdentityConstraint::major`
76+
- `CLBeaconIdentityConstraint::minor`
77+
- `ASIdentifierManager::clearAdvertisingIdentifier`
6378
* Removed private `MetricKit::_MXSignpostMetricsSnapshot` function.
6479

6580
### Fixed
@@ -77,6 +92,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7792
`AnyObject` instead of the correct `ProtocolObject<dyn NSCopying>`).
7893
* Update the minimum deployment target, which adds a few missing protocol
7994
implementations and methods for `NSPopover` and `NSLayoutAnchor`.
95+
- **BREAKING**: `CKSystemSharingUIObserver` and `CKLocationSortDescriptor` are no longer marked thread safe.
96+
- **BREAKING**: `NSColor::ignoresAlpha` now requires a main thread marker.
8097

8198

8299
## icrate 0.0.4 - 2023-07-31

0 commit comments

Comments
 (0)