我正在編寫一個框架(稱爲Lighthouse.framework),該框架反過來使用來自另一個框架(RegexKit.framework,準確地說)的代碼。我抄RegexKit.framework到我自己的框架,因此,它具有如下所示的結構:我可以在另一個框架中包含框架嗎?
Lighthouse.framework/
Versions/
A/
Frameworks/
RegexKit.framework
Lighthouse
然而,當我嘗試運行使用Lighthouse.framework(我的架構)的應用程序,我得到的以下錯誤:
dyld: Library not loaded: @executable_path/../Frameworks/RegexKit.framework/Versions/A/RegexKit
Referenced from: /Users/mdippery/Developer/Projects/Current/lighthouse/build/Debug/Lighthouse.framework/Versions/A/Lighthouse
Reason: image not found
顯然,加載程序沒有找到RegexKit。
我這裏還有裝載機希望加載路徑,禮貌otool
:
build/Debug/Lighthouse.framework/Versions/A/Lighthouse:
/Users/mdippery/Library/Frameworks/Lighthouse.framework/Versions/A/Lighthouse (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0)
@executable_path/../Frameworks/RegexKit.framework/Versions/A/RegexKit (compatibility version 0.4.0, current version 0.6.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.19.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 677.26.0)
我可以在另一個框架的框架?這是做到這一點的正確方法嗎?我該如何解決我的錯誤?
下面是如何在另一個框架中包含框架。 http://stackoverflow.com/a/27638841/1582217它被稱爲傘架。 – 2014-12-24 16:21:09
[如何在iOS sdk中創建Umbrella框架?](http://stackoverflow.com/questions/27484997/how-to-create-an-umbrella-framework-in-ios-sdk) – 2014-12-25 08:00:32