Xamarin Embedded 内容包含 Swift 代码

Xamarin Embedded content contains Swift code

我已成功创建绑定库,它在 Xamarin.iOS 应用程序中正确初始化,但在特定时刻,应用程序崩溃了。 我尝试在 XCode 上实现相同的功能,它也崩溃了,但问题已通过根据 this answer.[=14 启用选项 Embedded content contains Swift Code = true 得到解决=]

那么如何在 Xamarin 中启用相同的选项?

Swift 框架的使用和 Swift 支持库的包含在 Xamarin 构建过程中未得到官方支持,因此您必须手动捆绑相关的 Swift 支持库进入您的 Xamarin.iOS 应用。

注意:您必须确保包含这些库的正确版本。

Github 上的用户 Flash3001 已经为 Swift 框架创建了 Nugets/packages

Swift 4

图书馆:

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/