Post

Replies

Boosts

Views

Activity

Swift Data + Swift 6 Sendable-ity paradox
Xcode 16 beta 3 Assume a SwiftData model starts like this and has a few more properties like a name and creation date (these are immaterial to my main question. @Model final class Batch: Identifiable, Sendable { @Attribute(.unique) var id: UUID //... more stuff The combination of Swift 6 (or Swift 5 with warnings enabled) and SwiftData seem to provide a paradox: Swift 6 complains when the id is a let: Cannot expand accessors on variable declared with 'let'; this is an error in the Swift 6 language mode Swift 6 complains when the id is a var: Stored property '_id' of 'Sendable'-conforming class 'Batch' is mutable; this is an error in the Swift 6 language mode Removing "Sendable" may be one solution but defeats the purpose and causes warnings elsewhere in the app about the model not being Sendable. Is there an obvious fix? Am I as a newbie (to the combination of Swift 6 and SwiftData) missing an entire architectural step of using ModelActor somewhere?
1
1
1.2k
Aug ’24
Guideline 3.1.1 For Bring-Your-Own_Key
I've run into Guideline 3.1.1 in an app which I want to have as a one-time purchase, bring your own key, AI app. Pay once for the app. Insert your OpenAI/Claude key. Do stuff with AI. I have run into Guideline 3.1.1 Does anyone have any example of having an intention similar to what I had above and how you successfully reworked your business model to comply with 3.1.1? Guideline 3.1.1 - Business - Payments - In-App Purchase The app unlocks or enables additional functionality with mechanisms other than in-app purchase, which is not appropriate. Specifically, the app uses API keys to unlock or enable functionality. Next Steps It would be appropriate to remove these features from the app and any other feature that unlocks or enables functionality with mechanisms other than the App Store. You may also consider making this unlocked content available to your users as in-app purchases.
2
0
260
Sep ’24