Documentation
¶
Overview ¶
Package storekit provides a fluent Go API over the macOS StoreKit framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Errors ¶
Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.
Main-thread requirements ¶
Methods, setters, and constructors of classes Apple isolates to the main thread run there automatically; callers never need to arrange main-thread dispatch for the generated API.
Delegates ¶
A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- Payment: MutablePayment
- Request: ProductsRequest, ReceiptRefreshRequest
Index ¶
- Variables
- func ArcadeSubscriptionStatusWithNonceResultHandler(nonce uint64, ...)
- func CanMakePayments() bool
- func ContentURLForProductID(productID string) string
- func DeleteContentForProductID(productID string)
- func RegisterArcadeAppWithRandomFromLibRandomFromLibLengthResultHandler(randomFromLib []byte, randomFromLibLength uint32, ...)
- func RepairArcadeApp()
- func RequestAuthorization(completionHandler func(CloudServiceAuthorizationStatus))
- func RequestReview()
- func SKCloudServiceCapabilitiesDidChangeNotification() uintptr
- func SKDownloadTimeRemainingUnknown() float64
- func SKErrorDomain() obj.Object
- func SKReceiptPropertyIsExpired() obj.Object
- func SKReceiptPropertyIsRevoked() obj.Object
- func SKReceiptPropertyIsVolumePurchase() obj.Object
- func SKStoreProductParameterAdvertisingPartnerToken() obj.Object
- func SKStoreProductParameterAffiliateToken() obj.Object
- func SKStoreProductParameterCampaignToken() obj.Object
- func SKStoreProductParameterCustomProductPageIdentifier() obj.Object
- func SKStoreProductParameterITunesItemIdentifier() obj.Object
- func SKStoreProductParameterProductIdentifier() obj.Object
- func SKStoreProductParameterProviderToken() obj.Object
- func SKStorefrontCountryCodeDidChangeNotification() uintptr
- func SKStorefrontIdentifierDidChangeNotification() uintptr
- func SKTerminateForInvalidReceipt()
- type ArcadeService
- type CGLCPContextPriorityRequest
- type Clockid
- type CloudServiceAuthorizationStatusdeprecated
- type CloudServiceCapabilitydeprecated
- type CloudServiceController
- func (csc *CloudServiceController) Description() string
- func (csc *CloudServiceController) IsEqual(other obj.Object) bool
- func (csc *CloudServiceController) IsKind(className string) bool
- func (csc *CloudServiceController) RequestCapabilitiesWithCompletionHandler(completionHandler func(CloudServiceCapability, unsafe.Pointer))
- func (csc *CloudServiceController) RequestStorefrontCountryCode(ctx context.Context) (result string, err error)
- func (csc *CloudServiceController) RequestStorefrontIdentifier(ctx context.Context) (result string, err error)
- func (csc *CloudServiceController) RequestUserTokenForDeveloperToken(ctx context.Context, developerToken string) (result string, err error)
- func (csc *CloudServiceController) String() string
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type Download
- func (d *Download) ContentIdentifier() string
- func (d *Download) ContentLength() unsafe.Pointer
- func (d *Download) ContentURL() string
- func (d *Download) ContentVersion() string
- func (d *Download) Description() string
- func (d *Download) Error() unsafe.Pointer
- func (d *Download) ExpectedContentLength() int64
- func (d *Download) IsEqual(other obj.Object) bool
- func (d *Download) IsKind(className string) bool
- func (d *Download) Progress() float32
- func (d *Download) State() DownloadState
- func (d *Download) String() string
- func (d *Download) TimeRemaining() float64
- func (d *Download) Transaction() *PaymentTransaction
- type DownloadStatedeprecated
- type DownloaderExtension
- type EntryID
- type ErrorCode
- type EvCmd
- type FilesecProperty
- type Flag
- type Idtype
- type IpcInfoObjectType
- type LaunchDataType
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type MpoFlags
- type MutablePayment
- func (mp *MutablePayment) ProductIdentifier() string
- func (mp *MutablePayment) WithApplicationUsername(applicationUsername string) *MutablePayment
- func (mp *MutablePayment) WithPaymentDiscount(paymentDiscount *PaymentDiscount) *MutablePayment
- func (mp *MutablePayment) WithProductIdentifier(productIdentifier string) *MutablePayment
- func (mp *MutablePayment) WithQuantity(quantity int) *MutablePayment
- func (mp *MutablePayment) WithRequestData(requestData []byte) *MutablePayment
- func (mp *MutablePayment) WithSimulatesAskToBuyInSandbox(simulatesAskToBuyInSandbox bool) *MutablePayment
- type NXMouseButton
- type OSClockid
- type OSUnfairLockFlags
- type PMPageToPaperMappingType
- type Payment
- func (p *Payment) ApplicationUsername() string
- func (p *Payment) Description() string
- func (p *Payment) IsEqual(other obj.Object) bool
- func (p *Payment) IsKind(className string) bool
- func (p *Payment) PaymentDiscount() *PaymentDiscount
- func (p *Payment) Quantity() int
- func (p *Payment) RequestData() []byte
- func (p *Payment) SimulatesAskToBuyInSandbox() bool
- func (p *Payment) String() string
- type PaymentDiscount
- func (pd *PaymentDiscount) Description() string
- func (pd *PaymentDiscount) Identifier() string
- func (pd *PaymentDiscount) IsEqual(other obj.Object) bool
- func (pd *PaymentDiscount) IsKind(className string) bool
- func (pd *PaymentDiscount) KeyIdentifier() string
- func (pd *PaymentDiscount) Nonce() *foundation.UUID
- func (pd *PaymentDiscount) Signature() string
- func (pd *PaymentDiscount) String() string
- func (pd *PaymentDiscount) Timestamp() *foundation.Number
- type PaymentProvider
- type PaymentQueue
- func (pq *PaymentQueue) AddPayment(payment *Payment)
- func (pq *PaymentQueue) CancelDownloads(downloads []*Download)
- func (pq *PaymentQueue) Description() string
- func (pq *PaymentQueue) FinishTransaction(transaction *PaymentTransaction)
- func (pq *PaymentQueue) IsEqual(other obj.Object) bool
- func (pq *PaymentQueue) IsKind(className string) bool
- func (pq *PaymentQueue) PauseDownloads(downloads []*Download)
- func (pq *PaymentQueue) RestoreCompletedTransactions()
- func (pq *PaymentQueue) RestoreCompletedTransactionsWithApplicationUsername(username string)
- func (pq *PaymentQueue) ResumeDownloads(downloads []*Download)
- func (pq *PaymentQueue) StartDownloads(downloads []*Download)
- func (pq *PaymentQueue) Storefront() *Storefront
- func (pq *PaymentQueue) String() string
- func (pq *PaymentQueue) TransactionObservers() []obj.Object
- func (pq *PaymentQueue) Transactions() []*PaymentTransaction
- func (pq *PaymentQueue) WithDelegate(delegate PaymentQueueDelegate) *PaymentQueue
- type PaymentQueueDelegate
- type PaymentQueueDelegatePaymentQueueShouldContinueTransactionInStorefrontHandler
- type PaymentTransaction
- func (pt *PaymentTransaction) Description() string
- func (pt *PaymentTransaction) Downloads() []*Download
- func (pt *PaymentTransaction) Error() unsafe.Pointer
- func (pt *PaymentTransaction) IsEqual(other obj.Object) bool
- func (pt *PaymentTransaction) IsKind(className string) bool
- func (pt *PaymentTransaction) OriginalTransaction() *PaymentTransaction
- func (pt *PaymentTransaction) Payment() *Payment
- func (pt *PaymentTransaction) String() string
- func (pt *PaymentTransaction) TransactionDate() time.Time
- func (pt *PaymentTransaction) TransactionIdentifier() string
- type PaymentTransactionObserver
- type PaymentTransactionObserverPaymentQueueDidChangeStorefrontHandler
- type PaymentTransactionObserverPaymentQueueDidRevokeEntitlementsForProductIdentifiersHandler
- type PaymentTransactionObserverPaymentQueueRemovedTransactionsHandler
- type PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFailedWithErrorHandler
- type PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFinishedHandler
- type PaymentTransactionObserverPaymentQueueShouldAddStorePaymentForProductHandler
- type PaymentTransactionObserverPaymentQueueUpdatedDownloadsHandler
- type PaymentTransactionStatedeprecated
- type Perm
- type Product
- func (p *Product) ContentLengths() unsafe.Pointer
- func (p *Product) ContentVersion() unsafe.Pointer
- func (p *Product) Description() string
- func (p *Product) Discounts() []*ProductDiscount
- func (p *Product) DownloadContentLengths() []obj.Object
- func (p *Product) DownloadContentVersion() string
- func (p *Product) Downloadable() bool
- func (p *Product) IntroductoryPrice() *ProductDiscount
- func (p *Product) IsDownloadable() bool
- func (p *Product) IsEqual(other obj.Object) bool
- func (p *Product) IsFamilyShareable() bool
- func (p *Product) IsKind(className string) bool
- func (p *Product) LocalizedDescription() string
- func (p *Product) LocalizedTitle() string
- func (p *Product) Price() *foundation.DecimalNumber
- func (p *Product) PriceLocale() *foundation.Locale
- func (p *Product) ProductIdentifier() string
- func (p *Product) String() string
- func (p *Product) SubscriptionGroupIdentifier() string
- func (p *Product) SubscriptionPeriod() *ProductSubscriptionPeriod
- type ProductDiscount
- func (pd *ProductDiscount) Description() string
- func (pd *ProductDiscount) Identifier() string
- func (pd *ProductDiscount) IsEqual(other obj.Object) bool
- func (pd *ProductDiscount) IsKind(className string) bool
- func (pd *ProductDiscount) NumberOfPeriods() int
- func (pd *ProductDiscount) PaymentMode() ProductDiscountPaymentMode
- func (pd *ProductDiscount) Price() *foundation.DecimalNumber
- func (pd *ProductDiscount) PriceLocale() *foundation.Locale
- func (pd *ProductDiscount) String() string
- func (pd *ProductDiscount) SubscriptionPeriod() *ProductSubscriptionPeriod
- func (pd *ProductDiscount) Type() ProductDiscountType
- type ProductDiscountPaymentModedeprecated
- type ProductDiscountTypedeprecated
- type ProductPeriodUnitdeprecated
- type ProductStorePromotionController
- func (pspc *ProductStorePromotionController) Description() string
- func (pspc *ProductStorePromotionController) FetchStorePromotionOrder(ctx context.Context) (result obj.Object, err error)
- func (pspc *ProductStorePromotionController) FetchStorePromotionVisibilityForProductCompletionHandler(product *Product, ...)
- func (pspc *ProductStorePromotionController) IsEqual(other obj.Object) bool
- func (pspc *ProductStorePromotionController) IsKind(className string) bool
- func (pspc *ProductStorePromotionController) String() string
- func (pspc *ProductStorePromotionController) UpdateStorePromotionOrder(ctx context.Context, promotionOrder []*Product) error
- func (pspc *ProductStorePromotionController) UpdateStorePromotionVisibilityForProduct(ctx context.Context, promotionVisibility ProductStorePromotionVisibility, ...) error
- type ProductStorePromotionVisibilitydeprecated
- type ProductSubscriptionPeriod
- func (psp *ProductSubscriptionPeriod) Description() string
- func (psp *ProductSubscriptionPeriod) IsEqual(other obj.Object) bool
- func (psp *ProductSubscriptionPeriod) IsKind(className string) bool
- func (psp *ProductSubscriptionPeriod) NumberOfUnits() int
- func (psp *ProductSubscriptionPeriod) String() string
- func (psp *ProductSubscriptionPeriod) Unit() ProductPeriodUnit
- type ProductsRequest
- type ProductsRequestDelegate
- type ProductsResponse
- func (pr *ProductsResponse) Description() string
- func (pr *ProductsResponse) InvalidProductIdentifiers() []string
- func (pr *ProductsResponse) IsEqual(other obj.Object) bool
- func (pr *ProductsResponse) IsKind(className string) bool
- func (pr *ProductsResponse) Products() []*Product
- func (pr *ProductsResponse) String() string
- type PtrauthKey
- type QosClass
- type ReceiptRefreshRequest
- type Request
- type RequestDelegate
- type RequestDelegateRequestDidFailWithErrorHandler
- type RequestDelegateRequestDidFinishHandler
- type RequestProvider
- type StoreProductViewController
- func (spvc *StoreProductViewController) Description() string
- func (spvc *StoreProductViewController) IsEqual(other obj.Object) bool
- func (spvc *StoreProductViewController) IsKind(className string) bool
- func (spvc *StoreProductViewController) LoadProductWithParametersCompletionBlock(parameters map[string]obj.Object, block func(bool, unsafe.Pointer))
- func (spvc *StoreProductViewController) String() string
- func (spvc *StoreProductViewController) WithDelegate(delegate StoreProductViewControllerDelegate) *StoreProductViewController
- type StoreProductViewControllerDelegate
- type StoreProductViewControllerDelegateProductViewControllerDidFinishHandler
- type StoreReviewController
- type Storefront
- type Tag
- type Type
- type VirtualMemoryGuardExceptionCode
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
This section is empty.
Variables ¶
var ErrClientInvalid = errkit.New("SKErrorDomain", 1)
ErrClientInvalid matches the StoreKit error SKErrorClientInvalid.
var ErrCloudServiceNetworkConnectionFailed = errkit.New("SKErrorDomain", 7)
ErrCloudServiceNetworkConnectionFailed matches the StoreKit error SKErrorCloudServiceNetworkConnectionFailed.
var ErrCloudServicePermissionDenied = errkit.New("SKErrorDomain", 6)
ErrCloudServicePermissionDenied matches the StoreKit error SKErrorCloudServicePermissionDenied.
var ErrCloudServiceRevoked = errkit.New("SKErrorDomain", 8)
ErrCloudServiceRevoked matches the StoreKit error SKErrorCloudServiceRevoked.
var ErrIneligibleForOffer = errkit.New("SKErrorDomain", 18)
ErrIneligibleForOffer matches the StoreKit error SKErrorIneligibleForOffer.
var ErrInvalidOfferIdentifier = errkit.New("SKErrorDomain", 11)
ErrInvalidOfferIdentifier matches the StoreKit error SKErrorInvalidOfferIdentifier.
var ErrInvalidOfferPrice = errkit.New("SKErrorDomain", 14)
ErrInvalidOfferPrice matches the StoreKit error SKErrorInvalidOfferPrice.
var ErrInvalidSignature = errkit.New("SKErrorDomain", 12)
ErrInvalidSignature matches the StoreKit error SKErrorInvalidSignature.
var ErrMissingOfferParams = errkit.New("SKErrorDomain", 13)
ErrMissingOfferParams matches the StoreKit error SKErrorMissingOfferParams.
var ErrOverlayCancelled = errkit.New("SKErrorDomain", 15)
ErrOverlayCancelled matches the StoreKit error SKErrorOverlayCancelled.
var ErrPaymentCancelled = errkit.New("SKErrorDomain", 2)
ErrPaymentCancelled matches the StoreKit error SKErrorPaymentCancelled.
var ErrPaymentInvalid = errkit.New("SKErrorDomain", 3)
ErrPaymentInvalid matches the StoreKit error SKErrorPaymentInvalid.
var ErrPaymentMethodBindingConfigurationRequired = errkit.New("SKErrorDomain", 21)
ErrPaymentMethodBindingConfigurationRequired matches the StoreKit error SKErrorPaymentMethodBindingConfigurationRequired.
var ErrPaymentNotAllowed = errkit.New("SKErrorDomain", 4)
ErrPaymentNotAllowed matches the StoreKit error SKErrorPaymentNotAllowed.
var ErrPrivacyAcknowledgementRequired = errkit.New("SKErrorDomain", 9)
ErrPrivacyAcknowledgementRequired matches the StoreKit error SKErrorPrivacyAcknowledgementRequired.
var ErrStoreProductNotAvailable = errkit.New("SKErrorDomain", 5)
ErrStoreProductNotAvailable matches the StoreKit error SKErrorStoreProductNotAvailable.
ErrUnauthorizedRequestData matches the StoreKit error SKErrorUnauthorizedRequestData.
var ErrUnknown = errkit.New("SKErrorDomain", 0)
ErrUnknown matches the StoreKit error SKErrorUnknown.
var ErrUnsupportedPlatform = errkit.New("SKErrorDomain", 19)
ErrUnsupportedPlatform matches the StoreKit error SKErrorUnsupportedPlatform.
Functions ¶
func ArcadeSubscriptionStatusWithNonceResultHandler ¶ added in v0.18.0
func ArcadeSubscriptionStatusWithNonceResultHandler(nonce uint64, resultHandler func(obj.Object, uint32, obj.Object, uint32, unsafe.Pointer))
ArcadeSubscriptionStatusWithNonceResultHandler wraps the corresponding Objective-C method.
func CanMakePayments ¶ added in v0.17.0
func CanMakePayments() bool
CanMakePayments reports whether a method that indicates whether the person can make purchases.
func ContentURLForProductID ¶ added in v0.17.0
ContentURLForProductID returns the local location for the previously downloaded flie.
func DeleteContentForProductID ¶ added in v0.17.0
func DeleteContentForProductID(productID string)
DeleteContentForProductID deletes the previously downloaded file.
func RegisterArcadeAppWithRandomFromLibRandomFromLibLengthResultHandler ¶ added in v0.18.0
func RegisterArcadeAppWithRandomFromLibRandomFromLibLengthResultHandler(randomFromLib []byte, randomFromLibLength uint32, resultHandler func(obj.Object, uint32, obj.Object, uint32, unsafe.Pointer))
RegisterArcadeAppWithRandomFromLibRandomFromLibLengthResultHandler registers arcade app with random from lib random from lib length result handler.
func RepairArcadeApp ¶ added in v0.17.0
func RepairArcadeApp()
RepairArcadeApp wraps the corresponding Objective-C method.
func RequestAuthorization ¶ added in v0.18.0
func RequestAuthorization(completionHandler func(CloudServiceAuthorizationStatus))
RequestAuthorization asks the customer for permission to access the Music library on the device.
func RequestReview ¶ added in v0.17.0
func RequestReview()
RequestReview tells StoreKit to ask the customer to rate or review your app, if appropriate.
func SKCloudServiceCapabilitiesDidChangeNotification ¶
func SKCloudServiceCapabilitiesDidChangeNotification() uintptr
SKCloudServiceCapabilitiesDidChangeNotification returns the address of the symbol SKCloudServiceCapabilitiesDidChangeNotification.
func SKDownloadTimeRemainingUnknown ¶
func SKDownloadTimeRemainingUnknown() float64
SKDownloadTimeRemainingUnknown returns the value of the constant SKDownloadTimeRemainingUnknown.
func SKErrorDomain ¶
SKErrorDomain returns the string constant SKErrorDomain, for use as a dictionary key or argument.
func SKReceiptPropertyIsExpired ¶
SKReceiptPropertyIsExpired returns the string constant SKReceiptPropertyIsExpired, for use as a dictionary key or argument.
func SKReceiptPropertyIsRevoked ¶
SKReceiptPropertyIsRevoked returns the string constant SKReceiptPropertyIsRevoked, for use as a dictionary key or argument.
func SKReceiptPropertyIsVolumePurchase ¶
SKReceiptPropertyIsVolumePurchase returns the string constant SKReceiptPropertyIsVolumePurchase, for use as a dictionary key or argument.
func SKStoreProductParameterAdvertisingPartnerToken ¶
SKStoreProductParameterAdvertisingPartnerToken returns the string constant SKStoreProductParameterAdvertisingPartnerToken, for use as a dictionary key or argument.
func SKStoreProductParameterAffiliateToken ¶
SKStoreProductParameterAffiliateToken returns the string constant SKStoreProductParameterAffiliateToken, for use as a dictionary key or argument.
func SKStoreProductParameterCampaignToken ¶
SKStoreProductParameterCampaignToken returns the string constant SKStoreProductParameterCampaignToken, for use as a dictionary key or argument.
func SKStoreProductParameterCustomProductPageIdentifier ¶
SKStoreProductParameterCustomProductPageIdentifier returns the string constant SKStoreProductParameterCustomProductPageIdentifier, for use as a dictionary key or argument.
func SKStoreProductParameterITunesItemIdentifier ¶
SKStoreProductParameterITunesItemIdentifier returns the string constant SKStoreProductParameterITunesItemIdentifier, for use as a dictionary key or argument.
func SKStoreProductParameterProductIdentifier ¶
SKStoreProductParameterProductIdentifier returns the string constant SKStoreProductParameterProductIdentifier, for use as a dictionary key or argument.
func SKStoreProductParameterProviderToken ¶
SKStoreProductParameterProviderToken returns the string constant SKStoreProductParameterProviderToken, for use as a dictionary key or argument.
func SKStorefrontCountryCodeDidChangeNotification ¶
func SKStorefrontCountryCodeDidChangeNotification() uintptr
SKStorefrontCountryCodeDidChangeNotification returns the address of the symbol SKStorefrontCountryCodeDidChangeNotification.
func SKStorefrontIdentifierDidChangeNotification ¶
func SKStorefrontIdentifierDidChangeNotification() uintptr
SKStorefrontIdentifierDidChangeNotification returns the address of the symbol SKStorefrontIdentifierDidChangeNotification.
func SKTerminateForInvalidReceipt ¶
func SKTerminateForInvalidReceipt()
SKTerminateForInvalidReceipt calls the StoreKit framework function SKTerminateForInvalidReceipt.
Types ¶
type ArcadeService ¶ added in v0.17.0
ArcadeService is an idiomatic wrapper over the Objective-C class SKArcadeService.
func ArcadeServiceFromID ¶ added in v0.17.0
func ArcadeServiceFromID(id objc.ID) *ArcadeService
ArcadeServiceFromID adopts an existing Objective-C object as a ArcadeService (nil for 0), retaining it and registering a release finalizer.
func NewArcadeService ¶ added in v0.17.0
func NewArcadeService() *ArcadeService
NewArcadeService creates a new ArcadeService.
func (*ArcadeService) Description ¶ added in v0.17.0
func (as *ArcadeService) Description() string
Description returns the object's -description text.
func (*ArcadeService) IsEqual ¶ added in v0.17.0
func (as *ArcadeService) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ArcadeService) IsKind ¶ added in v0.17.0
func (as *ArcadeService) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ArcadeService) String ¶ added in v0.17.0
func (as *ArcadeService) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type CGLCPContextPriorityRequest ¶
type CGLCPContextPriorityRequest int32
const ( KCGLCPContextPriorityRequestHigh CGLCPContextPriorityRequest = 0 KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1 KCGLCPContextPriorityRequestLow CGLCPContextPriorityRequest = 2 )
func (CGLCPContextPriorityRequest) String ¶
func (e CGLCPContextPriorityRequest) String() string
String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.
type CloudServiceAuthorizationStatus
deprecated
added in
v0.17.0
type CloudServiceAuthorizationStatus int64
Constants that indicate the type of authorization the customer has for accessing the Music library.
Deprecated: Use MusicAuthorization.Status from MusicKit.
const ( // The authorization type cannot be determined. CloudServiceAuthorizationStatusNotDetermined CloudServiceAuthorizationStatus = 0 // The user does not authorize any access to their music library. CloudServiceAuthorizationStatusDenied CloudServiceAuthorizationStatus = 1 // Access to the music library is restricted in a way that the user cannot change, so your app should not prompt for authorization. An example of this situation is if the device is in an education mode. CloudServiceAuthorizationStatusRestricted CloudServiceAuthorizationStatus = 2 // The user authorizes playback of Apple Music tracks and the addition of tracks to their music library. CloudServiceAuthorizationStatusAuthorized CloudServiceAuthorizationStatus = 3 )
func AuthorizationStatus ¶ added in v0.17.0
func AuthorizationStatus() CloudServiceAuthorizationStatus
AuthorizationStatus returns the type of authorization the customer has for accessing the Music library on the device.
func (CloudServiceAuthorizationStatus) String ¶ added in v0.17.0
func (e CloudServiceAuthorizationStatus) String() string
String returns the CloudServiceAuthorizationStatus constant's name, or its numeric form when the value is not a known constant.
type CloudServiceCapability
deprecated
added in
v0.17.0
type CloudServiceCapability uint64
Constants that specify the current capabilities of the customer’s Music library on the device.
Deprecated: Use MusicSubscription from MusicKit. Bitmask — values may be combined with |.
const ( // The device does not allow playback of Apple Music content or the addition of tracks to the music library. // // Deprecated: Use MusicAuthorization.Status from MusicKit. CloudServiceCapabilityNone CloudServiceCapability = 0 // The device allows playback of Apple Music catalog tracks. CloudServiceCapabilityMusicCatalogPlayback CloudServiceCapability = 1 // The device allows subscription to the Apple Music catalog. // // Deprecated: Use the canBecomeSubscriber property of MusicSubscription from MusicKit. CloudServiceCapabilityMusicCatalogSubscriptionEligible CloudServiceCapability = 2 // The device allows tracks to be added to the user’s music library. // // Deprecated: Use the canBecomeSubscriber property of MusicSubscription from MusicKit. CloudServiceCapabilityAddToCloudMusicLibrary CloudServiceCapability = 256 )
func (CloudServiceCapability) String ¶ added in v0.17.0
func (e CloudServiceCapability) String() string
String returns the CloudServiceCapability constant's name, or its numeric form when the value is not a known constant.
type CloudServiceController ¶ added in v0.17.0
CloudServiceController is an idiomatic wrapper over the Objective-C class SKCloudServiceController.
An object that determines the current capabilities of a person’s Music library.
func CloudServiceControllerFromID ¶ added in v0.17.0
func CloudServiceControllerFromID(id objc.ID) *CloudServiceController
CloudServiceControllerFromID adopts an existing Objective-C object as a CloudServiceController (nil for 0), retaining it and registering a release finalizer.
func NewCloudServiceController ¶ added in v0.17.0
func NewCloudServiceController() *CloudServiceController
NewCloudServiceController creates a new CloudServiceController.
func (*CloudServiceController) Description ¶ added in v0.17.0
func (csc *CloudServiceController) Description() string
Description returns the object's -description text.
func (*CloudServiceController) IsEqual ¶ added in v0.17.0
func (csc *CloudServiceController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*CloudServiceController) IsKind ¶ added in v0.17.0
func (csc *CloudServiceController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*CloudServiceController) RequestCapabilitiesWithCompletionHandler ¶ added in v0.18.0
func (csc *CloudServiceController) RequestCapabilitiesWithCompletionHandler(completionHandler func(CloudServiceCapability, unsafe.Pointer))
RequestCapabilitiesWithCompletionHandler gets the current capabilities associated with the Music library on the device.
func (*CloudServiceController) RequestStorefrontCountryCode ¶ added in v0.17.0
func (csc *CloudServiceController) RequestStorefrontCountryCode(ctx context.Context) (result string, err error)
RequestStorefrontCountryCode gets the country code for the storefront associated with a customer’s iTunes account.
RequestStorefrontCountryCode blocks until the operation completes or ctx is cancelled.
func (*CloudServiceController) RequestStorefrontIdentifier ¶ added in v0.17.0
func (csc *CloudServiceController) RequestStorefrontIdentifier(ctx context.Context) (result string, err error)
RequestStorefrontIdentifier gets the device’s storefront identifier.
RequestStorefrontIdentifier blocks until the operation completes or ctx is cancelled.
func (*CloudServiceController) RequestUserTokenForDeveloperToken ¶ added in v0.17.0
func (csc *CloudServiceController) RequestUserTokenForDeveloperToken(ctx context.Context, developerToken string) (result string, err error)
RequestUserTokenForDeveloperToken returns a user token that you use to access personalized Apple Music content.
RequestUserTokenForDeveloperToken blocks until the operation completes or ctx is cancelled.
func (*CloudServiceController) String ¶ added in v0.17.0
func (csc *CloudServiceController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type DispatchAutoreleaseFrequency ¶ added in v0.17.0
type DispatchAutoreleaseFrequency uint64
const ( DispatchAutoreleaseFrequencyInherit DispatchAutoreleaseFrequency = 0 DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1 DispatchAutoreleaseFrequencyNever DispatchAutoreleaseFrequency = 2 )
func (DispatchAutoreleaseFrequency) String ¶ added in v0.17.0
func (e DispatchAutoreleaseFrequency) String() string
String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.
type DispatchBlockFlags ¶ added in v0.17.0
type DispatchBlockFlags uint64
Bitmask — values may be combined with |.
const ( DispatchBlockFlagsBarrier DispatchBlockFlags = 1 DispatchBlockFlagsDetached DispatchBlockFlags = 2 DispatchBlockFlagsAssignCurrent DispatchBlockFlags = 4 DispatchBlockFlagsNoQosClass DispatchBlockFlags = 8 DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16 DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32 )
func (DispatchBlockFlags) String ¶ added in v0.17.0
func (e DispatchBlockFlags) String() string
String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.
type Download ¶ added in v0.17.0
Download is an idiomatic wrapper over the Objective-C class SKDownload.
Downloadable content associated with a product.
func DownloadFromID ¶ added in v0.17.0
DownloadFromID adopts an existing Objective-C object as a Download (nil for 0), retaining it and registering a release finalizer.
func NewDownload ¶ added in v0.17.0
func NewDownload() *Download
NewDownload creates a new Download.
func (*Download) ContentIdentifier ¶ added in v0.17.0
ContentIdentifier returns the content identifier.
func (*Download) ContentLength ¶ added in v0.18.0
ContentLength returns the content length.
func (*Download) ContentURL ¶ added in v0.17.0
ContentURL returns the content URL.
func (*Download) ContentVersion ¶ added in v0.17.0
ContentVersion returns the content version.
func (*Download) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Download) ExpectedContentLength ¶ added in v0.17.0
ExpectedContentLength returns the expected content length.
func (*Download) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Download) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Download) State ¶ added in v0.17.0
func (d *Download) State() DownloadState
State returns the state.
func (*Download) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Download) TimeRemaining ¶ added in v0.17.0
TimeRemaining returns the time remaining.
func (*Download) Transaction ¶ added in v0.17.0
func (d *Download) Transaction() *PaymentTransaction
Transaction returns the transaction.
type DownloadState
deprecated
added in
v0.17.0
type DownloadState int64
The states that a download operation can be in.
Deprecated: Hosted content is no longer supported.
const ( // Indicates that the download has not started yet. DownloadStateWaiting DownloadState = 0 // Indicates that the content is currently being downloaded. DownloadStateActive DownloadState = 1 // Indicates that your app paused the download. DownloadStatePaused DownloadState = 2 // Indicates that the content was successfully downloaded. DownloadStateFinished DownloadState = 3 // Indicates that an error occurred while the file was being downloaded. DownloadStateFailed DownloadState = 4 // Indicates that your app canceled the download. DownloadStateCancelled DownloadState = 5 )
func (DownloadState) String ¶ added in v0.17.0
func (e DownloadState) String() string
String returns the DownloadState constant's name, or its numeric form when the value is not a known constant.
type DownloaderExtension ¶ added in v0.17.0
type DownloaderExtension interface {
}
DownloaderExtension is the Go form of the Objective-C protocol SKDownloaderExtension.
type ErrorCode ¶ added in v0.17.0
type ErrorCode int64
Error codes for StoreKit errors.
const ( ErrorUnknown ErrorCode = 0 ErrorClientInvalid ErrorCode = 1 ErrorPaymentCancelled ErrorCode = 2 ErrorPaymentInvalid ErrorCode = 3 ErrorPaymentNotAllowed ErrorCode = 4 ErrorStoreProductNotAvailable ErrorCode = 5 ErrorCloudServicePermissionDenied ErrorCode = 6 ErrorCloudServiceNetworkConnectionFailed ErrorCode = 7 ErrorCloudServiceRevoked ErrorCode = 8 ErrorPrivacyAcknowledgementRequired ErrorCode = 9 ErrorInvalidOfferIdentifier ErrorCode = 11 ErrorInvalidSignature ErrorCode = 12 ErrorMissingOfferParams ErrorCode = 13 ErrorInvalidOfferPrice ErrorCode = 14 ErrorOverlayCancelled ErrorCode = 15 ErrorIneligibleForOffer ErrorCode = 18 ErrorUnsupportedPlatform ErrorCode = 19 ErrorPaymentMethodBindingConfigurationRequired ErrorCode = 21 )
type FilesecProperty ¶ added in v0.17.0
type FilesecProperty int32
const ( FilesecPropertyOwner FilesecProperty = 1 FilesecPropertyGroup FilesecProperty = 2 FilesecPropertyUUID FilesecProperty = 3 FilesecPropertyMode FilesecProperty = 4 FilesecPropertyACL FilesecProperty = 5 FilesecPropertyGrpuuid FilesecProperty = 6 FilesecPropertyACLRaw FilesecProperty = 100 FilesecPropertyACLAllocsize FilesecProperty = 101 )
func (FilesecProperty) String ¶ added in v0.17.0
func (e FilesecProperty) String() string
String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.
type IpcInfoObjectType ¶ added in v0.17.0
type IpcInfoObjectType uint32
const ( IpcInfoObjectTypeNone IpcInfoObjectType = 0 IpcInfoObjectTypeThreadControl IpcInfoObjectType = 1 IpcInfoObjectTypeTaskControl IpcInfoObjectType = 2 IpcInfoObjectTypeHost IpcInfoObjectType = 3 IpcInfoObjectTypeHostPriv IpcInfoObjectType = 4 IpcInfoObjectTypeProcessor IpcInfoObjectType = 5 IpcInfoObjectTypeProcessorSet IpcInfoObjectType = 6 IpcInfoObjectTypeProcessorSetName IpcInfoObjectType = 7 IpcInfoObjectTypeTimer IpcInfoObjectType = 8 IpcInfoObjectTypePortSubstOnce IpcInfoObjectType = 9 IpcInfoObjectTypeMig IpcInfoObjectType = 10 IpcInfoObjectTypeMemoryObject IpcInfoObjectType = 11 IpcInfoObjectTypeXmmPager IpcInfoObjectType = 12 IpcInfoObjectTypeXmmKernel IpcInfoObjectType = 13 IpcInfoObjectTypeXmmReply IpcInfoObjectType = 14 IpcInfoObjectTypeUndReply IpcInfoObjectType = 15 IpcInfoObjectTypeHostNotify IpcInfoObjectType = 16 IpcInfoObjectTypeHostSecurity IpcInfoObjectType = 17 IpcInfoObjectTypeLedger IpcInfoObjectType = 18 IpcInfoObjectTypeMainDevice IpcInfoObjectType = 19 IpcInfoObjectTypeTaskName IpcInfoObjectType = 20 IpcInfoObjectTypeSubsystem IpcInfoObjectType = 21 IpcInfoObjectTypeIODoneQueue IpcInfoObjectType = 22 IpcInfoObjectTypeSemaphore IpcInfoObjectType = 23 IpcInfoObjectTypeLockSet IpcInfoObjectType = 24 IpcInfoObjectTypeClock IpcInfoObjectType = 25 IpcInfoObjectTypeClockCtrl IpcInfoObjectType = 26 IpcInfoObjectTypeIokitIdent IpcInfoObjectType = 27 IpcInfoObjectTypeNamedEntry IpcInfoObjectType = 28 IpcInfoObjectTypeIokitConnect IpcInfoObjectType = 29 IpcInfoObjectTypeIokitObject IpcInfoObjectType = 30 IpcInfoObjectTypeUpl IpcInfoObjectType = 31 IpcInfoObjectTypeMemObjControl IpcInfoObjectType = 32 IpcInfoObjectTypeAuSessionport IpcInfoObjectType = 33 IpcInfoObjectTypeFileport IpcInfoObjectType = 34 IpcInfoObjectTypeLabelh IpcInfoObjectType = 35 IpcInfoObjectTypeTaskResume IpcInfoObjectType = 36 IpcInfoObjectTypeVoucher IpcInfoObjectType = 37 IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38 IpcInfoObjectTypeWorkInterval IpcInfoObjectType = 39 IpcInfoObjectTypeUxHandler IpcInfoObjectType = 40 IpcInfoObjectTypeUextObject IpcInfoObjectType = 41 IpcInfoObjectTypeArcadeReg IpcInfoObjectType = 42 IpcInfoObjectTypeEventlink IpcInfoObjectType = 43 IpcInfoObjectTypeTaskInspect IpcInfoObjectType = 44 IpcInfoObjectTypeTaskRead IpcInfoObjectType = 45 IpcInfoObjectTypeThreadInspect IpcInfoObjectType = 46 IpcInfoObjectTypeThreadRead IpcInfoObjectType = 47 IpcInfoObjectTypeSuidCred IpcInfoObjectType = 48 IpcInfoObjectTypeHypervisor IpcInfoObjectType = 49 IpcInfoObjectTypeTaskIDToken IpcInfoObjectType = 50 IpcInfoObjectTypeTaskFatal IpcInfoObjectType = 51 IpcInfoObjectTypeKcdata IpcInfoObjectType = 52 IpcInfoObjectTypeExclavesResource IpcInfoObjectType = 53 IpcInfoObjectTypeThreadResume IpcInfoObjectType = 54 IpcInfoObjectTypeUnknown IpcInfoObjectType = 4294967295 )
func (IpcInfoObjectType) String ¶ added in v0.17.0
func (e IpcInfoObjectType) String() string
String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.
type LaunchDataType ¶ added in v0.17.0
type LaunchDataType int32
const ( LaunchDataTypeDictionary LaunchDataType = 1 LaunchDataTypeArray LaunchDataType = 2 LaunchDataTypeFd LaunchDataType = 3 LaunchDataTypeInteger LaunchDataType = 4 LaunchDataTypeReal LaunchDataType = 5 LaunchDataTypeBool LaunchDataType = 6 LaunchDataTypeString LaunchDataType = 7 LaunchDataTypeOpaque LaunchDataType = 8 LaunchDataTypeErrno LaunchDataType = 9 LaunchDataTypeMachport LaunchDataType = 10 )
func (LaunchDataType) String ¶ added in v0.17.0
func (e LaunchDataType) String() string
String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.
type MDLabelDomain ¶
type MDLabelDomain int32
These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int32
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int32
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlags ¶ added in v0.17.0
type MachVMRangeFlags uint64
Bitmask — values may be combined with |.
const (
MachVMRangeFlagsNone MachVMRangeFlags = 0
)
func (MachVMRangeFlags) String ¶ added in v0.17.0
func (e MachVMRangeFlags) String() string
String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlavor ¶ added in v0.17.0
type MachVMRangeFlavor uint32
const ( MachVMRangeFlavorInvalid MachVMRangeFlavor = 0 MachVMRangeFlavorV1 MachVMRangeFlavor = 1 )
func (MachVMRangeFlavor) String ¶ added in v0.17.0
func (e MachVMRangeFlavor) String() string
String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeTag ¶ added in v0.17.0
type MachVMRangeTag uint16
const ( MachVMRangeTagDefault MachVMRangeTag = 0 MachVMRangeTagData MachVMRangeTag = 1 MachVMRangeTagFixed MachVMRangeTag = 2 )
func (MachVMRangeTag) String ¶ added in v0.17.0
func (e MachVMRangeTag) String() string
String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.
type MpoFlags ¶ added in v0.17.0
type MpoFlags uint32
Bitmask — values may be combined with |.
const ( MpoFlagsPort MpoFlags = 0 MpoFlagsServicePort MpoFlags = 1024 MpoFlagsConnectionPort MpoFlags = 2048 MpoFlagsReplyPort MpoFlags = 4096 MpoFlagsWeakReplyPort MpoFlags = 16384 MpoFlagsNotificationPort MpoFlags = 17408 MpoFlagsExceptionPort MpoFlags = 32768 MpoFlagsConnectionPortWithPortArray MpoFlags = 65536 )
type MutablePayment ¶ added in v0.17.0
type MutablePayment struct {
Payment
}
MutablePayment is an idiomatic wrapper over the Objective-C class SKMutablePayment.
It embeds Payment, promoting that type's methods.
A mutable request to the App Store to process payment for additional functionality that your app offers.
func MutablePaymentFromID ¶ added in v0.17.0
func MutablePaymentFromID(id objc.ID) *MutablePayment
MutablePaymentFromID adopts an existing Objective-C object as a MutablePayment (nil for 0), retaining it and registering a release finalizer.
func NewMutablePayment ¶ added in v0.17.0
func NewMutablePayment() *MutablePayment
NewMutablePayment creates a new MutablePayment.
func (*MutablePayment) ProductIdentifier ¶ added in v0.17.0
func (mp *MutablePayment) ProductIdentifier() string
ProductIdentifier returns the product identifier.
func (*MutablePayment) WithApplicationUsername ¶ added in v0.17.0
func (mp *MutablePayment) WithApplicationUsername(applicationUsername string) *MutablePayment
WithApplicationUsername sets a string that associates the transaction with a user account on your service.
func (*MutablePayment) WithPaymentDiscount ¶ added in v0.17.0
func (mp *MutablePayment) WithPaymentDiscount(paymentDiscount *PaymentDiscount) *MutablePayment
WithPaymentDiscount sets the details of the discount offer to apply to the payment.
func (*MutablePayment) WithProductIdentifier ¶ added in v0.17.0
func (mp *MutablePayment) WithProductIdentifier(productIdentifier string) *MutablePayment
WithProductIdentifier sets a string that identifies a product that can be purchased from within your app.
func (*MutablePayment) WithQuantity ¶ added in v0.17.0
func (mp *MutablePayment) WithQuantity(quantity int) *MutablePayment
WithQuantity sets the number of items the user wants to purchase.
func (*MutablePayment) WithRequestData ¶ added in v0.17.0
func (mp *MutablePayment) WithRequestData(requestData []byte) *MutablePayment
WithRequestData sets reserved for future use.
func (*MutablePayment) WithSimulatesAskToBuyInSandbox ¶ added in v0.17.0
func (mp *MutablePayment) WithSimulatesAskToBuyInSandbox(simulatesAskToBuyInSandbox bool) *MutablePayment
WithSimulatesAskToBuyInSandbox sets a Boolean value that produces an “ask to buy” flow for this payment in the sandbox.
type NXMouseButton ¶
type NXMouseButton int32
const ( NX_OneButton NXMouseButton = 0 NX_LeftButton NXMouseButton = 1 NX_RightButton NXMouseButton = 2 )
func (NXMouseButton) String ¶
func (e NXMouseButton) String() string
String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.
type OSUnfairLockFlags ¶ added in v0.17.0
type OSUnfairLockFlags uint32
Bitmask — values may be combined with |.
const ( OSUnfairLockFlagsNone OSUnfairLockFlags = 0 OSUnfairLockFlagsAdaptiveSpin OSUnfairLockFlags = 262144 )
func (OSUnfairLockFlags) String ¶ added in v0.17.0
func (e OSUnfairLockFlags) String() string
String returns the OSUnfairLockFlags constant's name, or its numeric form when the value is not a known constant.
type PMPageToPaperMappingType ¶
type PMPageToPaperMappingType int32
const ( KPMPageToPaperMappingNone PMPageToPaperMappingType = 1 KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2 )
func (PMPageToPaperMappingType) String ¶
func (e PMPageToPaperMappingType) String() string
String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.
type Payment ¶ added in v0.17.0
Payment is an idiomatic wrapper over the Objective-C class SKPayment.
Payment is an abstract base — you do not construct it directly. Construct one of MutablePayment and pass it where a Payment is accepted.
A request to the App Store to process payment for additional functionality that your app offers.
func PaymentFromID ¶ added in v0.17.0
PaymentFromID adopts an existing Objective-C object as a Payment (nil for 0), retaining it and registering a release finalizer.
func PaymentWithProduct ¶ added in v0.17.0
PaymentWithProduct returns a new payment for the specified product.
func (*Payment) ApplicationUsername ¶ added in v0.17.0
ApplicationUsername returns the application username.
func (*Payment) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Payment) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Payment) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Payment) PaymentDiscount ¶ added in v0.17.0
func (p *Payment) PaymentDiscount() *PaymentDiscount
PaymentDiscount returns the payment discount.
func (*Payment) RequestData ¶ added in v0.17.0
RequestData returns the request data.
func (*Payment) SimulatesAskToBuyInSandbox ¶ added in v0.17.0
SimulatesAskToBuyInSandbox wraps the corresponding Objective-C method.
type PaymentDiscount ¶ added in v0.17.0
PaymentDiscount is an idiomatic wrapper over the Objective-C class SKPaymentDiscount.
The signed discount to apply to a payment.
func NewPaymentDiscountWithIdentifierKeyIdentifierNonceSignatureTimestamp ¶ added in v0.17.0
func NewPaymentDiscountWithIdentifierKeyIdentifierNonceSignatureTimestamp(identifier string, keyIdentifier string, nonce obj.Object, signature string, timestamp obj.Object) *PaymentDiscount
NewPaymentDiscountWithIdentifierKeyIdentifierNonceSignatureTimestamp initializes the payment discount with a signature and the parameters used by the signature.
func PaymentDiscountFromID ¶ added in v0.17.0
func PaymentDiscountFromID(id objc.ID) *PaymentDiscount
PaymentDiscountFromID adopts an existing Objective-C object as a PaymentDiscount (nil for 0), retaining it and registering a release finalizer.
func (*PaymentDiscount) Description ¶ added in v0.17.0
func (pd *PaymentDiscount) Description() string
Description returns the object's -description text.
func (*PaymentDiscount) Identifier ¶ added in v0.17.0
func (pd *PaymentDiscount) Identifier() string
Identifier returns the identifier.
func (*PaymentDiscount) IsEqual ¶ added in v0.17.0
func (pd *PaymentDiscount) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*PaymentDiscount) IsKind ¶ added in v0.17.0
func (pd *PaymentDiscount) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*PaymentDiscount) KeyIdentifier ¶ added in v0.17.0
func (pd *PaymentDiscount) KeyIdentifier() string
KeyIdentifier returns the key identifier.
func (*PaymentDiscount) Nonce ¶ added in v0.17.0
func (pd *PaymentDiscount) Nonce() *foundation.UUID
Nonce returns the nonce.
func (*PaymentDiscount) Signature ¶ added in v0.17.0
func (pd *PaymentDiscount) Signature() string
Signature returns the signature.
func (*PaymentDiscount) String ¶ added in v0.17.0
func (pd *PaymentDiscount) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*PaymentDiscount) Timestamp ¶ added in v0.17.0
func (pd *PaymentDiscount) Timestamp() *foundation.Number
Timestamp returns the timestamp.
type PaymentProvider ¶ added in v0.17.0
PaymentProvider is accepted wherever a SKPayment (or one of its subclasses) is expected.
type PaymentQueue ¶ added in v0.17.0
PaymentQueue is an idiomatic wrapper over the Objective-C class SKPaymentQueue.
A queue of payment transactions for the App Store to process.
func DefaultQueue ¶ added in v0.17.0
func DefaultQueue() *PaymentQueue
DefaultQueue returns the default payment queue instance.
func NewPaymentQueue ¶ added in v0.17.0
func NewPaymentQueue() *PaymentQueue
NewPaymentQueue creates a new PaymentQueue.
func PaymentQueueFromID ¶ added in v0.17.0
func PaymentQueueFromID(id objc.ID) *PaymentQueue
PaymentQueueFromID adopts an existing Objective-C object as a PaymentQueue (nil for 0), retaining it and registering a release finalizer.
func (*PaymentQueue) AddPayment ¶ added in v0.17.0
func (pq *PaymentQueue) AddPayment(payment *Payment)
AddPayment adds a payment request to the queue.
func (*PaymentQueue) CancelDownloads ¶ added in v0.17.0
func (pq *PaymentQueue) CancelDownloads(downloads []*Download)
CancelDownloads removes a set of downloads from the download list.
func (*PaymentQueue) Description ¶ added in v0.17.0
func (pq *PaymentQueue) Description() string
Description returns the object's -description text.
func (*PaymentQueue) FinishTransaction ¶ added in v0.17.0
func (pq *PaymentQueue) FinishTransaction(transaction *PaymentTransaction)
FinishTransaction notifies the App Store that the app finished processing the transaction.
func (*PaymentQueue) IsEqual ¶ added in v0.17.0
func (pq *PaymentQueue) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*PaymentQueue) IsKind ¶ added in v0.17.0
func (pq *PaymentQueue) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*PaymentQueue) PauseDownloads ¶ added in v0.17.0
func (pq *PaymentQueue) PauseDownloads(downloads []*Download)
PauseDownloads pauses a set of downloads.
func (*PaymentQueue) RestoreCompletedTransactions ¶ added in v0.17.0
func (pq *PaymentQueue) RestoreCompletedTransactions()
RestoreCompletedTransactions asks the payment queue to restore previously completed purchases.
func (*PaymentQueue) RestoreCompletedTransactionsWithApplicationUsername ¶ added in v0.17.0
func (pq *PaymentQueue) RestoreCompletedTransactionsWithApplicationUsername(username string)
RestoreCompletedTransactionsWithApplicationUsername asks the payment queue to restore previously completed purchases, providing an opaque identifier for the user’s account.
func (*PaymentQueue) ResumeDownloads ¶ added in v0.17.0
func (pq *PaymentQueue) ResumeDownloads(downloads []*Download)
ResumeDownloads resumes a set of downloads.
func (*PaymentQueue) StartDownloads ¶ added in v0.17.0
func (pq *PaymentQueue) StartDownloads(downloads []*Download)
StartDownloads adds a set of downloads to the download list.
func (*PaymentQueue) Storefront ¶ added in v0.17.0
func (pq *PaymentQueue) Storefront() *Storefront
Storefront returns the storefront.
func (*PaymentQueue) String ¶ added in v0.17.0
func (pq *PaymentQueue) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*PaymentQueue) TransactionObservers ¶ added in v0.17.0
func (pq *PaymentQueue) TransactionObservers() []obj.Object
TransactionObservers returns the transaction observers.
func (*PaymentQueue) Transactions ¶ added in v0.17.0
func (pq *PaymentQueue) Transactions() []*PaymentTransaction
Transactions returns the transactions.
Transactions returns the collection as a Go slice.
func (*PaymentQueue) WithDelegate ¶ added in v0.17.0
func (pq *PaymentQueue) WithDelegate(delegate PaymentQueueDelegate) *PaymentQueue
WithDelegate sets a delegate that provides information needed to complete transactions.
type PaymentQueueDelegate ¶ added in v0.17.0
type PaymentQueueDelegate interface {
}
PaymentQueueDelegate receives the callbacks of the Objective-C protocol SKPaymentQueueDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (PaymentQueueDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type PaymentQueueDelegatePaymentQueueShouldContinueTransactionInStorefrontHandler ¶ added in v0.17.0
type PaymentQueueDelegatePaymentQueueShouldContinueTransactionInStorefrontHandler interface {
PaymentQueueShouldContinueTransactionInStorefront(paymentQueue *PaymentQueue, transaction *PaymentTransaction, newStorefront *Storefront) bool
}
PaymentQueueDelegatePaymentQueueShouldContinueTransactionInStorefrontHandler is the optional SKPaymentQueueDelegate method paymentQueue:shouldContinueTransaction:inStorefront:. Implement it on a PaymentQueueDelegate value to receive that callback; a value without it is simply never sent one.
type PaymentTransaction ¶ added in v0.17.0
PaymentTransaction is an idiomatic wrapper over the Objective-C class SKPaymentTransaction.
An object in the payment queue.
func NewPaymentTransaction ¶ added in v0.17.0
func NewPaymentTransaction() *PaymentTransaction
NewPaymentTransaction creates a new PaymentTransaction.
func PaymentTransactionFromID ¶ added in v0.17.0
func PaymentTransactionFromID(id objc.ID) *PaymentTransaction
PaymentTransactionFromID adopts an existing Objective-C object as a PaymentTransaction (nil for 0), retaining it and registering a release finalizer.
func (*PaymentTransaction) Description ¶ added in v0.17.0
func (pt *PaymentTransaction) Description() string
Description returns the object's -description text.
func (*PaymentTransaction) Downloads ¶ added in v0.17.0
func (pt *PaymentTransaction) Downloads() []*Download
Downloads returns the downloads.
Downloads returns the collection as a Go slice.
func (*PaymentTransaction) Error ¶ added in v0.18.0
func (pt *PaymentTransaction) Error() unsafe.Pointer
Error returns the error.
func (*PaymentTransaction) IsEqual ¶ added in v0.17.0
func (pt *PaymentTransaction) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*PaymentTransaction) IsKind ¶ added in v0.17.0
func (pt *PaymentTransaction) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*PaymentTransaction) OriginalTransaction ¶ added in v0.17.0
func (pt *PaymentTransaction) OriginalTransaction() *PaymentTransaction
OriginalTransaction returns the original transaction.
func (*PaymentTransaction) Payment ¶ added in v0.17.0
func (pt *PaymentTransaction) Payment() *Payment
Payment returns the payment.
func (*PaymentTransaction) String ¶ added in v0.17.0
func (pt *PaymentTransaction) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*PaymentTransaction) TransactionDate ¶ added in v0.17.0
func (pt *PaymentTransaction) TransactionDate() time.Time
TransactionDate returns the transaction date.
func (*PaymentTransaction) TransactionIdentifier ¶ added in v0.17.0
func (pt *PaymentTransaction) TransactionIdentifier() string
TransactionIdentifier returns the transaction identifier.
type PaymentTransactionObserver ¶ added in v0.17.0
type PaymentTransactionObserver interface {
// PaymentQueueUpdatedTransactions wraps the corresponding Objective-C method.
PaymentQueueUpdatedTransactions(queue *PaymentQueue, transactions obj.Object)
}
PaymentTransactionObserver receives the callbacks of the Objective-C protocol SKPaymentTransactionObserver. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (PaymentTransactionObserver…Handler): implement the ones you need on the same value and the framework will call them too.
type PaymentTransactionObserverPaymentQueueDidChangeStorefrontHandler ¶ added in v0.17.0
type PaymentTransactionObserverPaymentQueueDidChangeStorefrontHandler interface {
PaymentQueueDidChangeStorefront(queue *PaymentQueue)
}
PaymentTransactionObserverPaymentQueueDidChangeStorefrontHandler is the optional SKPaymentTransactionObserver method paymentQueueDidChangeStorefront:. Implement it on a PaymentTransactionObserver value to receive that callback; a value without it is simply never sent one.
type PaymentTransactionObserverPaymentQueueDidRevokeEntitlementsForProductIdentifiersHandler ¶ added in v0.17.0
type PaymentTransactionObserverPaymentQueueDidRevokeEntitlementsForProductIdentifiersHandler interface {
PaymentQueueDidRevokeEntitlementsForProductIdentifiers(queue *PaymentQueue, productIdentifiers obj.Object)
}
PaymentTransactionObserverPaymentQueueDidRevokeEntitlementsForProductIdentifiersHandler is the optional SKPaymentTransactionObserver method paymentQueue:didRevokeEntitlementsForProductIdentifiers:. Implement it on a PaymentTransactionObserver value to receive that callback; a value without it is simply never sent one.
type PaymentTransactionObserverPaymentQueueRemovedTransactionsHandler ¶ added in v0.17.0
type PaymentTransactionObserverPaymentQueueRemovedTransactionsHandler interface {
PaymentQueueRemovedTransactions(queue *PaymentQueue, transactions obj.Object)
}
PaymentTransactionObserverPaymentQueueRemovedTransactionsHandler is the optional SKPaymentTransactionObserver method paymentQueue:removedTransactions:. Implement it on a PaymentTransactionObserver value to receive that callback; a value without it is simply never sent one.
type PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFailedWithErrorHandler ¶ added in v0.17.0
type PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFailedWithErrorHandler interface {
PaymentQueueRestoreCompletedTransactionsFailedWithError(queue *PaymentQueue, err error)
}
PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFailedWithErrorHandler is the optional SKPaymentTransactionObserver method paymentQueue:restoreCompletedTransactionsFailedWithError:. Implement it on a PaymentTransactionObserver value to receive that callback; a value without it is simply never sent one.
type PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFinishedHandler ¶ added in v0.17.0
type PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFinishedHandler interface {
PaymentQueueRestoreCompletedTransactionsFinished(queue *PaymentQueue)
}
PaymentTransactionObserverPaymentQueueRestoreCompletedTransactionsFinishedHandler is the optional SKPaymentTransactionObserver method paymentQueueRestoreCompletedTransactionsFinished:. Implement it on a PaymentTransactionObserver value to receive that callback; a value without it is simply never sent one.
type PaymentTransactionObserverPaymentQueueShouldAddStorePaymentForProductHandler ¶ added in v0.17.0
type PaymentTransactionObserverPaymentQueueShouldAddStorePaymentForProductHandler interface {
PaymentQueueShouldAddStorePaymentForProduct(queue *PaymentQueue, payment *Payment, product *Product) bool
}
PaymentTransactionObserverPaymentQueueShouldAddStorePaymentForProductHandler is the optional SKPaymentTransactionObserver method paymentQueue:shouldAddStorePayment:forProduct:. Implement it on a PaymentTransactionObserver value to receive that callback; a value without it is simply never sent one.
type PaymentTransactionObserverPaymentQueueUpdatedDownloadsHandler ¶ added in v0.17.0
type PaymentTransactionObserverPaymentQueueUpdatedDownloadsHandler interface {
PaymentQueueUpdatedDownloads(queue *PaymentQueue, downloads obj.Object)
}
PaymentTransactionObserverPaymentQueueUpdatedDownloadsHandler is the optional SKPaymentTransactionObserver method paymentQueue:updatedDownloads:. Implement it on a PaymentTransactionObserver value to receive that callback; a value without it is simply never sent one.
type PaymentTransactionState
deprecated
added in
v0.17.0
type PaymentTransactionState int64
Values representing the state of a transaction.
Deprecated: Use PurchaseResult from Product.purchase(confirmIn:options:).
const ( // A transaction that is being processed by the App Store. PaymentTransactionStatePurchasing PaymentTransactionState = 0 // A successfully processed transaction. PaymentTransactionStatePurchased PaymentTransactionState = 1 // A failed transaction. PaymentTransactionStateFailed PaymentTransactionState = 2 // A transaction that restores content previously purchased by the user. PaymentTransactionStateRestored PaymentTransactionState = 3 // A transaction that is in the queue, but its final status is pending external action such as Ask to Buy. // // Deprecated: Use PurchaseResult.pending from Product.purchase(confirmIn:options:). PaymentTransactionStateDeferred PaymentTransactionState = 4 )
func (PaymentTransactionState) String ¶ added in v0.17.0
func (e PaymentTransactionState) String() string
String returns the PaymentTransactionState constant's name, or its numeric form when the value is not a known constant.
type Perm ¶ added in v0.17.0
type Perm int32
const ( PermReadData Perm = 2 PermListDirectory Perm = 2 PermWriteData Perm = 4 PermAddFile Perm = 4 PermExecute Perm = 8 PermSearch Perm = 8 PermDelete Perm = 16 PermAppendData Perm = 32 PermAddSubdirectory Perm = 32 PermDeleteChild Perm = 64 PermReadAttributes Perm = 128 PermWriteAttributes Perm = 256 PermReadExtattributes Perm = 512 PermWriteExtattributes Perm = 1024 PermReadSecurity Perm = 2048 PermWriteSecurity Perm = 4096 PermChangeOwner Perm = 8192 PermSynchronize Perm = 1048576 )
type Product ¶ added in v0.17.0
Product is an idiomatic wrapper over the Objective-C class SKProduct.
Information about a registered product in App Store Connect.
func ProductFromID ¶ added in v0.17.0
ProductFromID adopts an existing Objective-C object as a Product (nil for 0), retaining it and registering a release finalizer.
func (*Product) ContentLengths ¶ added in v0.18.0
ContentLengths returns the content lengths.
func (*Product) ContentVersion ¶ added in v0.18.0
ContentVersion returns the content version.
func (*Product) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Product) Discounts ¶ added in v0.17.0
func (p *Product) Discounts() []*ProductDiscount
Discounts returns the discounts.
Discounts returns the collection as a Go slice.
func (*Product) DownloadContentLengths ¶ added in v0.17.0
DownloadContentLengths returns the download content lengths.
DownloadContentLengths returns the collection as a Go slice.
func (*Product) DownloadContentVersion ¶ added in v0.17.0
DownloadContentVersion returns the download content version.
func (*Product) Downloadable ¶ added in v0.17.0
Downloadable wraps the corresponding Objective-C method.
func (*Product) IntroductoryPrice ¶ added in v0.17.0
func (p *Product) IntroductoryPrice() *ProductDiscount
IntroductoryPrice returns the introductory price.
func (*Product) IsDownloadable ¶ added in v0.17.0
IsDownloadable reports whether the object is downloadable.
func (*Product) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Product) IsFamilyShareable ¶ added in v0.17.0
IsFamilyShareable reports whether the object is family shareable.
func (*Product) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Product) LocalizedDescription ¶ added in v0.17.0
LocalizedDescription returns the localized description.
func (*Product) LocalizedTitle ¶ added in v0.17.0
LocalizedTitle returns the localized title.
func (*Product) Price ¶ added in v0.17.0
func (p *Product) Price() *foundation.DecimalNumber
Price returns the price.
func (*Product) PriceLocale ¶ added in v0.17.0
func (p *Product) PriceLocale() *foundation.Locale
PriceLocale returns the price locale.
func (*Product) ProductIdentifier ¶ added in v0.17.0
ProductIdentifier returns the product identifier.
func (*Product) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Product) SubscriptionGroupIdentifier ¶ added in v0.17.0
SubscriptionGroupIdentifier returns the subscription group identifier.
func (*Product) SubscriptionPeriod ¶ added in v0.17.0
func (p *Product) SubscriptionPeriod() *ProductSubscriptionPeriod
SubscriptionPeriod returns the subscription period.
type ProductDiscount ¶ added in v0.17.0
ProductDiscount is an idiomatic wrapper over the Objective-C class SKProductDiscount.
The details of an introductory offer or a promotional offer for an auto-renewable subscription.
func NewProductDiscount ¶ added in v0.17.0
func NewProductDiscount() *ProductDiscount
NewProductDiscount creates a new ProductDiscount.
func ProductDiscountFromID ¶ added in v0.17.0
func ProductDiscountFromID(id objc.ID) *ProductDiscount
ProductDiscountFromID adopts an existing Objective-C object as a ProductDiscount (nil for 0), retaining it and registering a release finalizer.
func (*ProductDiscount) Description ¶ added in v0.17.0
func (pd *ProductDiscount) Description() string
Description returns the object's -description text.
func (*ProductDiscount) Identifier ¶ added in v0.17.0
func (pd *ProductDiscount) Identifier() string
Identifier returns the identifier.
func (*ProductDiscount) IsEqual ¶ added in v0.17.0
func (pd *ProductDiscount) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ProductDiscount) IsKind ¶ added in v0.17.0
func (pd *ProductDiscount) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ProductDiscount) NumberOfPeriods ¶ added in v0.17.0
func (pd *ProductDiscount) NumberOfPeriods() int
NumberOfPeriods returns the number of periods.
func (*ProductDiscount) PaymentMode ¶ added in v0.17.0
func (pd *ProductDiscount) PaymentMode() ProductDiscountPaymentMode
PaymentMode returns the payment mode.
func (*ProductDiscount) Price ¶ added in v0.17.0
func (pd *ProductDiscount) Price() *foundation.DecimalNumber
Price returns the price.
func (*ProductDiscount) PriceLocale ¶ added in v0.17.0
func (pd *ProductDiscount) PriceLocale() *foundation.Locale
PriceLocale returns the price locale.
func (*ProductDiscount) String ¶ added in v0.17.0
func (pd *ProductDiscount) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ProductDiscount) SubscriptionPeriod ¶ added in v0.17.0
func (pd *ProductDiscount) SubscriptionPeriod() *ProductSubscriptionPeriod
SubscriptionPeriod returns the subscription period.
func (*ProductDiscount) Type ¶ added in v0.17.0
func (pd *ProductDiscount) Type() ProductDiscountType
Type returns the type.
type ProductDiscountPaymentMode
deprecated
added in
v0.17.0
type ProductDiscountPaymentMode uint64
Values representing the payment modes for a product discount.
Deprecated: Use Product.SubscriptionOffer.PaymentMode.
const ( ProductDiscountPaymentModePayAsYouGo ProductDiscountPaymentMode = 0 ProductDiscountPaymentModePayUpFront ProductDiscountPaymentMode = 1 ProductDiscountPaymentModeFreeTrial ProductDiscountPaymentMode = 2 )
func (ProductDiscountPaymentMode) String ¶ added in v0.17.0
func (e ProductDiscountPaymentMode) String() string
String returns the ProductDiscountPaymentMode constant's name, or its numeric form when the value is not a known constant.
type ProductDiscountType
deprecated
added in
v0.17.0
type ProductDiscountType uint64
Values representing the types of discount offers an app can present.
Deprecated: Use Product.SubscriptionOffer.OfferType.
const ( // Deprecated: Use Product.SubscriptionOffer.PaymentMode. ProductDiscountTypeIntroductory ProductDiscountType = 0 // Deprecated: Use Product.SubscriptionOffer.PaymentMode. ProductDiscountTypeSubscription ProductDiscountType = 1 )
func (ProductDiscountType) String ¶ added in v0.17.0
func (e ProductDiscountType) String() string
String returns the ProductDiscountType constant's name, or its numeric form when the value is not a known constant.
type ProductPeriodUnit
deprecated
added in
v0.17.0
type ProductPeriodUnit uint64
Values representing the duration of an interval, from a day up to a year.
Deprecated: Use Product.SubscriptionPeriod.Unit.
const ( ProductPeriodUnitDay ProductPeriodUnit = 0 ProductPeriodUnitWeek ProductPeriodUnit = 1 ProductPeriodUnitMonth ProductPeriodUnit = 2 ProductPeriodUnitYear ProductPeriodUnit = 3 )
func (ProductPeriodUnit) String ¶ added in v0.17.0
func (e ProductPeriodUnit) String() string
String returns the ProductPeriodUnit constant's name, or its numeric form when the value is not a known constant.
type ProductStorePromotionController ¶ added in v0.17.0
ProductStorePromotionController is an idiomatic wrapper over the Objective-C class SKProductStorePromotionController.
A product promotion controller for customizing the order and visibility of In-App Purchases per device.
func DefaultController ¶ added in v0.17.0
func DefaultController() *ProductStorePromotionController
DefaultController returns the default product store promotion controller.
func NewProductStorePromotionController ¶ added in v0.17.0
func NewProductStorePromotionController() *ProductStorePromotionController
NewProductStorePromotionController creates a new ProductStorePromotionController.
func ProductStorePromotionControllerFromID ¶ added in v0.17.0
func ProductStorePromotionControllerFromID(id objc.ID) *ProductStorePromotionController
ProductStorePromotionControllerFromID adopts an existing Objective-C object as a ProductStorePromotionController (nil for 0), retaining it and registering a release finalizer.
func (*ProductStorePromotionController) Description ¶ added in v0.17.0
func (pspc *ProductStorePromotionController) Description() string
Description returns the object's -description text.
func (*ProductStorePromotionController) FetchStorePromotionOrder ¶ added in v0.17.0
func (pspc *ProductStorePromotionController) FetchStorePromotionOrder(ctx context.Context) (result obj.Object, err error)
FetchStorePromotionOrder reads the product order override that determines the promoted product order on this device.
FetchStorePromotionOrder blocks until the operation completes or ctx is cancelled.
func (*ProductStorePromotionController) FetchStorePromotionVisibilityForProductCompletionHandler ¶ added in v0.18.0
func (pspc *ProductStorePromotionController) FetchStorePromotionVisibilityForProductCompletionHandler(product *Product, completionHandler func(ProductStorePromotionVisibility, unsafe.Pointer))
FetchStorePromotionVisibilityForProductCompletionHandler reads the visibility setting of a promoted product in the App Store for this device.
func (*ProductStorePromotionController) IsEqual ¶ added in v0.17.0
func (pspc *ProductStorePromotionController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ProductStorePromotionController) IsKind ¶ added in v0.17.0
func (pspc *ProductStorePromotionController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ProductStorePromotionController) String ¶ added in v0.17.0
func (pspc *ProductStorePromotionController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ProductStorePromotionController) UpdateStorePromotionOrder ¶ added in v0.17.0
func (pspc *ProductStorePromotionController) UpdateStorePromotionOrder(ctx context.Context, promotionOrder []*Product) error
UpdateStorePromotionOrder overrides the promoted product order on this device.
UpdateStorePromotionOrder blocks until the operation completes or ctx is cancelled.
func (*ProductStorePromotionController) UpdateStorePromotionVisibilityForProduct ¶ added in v0.17.0
func (pspc *ProductStorePromotionController) UpdateStorePromotionVisibilityForProduct(ctx context.Context, promotionVisibility ProductStorePromotionVisibility, product *Product) error
UpdateStorePromotionVisibilityForProduct updates the visibility of the product on the App Store, per device.
UpdateStorePromotionVisibilityForProduct blocks until the operation completes or ctx is cancelled.
type ProductStorePromotionVisibility
deprecated
added in
v0.17.0
type ProductStorePromotionVisibility int64
The visibility settings that determine if an in-app purchase is visible on a device.
Deprecated: Use Product.PromotionInfo.Visibility.
const ( // Indicates product visibility is the same as the default value set in App Store Connect. ProductStorePromotionVisibilityDefault ProductStorePromotionVisibility = 0 // Indicates product is shown. ProductStorePromotionVisibilityShow ProductStorePromotionVisibility = 1 // Indicates product is hidden. ProductStorePromotionVisibilityHide ProductStorePromotionVisibility = 2 )
func (ProductStorePromotionVisibility) String ¶ added in v0.17.0
func (e ProductStorePromotionVisibility) String() string
String returns the ProductStorePromotionVisibility constant's name, or its numeric form when the value is not a known constant.
type ProductSubscriptionPeriod ¶ added in v0.17.0
ProductSubscriptionPeriod is an idiomatic wrapper over the Objective-C class SKProductSubscriptionPeriod.
An object containing the subscription period duration information.
func NewProductSubscriptionPeriod ¶ added in v0.17.0
func NewProductSubscriptionPeriod() *ProductSubscriptionPeriod
NewProductSubscriptionPeriod creates a new ProductSubscriptionPeriod.
func ProductSubscriptionPeriodFromID ¶ added in v0.17.0
func ProductSubscriptionPeriodFromID(id objc.ID) *ProductSubscriptionPeriod
ProductSubscriptionPeriodFromID adopts an existing Objective-C object as a ProductSubscriptionPeriod (nil for 0), retaining it and registering a release finalizer.
func (*ProductSubscriptionPeriod) Description ¶ added in v0.17.0
func (psp *ProductSubscriptionPeriod) Description() string
Description returns the object's -description text.
func (*ProductSubscriptionPeriod) IsEqual ¶ added in v0.17.0
func (psp *ProductSubscriptionPeriod) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ProductSubscriptionPeriod) IsKind ¶ added in v0.17.0
func (psp *ProductSubscriptionPeriod) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ProductSubscriptionPeriod) NumberOfUnits ¶ added in v0.17.0
func (psp *ProductSubscriptionPeriod) NumberOfUnits() int
NumberOfUnits returns the number of units.
func (*ProductSubscriptionPeriod) String ¶ added in v0.17.0
func (psp *ProductSubscriptionPeriod) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ProductSubscriptionPeriod) Unit ¶ added in v0.17.0
func (psp *ProductSubscriptionPeriod) Unit() ProductPeriodUnit
Unit returns the unit.
type ProductsRequest ¶ added in v0.17.0
type ProductsRequest struct {
Request
}
ProductsRequest is an idiomatic wrapper over the Objective-C class SKProductsRequest.
It embeds Request, promoting that type's methods.
An object that can retrieve localized information from the App Store about a specified list of products.
func NewProductsRequestWithProductIdentifiers ¶ added in v0.17.0
func NewProductsRequestWithProductIdentifiers(productIdentifiers []string) *ProductsRequest
NewProductsRequestWithProductIdentifiers initializes the request with the set of product identifiers.
func ProductsRequestFromID ¶ added in v0.17.0
func ProductsRequestFromID(id objc.ID) *ProductsRequest
ProductsRequestFromID adopts an existing Objective-C object as a ProductsRequest (nil for 0), retaining it and registering a release finalizer.
func (*ProductsRequest) WithDelegate ¶ added in v0.17.0
func (pr *ProductsRequest) WithDelegate(delegate RequestDelegate) *ProductsRequest
WithDelegate sets the delegate of the request object.
type ProductsRequestDelegate ¶ added in v0.17.0
type ProductsRequestDelegate interface {
// ProductsRequestDidReceiveResponse wraps the corresponding Objective-C method.
ProductsRequestDidReceiveResponse(request *ProductsRequest, response *ProductsResponse)
}
ProductsRequestDelegate receives the callbacks of the Objective-C protocol SKProductsRequestDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (ProductsRequestDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type ProductsResponse ¶ added in v0.17.0
ProductsResponse is an idiomatic wrapper over the Objective-C class SKProductsResponse.
An App Store response to a request for information about a list of products.
func NewProductsResponse ¶ added in v0.17.0
func NewProductsResponse() *ProductsResponse
NewProductsResponse creates a new ProductsResponse.
func ProductsResponseFromID ¶ added in v0.17.0
func ProductsResponseFromID(id objc.ID) *ProductsResponse
ProductsResponseFromID adopts an existing Objective-C object as a ProductsResponse (nil for 0), retaining it and registering a release finalizer.
func (*ProductsResponse) Description ¶ added in v0.17.0
func (pr *ProductsResponse) Description() string
Description returns the object's -description text.
func (*ProductsResponse) InvalidProductIdentifiers ¶ added in v0.17.0
func (pr *ProductsResponse) InvalidProductIdentifiers() []string
InvalidProductIdentifiers returns the invalid product identifiers.
InvalidProductIdentifiers returns the collection as a Go slice.
func (*ProductsResponse) IsEqual ¶ added in v0.17.0
func (pr *ProductsResponse) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ProductsResponse) IsKind ¶ added in v0.17.0
func (pr *ProductsResponse) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ProductsResponse) Products ¶ added in v0.17.0
func (pr *ProductsResponse) Products() []*Product
Products returns the products.
Products returns the collection as a Go slice.
func (*ProductsResponse) String ¶ added in v0.17.0
func (pr *ProductsResponse) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int32
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
type ReceiptRefreshRequest ¶ added in v0.17.0
type ReceiptRefreshRequest struct {
Request
}
ReceiptRefreshRequest is an idiomatic wrapper over the Objective-C class SKReceiptRefreshRequest.
It embeds Request, promoting that type's methods.
A request to the App Store to get the app receipt, which represents the customer’s transactions with your app.
func NewReceiptRefreshRequestWithReceiptProperties ¶ added in v0.17.0
func NewReceiptRefreshRequestWithReceiptProperties(properties map[string]obj.Object) *ReceiptRefreshRequest
NewReceiptRefreshRequestWithReceiptProperties creates a receipt refresh request with optional properties.
func ReceiptRefreshRequestFromID ¶ added in v0.17.0
func ReceiptRefreshRequestFromID(id objc.ID) *ReceiptRefreshRequest
ReceiptRefreshRequestFromID adopts an existing Objective-C object as a ReceiptRefreshRequest (nil for 0), retaining it and registering a release finalizer.
func (*ReceiptRefreshRequest) ReceiptProperties ¶ added in v0.17.0
func (rrr *ReceiptRefreshRequest) ReceiptProperties() map[string]obj.Object
ReceiptProperties returns the receipt properties.
func (*ReceiptRefreshRequest) WithDelegate ¶ added in v0.17.0
func (rrr *ReceiptRefreshRequest) WithDelegate(delegate RequestDelegate) *ReceiptRefreshRequest
WithDelegate sets the delegate of the request object.
type Request ¶ added in v0.17.0
Request is an idiomatic wrapper over the Objective-C class SKRequest.
Request is an abstract base — you do not construct it directly. Construct one of ProductsRequest, ReceiptRefreshRequest and pass it where a Request is accepted.
An abstract class that represents a request to the App Store.
func RequestFromID ¶ added in v0.17.0
RequestFromID adopts an existing Objective-C object as a Request (nil for 0), retaining it and registering a release finalizer.
func (*Request) Cancel ¶ added in v0.17.0
func (r *Request) Cancel()
Cancel cancels a previously started request.
func (*Request) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Request) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Request) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Request) Start ¶ added in v0.17.0
func (r *Request) Start()
Start sends the request to the Apple App Store.
func (*Request) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Request) WithDelegate ¶ added in v0.17.0
func (r *Request) WithDelegate(delegate RequestDelegate) *Request
WithDelegate sets the delegate of the request object.
type RequestDelegate ¶ added in v0.17.0
type RequestDelegate interface {
}
RequestDelegate receives the callbacks of the Objective-C protocol SKRequestDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (RequestDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type RequestDelegateRequestDidFailWithErrorHandler ¶ added in v0.17.0
type RequestDelegateRequestDidFailWithErrorHandler interface {
RequestDidFailWithError(request *Request, err error)
}
RequestDelegateRequestDidFailWithErrorHandler is the optional SKRequestDelegate method request:didFailWithError:. Implement it on a RequestDelegate value to receive that callback; a value without it is simply never sent one.
type RequestDelegateRequestDidFinishHandler ¶ added in v0.17.0
type RequestDelegateRequestDidFinishHandler interface {
RequestDidFinish(request *Request)
}
RequestDelegateRequestDidFinishHandler is the optional SKRequestDelegate method requestDidFinish:. Implement it on a RequestDelegate value to receive that callback; a value without it is simply never sent one.
type RequestProvider ¶ added in v0.17.0
RequestProvider is accepted wherever a SKRequest (or one of its subclasses) is expected.
type StoreProductViewController ¶ added in v0.17.0
StoreProductViewController is an idiomatic wrapper over the Objective-C class SKStoreProductViewController.
A view controller that provides a page where customers can purchase media from the App Store.
func NewStoreProductViewController ¶ added in v0.17.0
func NewStoreProductViewController() *StoreProductViewController
NewStoreProductViewController creates a new StoreProductViewController.
func StoreProductViewControllerFromID ¶ added in v0.17.0
func StoreProductViewControllerFromID(id objc.ID) *StoreProductViewController
StoreProductViewControllerFromID adopts an existing Objective-C object as a StoreProductViewController (nil for 0), retaining it and registering a release finalizer.
func (*StoreProductViewController) Description ¶ added in v0.17.0
func (spvc *StoreProductViewController) Description() string
Description returns the object's -description text.
func (*StoreProductViewController) IsEqual ¶ added in v0.17.0
func (spvc *StoreProductViewController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*StoreProductViewController) IsKind ¶ added in v0.17.0
func (spvc *StoreProductViewController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*StoreProductViewController) LoadProductWithParametersCompletionBlock ¶ added in v0.18.0
func (spvc *StoreProductViewController) LoadProductWithParametersCompletionBlock(parameters map[string]obj.Object, block func(bool, unsafe.Pointer))
LoadProductWithParametersCompletionBlock loads a new product screen to display.
func (*StoreProductViewController) String ¶ added in v0.17.0
func (spvc *StoreProductViewController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*StoreProductViewController) WithDelegate ¶ added in v0.17.0
func (spvc *StoreProductViewController) WithDelegate(delegate StoreProductViewControllerDelegate) *StoreProductViewController
WithDelegate sets the store view controller’s delegate.
type StoreProductViewControllerDelegate ¶ added in v0.17.0
type StoreProductViewControllerDelegate interface {
}
StoreProductViewControllerDelegate receives the callbacks of the Objective-C protocol SKStoreProductViewControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (StoreProductViewControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type StoreProductViewControllerDelegateProductViewControllerDidFinishHandler ¶ added in v0.17.0
type StoreProductViewControllerDelegateProductViewControllerDidFinishHandler interface {
ProductViewControllerDidFinish(viewController *StoreProductViewController)
}
StoreProductViewControllerDelegateProductViewControllerDidFinishHandler is the optional SKStoreProductViewControllerDelegate method productViewControllerDidFinish:. Implement it on a StoreProductViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type StoreReviewController ¶ added in v0.17.0
StoreReviewController is an idiomatic wrapper over the Objective-C class SKStoreReviewController.
An object that controls the process of requesting App Store ratings and reviews from customers.
func NewStoreReviewController ¶ added in v0.17.0
func NewStoreReviewController() *StoreReviewController
NewStoreReviewController creates a new StoreReviewController.
func StoreReviewControllerFromID ¶ added in v0.17.0
func StoreReviewControllerFromID(id objc.ID) *StoreReviewController
StoreReviewControllerFromID adopts an existing Objective-C object as a StoreReviewController (nil for 0), retaining it and registering a release finalizer.
func (*StoreReviewController) Description ¶ added in v0.17.0
func (src *StoreReviewController) Description() string
Description returns the object's -description text.
func (*StoreReviewController) IsEqual ¶ added in v0.17.0
func (src *StoreReviewController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*StoreReviewController) IsKind ¶ added in v0.17.0
func (src *StoreReviewController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*StoreReviewController) String ¶ added in v0.17.0
func (src *StoreReviewController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type Storefront ¶ added in v0.17.0
Storefront is an idiomatic wrapper over the Objective-C class SKStorefront.
An object containing the location and unique identifier of an Apple App Store storefront.
func NewStorefront ¶ added in v0.17.0
func NewStorefront() *Storefront
NewStorefront creates a new Storefront.
func StorefrontFromID ¶ added in v0.17.0
func StorefrontFromID(id objc.ID) *Storefront
StorefrontFromID adopts an existing Objective-C object as a Storefront (nil for 0), retaining it and registering a release finalizer.
func (*Storefront) CountryCode ¶ added in v0.17.0
func (s *Storefront) CountryCode() string
CountryCode returns the country code.
func (*Storefront) Description ¶ added in v0.17.0
func (s *Storefront) Description() string
Description returns the object's -description text.
func (*Storefront) Identifier ¶ added in v0.17.0
func (s *Storefront) Identifier() string
Identifier returns the identifier.
func (*Storefront) IsEqual ¶ added in v0.17.0
func (s *Storefront) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Storefront) IsKind ¶ added in v0.17.0
func (s *Storefront) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Storefront) String ¶ added in v0.17.0
func (s *Storefront) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type VirtualMemoryGuardExceptionCode ¶ added in v0.17.0
type VirtualMemoryGuardExceptionCode uint32
const ( KGUARD_EXC_DEALLOC_GAP VirtualMemoryGuardExceptionCode = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE VirtualMemoryGuardExceptionCode = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE VirtualMemoryGuardExceptionCode = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE VirtualMemoryGuardExceptionCode = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE VirtualMemoryGuardExceptionCode = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE VirtualMemoryGuardExceptionCode = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE VirtualMemoryGuardExceptionCode = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY VirtualMemoryGuardExceptionCode = 13 KGUARD_EXC_SEC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 99 KGUARD_EXC_SEC_COPY_DENIED VirtualMemoryGuardExceptionCode = 100 KGUARD_EXC_SEC_SHARING_DENIED VirtualMemoryGuardExceptionCode = 101 KGUARD_EXC_MTE_SYNC_FAULT VirtualMemoryGuardExceptionCode = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204 )
func (VirtualMemoryGuardExceptionCode) String ¶ added in v0.17.0
func (e VirtualMemoryGuardExceptionCode) String() string
String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.
type XpcListenerCreateFlags ¶ added in v0.17.0
type XpcListenerCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcListenerCreateFlagsNone XpcListenerCreateFlags = 0 XpcListenerCreateFlagsInactive XpcListenerCreateFlags = 1 XpcListenerCreateFlagsForceMach XpcListenerCreateFlags = 2 XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4 )
func (XpcListenerCreateFlags) String ¶ added in v0.17.0
func (e XpcListenerCreateFlags) String() string
String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.
type XpcSessionCreateFlags ¶ added in v0.17.0
type XpcSessionCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcSessionCreateFlagsNone XpcSessionCreateFlags = 0 XpcSessionCreateFlagsInactive XpcSessionCreateFlags = 1 XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2 )
func (XpcSessionCreateFlags) String ¶ added in v0.17.0
func (e XpcSessionCreateFlags) String() string
String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- SKArcadeService_generated.go
- SKCloudServiceController_generated.go
- SKDownload_generated.go
- SKMutablePayment_generated.go
- SKPaymentDiscount_generated.go
- SKPaymentQueueDelegate_delegate_generated.go
- SKPaymentQueue_generated.go
- SKPaymentTransactionObserver_delegate_generated.go
- SKPaymentTransaction_generated.go
- SKPayment_generated.go
- SKProductDiscount_generated.go
- SKProductStorePromotionController_generated.go
- SKProductSubscriptionPeriod_generated.go
- SKProduct_generated.go
- SKProductsRequestDelegate_delegate_generated.go
- SKProductsRequest_generated.go
- SKProductsResponse_generated.go
- SKReceiptRefreshRequest_generated.go
- SKRequestDelegate_delegate_generated.go
- SKRequest_generated.go
- SKStoreProductViewControllerDelegate_delegate_generated.go
- SKStoreProductViewController_generated.go
- SKStoreReviewController_generated.go
- SKStorefront_generated.go
- doc.go
- storekit_cfunctions_generated.go
- storekit_classmethods_generated.go
- storekit_constants_generated.go
- storekit_enums_generated.go
- storekit_errors_generated.go
- storekit_protocols_generated.go
- storekit_providers_generated.go
- storekit_runtime_generated.go