What does it mean to “weak-link” a framework?

后端 未结 3 1871
渐次进展
渐次进展 2020-12-05 08:00

In Xcode, I can set a framework to \"Optional\" instead of \"Required\", which then means the framework is weak linked.

Does that mean the framework is only

3条回答
  •  攒了一身酷
    2020-12-05 08:20

    I encountered weak linking when I was using iAds. The problem was if I strong link iAds framework and run the app on a device with SDK which did not supported iAds then it will simply crash. Weak linking allowed to avoid the crashes. I still believe that even with weak linking you still have to check in code if the framework is available or not.

提交回复
热议问题