This happened suddenly after installing Xcode 15.3. Both simulator and actual device on versions other than iOS 17.4 (e.g. 17.2, my minimum deployment target) are crashing on start. It's working fine on iOS 17.4. The error message is this:
dyld[2687]: Symbol not found: _$s10AppIntents0A16ShortcutsBuilderO10buildBlockySayAA0A8ShortcutVGAGd_tFZ Referenced from: <CAAA4ECB-9E8B-3089-BAA3-30353A952A4F> /Users/abc/Library/Developer/CoreSimulator/Devices/855CEC69-3F94-4A57-99DA-23000B104AC5/data/Containers/Bundle/Application/F72ABCFE-4B85-461E-9B1D-4589DAB9262F/MyApp.app/MyApp Expected in: <6683DFEB-450B-3643-B865-E4D9D0B501D6> /Library/Developer/CoreSimulator/Volumes/iOS_21C62/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AppIntents.framework/AppIntents
The issue is gone if I comment out my Shortcuts related code (it's only a few lines):
import Intents
import SwiftData
import AppIntents
struct MyAppIntent: AppIntent {
static var title: LocalizedStringResource = "doSomething"
@Parameter(title: "myParam")
var myParam: URL
@MainActor
func perform() async throws -> some IntentResult {
// perform task here ...
return .result()
}
static var parameterSummary: some ParameterSummary {
Summary("Summary")
}
}
struct MyAppShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: MyAppIntent(),
phrases: ["MyAppIntent"],
shortTitle: "MyAppIntent",
systemImageName: "play.rectangle.fill"
)
}
}
There are no additional frameworks installed, I've cleaned build folders and restarted everything multiple times. It's also happening on the TestFlight version.
Anything I could try to fix this?
I had the same issue! It even happens on the User's device running 17.3.1 (20+ crash/day).
Apple just released 15.4, which seems to fix the issue in the simulator 17.2; hopefully, this will fix the issue on the user's device as well!
Edit May 18, 2024: it seems to be fixed now as the crashes drop back down to 0 with Xcode 15.4 compiled binary.