ios-unity/purchase/Utilities.h
2023-07-20 15:28:40 +08:00

35 lines
1.0 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
See LICENSE folder for this samples licensing information.
Abstract:
Fetches identifiers from a resource file, provides the Purchases view's data source, and creates an alert.
*/
@import StoreKit;
#import "Section.h"
#if TARGET_OS_OSX
@import Cocoa;
#else
@import UIKit;
#endif
@interface Utilities : NSObject
/// - returns: An array that will be used to populate the Purchases view.
@property (NS_NONATOMIC_IOSONLY, readonly, assign) NSArray *dataSourceForPurchasesUI;
/// - returns: An array with the product identifiers to be queried.
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *identifiers;
/// Indicates whether the user has initiated a restore.
@property (nonatomic) BOOL restoreWasCalled;
#if TARGET_OS_IOS || TARGET_OS_TV
/// - returns: An alert with a given title and message.
-(UIAlertController *)alertWithTitle:(NSString *)title message:(NSString *)message;
#endif
/// - returns: A Section object matching the specified name in the data array.
-(Section *)parse:(NSArray *)data forName:(NSString *)name;
@end