您可以为 iOS 构建动态库并在运行时加载它们吗? [英] Can you build dynamic libraries for iOS and load them at runtime?

查看:31
本文介绍了您可以为 iOS 构建动态库并在运行时加载它们吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS (iPhone/iPad) 是否支持动态库?

Are dynamic libraries supported on iOS (iPhone/iPad)?

在 Xcode 中,我尝试创建一个 新项目 -> Framework &库 -> Cocoa 库(动态).在项目设置中,我将Base SDK 设置为iOS device 4.1 并将目标设置为iOS4.1,但它有一个构建错误:

In Xcode, I tried to create a New project -> Framework & Library -> Cocoa Library (dynamic). In the project settings, I set the Base SDK to iOS device 4.1 and target to iOS4.1, but it has a build error:

target 指定了产品类型com.apple.product-type.library.dynamic",但iphonesimulator"平台没有这样的产品类型.

target specifies product type 'com.apple.product-type.library.dynamic', but there's no such product type for the 'iphonesimulator' platform".

我选择的版本是模拟器 -> 调试 -> i386.

推荐答案

在提出此问题时,iOS 不支持动态库,这将导致您的应用被拒绝.只允许使用静态库.

At the time this question was asked, Dynamic libraries were not supported by iOS and will result in your app getting rejected. Only static libraries are allowed.

然而,在 iOS8 中你可以使用动态库和框架.它应该正常工作"

However, in iOS8 you can use dynamic libraries and frameworks. It should "just work"

这篇关于您可以为 iOS 构建动态库并在运行时加载它们吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