Post

Replies

Boosts

Views

Activity

Reply to App is on App Store but Subscription is in review
My App is approved and in App Store. I have never changed anything on Subscriptions. Perhaps I shall have and a blank or a dot and resubmit ? Now subscription wasn't approved - rejected due to localisation. Message says : We have returned your in-app purchase products to you as the required binary was not submitted. When you are ready to submit the binary, please resubmit the in-app purchase products with the binary.
3w
Reply to SwiftData know how specific information
Apparently it also deletes automatically as per this : for index in indexSet { let animalToDelete = animals[index] if navigationContext.selectedAnimal?.persistentModelID == animalToDelete.persistentModelID { navigationContext.selectedAnimal = nil } modelContext.delete(animalToDelete) } } The sample above uses the SwiftData autosave feature, which is enabled by default when creating a ModelContainerusing the modelContainer(for:inMemory:isAutosaveEnabled:isUndoEnabled:onSetup:) modifier. If this feature is disabled, the removeAnimals method needs to explicitly save the change by calling the ModelContext method save(); for example: do { for index in indexSet { let animalToDelete = animals[index] if navigationContext.selectedAnimal?.persistentModelID == animalToDelete.persistentModelID { navigationContext.selectedAnimal = nil } modelContext.delete(animalToDelete) } try modelContext.save() } catch { // Handle error. } } https://developer.apple.com/documentation/swiftdata/deleting-persistent-data-from-your-app
3w
Reply to Type Eraser for Container
I’m referring to the injection of a model container into the environment. We accomplish this by declaring the type as follows: .modelContainer(for: [Book.self, Author.self]) For instance: struct Example: App { @State private var appData = ApplicationData.shared var body: some Scene { WindowGroup { ContentView() .environment(appData) .modelContainer(for: [Book.self, Author.self]) } } } I was wondering if we could implement a feature similar to the navigationPath() type-erasing functionality. This allows us to define a heterogeneous set of types, as we can do with: @State private var path = NavigationPath() Instead of explicitly declaring: @State private var path = [Book] () Is there a way to build ( if not already a way) into Swift Language a similar capability for environment injection, enabling the injection of a heterogeneous set of types without needing to declare the type explicitly?
3w
Reply to "Unable to Complete Request" error
The message seen is the standard response generated by the SubscriptionStoreView when a "StoreKit Purchase" of an "Unknown" error Type when it occurs during the purchase process. This is the default behaviour, which suggests retrying the purchase at a later time. Unfortunately, this is how SubscriptionStoreView is designed to handle such errors. We believe this shall be sufficient enough for user to be guided to try again later. As SubscriptionStoreView is the recommended approach for subscription management in iOS apps, we are unable to customise the error handling beyond what is provided by the framework itself. While the products are being loaded correctly, the purchase fails due to an error, and at this stage, the only option available is to retry the purchase or wait for a network resolution. To offer a smoother experience, we would need to abandon the use of SubscriptionStoreView, but this would not align with standard app guidelines and could lead to a less intuitive experience for users. We need help with this. In StoreKit Config File simulate Unknown Purchase Error. Try Purchase. As per design SubscriptionStoreView shows popup saying : "Unable to Complete Request Something went wrong. Try again." We thought this is fine as it is explanatory. App Review Team says this is poor user experience and I need code level help to tackle this .
2w