My project was running fine on Xcode 14.x. It’s also running fine with Xcode 15.x and iOS 17.
But without making any changes, I’m getting a crash on startup and this error with Xcode 15.x and iOS 16:
<code>dyld[56820]: Symbol not found: _$s9VisionKit32ImageAnalysisInteractionDelegatePAAE22textSelectionDidChangeyyAA0cdE0CF
Referenced from: <9AB4D482-F7DC-3930-97FD-BEA5B0E7FDAC> /Users/name/Library/Developer/CoreSimulator/Devices/3E39921F-4570-4A7E-BC4C-BD47C2EECDFF/data/Containers/Bundle/Application/5683B911-CCC3-4D97-9EAC-97A8DF01AFBA/MyAppName.app/MyAppName
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
</code>
<code>dyld[56820]: Symbol not found: _$s9VisionKit32ImageAnalysisInteractionDelegatePAAE22textSelectionDidChangeyyAA0cdE0CF
Referenced from: <9AB4D482-F7DC-3930-97FD-BEA5B0E7FDAC> /Users/name/Library/Developer/CoreSimulator/Devices/3E39921F-4570-4A7E-BC4C-BD47C2EECDFF/data/Containers/Bundle/Application/5683B911-CCC3-4D97-9EAC-97A8DF01AFBA/MyAppName.app/MyAppName
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
</code>
dyld[56820]: Symbol not found: _$s9VisionKit32ImageAnalysisInteractionDelegatePAAE22textSelectionDidChangeyyAA0cdE0CF
Referenced from: <9AB4D482-F7DC-3930-97FD-BEA5B0E7FDAC> /Users/name/Library/Developer/CoreSimulator/Devices/3E39921F-4570-4A7E-BC4C-BD47C2EECDFF/data/Containers/Bundle/Application/5683B911-CCC3-4D97-9EAC-97A8DF01AFBA/MyAppName.app/MyAppName
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
This is my usage of ImageAnalysisInteractionDelegate
:
<code>import UIKit
import SwiftUI
import VisionKit
import Vision
struct TextRecognition: UIViewRepresentable {
let imageView = UIImageView()
class Coordinator: NSObject, ImageAnalysisInteractionDelegate {
var parent: TextRecognition
init(_ parent: TextRecognition) {
self.parent = parent
super.init()
// ...
}
// ...
}
func makeCoordinator() -> Coordinator {
Coordinator(self)
}
func makeUIView(context: Context) -> UIImageView {
// ...
}
// ...
}
</code>
<code>import UIKit
import SwiftUI
import VisionKit
import Vision
struct TextRecognition: UIViewRepresentable {
let imageView = UIImageView()
class Coordinator: NSObject, ImageAnalysisInteractionDelegate {
var parent: TextRecognition
init(_ parent: TextRecognition) {
self.parent = parent
super.init()
// ...
}
// ...
}
func makeCoordinator() -> Coordinator {
Coordinator(self)
}
func makeUIView(context: Context) -> UIImageView {
// ...
}
// ...
}
</code>
import UIKit
import SwiftUI
import VisionKit
import Vision
struct TextRecognition: UIViewRepresentable {
let imageView = UIImageView()
class Coordinator: NSObject, ImageAnalysisInteractionDelegate {
var parent: TextRecognition
init(_ parent: TextRecognition) {
self.parent = parent
super.init()
// ...
}
// ...
}
func makeCoordinator() -> Coordinator {
Coordinator(self)
}
func makeUIView(context: Context) -> UIImageView {
// ...
}
// ...
}
Anything I can do about this, other than maybe installing an old macOS version again or changing the required version?
Thanks 🙂