Post

Replies

Boosts

Views

Activity

Reply to How to Verify the Authenticity of an In-App Purchase Receipt from Apple Pay?
users either exit the app before tapping "OK" or experience network issues, preventing the receipt from being sent to my server. Don't .finish() the transaction until your server has responded to confirm it has added the points to the account. If there's a crash or similar, you'll get the unfinished transactions again when the app next runs. So make sure your transaction processing code will process purchases at any time, not only immediately after the user has initiated a purchase in your UI. some users send me a receipt from Apple Pay ... How can I verify the authenticity of these receipts? There is this API: https://developer.apple.com/documentation/appstoreserverapi/look-up-order-id That maps from an identifier in their e.g. emailed receipt to a transaction ID, which you can use to look up their transaction history.
Topic: App & System Services SubTopic: StoreKit Tags:
Mar ’25
Reply to Metal triangle strips uniform opacity.
Looking at your first image, the traditional GPU solution would be to use the stencil buffer to only paint each pixel once. If you have anti-aliased edges, the binary stencil buffer isn't perfect. But you can use the alpha channel in the framebuffer to get a similar but fractional effect. Or you can re-triangulate your triangle strips on the CPU to get a geometry that doesn't self-intersect. You should aim to do that ahead-of-time, but it's not completely impossible to do it for every frame. In your other images with the brush texture, I think that again using the framebuffer alpha as a pseudo-stencil is probably the best solution.
Topic: Graphics & Games SubTopic: Metal Tags:
Mar ’25
Reply to Increased Memory Limit, Extended Virtual Addressing affects on recent iPadOS 18.3
Hi Kevin, Thank you for this interesting post. A decade ago I was struggling with an app that tried to use large memory-mapped read-only data files. By default, we prevented that issue by artificially limiting address space and terminating the app when it hits that limit. That is, you can use the architecture above but doing so won't actually give you access to significantly more memory than you would otherwise have access to, removing most of the benefit this architecture would have provided. So now I know that my inability to map large (multi-gigabyte) files for reading was blocked because you didn't want people to map large files for read/write as a kind of swap. I don't think anyone said that at the time. It's much too late now, but I do wonder if you could have used some other method than simply restricting the virtual memory size, that would have permitted read-only mappings.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’25
Reply to 30% commission from user to user
You need to answer the more fundamental question of whether in-app-purchase is allowed for this at all. If in-app-purchase is allowed, Apple takes 30% (or 15%) of the total value of the transaction, as well as any applicable taxes. If in-app-purchase is not allowed, you need to provide your own payment processing and Apple take nothing. As to whether in-app-purchase is allowed, the primary question is whether the purchased content is delivered in the app. You talk about "shows" and "lectures", but I take it that these are actually streamed videos; are these presented in your app? I'm not totally familiar with the current rules in this case; I think there are some relatively new exceptions for one-to-one consultations.
Mar ’25
Reply to Not understanding synchronous/asynchronous code
why the test code print("line 64") is being printed after the test code print("line 84") Because the session.dataTask call on line 52 returns immediately and runs the code from line 78 onwards. The call to dataTask.resume on line 80 also returns immediately, having caused the download to start asynchronously. The code in lines 53 to 76 runs only when the download has completed. I would like the program to wait until the results array has been parsed before continuing the code (otherwise it does not have content to present). Waiting in a method like this one would cause the UI to freeze until the download has finished, which is very undesirable. You need to start your networking elsewhere. When the download completes, store the items and tell the view to update. Have the numberOfRowsInSection method just return the current number of items, which will initially be zero. Possibly also present some sort of "wait" indication (spinner, etc) in this case.
Mar ’25
Reply to App update required Message
In the circumstance, you probably can't make a message appear. More likely, you could probably make the current version continue to function by supporting both versions on your back end. To avoid this happening next time, make sure that what is now your new version does include a mechanism that allows it to show such a message when it is replaced.
Mar ’25
Reply to How to Verify the Authenticity of an In-App Purchase Receipt from Apple Pay?
users either exit the app before tapping "OK" or experience network issues, preventing the receipt from being sent to my server. Don't .finish() the transaction until your server has responded to confirm it has added the points to the account. If there's a crash or similar, you'll get the unfinished transactions again when the app next runs. So make sure your transaction processing code will process purchases at any time, not only immediately after the user has initiated a purchase in your UI. some users send me a receipt from Apple Pay ... How can I verify the authenticity of these receipts? There is this API: https://developer.apple.com/documentation/appstoreserverapi/look-up-order-id That maps from an identifier in their e.g. emailed receipt to a transaction ID, which you can use to look up their transaction history.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Metal triangle strips uniform opacity.
Looking at your first image, the traditional GPU solution would be to use the stencil buffer to only paint each pixel once. If you have anti-aliased edges, the binary stencil buffer isn't perfect. But you can use the alpha channel in the framebuffer to get a similar but fractional effect. Or you can re-triangulate your triangle strips on the CPU to get a geometry that doesn't self-intersect. You should aim to do that ahead-of-time, but it's not completely impossible to do it for every frame. In your other images with the brush texture, I think that again using the framebuffer alpha as a pseudo-stencil is probably the best solution.
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Increased Memory Limit, Extended Virtual Addressing affects on recent iPadOS 18.3
Hi Kevin, Thank you for this interesting post. A decade ago I was struggling with an app that tried to use large memory-mapped read-only data files. By default, we prevented that issue by artificially limiting address space and terminating the app when it hits that limit. That is, you can use the architecture above but doing so won't actually give you access to significantly more memory than you would otherwise have access to, removing most of the benefit this architecture would have provided. So now I know that my inability to map large (multi-gigabyte) files for reading was blocked because you didn't want people to map large files for read/write as a kind of swap. I don't think anyone said that at the time. It's much too late now, but I do wonder if you could have used some other method than simply restricting the virtual memory size, that would have permitted read-only mappings.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to 30% commission from user to user
You need to answer the more fundamental question of whether in-app-purchase is allowed for this at all. If in-app-purchase is allowed, Apple takes 30% (or 15%) of the total value of the transaction, as well as any applicable taxes. If in-app-purchase is not allowed, you need to provide your own payment processing and Apple take nothing. As to whether in-app-purchase is allowed, the primary question is whether the purchased content is delivered in the app. You talk about "shows" and "lectures", but I take it that these are actually streamed videos; are these presented in your app? I'm not totally familiar with the current rules in this case; I think there are some relatively new exceptions for one-to-one consultations.
Replies
Boosts
Views
Activity
Mar ’25
Reply to Not understanding synchronous/asynchronous code
why the test code print("line 64") is being printed after the test code print("line 84") Because the session.dataTask call on line 52 returns immediately and runs the code from line 78 onwards. The call to dataTask.resume on line 80 also returns immediately, having caused the download to start asynchronously. The code in lines 53 to 76 runs only when the download has completed. I would like the program to wait until the results array has been parsed before continuing the code (otherwise it does not have content to present). Waiting in a method like this one would cause the UI to freeze until the download has finished, which is very undesirable. You need to start your networking elsewhere. When the download completes, store the items and tell the view to update. Have the numberOfRowsInSection method just return the current number of items, which will initially be zero. Possibly also present some sort of "wait" indication (spinner, etc) in this case.
Replies
Boosts
Views
Activity
Mar ’25
Reply to App update required Message
In the circumstance, you probably can't make a message appear. More likely, you could probably make the current version continue to function by supporting both versions on your back end. To avoid this happening next time, make sure that what is now your new version does include a mechanism that allows it to show such a message when it is replaced.
Replies
Boosts
Views
Activity
Mar ’25