2017-12-18 151 views
0

我为Mac安装程序创建一个requiresCheck.bundle项目,然后创建一个框架并将其拖动到该包。在mac应用程序包中嵌入框架

我认为这可能是因为我使用安装程序来运行捆绑软件,因为我在安装程序运行时从捆绑项目中获得值[[NSBundle mainBundle]executablePath],它是/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer。 所以也许运行搜索路径是基于这个位置。

这个框架的构建设置是如下:

enter image description here

捆绑项目的构建短语是如下:

enter image description here

构建捆绑项目的设置如下:

enter image description here

之后,我使封装该束和运行安装程序。然后输入这个包时会发生错误。它说:Error loading /var/folders/d5/ydvs_pts06l_v4pltvtd80880000gn/T/com.apple.install.AifpVAae/TMRequiredChecking.bundle/Contents/MacOS/TMRequiredChecking: dlopen(/var/folders/d5/ydvs_pts06l_v4pltvtd80880000gn/T/com.apple.install.AifpVAae/TMRequiredChecking.bundle/Contents/MacOS/TMRequiredChecking, 265): Library not loaded: @rpath/XXXXX.framework/Versions/A/XXXXX Referenced from: /var/folders/d5/ydvs_pts06l_v4pltvtd80880000gn/T/com.apple.install.AifpVAae/TMRequiredChecking.bundle/Contents/MacOS/TMRequiredChecking Reason: image not found

我检查了复制到TMRequiredChecking.bundle/Contents/Frameworks`文件夹的框架,并且我尝试了许多不同的路径(@executable_path ../ Frameworks,@ loader_path/Frameworks)动态库安装名称库“的框架项目。他们都没有工作。所以任何人都可以告诉我如何通过bundle项目找到这个框架。

谢谢!

回答

0

我已经找到了这个case.Refer解决这一链接Here

的@loader_path说明我设置了“动态安装名称基地”框架项目对@loader_path../Frameworks,然后设置“运行路径搜索路径“该项目的项目为@loader_path../Frameworks。那么一切都很好。

相关问题