Post

Replies

Boosts

Views

Activity

Filter CoreData list at some Index for a freemium app
Hello, I'm building a freemium app with CoreData. One of the subscription features is to unlock "creating unlimited items". So if the user don't subscribe have a limit of i.e 10 items. I have restricted the item creation when the limit is 10 items, but when a user becomes subscriber and then cancel subscription I need to "lock" the previously created items (until 10) and leave only for delete (if the user wants). I will use a lock image over the item. I'm looking for the best way to do this. I have the FetchRequest, then filter with some parameters like "search text" or type and then show in a View. How can be a good solution of it? I'm thinking in ".firstIndex(of: )", but don't seems the optimum solution because it will called everytime the view is generated... Any ideas? Thanks!!
0
0
436
Apr ’23
CloudKit Zones Without Records
Hello, I'm using CloudKit for sharing CoreData objects. In my app, any time a user share an object (that previously doesn't has shared) I create a new sharing zone with the CKRecord. Also I'm using UICloudSharingController, so in this page when the user select "Stop sharing" (from the UICloudSharingController) it works, and all the items created in this Zone persist on it. I have two questions or doubts: When I delete all the items in the zone, the zone doesn't delete it self. So I have many Zones wihout items. I have to delete manually detecting what are the last item on it? If I don't want to share this (I stop sharing), exist any "easy" way to move all the items to my "default zone"? Thanks in advance, David
1
0
717
Mar ’23
CloudKit Zones Limit
Hello, I'm going to implement CloudKit for my project, allowing the users share data. At this moment, I'm researching the Apple project (link below) and documentation for this purpose, and I see many times "CloudKit has a limit on how many zones a database can have." So I have doubts about what is this limit. For my purpose, each user will share 10/15 objects (imagine posts with: title, notes and photos) as maximum. This zone limit is per user? I have to worry about this limit with my expected usage of sharing / per user? The apple project: https://developer.apple.com/documentation/coredata/sharing_core_data_objects_between_icloud_users Thanks in advance, David
0
0
765
Mar ’23
Issue in Dateformatter with language
Hello! How can we change the locale in DateFormatter auotmatic or dynamically? I need to set in English or Spanish depends on the user language... let formatter = DateFormatter() formatter.dateStyle = .long formatter.locale = Locale(identifier: "es_ES") return formatter.string(from: date) I’m trying in the simulator in spanish and without the Locale identifier keeps in english, also in real devices. Thanks!
2
0
726
Oct ’22
StoreKit 2 - Issue
Hello, Im trying to use in-app purchases for first time. I have followed the tutorial for StoreKit 2 from the WWDC21 and in the simulator with the StoreKit Configuration File all was OK. But now I want test to the real server and I have this response: Error enumerating unfinished transactions for first transaction listener: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={client-environment-type=Sandbox, storefront-country-code=USA, NSLocalizedDescription=No active account} In "Run" -> "StoreKit configuration" I have selected none In AppleStoreConnect I have created the auto-renewal suscription like in my StoreKit configuration. Also I create a new StoreKit configuration from the AppleStoreConnect and with this file its OK too. None of my testflight testers can see the options to purchase. I dont create any sandbox user. It's the problem? I saw in the documentation thats not needed. I am thankful for any kind of help. David
2
1
2.5k
Oct ’22