swift的动态库

swift的动态库,第1张

概述共享可执行文件 iOS 有沙箱机制,不能跨App间共享共态库,但Apple开放了App Extension,可以在App和Extension间共间动态库(这也许是Apple开放动态链接库的唯一原因了)。 http://blog.lanvige.com/2015/01/04/library-vs-framework-in-ios/?utm_source=tuicool&utm_medium=refe

共享可执行文件 iOS 有沙箱机制,不能跨App间共享共态库,但Apple开放了App Extension,可以在App和Extension间共间动态库(这也许是Apple开放动态链接库的唯一原因了)。

http://blog.lanvige.com/2015/01/04/library-vs-framework-in-ios/?utm_source=tuicool&utm_medium=referral

 

Introducing extensions in iOS8 seems to change this a bit,because extensions are separate executables. Sharing code between an extension and its containing app is done via a framework. Apple is saying this in their release notes:

Emphasis is mine.

Source: https://developer.apple.com/library/content/documentation/Xcode/Conceptual/WhatsNewXcode-Archive/Articles/xcode_6_0.html#//apple_ref/doc/uid/TP40014509-SW14

Further,in the extension dev guIDe,they explain that you can share code between an extension and the containing app via a "embedded framework".

Source: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW1

My question is - what is an embedded framework,how does it differ from a dynamic framework,and will we really see proper dynamic linking in iOS8? All the documentation I‘ve read seems ambiguous about this.

 

"Embedded" and "Dynamic" frameworks don‘t refer to the same aspect of frameworks. They are not the opposite of one another. First,let‘s define what‘s a framework: in Apple lingo,a framework refers to some compiled code + the public headers of saID code.

Now a dynamic framework is a framework whose code was built as a dynamic library. It is the opposite of a "static" framework,where the code would be built as a static library. In case you‘re wondering,Wikipedia has a very nice explanation of what‘s the difference between a static and a dynamic library. And finally,an embedded framework is a framework that is packaged within an app,as opposed to being installed system-wIDe,in "/System/library/Frameworks" for example.

 

An embedded framework is simply one that‘s included in the app bundle,rather than a global framework which is installed in system directory.

Dynamic Frameworks doesn‘t means dynamically linked framework. Apps still just work in a sandBox environment.

 

https://stackoverflow.com/questions/25080914/does-ios-8-support-dynamic-linking

总结

以上是内存溢出为你收集整理的swift的动态库全部内容,希望文章能够帮你解决swift的动态库所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1020689.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-23
下一篇2022-05-23

发表评论

登录后才能评论

评论列表(0条)

    保存