Post

Replies

Boosts

Views

Activity

App unable to load all requested Subscriptions and IAPs
I have two subscription in the same group and the same level 1. One is a monthly one and the other a yearly one. I also have an IAP for Lifetime Unlock. When my app requests for these it only loads Monthly. Debugging reveals that the ASC doesn't return the yearly subscription and the lifetime IAP. When I added a StoreKit config to the app, it correctly show the Yearly subscription as well and the view loads it appropriately. But the storekit config doesn't load IAP. I have checked things several tiles in ASC and in code. What can I do to fix this?
2
0
949
Aug ’26
CloudKit schema messed up!
I don't remember if i deployed the changes in my cloudkit schema to production when I uploaded the version 2 of my existing app. since then i had accidentally reseted the environment while trying to do the same for another app. This was in haste, without checking the group identifier in the console. How do I know if everything is fine on the user's end?
1
0
517
Jun ’26
Little experience with SCM. Need help with project source management.
I'm an indie developer and I'm managing my builds using xcode scm (git repo) and with github. I'm at a stage when I have to work on two different things at once on my project... Enhancements Feature change At a later stage I might want the enhancements and not the feature changes, or keep both. How should I - branch, merge and/or cherry pick on the current main branch since the Initial commit?
3
0
273
Jul ’25
Xcode doesn't recognise changes in file status, unable to stage and commit to repo.
I'm using Version 16.4 (16F6) of Xcode on macOS 15.5 (24F74) and everything was working fine until I selected an older build to branch out from. Now, Xcode cant properly know the file status as it keeps on changing it after quitting and relaunching it. The changes in the file are there and when trying to commit to the local repo it doesn't show any changes to stage. At present I'm relying on making project folder backups as a way of backing up builds. Any suggestions what can be done?
0
0
268
Jul ’25
Are these @model classes correct for swiftdata with cloudkit?
I have used core data before via the model editor. This is the first time I'm using swift data and that too with CloudKit. Can you tell me if the following model classes are correct? I have an expense which can have only one sub category which in turn belongs to a single category. Here are my classes... // Expense.swift // Pocket Expense Diary // // Created by Neerav Kothari on 16/05/25. // import Foundation import SwiftData @Model class Expense { @Attribute var expenseDate: Date? = nil @Attribute var expenseAmount: Double? = nil @Attribute var expenseCategory: Category? = nil @Attribute var expenseSubCategory: SubCategory? = nil var date: Date { get { return expenseDate ?? Date() } set { expenseDate = newValue } } var amount: Double{ get { return expenseAmount ?? 0.0 } set { expenseAmount = newValue } } var category: Category{ get { return expenseCategory ?? Category.init(name: "", icon: "") } set { expenseCategory = newValue } } var subCategory: SubCategory{ get { return expenseSubCategory ?? SubCategory.init(name: "", icon: "") } set { expenseSubCategory = newValue } } init(date: Date, amount: Double, category: Category, subCategory: SubCategory) { self.date = date self.amount = amount self.category = category self.subCategory = subCategory } } // // Category.swift // Pocket Expense Diary // // Created by Neerav Kothari on 16/05/25. // import Foundation import SwiftData @Model class Category { @Attribute var categoryName: String? = nil @Attribute var categoryIcon: String? = nil var name: String { get { return categoryName ?? "" } set { categoryName = newValue } } var icon: String { get { return categoryIcon ?? "" } set { categoryIcon = newValue } } @Relationship(inverse: \Expense.expenseCategory) var expenses: [Expense]? = [] init(name: String, icon: String) { self.name = name self.icon = icon } } // SubCategory.swift // Pocket Expense Diary // // Created by Neerav Kothari on 16/05/25. // import Foundation import SwiftData @Model class SubCategory { @Attribute var subCategoryName: String? = nil @Attribute var subCategoryIcon: String? = nil var name: String { get { return subCategoryName ?? "" } set { subCategoryName = newValue } } var icon: String { get { return subCategoryIcon ?? "" } set { subCategoryIcon = newValue } } @Relationship(inverse: \Expense.expenseSubCategory) var expenses: [Expense]? = [] init(name: String, icon: String) { self.name = name self.icon = icon } } The reason why I have wrappers is the let the existing code (before CloudKit was integrated), work. In future versions I plan to query expenses even via category or sub category. I particularly doubt for the relationship i have set. should there be one from category to subcategory as well?
1
0
396
Jun ’25
Migrating a swiftData project to CloudKit to implement iCloudSync.
My project is using swiftData and I want to implement iCloud sync in it. Now, my data base doesnt have any optional attributes or relationships and CloudKit wants them to be optional. So, rather than editing all code with unwrapping code for the optionals, how can I provide a bridge that does so in the last stage of actually saving to the store? Sort of, capture it in a proxy object before writing and after reading from the store. Is there a neat way that can save a lot of debugging? I have code snippets from chat gpt and they are hard to debug. This is my first project in swiftUI. Thanks. Neerav
3
0
416
Jun ’25
The tint color on tableviewcell's default content config's image properties doesn't work.
Here is my code that sets the tint color of the image view in the tableview cell. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "typeCell") var content = cell?.defaultContentConfiguration() // Configure content. content?.image = UIImage(imageLiteralResourceName:typesArray![indexPath.row]) content?.imageProperties.maximumSize = CGSize(width: 28.0, height: 28.0) content?.text = typesArray![indexPath.row] content?.imageProperties.tintColor = UIColor(named:typesColorsArray![indexPath.row]) cell?.contentConfiguration = content return cell! }
Topic: UI Frameworks SubTopic: UIKit
1
0
575
Jun ’24
loaded array from plist. call using AppDelegate() returns empty array.
In app delegate I'm trying to load an array with strings from a plist. I print the plist it prints fine... func loadTypesArray() { guard let path = Bundle.main.path(forResource: "Types", ofType: "plist") else {return} let url = URL(fileURLWithPath: path) let data = try! Data(contentsOf: url) guard let plist = try! PropertyListSerialization.propertyList(from: data, options: .mutableContainers, format: nil) as? [String] else {return} print(plist) typesArray = plist // print(typesArray) } But when I try and access it from a different part of the app using let typesArray = AppDelegate().typesArray the array I get is an empty array! any help?
2
0
838
Jun ’24
UIColorPickerController extension doesn't seem to work to set VC as delegate.
I am taking a reference to a VC in app delegate and using a UIColorPickerController extension with the following code, I'm setting this VC as a delegate to the picker. I need to take these lengthy steps because there is no reference to the picker that a UIColorWell displays! This way, I can set the background color of the VC while the user selects different colors from picker, one after another. This is the give a live effect or color change. However, I dont see this happening. The delegate is not being called. Any help? import Foundation import UIKit extension UIColorPickerViewController{ open override func viewDidLoad() { super.viewDidLoad() let appDelegate = UIApplication.shared.delegate as! AppDelegate delegate = appDelegate.addOrEditVC } }```
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
784
Feb ’24
CoreData with cloudkit sync - partially broken.
When I add or delete data of my entity type I can see the updates (between the simulator and the phone) but when i edit I dont see the updates although table view is reloaded. The console says Ignoring remote change notification because it didn't change any entities tracked by persistent history When I rebuild the app for both device and simulator I see it reflecting the most current changes. Any help? Neerav
0
0
608
Feb ’24
Implement a timer for an activity.
In my app, the user can set a timer for an activity. I want to show a simple progress bar that progresses every 1 second and stops (100%) at the end of the time interval of the timer. example, think of the progressbar of a song being played which finishes on the length of the song. I've read about TimerPublisher but am not sure how to implement it. Can someone help me out over here please? Thanks Neerav
Topic: UI Frameworks SubTopic: UIKit Tags:
4
0
1.3k
Feb ’24
App unable to load all requested Subscriptions and IAPs
I have two subscription in the same group and the same level 1. One is a monthly one and the other a yearly one. I also have an IAP for Lifetime Unlock. When my app requests for these it only loads Monthly. Debugging reveals that the ASC doesn't return the yearly subscription and the lifetime IAP. When I added a StoreKit config to the app, it correctly show the Yearly subscription as well and the view loads it appropriately. But the storekit config doesn't load IAP. I have checked things several tiles in ASC and in code. What can I do to fix this?
Replies
2
Boosts
0
Views
949
Activity
Aug ’26
CloudKit schema messed up!
I don't remember if i deployed the changes in my cloudkit schema to production when I uploaded the version 2 of my existing app. since then i had accidentally reseted the environment while trying to do the same for another app. This was in haste, without checking the group identifier in the console. How do I know if everything is fine on the user's end?
Replies
1
Boosts
0
Views
517
Activity
Jun ’26
Little experience with SCM. Need help with project source management.
I'm an indie developer and I'm managing my builds using xcode scm (git repo) and with github. I'm at a stage when I have to work on two different things at once on my project... Enhancements Feature change At a later stage I might want the enhancements and not the feature changes, or keep both. How should I - branch, merge and/or cherry pick on the current main branch since the Initial commit?
Replies
3
Boosts
0
Views
273
Activity
Jul ’25
Xcode doesn't recognise changes in file status, unable to stage and commit to repo.
I'm using Version 16.4 (16F6) of Xcode on macOS 15.5 (24F74) and everything was working fine until I selected an older build to branch out from. Now, Xcode cant properly know the file status as it keeps on changing it after quitting and relaunching it. The changes in the file are there and when trying to commit to the local repo it doesn't show any changes to stage. At present I'm relying on making project folder backups as a way of backing up builds. Any suggestions what can be done?
Replies
0
Boosts
0
Views
268
Activity
Jul ’25
Are these @model classes correct for swiftdata with cloudkit?
I have used core data before via the model editor. This is the first time I'm using swift data and that too with CloudKit. Can you tell me if the following model classes are correct? I have an expense which can have only one sub category which in turn belongs to a single category. Here are my classes... // Expense.swift // Pocket Expense Diary // // Created by Neerav Kothari on 16/05/25. // import Foundation import SwiftData @Model class Expense { @Attribute var expenseDate: Date? = nil @Attribute var expenseAmount: Double? = nil @Attribute var expenseCategory: Category? = nil @Attribute var expenseSubCategory: SubCategory? = nil var date: Date { get { return expenseDate ?? Date() } set { expenseDate = newValue } } var amount: Double{ get { return expenseAmount ?? 0.0 } set { expenseAmount = newValue } } var category: Category{ get { return expenseCategory ?? Category.init(name: "", icon: "") } set { expenseCategory = newValue } } var subCategory: SubCategory{ get { return expenseSubCategory ?? SubCategory.init(name: "", icon: "") } set { expenseSubCategory = newValue } } init(date: Date, amount: Double, category: Category, subCategory: SubCategory) { self.date = date self.amount = amount self.category = category self.subCategory = subCategory } } // // Category.swift // Pocket Expense Diary // // Created by Neerav Kothari on 16/05/25. // import Foundation import SwiftData @Model class Category { @Attribute var categoryName: String? = nil @Attribute var categoryIcon: String? = nil var name: String { get { return categoryName ?? "" } set { categoryName = newValue } } var icon: String { get { return categoryIcon ?? "" } set { categoryIcon = newValue } } @Relationship(inverse: \Expense.expenseCategory) var expenses: [Expense]? = [] init(name: String, icon: String) { self.name = name self.icon = icon } } // SubCategory.swift // Pocket Expense Diary // // Created by Neerav Kothari on 16/05/25. // import Foundation import SwiftData @Model class SubCategory { @Attribute var subCategoryName: String? = nil @Attribute var subCategoryIcon: String? = nil var name: String { get { return subCategoryName ?? "" } set { subCategoryName = newValue } } var icon: String { get { return subCategoryIcon ?? "" } set { subCategoryIcon = newValue } } @Relationship(inverse: \Expense.expenseSubCategory) var expenses: [Expense]? = [] init(name: String, icon: String) { self.name = name self.icon = icon } } The reason why I have wrappers is the let the existing code (before CloudKit was integrated), work. In future versions I plan to query expenses even via category or sub category. I particularly doubt for the relationship i have set. should there be one from category to subcategory as well?
Replies
1
Boosts
0
Views
396
Activity
Jun ’25
Migrating a swiftData project to CloudKit to implement iCloudSync.
My project is using swiftData and I want to implement iCloud sync in it. Now, my data base doesnt have any optional attributes or relationships and CloudKit wants them to be optional. So, rather than editing all code with unwrapping code for the optionals, how can I provide a bridge that does so in the last stage of actually saving to the store? Sort of, capture it in a proxy object before writing and after reading from the store. Is there a neat way that can save a lot of debugging? I have code snippets from chat gpt and they are hard to debug. This is my first project in swiftUI. Thanks. Neerav
Replies
3
Boosts
0
Views
416
Activity
Jun ’25
The tint color on tableviewcell's default content config's image properties doesn't work.
Here is my code that sets the tint color of the image view in the tableview cell. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "typeCell") var content = cell?.defaultContentConfiguration() // Configure content. content?.image = UIImage(imageLiteralResourceName:typesArray![indexPath.row]) content?.imageProperties.maximumSize = CGSize(width: 28.0, height: 28.0) content?.text = typesArray![indexPath.row] content?.imageProperties.tintColor = UIColor(named:typesColorsArray![indexPath.row]) cell?.contentConfiguration = content return cell! }
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
0
Views
575
Activity
Jun ’24
loaded array from plist. call using AppDelegate() returns empty array.
In app delegate I'm trying to load an array with strings from a plist. I print the plist it prints fine... func loadTypesArray() { guard let path = Bundle.main.path(forResource: "Types", ofType: "plist") else {return} let url = URL(fileURLWithPath: path) let data = try! Data(contentsOf: url) guard let plist = try! PropertyListSerialization.propertyList(from: data, options: .mutableContainers, format: nil) as? [String] else {return} print(plist) typesArray = plist // print(typesArray) } But when I try and access it from a different part of the app using let typesArray = AppDelegate().typesArray the array I get is an empty array! any help?
Replies
2
Boosts
0
Views
838
Activity
Jun ’24
UIColorPickerController extension doesn't seem to work to set VC as delegate.
I am taking a reference to a VC in app delegate and using a UIColorPickerController extension with the following code, I'm setting this VC as a delegate to the picker. I need to take these lengthy steps because there is no reference to the picker that a UIColorWell displays! This way, I can set the background color of the VC while the user selects different colors from picker, one after another. This is the give a live effect or color change. However, I dont see this happening. The delegate is not being called. Any help? import Foundation import UIKit extension UIColorPickerViewController{ open override func viewDidLoad() { super.viewDidLoad() let appDelegate = UIApplication.shared.delegate as! AppDelegate delegate = appDelegate.addOrEditVC } }```
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
784
Activity
Feb ’24
CoreData with cloudkit sync - partially broken.
When I add or delete data of my entity type I can see the updates (between the simulator and the phone) but when i edit I dont see the updates although table view is reloaded. The console says Ignoring remote change notification because it didn't change any entities tracked by persistent history When I rebuild the app for both device and simulator I see it reflecting the most current changes. Any help? Neerav
Replies
0
Boosts
0
Views
608
Activity
Feb ’24
Implement a timer for an activity.
In my app, the user can set a timer for an activity. I want to show a simple progress bar that progresses every 1 second and stops (100%) at the end of the time interval of the timer. example, think of the progressbar of a song being played which finishes on the length of the song. I've read about TimerPublisher but am not sure how to implement it. Can someone help me out over here please? Thanks Neerav
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
4
Boosts
0
Views
1.3k
Activity
Feb ’24