Post

Replies

Boosts

Views

Activity

Comment on Xcode 15 beta 8: try await .purchase() consistently throws StoreKitError.Unknown during XCTest on iOS 17 simulator
ChatGPT says: "Selecting a host app for your test target is essential when testing StoreKit 2 functionalities like Product.purchase. StoreKit 2 requires a full app environment to simulate transactions, as it relies on app lifecycle events and system-level APIs that aren’t available in standalone unit tests. Setting up the host app should resolve issues with incomplete transactions and better simulate in-app purchase flows in your tests." Hopefully he is right :D (I haven't seen this in docs)
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’24
Comment on Confused with type erasure when working with existential type
Thanks for your reply. Could you please explain how is that I can replace the return type of produceCommodities from [any Food] to [Food] and the compiler will accept it ? I am under the impression that the compiler won't be able to understand the concrete type of the produceCommodities function since it relies on an associated type until a specialization takes places (either by calling the function or by its implementation as explained in the lecture)
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23
Comment on Xcode 15 beta 8: try await .purchase() consistently throws StoreKitError.Unknown during XCTest on iOS 17 simulator
ChatGPT says: "Selecting a host app for your test target is essential when testing StoreKit 2 functionalities like Product.purchase. StoreKit 2 requires a full app environment to simulate transactions, as it relies on app lifecycle events and system-level APIs that aren’t available in standalone unit tests. Setting up the host app should resolve issues with incomplete transactions and better simulate in-app purchase flows in your tests." Hopefully he is right :D (I haven't seen this in docs)
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’24
Comment on Confused with type erasure when working with existential type
Thanks for your reply. Could you please explain how is that I can replace the return type of produceCommodities from [any Food] to [Food] and the compiler will accept it ? I am under the impression that the compiler won't be able to understand the concrete type of the produceCommodities function since it relies on an associated type until a specialization takes places (either by calling the function or by its implementation as explained in the lecture)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23