Skip to content

Commit

Permalink
Add HealthKit, MediaPlayer, MetricKit, PhotoKit frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanshade committed Feb 22, 2023
1 parent abf973e commit 60d2047
Show file tree
Hide file tree
Showing 15 changed files with 845 additions and 1 deletion.
8 changes: 8 additions & 0 deletions crates/header-translator/framework-includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@

#import <GameKit/GameKit.h>

#import <HealthKit/HealthKit.h>

#import <IdentityLookup/IdentityLookup.h>

#import <InputMethodKit/InputMethodKit.h>
Expand All @@ -75,12 +77,18 @@

#import <MapKit/MapKit.h>

#import <MediaPlayer/MediaPlayer.h>

#import <Metal/Metal.h>

#import <MetalFX/MetalFX.h>

#import <MetalKit/MetalKit.h>

#import <MetricKit/MetricKit.h>

#import <Photos/Photos.h>

#import <QuartzCore/CoreAnimation.h>

#import <SoundAnalysis/SoundAnalysis.h>
Expand Down
1 change: 1 addition & 0 deletions crates/header-translator/src/data/HealthKit.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data! {}
1 change: 1 addition & 0 deletions crates/header-translator/src/data/MediaPlayer.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data! {}
1 change: 1 addition & 0 deletions crates/header-translator/src/data/MetricKit.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data! {}
1 change: 1 addition & 0 deletions crates/header-translator/src/data/PhotoKit.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data! {}
4 changes: 4 additions & 0 deletions crates/header-translator/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,21 @@ data! {
mod Foundation;
mod GameController;
mod GameKit;
mod HealthKit;
mod IdentityLookup;
mod InputMethodKit;
mod LocalAuthentication;
mod LocalAuthenticationEmbeddedUI;
mod LinkPresentation;
mod MailKit;
mod MapKit;
mod MediaPlayer;
mod Metal;
mod MetalFX;
mod MetalKit;
mod MetricKit;
mod OSAKit;
mod PhotoKit;
mod SoundAnalysis;
mod Speech;
mod StoreKit;
Expand Down
77 changes: 77 additions & 0 deletions crates/header-translator/translation-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ ios = "3.0"
tvos = "9.0"
watchos = "3.0"

[library.HealthKit]
imports = ["CoreLocation", "Foundation", "UniformTypeIdentifiers"]
macos = "13.0"
maccatalyst = "13.0"
ios = "8.0"
watchos = "2.0"

[library.IdentityLookup]
imports = ["Foundation"]
macos = "10.15"
Expand Down Expand Up @@ -299,6 +306,14 @@ ios = "3.0"
tvos = "9.2"
watchos = "2.0"

[library.MediaPlayer]
imports = ["AppKit", "Foundation"]
macos = "10.12.1"
maccatalyst = "13.0"
ios = "2.0"
tvos = "9.0"
watchos = "5.0"

[library.Metal]
imports = ["Foundation"]
macos = "10.11"
Expand All @@ -324,6 +339,21 @@ maccatalyst = "13.0"
ios = "9.0"
tvos = "9.0"

[library.MetricKit]
imports = ["Foundation"]
macos = "12.0"
maccatalyst = "13.0"
ios = "13.0"

[library.Photos]
name = "PhotoKit"
imports = ["AppKit", "CoreLocation", "Foundation"]
macos = "10.11"
maccatalyst = "13.0"
ios = "8.0"
tvos = "10.0"
watchos = "9.0"

[library.OSAKit]
imports = ["AppKit", "Foundation"]
macos = "10.4"
Expand Down Expand Up @@ -1162,6 +1192,41 @@ skipped = true
skipped = true
[class.LAPublicKey.methods.verifyData_signature_secKeyAlgorithm_completion]
skipped = true
# Needs `CGImagePropertyOrientation` from `ImageIO`
[class.PHLivePhotoEditingContext.methods.orientation]
skipped = true
[class.PHImageManager.methods.requestImageDataAndOrientationForAsset_options_resultHandler]
skipped = true
# Needs `UIImageOrientation` from `UIKit`
[class.PHImageManager.methods.requestImageDataForAsset_options_resultHandler]
skipped = true
# Needs `CMTime` from `CoreMedia`
[class.PHLivePhotoEditingContext.methods.duration]
skipped = true
[class.PHLivePhotoEditingContext.methods.photoTime]
skipped = true
[protocol.PHLivePhotoFrame.methods.time]
skipped = true
# Needs `PHLivePhotoFrameProcessingBlock` (skipped because needs `CIImage`)
[class.PHLivePhotoEditingContext.methods.frameProcessor]
skipped = true
[class.PHLivePhotoEditingContext.methods.setFrameProcessor]
skipped = true
# Needs `CIImage` from `CoreImage`
[typedef.PHLivePhotoFrameProcessingBlock]
skipped = true
# Needs `dispatch_block_t`
[class.PHPhotoLibrary.methods.performChanges_completionHandler]
skipped = true
[class.PHPhotoLibrary.methods.performChangesAndWait_error]
skipped = true
# Needs `CMTimeRange` from `CoreMedia`
[class.MPAdTimeRange.methods.initWithTimeRange]
skipped = true
[class.MPAdTimeRange.methods.timeRange]
skipped = true
[class.MPAdTimeRange.methods.setTimeRange]
skipped = true

# Uses a pointer to SEL, which doesn't implement Encode yet
[protocol.NSMenuDelegate.methods]
Expand Down Expand Up @@ -1467,3 +1532,15 @@ skipped = true
# produces wrong values for most cases; manually define for now
[enum.LAError]
skipped = true

# fails to strip const from `typedef const NSString *const MXLaunchTaskID;`
[typedef.MXLaunchTaskID]
skipped = true
# fails to parse method argument with `MXLaunchTaskID`
[class.MXMetricManager.methods.extendLaunchMeasurementForTaskID_error]
skipped = true
[class.MXMetricManager.methods.finishExtendedLaunchMeasurementForTaskID_error]
skipped = true
# `os_log_t` not defined; skip for now
[class.MXMetricManager.methods.makeLogHandleWithCategory]
skipped = true
Loading

0 comments on commit 60d2047

Please sign in to comment.