apple / app-store-server-library-swift

MIT License
218 stars 28 forks source link

The library isn't compatible with newer swift versions #36

Closed orre1996 closed 6 months ago

orre1996 commented 6 months ago

Seems like some packages needs to be updated

Skärmavbild 2024-03-13 kl  14 07 44
alexanderjordanbaker commented 6 months ago

This library only supports Swift on Server, not devices like an iPhone. We recommend using StoreKit 2 on device.

orre1996 commented 6 months ago

Ohhh that makes sense, sorry about that. Unfortunately promotional offers can't be done with only StoreKit 2, you need to create the signature on the server from what I've read. Unless I've completely missed something. And for the JavaScript code I get an error saying that applicationUsername.toLowerCase is not a function when I try to create the signature

alexanderjordanbaker commented 6 months ago

So yes, to create a promotional offer you need a server which has access to your app's private signing key (Another reason this can't be done on device, as the app wouldn't have access to this key). We can track that issue on the issue you created on the node library.