Skip to content

Commit

Permalink
Update iOS 17.2 SDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
xybp888 committed Dec 12, 2023
1 parent 5d4caa8 commit 62c04a6
Show file tree
Hide file tree
Showing 9,248 changed files with 2,974,171 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
//
// SKAdTestPostback.h
// StoreKitTest
//
// Copyright © 2021 Apple Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
#import <StoreKit/StoreKitDefines.h>

NS_ASSUME_NONNULL_BEGIN

typedef NSString * SKAdTestPostbackVersion NS_TYPED_ENUM API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

SK_EXTERN SKAdTestPostbackVersion const SKAdTestPostbackVersion2_1 API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);
SK_EXTERN SKAdTestPostbackVersion const SKAdTestPostbackVersion2_2 API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);
SK_EXTERN SKAdTestPostbackVersion const SKAdTestPostbackVersion3_0 API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);
SK_EXTERN SKAdTestPostbackVersion const SKAdTestPostbackVersion4_0 API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

SK_EXTERN_CLASS API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos) @interface SKAdTestPostback : NSObject

/// Use this initializer to create a postback with the specified version and parameters.
/// Parameters that are not applicable to the specified version will be ignored.
/// Parameters that are mandatory for the specified version and not provided will result
/// in failure to create the postback.
- (nullable instancetype)initWithVersion:(SKAdTestPostbackVersion)version
adNetworkIdentifier:(NSString *)adNetworkIdentifier
adCampaignIdentifier:(NSInteger)adCampaignIdentifier
appStoreItemIdentifier:(NSInteger)appStoreItemIdentifier
sourceAppStoreItemIdentifier:(NSInteger)sourceAppStoreItemIdentifier
conversionValue:(NSInteger)conversionValue
fidelityType:(NSInteger)fidelityType
isRedownload:(BOOL)isRedownload
didWin:(BOOL)didWin
postbackURL:(NSString *)postbackURL API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

/// Use this initializer to create a postback with the specified version and parameters.
/// Parameters that are not applicable to the specified version will be ignored.
/// Parameters that are mandatory for the specified version and not provided will result
/// in failure to create the postback.
- (nullable instancetype)initWithVersion:(SKAdTestPostbackVersion)version
adNetworkIdentifier:(NSString *)adNetworkIdentifier
sourceIdentifier:(NSString *)sourceIdentifier
appStoreItemIdentifier:(NSInteger)appStoreItemIdentifier
sourceAppStoreItemIdentifier:(NSInteger)sourceAppStoreItemIdentifier
sourceDomain:(nullable NSString *)sourceDomain
fidelityType:(NSInteger)fidelityType
isRedownload:(BOOL)isRedownload
didWin:(BOOL)didWin
postbackURL:(NSString *)postbackURL API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

/// Use this initializer to create an array of 3 winning postbacks with the specified version and parameters.
/// Parameters that are not applicable to the specified version will be ignored.
/// Parameters that are mandatory for the specified version and not provided will result
/// in failure to create the postback.
+ (nullable NSArray <SKAdTestPostback *> *)winningPostbacksWithVersion:(SKAdTestPostbackVersion)version
adNetworkIdentifier:(NSString *)adNetworkIdentifier
sourceIdentifier:(NSString *)sourceIdentifier
appStoreItemIdentifier:(NSInteger)appStoreItemIdentifier
sourceAppStoreItemIdentifier:(NSInteger)sourceAppStoreItemIdentifier
sourceDomain:(nullable NSString *)sourceDomain
fidelityType:(NSInteger)fidelityType
isRedownload:(BOOL)isRedownload
postbackURL:(NSString *)postbackURL API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

- (instancetype)init NS_UNAVAILABLE;

+ (instancetype)new NS_UNAVAILABLE;

/// The version of SKAdNetwork being used.
@property (nonatomic, strong, readonly) SKAdTestPostbackVersion version;

/// The identifier for the ad network.
@property (nonatomic, strong, readonly) NSString *adNetworkIdentifier;

/// The ad campaign identifier.
@property (nonatomic, assign, readonly) NSInteger adCampaignIdentifier;

/// The source identifier.
@property (nonatomic, strong, readonly, nullable) NSString *sourceIdentifier API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

/// The App Store item identifier for the app.
@property (nonatomic, assign, readonly) NSInteger appStoreItemIdentifier;

/// The App Store item identifier for the source app.
@property (nonatomic, assign, readonly) NSInteger sourceAppStoreItemIdentifier;

