Skip to content

Commit bd107e4

Browse files
committed
Fix framework CI
- PDFKit is not available as a standalone framework before macOS 10.15. - iTunesLibrary has a different install name. - ExposureNotification is not actually available on Mac Catalyst, even though Apple's online documentation says it is. - Same for IntentsUI and watchOS. - Same for HealthKitUI and tvOS. - MediaSetup and ThreadNetwork isn't available on the Simulator.
1 parent f9a1d82 commit bd107e4

File tree

10 files changed

+26
-23
lines changed

10 files changed

+26
-23
lines changed

.github/workflows/ci.yml

+6-6
Large diffs are not rendered by default.

crates/header-translator/src/main.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,20 @@ fn update_ci(workspace_dir: &Path, config: &Config) -> io::Result<()> {
610610
.as_ref()
611611
.is_some_and(|v| VersionReq::parse("<=10.12").unwrap().matches(v))
612612
&& !uses_avf_audio(lib)
613+
// HACK: PDFKit requires linking Quartz on older systems.
614+
&& !["objc2-pdf-kit"].contains(&&*lib.krate)
615+
// HACK: iTunesLibrary has a different install name on older systems.
616+
&& !["objc2-itunes-library"].contains(&&*lib.krate)
613617
})?;
614618
writer(&mut ci, config, "FRAMEWORKS_MACOS_10_13", |lib| {
615619
lib.macos
616620
.as_ref()
617621
.is_some_and(|v| VersionReq::parse("<=10.13").unwrap().matches(v))
618622
&& !uses_avf_audio(lib)
623+
// HACK: PDFKit requires linking Quartz on older systems.
624+
&& !["objc2-pdf-kit"].contains(&&*lib.krate)
625+
// HACK: iTunesLibrary has a different install name on older systems.
626+
&& !["objc2-itunes-library"].contains(&&*lib.krate)
619627
})?;
620628
writer(&mut ci, config, "FRAMEWORKS_MACOS_11", |lib| {
621629
lib.macos
@@ -653,8 +661,8 @@ fn update_ci(workspace_dir: &Path, config: &Config) -> io::Result<()> {
653661
.is_some_and(|v| VersionReq::parse("<=17.0").unwrap().matches(v))
654662
// HACK: MLCompute and MetalFX are only available on Aarch64
655663
&& !["objc2-ml-compute", "objc2-metal-fx"].contains(&&*lib.krate)
656-
// HACK: Cinematic isn't available in the simulator.
657-
&& !["objc2-cinematic"].contains(&&*lib.krate)
664+
// HACK: Cinematic, MediaSetup, etc. aren't available in the simulator.
665+
&& !["objc2-cinematic", "objc2-media-setup", "objc2-thread-network"].contains(&&*lib.krate)
658666
})?;
659667
writer(&mut ci, config, "FRAMEWORKS_TVOS_17", |lib| {
660668
lib.tvos

crates/test-frameworks/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ objc2-foundation = { path = "../../framework-crates/objc2-foundation", optional
407407
objc2-game-kit = { path = "../../framework-crates/objc2-game-kit", optional = true }
408408
objc2-image-io = { path = "../../framework-crates/objc2-image-io", optional = true }
409409
objc2-intents = { path = "../../framework-crates/objc2-intents", optional = true }
410-
objc2-intents-ui = { path = "../../framework-crates/objc2-intents-ui", optional = true }
411410
objc2-map-kit = { path = "../../framework-crates/objc2-map-kit", optional = true }
412411
objc2-media-player = { path = "../../framework-crates/objc2-media-player", optional = true }
413412
objc2-natural-language = { path = "../../framework-crates/objc2-natural-language", optional = true }
@@ -529,6 +528,7 @@ objc2-external-accessory = { path = "../../framework-crates/objc2-external-acces
529528
objc2-game-controller = { path = "../../framework-crates/objc2-game-controller", optional = true }
530529
objc2-gameplay-kit = { path = "../../framework-crates/objc2-gameplay-kit", optional = true }
531530
objc2-io-surface = { path = "../../framework-crates/objc2-io-surface", optional = true }
531+
objc2-intents-ui = { path = "../../framework-crates/objc2-intents-ui", optional = true }
532532
objc2-javascript-core = { path = "../../framework-crates/objc2-javascript-core", optional = true }
533533
objc2-link-presentation = { path = "../../framework-crates/objc2-link-presentation", optional = true }
534534
objc2-media-accessibility = { path = "../../framework-crates/objc2-media-accessibility", optional = true }
@@ -571,8 +571,11 @@ objc2-core-location-ui = { path = "../../framework-crates/objc2-core-location-ui
571571
[target.'cfg(target_os = "visionos")'.dependencies]
572572
objc2-compositor-services = { path = "../../framework-crates/objc2-compositor-services", optional = true }
573573

574-
[target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))'.dependencies]
574+
[target.'cfg(any(target_os = "ios", target_os = "watchos", target_os = "visionos"))'.dependencies]
575575
objc2-health-kit-ui = { path = "../../framework-crates/objc2-health-kit-ui", optional = true }
576+
objc2-watch-connectivity = { path = "../../framework-crates/objc2-watch-connectivity", optional = true }
577+
578+
[target.'cfg(any(target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))'.dependencies]
576579
objc2-home-kit = { path = "../../framework-crates/objc2-home-kit", optional = true }
577580
objc2-ui-kit = { path = "../../framework-crates/objc2-ui-kit", optional = true }
578581

@@ -585,8 +588,5 @@ objc2-tv-ml-kit = { path = "../../framework-crates/objc2-tv-ml-kit", optional =
585588
objc2-tv-services = { path = "../../framework-crates/objc2-tv-services", optional = true }
586589
objc2-tv-ui-kit = { path = "../../framework-crates/objc2-tv-ui-kit", optional = true }
587590

588-
[target.'cfg(any(target_os = "ios", target_os = "watchos", target_os = "visionos"))'.dependencies]
589-
objc2-watch-connectivity = { path = "../../framework-crates/objc2-watch-connectivity", optional = true }
590-
591591
[target.'cfg(target_os = "watchos")'.dependencies]
592592
objc2-watch-kit = { path = "../../framework-crates/objc2-watch-kit", optional = true }

framework-crates/objc2-exposure-notification/Cargo.toml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
framework = "ExposureNotification"
22
crate = "objc2-exposure-notification"
33
required-crates = ["objc2", "objc2-foundation"]
4-
maccatalyst = "13.5"
4+
# maccatalyst = "13.5" # Documentation says it's available, but it seems to not be
55
ios = "13.5"

framework-crates/objc2-health-kit-ui/Cargo.toml

+1-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework-crates/objc2-health-kit-ui/translation-config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ crate = "objc2-health-kit-ui"
33
required-crates = ["objc2", "objc2-foundation", "objc2-ui-kit"]
44
maccatalyst = "17.0"
55
ios = "8.0"
6-
tvos = "10.0"
6+
# tvos = "10.0" # Not actually available on tvOS
77
watchos = "2.0"
88
visionos = "1.0"

framework-crates/objc2-intents-ui/Cargo.toml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework-crates/objc2-intents-ui/translation-config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ macos = "12.0"
55
maccatalyst = "13.0"
66
ios = "10.0"
77
tvos = "14.0"
8-
watchos = "3.2"
8+
# watchos = "3.2" # Documentation says it's available, but it seems to not be
99
visionos = "1.0"

0 commit comments

Comments
 (0)