Skip to content

Commit

Permalink
[StoreKit] Added support for Xcode 14.1 b1-b3 (#16026)
Browse files Browse the repository at this point in the history
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
  • Loading branch information
3 people authored Oct 5, 2022
1 parent e2c41bb commit 66ae01a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
10 changes: 10 additions & 0 deletions src/StoreKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,14 @@ public enum SKOverlayPosition : long {
SKOverlayPositionBottom = 0,
Raised = 1,
}

[NoMac, iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV]
public enum SKAdNetworkCoarseConversionValue {
[Field ("SKAdNetworkCoarseConversionValueHigh")]
High,
[Field ("SKAdNetworkCoarseConversionValueMedium")]
Medium,
[Field ("SKAdNetworkCoarseConversionValueLow")]
Low,
}
}
28 changes: 25 additions & 3 deletions src/storekit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
using NativeHandle = System.IntPtr;
#endif

#nullable enable

namespace StoreKit {

[ErrorDomain ("SKANErrorDomain")]
Expand Down Expand Up @@ -699,6 +701,10 @@ interface SKStoreProductParameterKey
[Field ("SKStoreProductParameterAdNetworkCampaignIdentifier")]
NSString AdNetworkCampaignIdentifier { get; }

[NoMac, iOS (16,0), MacCatalyst (16,0), NoWatch, NoTV]
[Field ("SKStoreProductParameterAdNetworkSourceIdentifier")]
NSString AdNetworkSourceIdentifier { get; }

[iOS (11,3), TV (11,3), NoMac]
[Field ("SKStoreProductParameterAdNetworkIdentifier")]
NSString AdNetworkIdentifier { get; }
Expand Down Expand Up @@ -995,21 +1001,33 @@ interface SKAdNetwork {
[Static]
[Async]
[Export ("startImpression:completionHandler:")]
void StartImpression (SKAdImpression impression, [NullAllowed] Action<NSError> completion);
void StartImpression (SKAdImpression impression, [NullAllowed] Action<NSError?> completion);

[NoWatch, NoTV, NoMac]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Static]
[Async]
[Export ("endImpression:completionHandler:")]
void EndImpression (SKAdImpression impression, [NullAllowed] Action<NSError> completion);
void EndImpression (SKAdImpression impression, [NullAllowed] Action<NSError?> completion);

[NoWatch, NoTV, NoMac, iOS (15,4), MacCatalyst (15,4)]
[Static]
[Async]
[Export ("updatePostbackConversionValue:completionHandler:")]
void UpdatePostback (nint conversionValue, [NullAllowed] Action<NSError> completion);
void UpdatePostback (nint conversionValue, [NullAllowed] Action<NSError?> completion);

[NoMac, iOS (16,1), MacCatalyst (16,1), NoWatch, NoTV]
[Static]
[Async]
[Export ("updatePostbackConversionValue:coarseValue:completionHandler:")]
void UpdatePostback (nint conversionValue, [BindAs (typeof (SKAdNetworkCoarseConversionValue))] NSString coarseValue, [NullAllowed] Action<NSError?> completion);

[NoMac, iOS (16,1), MacCatalyst (16,1), NoWatch, NoTV]
[Static]
[Async]
[Export ("updatePostbackConversionValue:coarseValue:lockWindow:completionHandler:")]
void UpdatePostback (nint conversionValue, [BindAs (typeof (SKAdNetworkCoarseConversionValue))] NSString coarseValue, bool lockWindow, [NullAllowed] Action<NSError?> completion);
}

[iOS (12,2)]
Expand Down Expand Up @@ -1297,6 +1315,10 @@ interface SKAdImpression {
[Export ("adCampaignIdentifier", ArgumentSemantic.Strong)]
NSNumber AdCampaignIdentifier { get; set; }

[NoMac, iOS (16, 0), MacCatalyst (16,0), NoWatch, NoTV]
[Export ("sourceIdentifier", ArgumentSemantic.Strong)]
NSNumber SourceIdentifier { get; set; }

[Export ("adImpressionIdentifier", ArgumentSemantic.Strong)]
string AdImpressionIdentifier { get; set; }

Expand Down
8 changes: 0 additions & 8 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-StoreKit.todo

This file was deleted.

8 changes: 0 additions & 8 deletions tests/xtro-sharpie/iOS-StoreKit.todo

This file was deleted.

4 comments on commit 66ae01a

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.