J'écris un cadre (appelé Lighthouse.framework) qui, à son tour, utilise le code d'un autre cadre (RegexKit.framework, pour être précis). Je l'ai copié RegexKit.framework dans mon propre cadre, de sorte qu'il a une structure comme ce qui suit:Puis-je inclure un cadre dans un autre cadre?
Lighthouse.framework/
Versions/
A/
Frameworks/
RegexKit.framework
Lighthouse
Cependant, lorsque je tente d'exécuter une application qui utilise Lighthouse.framework (mon cadre), je reçois le erreur suivante:
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
De toute évidence, le chargeur ne trouve pas RegexKit.
Here're les chemins du chargeur pour charger, attend avec la permission 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)
Puis-je inclure un cadre dans un autre cadre? Est-ce la bonne façon de le faire? Comment puis-je résoudre mon erreur?
Voici comment vous pouvez inclure un cadre dans un autre cadre. http://stackoverflow.com/a/27638841/1582217 C'est ce qu'on appelle le cadre parapluie. –
double possible de [Comment créer un cadre parapluie dans iOS sdk?] (Http://stackoverflow.com/questions/27484997/how-to-create-an-umbrella-framework-in-ios-sdk) –