waiting for debugger to connect to the ios simulator

Viewed 111

I have created a binding library for xamarin.ios which is based on .xcframework. I followed this article https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-swift/walkthrough. the fact is that when I add a native reference to release-fat, I get a message: waiting for debugger to connect to the ios simulator and the app doesn't load in the iOS simulator. If I add a link to the release-iphonesimulator, the simulator starts and everything works. is there any way to solve this problem?

Reset the simulator does not help.

Because I need to create a library for both the simulator and the device at the same time

1 Answers

Did you try to combine iphoneos + iphonesimulator as a fat framework ?

  • Navigate to the build output folder with Release-iphoneos and Release-iphonesimulator subfolders and copy one of the frameworks as an initial version of the final output (fat framework).

    cp -R "Release-iphoneos" "Release-fat"
    
  • Combine modules from another build with the fat framework modules

    cp -R "Release-iphonesimulator/SwiftFrameworkProxy.framework/Modules/SwiftFrameworkProxy.swiftmodule/" "Release-fat/SwiftFrameworkProxy.framework/Modules/SwiftFrameworkProxy.swiftmodule/"
    
  • Combine iphoneos + iphonesimulator configuration as a fat framework

    lipo -create -output "Release-fat/SwiftFrameworkProxy.framework/SwiftFrameworkProxy" "Release-iphoneos/SwiftFrameworkProxy.framework/SwiftFrameworkProxy" "Release-iphonesimulator/SwiftFrameworkProxy.framework/SwiftFrameworkProxy"
    
  • Verify results

    lipo -info "Release-fat/SwiftFrameworkProxy.framework/SwiftFrameworkProxy"
    

Please check Step 12 in the link : https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-swift/walkthrough#build-a-native-library.

Related