Post

Replies

Boosts

Views

Activity

Reply to 32 byte NSNumber memory leak - how to fix?
Have you asked Gemini or ChatGPT about this case? When it comes to Swift Concurrency, they are quite good at it. Concerning your issue, Gemini reports to me several issues with the following last comment. In summary, the most critical issue is the unreliable view hierarchy traversal using view.superview?.superview. You should refactor the ViewExtractor to reliably pass the host UIView back to the modifier.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’25
Reply to how to navigate programmatically without navigation link?
Use navigationDestination(isPresented:destination:) and hide the Back button at the destination View? import SwiftUI struct ContentView: View { @State var goToHello = false var body: some View { NavigationStack { Button { goToHello = true } label: { Text("Go to Hello?") } .navigationDestination(isPresented: $goToHello) { HelloView() } } } } #Preview { ContentView() } struct HelloView: View { var body: some View { NavigationStack { VStack { Text("Hello!") } .navigationBarBackButtonHidden() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to WidgetKit with Data from CoreData
A solution is not to rely on a Data Manager class and its associates but to use UserDefaults so that Widget's getTimeline method will be called when ContentView submits data to it. By this approach, you can update Widget's View. import SwiftUI import WidgetKit struct ContentView: View { var body: some View { VStack { Button { let task0 = TaskItem(id: UUID(), name: "Dish washing", isComplete: false, dueDate: Date.now.addingTimeInterval(86400)) let task1 = TaskItem(id: UUID(), name: "Bed making", isComplete: false, dueDate: Date.now.addingTimeInterval(86400 * 2)) saveTasksToWidget(tasks: [task0, task1]) } label: { Image(systemName: "globe") .imageScale(.large) } .tint(.pink) .buttonStyle(.borderedProminent) } .padding() } private func saveTasksToWidget(tasks: [TaskItem]) { guard let sharedDefaults = UserDefaults(suiteName: "group.abc") else { print("Failed to get shared UserDefaults.") return } do { let encoder = JSONEncoder() let encodedData = try encoder.encode(tasks) sharedDefaults.set(encodedData, forKey: "widgetTasksArray") WidgetCenter.shared.reloadAllTimelines() } catch { print("Error encoding tasks: \(error)") } } } // TaskItem.swift // import Foundation struct TaskItem: Codable, Identifiable { let id: UUID let name: String let isComplete: Bool let dueDate: Date static let previewTasks = [ TaskItem(id: UUID(), name: "Rose", isComplete: false, dueDate: Date.now.addingTimeInterval(86400)), TaskItem(id: UUID(), name: "Chrisanthumum", isComplete: true, dueDate: Date.now.addingTimeInterval(86400 * 2)), TaskItem(id: UUID(), name: "Garden Dahlia", isComplete: false, dueDate: Date.now.addingTimeInterval(86400 * 3)) ] } // CrazyWidget.swift // import WidgetKit import SwiftUI struct SimpleEntry: TimelineEntry { let date: Date let tasks: [TaskItem] } struct Provider: TimelineProvider { let appGroupID = "group.abc" let dataKey = "widgetTasksArray" func placeholder(in context: Context) -> SimpleEntry { SimpleEntry(date: Date(), tasks: TaskItem.previewTasks) } func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) { let currentTasks = loadTasks() let entry = SimpleEntry(date: Date(), tasks: currentTasks) completion(entry) } func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) { let currentTasks = loadTasks() let entry = SimpleEntry(date: Date(), tasks: currentTasks) let nextUpdate = Calendar.current.date(byAdding: .minute, value: 1, to: Date())! let timeline = Timeline(entries: [entry], policy: .after(nextUpdate)) completion(timeline) } private func loadTasks() -> [TaskItem] { var taskItems: [TaskItem] = [] if let sharedDefaults = UserDefaults(suiteName: appGroupID), let savedData = sharedDefaults.data(forKey: dataKey) { do { let decoder = JSONDecoder() taskItems = try decoder.decode([TaskItem].self, from: savedData) } catch { print("Error decoding tasks from App Group: \(error)") taskItems = TaskItem.previewTasks // Fallback on decoding failure } } else { taskItems = TaskItem.previewTasks // Fallback on access failure } return taskItems } } struct CrazyWidgetEntryView : View { var entry: Provider.Entry var body: some View { VStack(alignment: .leading) { Text("Pending Tasks") .font(.headline) .foregroundColor(.blue) Divider() if entry.tasks.isEmpty { Text("All clear! No tasks found.") .font(.caption) .foregroundColor(.secondary) } else { VStack(alignment: .leading, spacing: 4) { ForEach(entry.tasks.prefix(3)) { task in HStack { Image(systemName: task.isComplete ? "checkmark.circle.fill" : "circle") .foregroundColor(task.isComplete ? .green : .orange) Text(task.name) .font(.caption) .strikethrough(task.isComplete) .lineLimit(1) } } } } } .padding() } } struct CrazyWidget: Widget { let kind: String = "RailMe" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, provider: Provider()) { entry in CrazyWidgetEntryView(entry: entry) } .configurationDisplayName("RailMe GGGGG") .description("View your current tasks saved from the main app.") .supportedFamilies([.systemSmall, .systemMedium]) } } #Preview("Small - Full Data") { CrazyWidgetEntryView(entry: SimpleEntry(date: Date(), tasks: TaskItem.previewTasks)) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to App Store version stuck in Developer Rejected state, blocking IAP submission
Isn't it just the matter of creating a new subscription group with a new set of product identifiers? You should have switched to the manual release as opposed to auto release and then submit a software update when you decided not to release the initial version. You have made the initial group of product identifiers useless, I guess.
Jan ’26
Reply to "In-App Purchases and Subscriptions" missing, WHY????
I'm in the same shoes since the end of the last December. Because my app contains the Japanese localization package, I thought I was not able to have subscription plans due to the holiday season and the Japan MSCA. But an Apple local rep. says that's not the case. I already released the app by reducing features. In the near future, I want to add subscription plans since it currently has no mineralization mechanism whatsoever. At this moment, it seems that I've reached the end of the rope. Seeing the last submission with subscription plans, I don't see anything wrong with the app in question. Also, I have deleted an existing sub group with a new one once or twice with no resolution.
Jan ’26
Reply to Subscription Group Remains as Prepare for Submission
I've consulted the local Apple Contact Us group. They replied last week that 'Prepare for Submission' is indicative of missing information. I already know that since this app submission is about 250th with IAPs. Then he or she said that my subscription plan may not have a screenshot. That's the case, either. They often try to solve an issue with a guess, which leads nowhere.
Jan ’26
Reply to Adding days to a date using the result of a division operation
Where does 'testDouble' come from? And what's testDouble's type?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Fraudsters gained access to my wife's phone through their APPLE ID
This is developer's website. You are at a wrong place to ask questions about your wife's phone.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Confirm whether the distribution of this app violates the terms of service
It's not the matter of violating which guideline rule. You shouldn't do that unless you want to get your developer account suspended or terminated.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Unable to remove old App due to 'App Review' for 3 years.
You are probably trying to remove your software title with a wrong approach. You have to go to Pricing and Availability to remove an existing one. If you try to do it under App Information, it's not going to cut it.
Replies
Boosts
Views
Activity
Nov ’25
Reply to 32 byte NSNumber memory leak - how to fix?
Have you asked Gemini or ChatGPT about this case? When it comes to Swift Concurrency, they are quite good at it. Concerning your issue, Gemini reports to me several issues with the following last comment. In summary, the most critical issue is the unreliable view hierarchy traversal using view.superview?.superview. You should refactor the ViewExtractor to reliably pass the host UIView back to the modifier.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to how to navigate programmatically without navigation link?
Use navigationDestination(isPresented:destination:) and hide the Back button at the destination View? import SwiftUI struct ContentView: View { @State var goToHello = false var body: some View { NavigationStack { Button { goToHello = true } label: { Text("Go to Hello?") } .navigationDestination(isPresented: $goToHello) { HelloView() } } } } #Preview { ContentView() } struct HelloView: View { var body: some View { NavigationStack { VStack { Text("Hello!") } .navigationBarBackButtonHidden() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to What exactly qualifies as valid proof of website domain ownership for App Store Connect account verification?
What types of documents or evidence Apple accepts as proof of domain ownership? What does your ICANN registration say? If it's registered under your name, wouldn't it just be the matter of giving them a Xerox copy of your driver's license?
Replies
Boosts
Views
Activity
Nov ’25
Reply to 4.3(a) Spam Issue – Appeal Not Receiving Any Updates
It seems likely that our submission is being linked to that previous prototype, even though it no longer exists and was submitted under a different personal account. How so? It has not passed the review process, and he's removed the binary, you have said. The only possibility is that he keeps and lists it at App Store, I guess, then.
Replies
Boosts
Views
Activity
Nov ’25
Reply to WidgetKit with Data from CoreData
A solution is not to rely on a Data Manager class and its associates but to use UserDefaults so that Widget's getTimeline method will be called when ContentView submits data to it. By this approach, you can update Widget's View. import SwiftUI import WidgetKit struct ContentView: View { var body: some View { VStack { Button { let task0 = TaskItem(id: UUID(), name: "Dish washing", isComplete: false, dueDate: Date.now.addingTimeInterval(86400)) let task1 = TaskItem(id: UUID(), name: "Bed making", isComplete: false, dueDate: Date.now.addingTimeInterval(86400 * 2)) saveTasksToWidget(tasks: [task0, task1]) } label: { Image(systemName: "globe") .imageScale(.large) } .tint(.pink) .buttonStyle(.borderedProminent) } .padding() } private func saveTasksToWidget(tasks: [TaskItem]) { guard let sharedDefaults = UserDefaults(suiteName: "group.abc") else { print("Failed to get shared UserDefaults.") return } do { let encoder = JSONEncoder() let encodedData = try encoder.encode(tasks) sharedDefaults.set(encodedData, forKey: "widgetTasksArray") WidgetCenter.shared.reloadAllTimelines() } catch { print("Error encoding tasks: \(error)") } } } // TaskItem.swift // import Foundation struct TaskItem: Codable, Identifiable { let id: UUID let name: String let isComplete: Bool let dueDate: Date static let previewTasks = [ TaskItem(id: UUID(), name: "Rose", isComplete: false, dueDate: Date.now.addingTimeInterval(86400)), TaskItem(id: UUID(), name: "Chrisanthumum", isComplete: true, dueDate: Date.now.addingTimeInterval(86400 * 2)), TaskItem(id: UUID(), name: "Garden Dahlia", isComplete: false, dueDate: Date.now.addingTimeInterval(86400 * 3)) ] } // CrazyWidget.swift // import WidgetKit import SwiftUI struct SimpleEntry: TimelineEntry { let date: Date let tasks: [TaskItem] } struct Provider: TimelineProvider { let appGroupID = "group.abc" let dataKey = "widgetTasksArray" func placeholder(in context: Context) -> SimpleEntry { SimpleEntry(date: Date(), tasks: TaskItem.previewTasks) } func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> ()) { let currentTasks = loadTasks() let entry = SimpleEntry(date: Date(), tasks: currentTasks) completion(entry) } func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) { let currentTasks = loadTasks() let entry = SimpleEntry(date: Date(), tasks: currentTasks) let nextUpdate = Calendar.current.date(byAdding: .minute, value: 1, to: Date())! let timeline = Timeline(entries: [entry], policy: .after(nextUpdate)) completion(timeline) } private func loadTasks() -> [TaskItem] { var taskItems: [TaskItem] = [] if let sharedDefaults = UserDefaults(suiteName: appGroupID), let savedData = sharedDefaults.data(forKey: dataKey) { do { let decoder = JSONDecoder() taskItems = try decoder.decode([TaskItem].self, from: savedData) } catch { print("Error decoding tasks from App Group: \(error)") taskItems = TaskItem.previewTasks // Fallback on decoding failure } } else { taskItems = TaskItem.previewTasks // Fallback on access failure } return taskItems } } struct CrazyWidgetEntryView : View { var entry: Provider.Entry var body: some View { VStack(alignment: .leading) { Text("Pending Tasks") .font(.headline) .foregroundColor(.blue) Divider() if entry.tasks.isEmpty { Text("All clear! No tasks found.") .font(.caption) .foregroundColor(.secondary) } else { VStack(alignment: .leading, spacing: 4) { ForEach(entry.tasks.prefix(3)) { task in HStack { Image(systemName: task.isComplete ? "checkmark.circle.fill" : "circle") .foregroundColor(task.isComplete ? .green : .orange) Text(task.name) .font(.caption) .strikethrough(task.isComplete) .lineLimit(1) } } } } } .padding() } } struct CrazyWidget: Widget { let kind: String = "RailMe" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, provider: Provider()) { entry in CrazyWidgetEntryView(entry: entry) } .configurationDisplayName("RailMe GGGGG") .description("View your current tasks saved from the main app.") .supportedFamilies([.systemSmall, .systemMedium]) } } #Preview("Small - Full Data") { CrazyWidgetEntryView(entry: SimpleEntry(date: Date(), tasks: TaskItem.previewTasks)) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to Question Regarding Enrollment for Apple Developer Account
Should I proceed with the enrollment myself No. Probably, your client hasn't enrolled you under their account properly.
Replies
Boosts
Views
Activity
Nov ’25
Reply to In-App Purchase Issue in App Store Connect
because the products screen doesn't load for reviewers What does that mean? Where? Since the introduction of iOS 26, it's possible that tool buttons can appear in 2 x 2 points. If that's the case, they probably cannot even open your store sheet or navigation to your store view.
Replies
Boosts
Views
Activity
Jan ’26
Reply to What's Wrong with Apple Review?
@darkpaw, thank you for your advice. I'm not going to change anything for now. If they believe that the Send button must be enabled, I don't think anything could help. I wish they just asked before jumping to a conclusion. All the fun is gone. I have little desire left with this app after waiting for 10 days.
Replies
Boosts
Views
Activity
Jan ’26
Reply to App Store version stuck in Developer Rejected state, blocking IAP submission
Isn't it just the matter of creating a new subscription group with a new set of product identifiers? You should have switched to the manual release as opposed to auto release and then submit a software update when you decided not to release the initial version. You have made the initial group of product identifiers useless, I guess.
Replies
Boosts
Views
Activity
Jan ’26
Reply to "In-App Purchases and Subscriptions" missing, WHY????
I'm in the same shoes since the end of the last December. Because my app contains the Japanese localization package, I thought I was not able to have subscription plans due to the holiday season and the Japan MSCA. But an Apple local rep. says that's not the case. I already released the app by reducing features. In the near future, I want to add subscription plans since it currently has no mineralization mechanism whatsoever. At this moment, it seems that I've reached the end of the rope. Seeing the last submission with subscription plans, I don't see anything wrong with the app in question. Also, I have deleted an existing sub group with a new one once or twice with no resolution.
Replies
Boosts
Views
Activity
Jan ’26
Reply to Subscription Group Remains as Prepare for Submission
I've consulted the local Apple Contact Us group. They replied last week that 'Prepare for Submission' is indicative of missing information. I already know that since this app submission is about 250th with IAPs. Then he or she said that my subscription plan may not have a screenshot. That's the case, either. They often try to solve an issue with a guess, which leads nowhere.
Replies
Boosts
Views
Activity
Jan ’26