The way to run diagnose-api-breaking-changes for iOS

What is a way to run diagnose-api-breaking-changes for iOS?

I've tried different ways. The only one I could succeed was this.

swift package -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios11.0-simulator" diagnose-api-breaking-changes -v 1.0.0

But it results in "No breaking changes detected"

Furthermore there are many MacOSX12.3.sdk or x86_64-apple-macosx in logs.
Seems like an error in my command.

Could you please tell the correct command parameters to run it for iOS?

You are running against the simulator, not the device. Change the ```--sdk`` parameter to the appropriate device SDK

Can I use it for simulator? What the correct parameters are? @jonprescott

You are already using it for the simulator. You need to look up the options for the --sdk parameter if you want to use it against a specific device. Maybe --sdk iphone

@jonprescott I don't need it for the device. I want to compile it for the simulator, but the parameters above doesn't work. This parameters still produce a lot of macOS mentions in the logs. That's the issue. I need to correct parameters to avoid all the macOS mentions from the logs.

Otherwise it seems like diagnose-api-breaking-changes still does some part of job (for example, compilation) for the MacOS instead of iOS simulator.

Could you provide correct command line for iOS simulator?

lipo -info .build/x86_64-apple-macosx/debug/libMyLib.dylib

Non-fat file: .build/x86_64-apple-macosx/debug/libMyLib.dylib is architecture: x86_64