About UUID when implementing promotion offer

Hi,

I am implementing a promotional offer. I have a question about the nonce (UUID) of the SK Payment Discount. Is there a way to generate a lowercase UUID in Swift?

In my environment, when I receive a UUID from the server, it becomes a String on Swift. The String is lowercase, but when converted to a UUID it becomes uppercase.

Not sure if I understand the issue, but if you need to use a lowercased UUID string you can just convert the Swift UUID back to a string and then lowercase it.

UUID().uuidString.lowercased()

As per the documentation, The string representation of the nonce must be lowercase. not the UUID itself. It seems that the reason that it needs to be lowercased is for when generating the signature on the server.

nonce A unique UUID value that your server defines. The string representation of the nonce used in the signature must be lowercase.

Generating a Signature for Promotional Offers

https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/subscriptions_and_offers/generating_a_signature_for_promotional_offers

About UUID when implementing promotion offer
 
 
Q