ios - 如何将 32 位二进制文​​件添加到 UIKit for Mac 上的 libsodium?

标签 ios xcode macos xcodebuild uikitformac

我在 Mac 的 UIKit 上为 libsodium 创建了 xcframework:

xcodebuild -create-xcframework -library /Users/<user>/Documents/<project>/libsodium-ios/ios64/lib/libsodium.a  -headers /Users/<user>/Documents/<project>/libsodium-ios/ios64/include -library /Users/<user>/Documents/<project>/libsodium-ios/simulator64/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-ios/simulator64/include -library /Users/<user>/Documents/<project>/libsodium-osx/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-osx/include -output /Users/<user>/Documents/<project>/libsodium.xcframework

Warnings related to headers being present but not usable are due to functions that didn't exist in the specified minimum iOS version level.
They can be safely ignored.

xcframework successfully written out to: /Users/<user>/Documents/<project>/libsodium.xcframework

但添加 32 位版本后出现错误:

xcodebuild -create-xcframework -library /Users/<user>/Documents/<project>/libsodium-ios/ios32/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-ios/ios32/include -library /Users/<user>/Documents/<project>/libsodium-ios/ios32s/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-ios/ios32s/include -library /Users/<user>/Documents/<project>/libsodium-ios/ios64/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-ios/ios64/include -library /Users/<user>/Documents/<project>/libsodium-ios/simulator32/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-ios/simulator32/include -library /Users/<user>/Documents/<project>/libsodium-ios/simulator64/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-ios/simulator64/include -library /Users/<user>/Documents/<project>/libsodium-osx/lib/libsodium.a -headers /Users/<user>/Documents/<project>/libsodium-osx/include -output /Users/<user>/Documents/<project>/libsodium-xcframework/libsodium.xcframework

Warnings related to headers being present but not usable are due to functions
that didn't exist in the specified minimum iOS version level.
They can be safely ignored.

The operation couldn’t be completed. (XCBCore.XCFrameworkValidationError error 8.)
  1. 什么是 XCBCore.XCFrameworkValidationError 错误 8?

  2. 如何为 Xcode 11 的 Mac(macOS + iOS)UIKit 构建 libsodium?

更新: Build 不是 Mac 的 UIKit。问题已关闭。非常感谢。

最佳答案

UIKitForMac 只能在 macOS 10.15 上运行,不支持 32 位。

您的 XCFramework 应仅包含 iOS 和 iOS 模拟器部分的 32 位二进制文​​件。

关于ios - 如何将 32 位二进制文​​件添加到 UIKit for Mac 上的 libsodium?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56486177/

相关文章:

iphone - Index like iOS 联系人应用

ios - 无法存档 iOS 应用

python - FastScripts MacOSX 应用程序 : strange stdin behavior when calling subprocessed Python scripts

macos - 为什么在Mac上使用Python和Pygame播放声音的这段代码无法加载文件并崩溃?

macos - 使用 CMake 自定义 MacOS Bundle 的 Info.plist 文件

ios - 防止 UIView 在 Swift 中溢出到 SuperView 之外

ios - 1 为企业和 App Store 打造的应用程序

iphone - 使用带有 webView 的 View 时,并不总是检测到摇动手势

IOS XCode 放置视频文件的正确位置

具有渐变背景的 iOS UITextField