/// The eTLD+1 representation of the source web page.
@property (nonatomic, strong, readonly, nullable) NSString *sourceDomain API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

/// The conversion value for this conversion.
@property (nonatomic, assign, readonly) NSInteger conversionValue;

/// The fine conversion value for this postback.
@property (nonatomic, assign, readonly) NSInteger fineConversionValue API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

/// The coarse conversion value for this postback.
@property (nonatomic, strong, readonly, nullable) SKAdNetworkCoarseConversionValue coarseConversionValue API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

/// A flag indicating whether this postback is registered or not.
@property (nonatomic, assign, readonly) BOOL isRegistered;

/// The transaction identifier for this postback.
@property (nonatomic, strong, readonly) NSString *transactionIdentifier;

/// The fidelity-type for this conversion.
@property (nonatomic, assign) NSInteger fidelityType;

/// Indication as to whether this conversion was for a redownload.
@property (nonatomic, assign, readonly) BOOL isRedownload;

/// Indication as to whether this was the winning conversion.
@property (nonatomic, assign, readonly) BOOL didWin;

/// The sequence index of the postback.
@property (nonatomic, assign, readonly) NSInteger postbackSequenceIndex API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos);

/// The URL to which the postback is to be sent.
@property (nonatomic, strong, readonly) NSString *postbackURL;

@end

SK_EXTERN_CLASS API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,tvos,visionos) __TVOS_PROHIBITED @interface SKAdTestPostbackResponse : NSObject

/// The error encountered, if any, while attempting to send this postback.
@property (nonatomic, strong, nullable) NSError *error;

/// A boolean flag indicating if this postback was sent successfully.
@property (nonatomic, assign) BOOL didSucceed;

/// The HTTP response received, if any, as a result of sending the postback.
@property (nonatomic, strong, nullable) NSHTTPURLResponse *httpResponse;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// SKAdTestSession.h
// StoreKitTest
//
// Copyright © 2021 Apple Inc. All rights reserved.
//

#import <StoreKit/StoreKit.h>

@class SKAdTestPostback;
@class SKAdTestPostbackResponse;

NS_ASSUME_NONNULL_BEGIN

typedef void (^SKANTestPostbackResponseHandler)(NSDictionary <NSString *, SKAdTestPostbackResponse *> * __nullable responseDict, NSError * __nullable error) API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,visionos) __TVOS_PROHIBITED;

SK_EXTERN_CLASS API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,tvos,watchos,visionos)
@interface SKAdTestSession : NSObject

#pragma mark - Methods

- (instancetype)init;

/// Use this method to validate an impression against the requirements that SKAdNetwork impressions
/// are expected to satisfy. This method is to be used for StoreKit rendered ads.
- (BOOL)validateImpressionWithParameters:(NSDictionary <NSString *, id> *)parameters publicKey:(NSString *)publicKey error:(NSError *__autoreleasing _Nullable *)error NS_SWIFT_NAME(validateImpression(parameters:publicKey:)) API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,visionos) __TVOS_PROHIBITED;

/// Use this method to validate an impression against the requirements that SKAdNetwork impressions
/// are expected to satisfy. This method is to be used for ViewThrough ads.
- (BOOL)validateImpression:(SKAdImpression *)impression publicKey:(NSString *)publicKey error:(NSError *__autoreleasing _Nullable *)error API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,visionos) __TVOS_PROHIBITED;

/// Use this method to validate an impression against the requirements that SKAdNetwork impressions
/// are expected to satisfy. This method is to be used for Web ads.
- (BOOL)validateWebAdImpressionPayload:(NSData *)impressionData publicKey:(NSString *)publicKey error:(NSError *__autoreleasing _Nullable *)error API_AVAILABLE(ios(16.4)) API_UNAVAILABLE(macos,watchos,visionos) __TVOS_PROHIBITED;

/// Use this method to set postbacks to interact with later.
- (BOOL)setPostbacks:(NSArray <SKAdTestPostback *> *)postbacks error:(NSError *__autoreleasing _Nullable *)error NS_SWIFT_NAME(setPostbacks(_:)) API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,visionos) __TVOS_PROHIBITED;

@property (nonatomic, strong, readonly) NSArray <SKAdTestPostback *> * postbacks;

@property (nonatomic, strong, readonly, nullable) NSURL *developerPostbackURL;

