Post

Replies

Boosts

Views

Activity

Instruments Crash using swiftui instrument
Instruments is crashing when the swiftui instrument is stopped (the session is finished) and the transfer begins from device to device: Crashed Thread: 11 Dispatch queue: com.apple.swiftuitracingsupport.reading Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [1633] I've tried removing derived data, reinstalling xcode, updating xcode (I originally thought this might be the issue -- I needed to update to 26.2 from the 26 RC -- the update didn't fix crash or change the crash report), and restarting both devices. I'm running Instruments/Xcode 26.2 on a MacBook Pro 15" (2018) running Mac OS 15.7.2 (24G325) with an iPhone 16 Pro Max running 26.2. Hoping someone else might have seen this or could help me troubleshoot. I find the swiftui instrument be helpful and like to use it :) I can post a complete crash report as well.
5
0
1k
Mar ’26
Document Type Export / Import in Xcode - Shared via Messages
I’ve created a document type for my app and set it up in the Info Configuration in Xcode. This all works as expected: Implemented with the Transferrable API and ShareLink, I can share an app’s file via the Files app or Notes and then import the file via a Share extension and the fileImport swiftUI api. My question is regarding Messages, specifically. It appears as a ShareLink option and I’m able to send my app’s document type via a message, but I’m unable to open it or share it (internally, with my app), other than being able to forward or delete it. If I copy the file, I can’t access it within my app (it’s still stored in the Messages private bundle) and startAccessingSecurityScopedResource returns false as expected. The message does detect the right icon, so it’s recognizing the custom document type. If my Share Extension, exported document type, and transferable implementation is configured correctly, should I be able to open a file for my app shared via Messages? Is this an allowed action? I get various answers from AI, and I can’t test this in the Simulator on pre-26 devices.
1
0
684
Feb ’26
Sheet + keyboard toolbar (18.3) - is anyone else still encountering this issue?
I'm pretty sure I'm writing this code correctly, and the keyboard toolbar shows up in the simulator. When I test on-device, though, the keyboard toolbar doesn't show up. I know this issue has been around intermittently since swiftui was released, but I figured it would have been fixed by now. I did submit another feedback request regarding this issue, but maybe I'm just writing the view in the wrong way to get this to function? I'm thinking that might be the case -- in another project I can get the toolbar to appear once, but after switching from one textfield to another it stops appearing. This is my attempt to get it to work in a simple demo project (excerpted from the original): // Content View NavigationStack { List { // ... } .toolbar { ToolbarItem(placement: .navigationBarTrailing) { EditButton() } ToolbarItem { Button(action: addItem) { Image(systemName: "plus") } } } } .sheet(item: $presentedItem) { item in NavigationStack { ItemView(item: item) .toolbar { ToolbarItem(placement: .topBarLeading) { Button("Cancel") { self.modelContext.delete(item) self.presentedItem = nil } } ToolbarItem(placement: .topBarTrailing) { Button("Save") { self.presentedItem = nil } } } .navigationTitle("Item") } } // Item View ScrollView { VStack { TextField("Title", text: $title, axis: .vertical) .focused($focus, equals: TextFieldFocus.title) } } .toolbar { ToolbarItemGroup(placement: .keyboard) { HStack { Spacer() Button("Done") { self.focus = nil print("done tapped") } } } } .navigationTitle("ItemView")
3
1
431
Feb ’25
UICollectionView self-sizing (list height) cells
I am trying to build a UICollectionView where the rows expand / collapse (for example, where the row only has a title initially, but when tapped expands to show a text view). I'm aware I can use UIContentConfiguration to swap a SwiftUI view for the cell's contentView, but I'm trying to do this in UIKit for configurability. I have watched WWDC 22, 10068: What's new in UIKit, which made this sound easy... I am using UICollectionLayoutListConfiguration for the UICollectionViewLayout. When a cell is tapped, I update the subviews' constraints to the "expanded" state, but this just causes the subviews to expand beyond the cell height. All subviews are on cell.contentView. Calling layoutIfNeeded, invalidateIntrinsicContentSize, on cell doesn't change the cell height. I assumed all I would need to do is set collectionView.selfSizingInvalidation = .enabledIncludingConstraints, but is overriding intrinsicContentSize of the cell the only way to accomplish this?
Topic: UI Frameworks SubTopic: UIKit
0
0
475
Oct ’24
Instruments Crash using swiftui instrument
Instruments is crashing when the swiftui instrument is stopped (the session is finished) and the transfer begins from device to device: Crashed Thread: 11 Dispatch queue: com.apple.swiftuitracingsupport.reading Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [1633] I've tried removing derived data, reinstalling xcode, updating xcode (I originally thought this might be the issue -- I needed to update to 26.2 from the 26 RC -- the update didn't fix crash or change the crash report), and restarting both devices. I'm running Instruments/Xcode 26.2 on a MacBook Pro 15" (2018) running Mac OS 15.7.2 (24G325) with an iPhone 16 Pro Max running 26.2. Hoping someone else might have seen this or could help me troubleshoot. I find the swiftui instrument be helpful and like to use it :) I can post a complete crash report as well.
Replies
5
Boosts
0
Views
1k
Activity
Mar ’26
Document Type Export / Import in Xcode - Shared via Messages
I’ve created a document type for my app and set it up in the Info Configuration in Xcode. This all works as expected: Implemented with the Transferrable API and ShareLink, I can share an app’s file via the Files app or Notes and then import the file via a Share extension and the fileImport swiftUI api. My question is regarding Messages, specifically. It appears as a ShareLink option and I’m able to send my app’s document type via a message, but I’m unable to open it or share it (internally, with my app), other than being able to forward or delete it. If I copy the file, I can’t access it within my app (it’s still stored in the Messages private bundle) and startAccessingSecurityScopedResource returns false as expected. The message does detect the right icon, so it’s recognizing the custom document type. If my Share Extension, exported document type, and transferable implementation is configured correctly, should I be able to open a file for my app shared via Messages? Is this an allowed action? I get various answers from AI, and I can’t test this in the Simulator on pre-26 devices.
Replies
1
Boosts
0
Views
684
Activity
Feb ’26
Sheet + keyboard toolbar (18.3) - is anyone else still encountering this issue?
I'm pretty sure I'm writing this code correctly, and the keyboard toolbar shows up in the simulator. When I test on-device, though, the keyboard toolbar doesn't show up. I know this issue has been around intermittently since swiftui was released, but I figured it would have been fixed by now. I did submit another feedback request regarding this issue, but maybe I'm just writing the view in the wrong way to get this to function? I'm thinking that might be the case -- in another project I can get the toolbar to appear once, but after switching from one textfield to another it stops appearing. This is my attempt to get it to work in a simple demo project (excerpted from the original): // Content View NavigationStack { List { // ... } .toolbar { ToolbarItem(placement: .navigationBarTrailing) { EditButton() } ToolbarItem { Button(action: addItem) { Image(systemName: "plus") } } } } .sheet(item: $presentedItem) { item in NavigationStack { ItemView(item: item) .toolbar { ToolbarItem(placement: .topBarLeading) { Button("Cancel") { self.modelContext.delete(item) self.presentedItem = nil } } ToolbarItem(placement: .topBarTrailing) { Button("Save") { self.presentedItem = nil } } } .navigationTitle("Item") } } // Item View ScrollView { VStack { TextField("Title", text: $title, axis: .vertical) .focused($focus, equals: TextFieldFocus.title) } } .toolbar { ToolbarItemGroup(placement: .keyboard) { HStack { Spacer() Button("Done") { self.focus = nil print("done tapped") } } } } .navigationTitle("ItemView")
Replies
3
Boosts
1
Views
431
Activity
Feb ’25
UICollectionView self-sizing (list height) cells
I am trying to build a UICollectionView where the rows expand / collapse (for example, where the row only has a title initially, but when tapped expands to show a text view). I'm aware I can use UIContentConfiguration to swap a SwiftUI view for the cell's contentView, but I'm trying to do this in UIKit for configurability. I have watched WWDC 22, 10068: What's new in UIKit, which made this sound easy... I am using UICollectionLayoutListConfiguration for the UICollectionViewLayout. When a cell is tapped, I update the subviews' constraints to the "expanded" state, but this just causes the subviews to expand beyond the cell height. All subviews are on cell.contentView. Calling layoutIfNeeded, invalidateIntrinsicContentSize, on cell doesn't change the cell height. I assumed all I would need to do is set collectionView.selfSizingInvalidation = .enabledIncludingConstraints, but is overriding intrinsicContentSize of the cell the only way to accomplish this?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
475
Activity
Oct ’24