Xamarin Embedded content contains Swift code

614 views Asked by At

I have created binding library successfully, it is initialized properly in Xamarin.iOS app, but at specific point, the app is crashing. I tried to implement the same on XCode, it is crashing also, but the issue has been fixed by enabling the option Embedded content contains Swift Code = true as per this answer.

So How to enable same option in Xamarin?

1

There are 1 answers

6
SushiHangover On BEST ANSWER

The use of Swift frameworks and inclusion of the Swift support libs are not officially supported in the Xamarin build process and thus you have to manually bundle the relevant Swift support libraries into your Xamarin.iOS app.

Note: You have to make sure you include the correct version of those libraries.

User Flash3001 on Github has created Nugets/packages for the Swift frameworks

Swift 4

Libraries:

https://www.nuget.org/packages/Xamarin.Swift4.Accelerate/ https://www.nuget.org/packages/Xamarin.Swift4.ARKit/ https://www.nuget.org/packages/Xamarin.Swift4.AssetsLibrary/ https://www.nuget.org/packages/Xamarin.Swift4.AVFoundation/ https://www.nuget.org/packages/Xamarin.Swift4.CallKit/ https://www.nuget.org/packages/Xamarin.Swift4.CloudKit/ https://www.nuget.org/packages/Xamarin.Swift4.Contacts/ https://www.nuget.org/packages/Xamarin.Swift4.Core/ https://www.nuget.org/packages/Xamarin.Swift4.CoreAudio/ https://www.nuget.org/packages/Xamarin.Swift4.CoreData/ https://www.nuget.org/packages/Xamarin.Swift4.CoreFoundation/ https://www.nuget.org/packages/Xamarin.Swift4.CoreGraphics/ https://www.nuget.org/packages/Xamarin.Swift4.CoreImage/ https://www.nuget.org/packages/Xamarin.Swift4.CoreLocation/ https://www.nuget.org/packages/Xamarin.Swift4.CoreMedia/ https://www.nuget.org/packages/Xamarin.Swift4.Darwin/ https://www.nuget.org/packages/Xamarin.Swift4.Dispatch/ https://www.nuget.org/packages/Xamarin.Swift4.Foundation/ https://www.nuget.org/packages/Xamarin.Swift4.GameplayKit/ https://www.nuget.org/packages/Xamarin.Swift4.GLKit/ https://www.nuget.org/packages/Xamarin.Swift4.HomeKit/ https://www.nuget.org/packages/Xamarin.Swift4.MapKit/ https://www.nuget.org/packages/Xamarin.Swift4.MediaPlayer/ https://www.nuget.org/packages/Xamarin.Swift4.Metal/ https://www.nuget.org/packages/Xamarin.Swift4.MetalKit/ https://www.nuget.org/packages/Xamarin.Swift4.ModelIO/ https://www.nuget.org/packages/Xamarin.Swift4.Intents/ https://www.nuget.org/packages/Xamarin.Swift4.ObjectiveC/ https://www.nuget.org/packages/Xamarin.Swift4.OS/ https://www.nuget.org/packages/Xamarin.Swift4.Photos/ https://www.nuget.org/packages/Xamarin.Swift4.QuartzCore/ https://www.nuget.org/packages/Xamarin.Swift4.RemoteMirror/ https://www.nuget.org/packages/Xamarin.Swift4.SceneKit/ https://www.nuget.org/packages/Xamarin.Swift4.SIMD/ https://www.nuget.org/packages/Xamarin.Swift4.SpriteKit/ https://www.nuget.org/packages/Xamarin.Swift4.SwiftOnoneSupport/ https://www.nuget.org/packages/Xamarin.Swift4.UIKit/ https://www.nuget.org/packages/Xamarin.Swift4.Vision/ https://www.nuget.org/packages/Xamarin.Swift4.WatchKit/ https://www.nuget.org/packages/Xamarin.Swift4.XCTest/

Swift 3

https://www.nuget.org/packages/Xamarin.Swift3.AssetsLibrary/ https://www.nuget.org/packages/Xamarin.Swift3.AVFoundation/ https://www.nuget.org/packages/Xamarin.Swift3.CallKit/ https://www.nuget.org/packages/Xamarin.Swift3.CloudKit/ https://www.nuget.org/packages/Xamarin.Swift3.Contacts/ https://www.nuget.org/packages/Xamarin.Swift3.Core/ https://www.nuget.org/packages/Xamarin.Swift3.CoreAudio/ https://www.nuget.org/packages/Xamarin.Swift3.CoreData/ https://www.nuget.org/packages/Xamarin.Swift3.CoreGraphics/ https://www.nuget.org/packages/Xamarin.Swift3.CoreImage/ https://www.nuget.org/packages/Xamarin.Swift3.CoreLocation/ https://www.nuget.org/packages/Xamarin.Swift3.CoreMedia/ https://www.nuget.org/packages/Xamarin.Swift3.Darwin/ https://www.nuget.org/packages/Xamarin.Swift3.Dispatch/ https://www.nuget.org/packages/Xamarin.Swift3.Foundation/ https://www.nuget.org/packages/Xamarin.Swift3.GameplayKit/ https://www.nuget.org/packages/Xamarin.Swift3.GLKit/ https://www.nuget.org/packages/Xamarin.Swift3.HomeKit/ https://www.nuget.org/packages/Xamarin.Swift3.MapKit/ https://www.nuget.org/packages/Xamarin.Swift3.Intents/ https://www.nuget.org/packages/Xamarin.Swift3.ObjectiveC/ https://www.nuget.org/packages/Xamarin.Swift3.OS/ https://www.nuget.org/packages/Xamarin.Swift3.Photos/ https://www.nuget.org/packages/Xamarin.Swift3.QuartzCore/ https://www.nuget.org/packages/Xamarin.Swift3.RemoteMirror/ https://www.nuget.org/packages/Xamarin.Swift3.SceneKit/ https://www.nuget.org/packages/Xamarin.Swift3.SIMD/ https://www.nuget.org/packages/Xamarin.Swift3.SpriteKit/ https://www.nuget.org/packages/Xamarin.Swift3.SwiftOnoneSupport/ https://www.nuget.org/packages/Xamarin.Swift3.UIKit/ https://www.nuget.org/packages/Xamarin.Swift3.WatchKit/ https://www.nuget.org/packages/Xamarin.Swift3.XCTest/