Skip to content

Commit 86cee20

Browse files
authored
[OSAnalytics] Add OSALegacyXform class (#106)
1 parent 9eb830d commit 86cee20

3 files changed

Lines changed: 45 additions & 0 deletions

File tree

OSAnalytics/OSALegacyXform.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#import <Foundation/Foundation.h>
2+
3+
// Research based on iOS 18.4
4+
5+
NS_ASSUME_NONNULL_BEGIN
6+
7+
// MARK: Option keys
8+
9+
FOUNDATION_EXPORT NSString *const OSATransformOptionPersist API_AVAILABLE(ios(14.0)); // value is an NSNumber, wrapping a BOOL
10+
FOUNDATION_EXPORT NSString *const OSATransformOptionSymbolicate API_AVAILABLE(ios(14.0)); // value is an NSNumber, wrapper a BOOL
11+
12+
FOUNDATION_EXPORT NSString *const OSATransformOptionTracerURL API_AVAILABLE(ios(14.0)); // value is an NSURL
13+
FOUNDATION_EXPORT NSString *const OSATransformOptionTracerGroup API_AVAILABLE(ios(14.0)); // value is an NSString
14+
15+
FOUNDATION_EXPORT NSString *const OSATransformOptionMetadata API_AVAILABLE(ios(15.0)); // as far as I can tell, the value of this key is not used- only the presence of the key is used.
16+
FOUNDATION_EXPORT NSString *const OSATransformOptionFullReport API_AVAILABLE(ios(15.0)); // value is an NSNumber, wrapping a BOOL
17+
18+
// MARK: Result keys
19+
20+
FOUNDATION_EXPORT NSString *const OSATransformResultError API_AVAILABLE(ios(14.0)); // value is an NSError
21+
FOUNDATION_EXPORT NSString *const OSATransformResultFileURL API_AVAILABLE(ios(14.0)); // value is an NSURL
22+
FOUNDATION_EXPORT NSString *const OSATransformResultReport API_AVAILABLE(ios(14.0)); // value is an NSString
23+
FOUNDATION_EXPORT NSString *const OSATransformResultRadars API_AVAILABLE(ios(14.0));
24+
FOUNDATION_EXPORT NSString *const OSATransformResultTracerURL API_AVAILABLE(ios(14.0));
25+
FOUNDATION_EXPORT NSString *const OSATransformResultMetadata API_AVAILABLE(ios(15.0)); // value is an NSString (which is JSON)
26+
27+
NS_ASSUME_NONNULL_END
28+
29+
API_AVAILABLE(ios(14.0))
30+
@interface OSALegacyXform : NSObject
31+
32+
// technically you can pass `nil` to `url`, however you'll always get an error back.
33+
// `url` is not validated by the method, however it is expected to be a file URL
34+
+ (nonnull NSDictionary<NSString *, id> *)transformURL:(nonnull NSURL *)url options:(nullable NSDictionary<NSString *, id> *)options API_AVAILABLE(ios(15.0));
35+
36+
@end

OSAnalytics/OSAnalytics.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#import <OSAnalytics/OSALegacyXform.h>

OSAnalytics/module.modulemap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module OSAnalytics {
2+
umbrella header "OSAnalytics.h"
3+
4+
link framework "OSAnalytics"
5+
6+
export *
7+
module * { export * }
8+
}

0 commit comments

Comments
 (0)