VisionKit crashes on iOS 16.4.

App crashes on iOS 16.4 when there is usage for ImageAnalysisInteraction api from VisionKit. App crashes before even starts.

Here is output:

dyld[3240]: Symbol not found: _$s9VisionKit24ImageAnalysisInteractionC7subject2atAC7SubjectVSgSo7CGPointV_tYaFTu
  Referenced from: <BAD7A699-FB4E-3D0E-8CD4-45CC9FC3D5E5> /Users/sereza/Library/Developer/CoreSimulator/Devices/B64EAF39-0DD9-49EC-A3F7-69675C94B8BE/data/Containers/Bundle/Application/F4E30E86-ED4D-4748-AB99-434208D55483/VisionKitChecker.app/VisionKitChecker
  Expected in:     <F05E3A17-D74A-3EE2-BC8D-DDCC23E48707> /Library/Developer/CoreSimulator/Volumes/iOS_20E247/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 16.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/VisionKit.framework/VisionKit

Here is enough code to produce this crash. Please note that this code never gets called. It is enough that it exists in the project:

import VisionKit

@MainActor 
final class LiftHelper: ObservableObject {
    func doSomething() async throws {
        let interaction = ImageAnalysisInteraction()
        let _ = try await interaction.image(for: [])
    }
}

Hello @asdjaslkdjlaksjklfhalkhkf,

Thank you for creating this thread, unfortunately I do not have a workaround to recommend, please submit a bug report for this issue using Feedback Assistant.

Best regards,

Greg

I have the same problem:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 4 Symbol missing
Symbol not found: _$s9VisionKit24ImageAnalysisInteractionC7SubjectV5imageSo7UIImageCvg
Referenced from: <5850C280-4CF7-3AAD-A6BD-701F4853126F> /Volumes/VOLUME/*/360° Menu.app/360° Menu
Expected in:     <78A10766-36E2-3820-A851-6A13ADB140AD> /System/Library/Frameworks/VisionKit.framework/VisionKit
(terminated at launch; ignore backtrace)

Please note that this code never gets called. It is enough that it exists in the project.

@asdjaslkdjlaksjklfhalkhkf Let's try the next steps:

-Select your crashing target. -Select Build Phases tab. -Expand Link Binary With Libraries and change Embed setting to be Optional for the offending framework.

VisionKit crashes on iOS 16.4.
 
 
Q