Xamarin.Swift3 do not swift the library between simulator and device?

Currently I am binding a Swift library to Xamarin.
I have compiled the binding library and consuming apps.
But when I start the app on simulator, it said

dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /Users/Bruce.Li/Library/Developer/CoreSimulator/Devices/69F6CD40-EF4C-4D37-B2A3-21F002851AA6/data/Containers/Bundle/Application/15813F6B-62FD-492D-821D-90F01A84BC60/VCPDemo.iOS.app/Frameworks/Alamofire.framework/Alamofire
Reason: no suitable image found. Did find:
/Users/Bruce.Li/Library/Developer/CoreSimulator/Devices/69F6CD40-EF4C-4D37-B2A3-21F002851AA6/data/Containers/Bundle/Application/15813F6B-62FD-492D-821D-90F01A84BC60/VCPDemo.iOS.app/Frameworks/libswiftCore.dylib: no matching architecture in universal wrapper
/Users/Bruce.Li/Library/Developer/CoreSimulator/Devices/69F6CD40-EF4C-4D37-B2A3-21F002851AA6/data/Containers/Bundle/Application/15813F6B-62FD-492D-821D-90F01A84BC60/VCPDemo.iOS.app/Frameworks/libswiftCore.dylib: stat() failed with errno=45
/Users/Bruce.Li/Library/Developer/CoreSimulator/Devices/69F6CD40-EF4C-4D37-B2A3-21F002851AA6/data/Containers/Bundle/Application/15813F6B-62FD-492D-821D-90F01A84BC60/VCPDemo.iOS.app/Frameworks/libswiftCore.dylib: no matching architecture in universal wrapper

I have checked the libswiftCore.dylib by lipo. It just include arm family arch binary.
But according to Xamarin.Swift3 description. It will in charge to switch the different binary between simulator and devices.
I have add the Xamarin.Swift3 in my consuming apps. But the x86 family binary still in SwiftFrameworksSimulator instead of in Frameworks.

Who can give some suggestion about this?

Best Answer

  • bruce_libruce_li
    Accepted Answer

    Sorry, I use wrong verison. I sorry my swift version is 3. but not check if it is 3.2. So I use Xamarin.Swift3. But actually, I should use Xamarin.Swift4. and It did work :smile:

Answers

  • bruce_libruce_li Member
    Accepted Answer

    Sorry, I use wrong verison. I sorry my swift version is 3. but not check if it is 3.2. So I use Xamarin.Swift3. But actually, I should use Xamarin.Swift4. and It did work :smile:

  • jezhjezh Member, Xamarin Team Xamurai

    Congrats, and thanks for sharing the answer.

Sign In or Register to comment.