Sto scrivendo un framework (chiamato Lighthouse.framework) che, a sua volta, utilizza il codice da un altro framework (RegexKit.framework, per essere precisi). Ho copiato RegexKit.framework nel mio quadro, in modo che abbia una struttura simile alla seguente:Posso includere un framework in un altro framework?
Lighthouse.framework/
Versions/
A/
Frameworks/
RegexKit.framework
Lighthouse
Tuttavia, quando si tenta di eseguire un'applicazione che utilizza Lighthouse.framework (il mio quadro), ottengo il errore seguente:
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
Ovviamente, il caricatore non trova RegexKit.
Here're i sentieri del caricatore prevede di caricare, cortesia 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)
Posso comprendere un quadro in un altro quadro? È questo il modo giusto per farlo? Come posso risolvere il mio errore?
Ecco come è possibile includere un framework in un altro framework. http://stackoverflow.com/a/27638841/1582217 Si chiama framework ombrello. –
possibile duplicato di [Come creare un framework Umbrella in sdk iOS?] (Http://stackoverflow.com/questions/27484997/how-to-create-an-umbrella-framework-in-ios-sdk) –