objective c - Problems exporting Mac App from Xcode to the computer desktop -
i have frustrating problem exporting compiled copy of mac app desktop , have run. first background...
the app contains 2 referenced subprojects. first project creates archive , second 1 creates framework. both used main project perform functions.
the app runs fine within xcode. problem start when archive , try export desktop see how runs on it's own. use regular procedures when try , start app desktop, won't load. there's message saying dynamic loader can't find framework object. part of error report looks helpful says this...
dyld error message: library not loaded: @rpath/jxls.framework/versions/a/jxls
referenced from: /users/user/buntingsimulator.app/contents/macos/baseball situation simulator
reason: image not found
jxls exist it's not in exported mac app bundle. have suggestions on or for? suspicions lay in value of @rpath , how subproject referenced or built within main project.
thanks in advance.
this added in after got answer below. in case needs use thought i'd illustrate changes made project bit obscure...
first, need add copy files step build phase main target. mean?
the detail steps are:
1: click on main target main project 2: select buid phases 3: click on plus sign add build phase 4: pop box (select new copy files phase) 5: change 'destination' selection 'frameworks' 6: drag framework object left panel name section of new copy phase created
second, need go 'build settings' of framework target , replace @rpath @executable_path/../frameworks
if doing own use, make sure copy jxls /system/library/frameworks.
otherwise, @ this answer.