atfelix
(Adam Felix)
1
I'm investigating an issue with iOS simulators. Frequently when I attempt to run a debugger (view, memory graph, some breakpoints or pausing the simulator), I'm presented with this warning.
warning: Module "/usr/lib/system/libsystem_kernel.dylib" uses
triple "x86_64-apple-macosx14.0.0", which is not compatible
with the target triple "x86_64-apple-ios14.0.0-simulator".
Enabling per-module Swift scratch context.
I'm not sure which build settings in Xcode (or something else) could be cause this warning. I suspect it's macOS Deployment Target, but I'm not sure how to resolve the issue currently.
Does anyone know how to resolve this warning?
7 Likes
Guillermo
(Guillermo González Irigoyen)
2
I had the same issue since using Xcode 14.n.n and kept on Xcode 15.n.n while trying to use the view debugger:
... which is not compatible
with the target triple "**x86_64-apple-ios15.0.0-simulator**"...
After more research, I stumbled upon a 'Disable the address sanitizer' comment
Edit Scheme > Run > Diagnostics > Runtime Sanitation
But I found that address sanitizer is disabled by default, and playing around with the scheme did not work either.
So, what I can share is how I solved it on my particular case, because was related to how I wrote a class of my application.
The issue was that I was providing a default value for a stored property at the top level of one the classes used on a particular view, that depended on another instance property.
final class MyClass {
private var audioPlayer: AVAudioPlayer = AVAudioPlayer()
...
class TheClassThatHoldMyClass {
var myClass: MyClass
init() {
myClass = MyClass()
...
public struct TheView: View {
var theClassThatHoldMyClass: TheClassThatHoldMyClass
...
and I solved it by initializing the property on the class initializer:
final class MyClass {
private var audioPlayer: AVAudioPlayer?
init() {
audioPlayer = AVAudioPlayer()
...
After that, warning disappeared and the View Debugger worked again; I know this does not generalize but maybe will help someone, I struggled with this for a long time.
1 Like