Post

Replies

Boosts

Views

Activity

iOS Simulator in Xcode 26.1 makes ReportCrash process run at 60-160% of CPU
My MBP M1 Pro gets really hot. iOS 26.1 Simulator in Xcode 26.1 makes ReportCrash process run at 60-160% of CPU shows Activity Monitor. MacOS 26.1. I've reported this via Feedback Assistant: FB20918609. Is there a way to quit this process permanently? When I Force Quit this it opens again immediately. Only way to stop it is to quit Simulator. But then again, I need to use the Simulator.
3
9
1.5k
Nov ’25
SwiftUI and ShareLink - Save button on Share Sheet crashes the app
I have an iOS/iPadOS app. When I run the app on Mac as a Designed for iPad app, Save button on the Share Sheet crashes the app. I want to share a view with ImageRenderer, but here's an even easier example where I am trying to share an SF Symbol as an image. ShareLink(item: Image(systemName: "swift"), preview: SharePreview(Text("PNG"), image: Image(systemName: "swift"))) Share button works. It opens Share Sheet. "Add to Photos" works. "Copy" works. I can paste the image file in Finder after I press "Copy". But when I press the "Save" button, my app crashes with the error: Thread 1: "-[NSItemProvider pathExtension]: unrecognized selector sent to instance 0x600001c1e290" How to fix this error? How to make saving the image work? Maybe I need additional permissions in plist? I already have "Privacy - Photo Library Additions Usage Description" and everything on iOS and iPadOS works without a problem.
2
1
1.1k
Oct ’24
Xcode, iOS app - How to disable iPad and Mac compatibility?
I want to release my first iOS app on App Store. I would like to make it iOS only. Without an option to download and run on iPad and Mac. However, TestFlight shows me this app on both iPad and Mac. Why can I test my iOS app on iPad when I specifically disabled iPad in Target’s Deployment Info? How to disable it? How to prevent the app from distributing to iPad and Mac? Deployment info is set to iPhone only. On App Store Connect I didn't add macOS app. And yet, it's still available in TestFlight and under compatibility it says: iPhone, iPad, macOS.
0
0
2.8k
Feb ’22
SwiftUI, Core Data, ScrollViewReader - [error] precondition failure: invalid graph update (access from multiple threads?)
I'm trying to make a list of Core Data items in SwiftUI where adding new item will also trigger scroll to last item. Here is a code I have. It's based on sample Core Data app in Xcode. One Entity: Item with one attribute: timestamp. import SwiftUI import CoreData struct ContentView: View { @Environment(\.managedObjectContext) private var viewContext @FetchRequest( sortDescriptors: [NSSortDescriptor(keyPath: \Item.timestamp, ascending: true)], animation: .default) private var items: FetchedResults<Item> var body: some View { NavigationView { ScrollViewReader { proxy in ScrollView { ForEach(items, id: \.self) { item in Text("Some item") .padding() .id(item.objectID) } .onDelete(perform: deleteItems) } .onChange(of: items.count) { _ in // DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { withAnimation { proxy.scrollTo(items.last?.objectID) } // } } .toolbar { ToolbarItem { Button(action: addItem) { Label("Add Item", systemImage: "plus") } } } } Text("Select an item") } } private func addItem() { withAnimation { let newItem = Item(context: viewContext) newItem.timestamp = Date() do { try viewContext.save() } catch { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. let nsError = error as NSError fatalError("Unresolved error \(nsError), \(nsError.userInfo)") } } } private func deleteItems(offsets: IndexSet) { withAnimation { offsets.map { items[$0] }.forEach(viewContext.delete) do { try viewContext.save() } catch { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. let nsError = error as NSError fatalError("Unresolved error \(nsError), \(nsError.userInfo)") } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) } } It works, but I'm getting errors like this in Xcode: 2022-02-06 16:28:47.280984+0700 scroll[901:2894134] [error] precondition failure: invalid graph update (access from multiple threads?) How to fix this? My guess is that it's something to do with concurrency. When new item is created it gets new id. Number of item changes. Core Data saves data. UI scrolls with animation. But maybe when scroll is triggered, swift is still not sure which item is last on the list? So, things I've tried: If you uncomment DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { And closing bracket as well - I am not getting an error when I'm adding one item at a time. But if I tap + few times, I'm getting errors again. Another surprising thing is that if I change ScrollView to List, I am not getting errors at all. Even without DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
0
0
1.1k
Feb ’22
SIWA JS and content available to predefined users
I would like to use Sign In with Apple JS on my website to show some pages or content only to predefined user. This is an example logic I would like to achieve: if userID or userEmail == "someValue" { // show page or content } In particular, I would like to show an admin panel only to users with particular username or email address or some ID or whatever. I don't want to allow signing up with SIWA for anyone. And just use SIWA JS to allow a safe way of signing in. Is it possible with Sign In with Apple JS? P.s. Technology I would like to use on my website: HTML, CSS, PHP, JS.
0
0
805
Jan ’22
iOS Simulator in Xcode 26.1 makes ReportCrash process run at 60-160% of CPU
My MBP M1 Pro gets really hot. iOS 26.1 Simulator in Xcode 26.1 makes ReportCrash process run at 60-160% of CPU shows Activity Monitor. MacOS 26.1. I've reported this via Feedback Assistant: FB20918609. Is there a way to quit this process permanently? When I Force Quit this it opens again immediately. Only way to stop it is to quit Simulator. But then again, I need to use the Simulator.
Replies
3
Boosts
9
Views
1.5k
Activity
Nov ’25
SwiftUI and ShareLink - Save button on Share Sheet crashes the app
I have an iOS/iPadOS app. When I run the app on Mac as a Designed for iPad app, Save button on the Share Sheet crashes the app. I want to share a view with ImageRenderer, but here's an even easier example where I am trying to share an SF Symbol as an image. ShareLink(item: Image(systemName: "swift"), preview: SharePreview(Text("PNG"), image: Image(systemName: "swift"))) Share button works. It opens Share Sheet. "Add to Photos" works. "Copy" works. I can paste the image file in Finder after I press "Copy". But when I press the "Save" button, my app crashes with the error: Thread 1: "-[NSItemProvider pathExtension]: unrecognized selector sent to instance 0x600001c1e290" How to fix this error? How to make saving the image work? Maybe I need additional permissions in plist? I already have "Privacy - Photo Library Additions Usage Description" and everything on iOS and iPadOS works without a problem.
Replies
2
Boosts
1
Views
1.1k
Activity
Oct ’24
App screenshots - PNG or JPG?
👋 Hey, folks. Does Apple convert app screenshots uploaded to App Store Connect before displaying them on the App Store? In other words, is it better to upload PNG files for better quality or JPG files for lower file size and faster loading?
Replies
2
Boosts
0
Views
1.2k
Activity
Jul ’24
Xcode, iOS app - How to disable iPad and Mac compatibility?
I want to release my first iOS app on App Store. I would like to make it iOS only. Without an option to download and run on iPad and Mac. However, TestFlight shows me this app on both iPad and Mac. Why can I test my iOS app on iPad when I specifically disabled iPad in Target’s Deployment Info? How to disable it? How to prevent the app from distributing to iPad and Mac? Deployment info is set to iPhone only. On App Store Connect I didn't add macOS app. And yet, it's still available in TestFlight and under compatibility it says: iPhone, iPad, macOS.
Replies
0
Boosts
0
Views
2.8k
Activity
Feb ’22
SwiftUI, Core Data, ScrollViewReader - [error] precondition failure: invalid graph update (access from multiple threads?)
I'm trying to make a list of Core Data items in SwiftUI where adding new item will also trigger scroll to last item. Here is a code I have. It's based on sample Core Data app in Xcode. One Entity: Item with one attribute: timestamp. import SwiftUI import CoreData struct ContentView: View { @Environment(\.managedObjectContext) private var viewContext @FetchRequest( sortDescriptors: [NSSortDescriptor(keyPath: \Item.timestamp, ascending: true)], animation: .default) private var items: FetchedResults<Item> var body: some View { NavigationView { ScrollViewReader { proxy in ScrollView { ForEach(items, id: \.self) { item in Text("Some item") .padding() .id(item.objectID) } .onDelete(perform: deleteItems) } .onChange(of: items.count) { _ in // DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { withAnimation { proxy.scrollTo(items.last?.objectID) } // } } .toolbar { ToolbarItem { Button(action: addItem) { Label("Add Item", systemImage: "plus") } } } } Text("Select an item") } } private func addItem() { withAnimation { let newItem = Item(context: viewContext) newItem.timestamp = Date() do { try viewContext.save() } catch { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. let nsError = error as NSError fatalError("Unresolved error \(nsError), \(nsError.userInfo)") } } } private func deleteItems(offsets: IndexSet) { withAnimation { offsets.map { items[$0] }.forEach(viewContext.delete) do { try viewContext.save() } catch { // Replace this implementation with code to handle the error appropriately. // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. let nsError = error as NSError fatalError("Unresolved error \(nsError), \(nsError.userInfo)") } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) } } It works, but I'm getting errors like this in Xcode: 2022-02-06 16:28:47.280984+0700 scroll[901:2894134] [error] precondition failure: invalid graph update (access from multiple threads?) How to fix this? My guess is that it's something to do with concurrency. When new item is created it gets new id. Number of item changes. Core Data saves data. UI scrolls with animation. But maybe when scroll is triggered, swift is still not sure which item is last on the list? So, things I've tried: If you uncomment DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { And closing bracket as well - I am not getting an error when I'm adding one item at a time. But if I tap + few times, I'm getting errors again. Another surprising thing is that if I change ScrollView to List, I am not getting errors at all. Even without DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
Replies
0
Boosts
0
Views
1.1k
Activity
Feb ’22
SIWA JS and content available to predefined users
I would like to use Sign In with Apple JS on my website to show some pages or content only to predefined user. This is an example logic I would like to achieve: if userID or userEmail == "someValue" { // show page or content } In particular, I would like to show an admin panel only to users with particular username or email address or some ID or whatever. I don't want to allow signing up with SIWA for anyone. And just use SIWA JS to allow a safe way of signing in. Is it possible with Sign In with Apple JS? P.s. Technology I would like to use on my website: HTML, CSS, PHP, JS.
Replies
0
Boosts
0
Views
805
Activity
Jan ’22