/// Use this method to send the test postbacks.
- (void)flushPostbacksWithResponses:(SKANTestPostbackResponseHandler)responses NS_SWIFT_ASYNC(1) API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,visionos) __TVOS_PROHIBITED;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// SKTestError.h
// StoreKitTest
//
// Copyright © 2020 Apple Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <StoreKit/StoreKitDefines.h>

NS_ASSUME_NONNULL_BEGIN

SK_EXTERN NSErrorDomain const SKTestErrorDomain API_AVAILABLE(ios(14.0), macos(11.0), tvos(14.0), watchos(7.0), visionos(1.0));

SK_EXTERN NSErrorDomain const SKAdTestErrorDomain API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos) __TVOS_PROHIBITED;

typedef NS_ERROR_ENUM(SKTestErrorDomain, SKTestErrorCode) {
SKTestErrorCodeServiceUnavailable = 0,
SKTestErrorCodeInvalidProductIdentifier = 1,
SKTestErrorCodeInvalidProductType = 2,
SKTestErrorCodeInvalidURL = 3,
SKTestErrorCodeFileNotFound = 4,
SKTestErrorCodeNoSubscriptionFound = 5,
SKTestErrorCodeNoTransactionFound = 6,
SKTestErrorCodeInvalidAction = 7
} API_AVAILABLE(ios(14.0), macos(11.0), tvos(14.0), watchos(7.0), visionos(1.0));

typedef NS_ERROR_ENUM(SKAdTestErrorDomain, SKAdTestErrorCode) {
SKAdTestErrorCodeSignatureMissingAdNetworkId = 0,
SKAdTestErrorCodeSignatureMissingCampaignId = 1,
SKAdTestErrorCodeSignatureMissingAppAdamId = 2,
SKAdTestErrorCodeSignatureMissingNonce = 3,
SKAdTestErrorCodeSignatureMissingSourceAppAdamId = 4,
SKAdTestErrorCodeSignatureMissingFidelityType = 5,
SKAdTestErrorCodeSignatureMissingTimestamp = 6,
SKAdTestErrorCodeSignatureVerificationFailed = 7,
SKAdTestErrorCodeSignatureInvalidKey = 8,
SKAdTestErrorCodeSignatureInvalidOrder = 9,
SKAdTestErrorCodeSignatureUnknownError = 10,
SKAdTestErrorCodeMisplacedWinnerPostback = 11,
SKAdTestErrorCodeInvalidRunnerUpPostback = 12,
SKAdTestErrorCodeInvalidConversionValue = 13,
SKAdTestErrorCodeMissingWinningPostback = 14,
SKAdTestErrorCodeMissingPostbacks = 15,
SKAdTestErrorCodeMalformedPostbacks = 16,
SKAdTestErrorCodeExcessivePostbacks = 17,
SKAdTestErrorCodeNoPendingPostbacks = 18,
SKAdTestErrorCodeInvalidPostbackURL = 19,
SKAdTestErrorCodeMissingSignature = 20,
SKAdTestErrorCodeUnknownError = 21,
SKAdTestErrorCodeSignatureMissingSourceIdentifier NS_ENUM_AVAILABLE_IOS(16_4) = 22,
SKAdTestErrorCodeInvalidVersion NS_ENUM_AVAILABLE_IOS(16_4) = 23,
SKAdTestErrorCodeInvalidCampaignId NS_ENUM_AVAILABLE_IOS(16_4) = 24,
SKAdTestErrorCodeInvalidSourceIdentifier NS_ENUM_AVAILABLE_IOS(16_4) = 25,
SKAdTestErrorCodeInvalidWinningPostbackCount NS_ENUM_AVAILABLE_IOS(16_4) = 26,
SKAdTestErrorCodeUnlinkedWinningPostbacks NS_ENUM_AVAILABLE_IOS(16_4) = 27,
SKAdTestErrorCodeConflictingSource NS_ENUM_AVAILABLE_IOS(16_4) = 28,
SKAdTestErrorCodeInvalidSourceAppAdamId NS_ENUM_AVAILABLE_IOS(16_4) = 29,
SKAdTestErrorCodeInvalidSourceDomain NS_ENUM_AVAILABLE_IOS(16_4) = 30,
SKAdTestErrorCodeInvalidImpressionId NS_ENUM_AVAILABLE_IOS(16_4) = 31,
SKAdTestErrorCodeSignatureMissingSourceDomain NS_ENUM_AVAILABLE_IOS(16_4) = 32,
} API_AVAILABLE(ios(15.4)) API_UNAVAILABLE(macos,watchos,visionos) __TVOS_PROHIBITED;

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 62c04a6

Please sign in to comment.