在Xcode外部运行可可应用程序 [英] Running cocoa application outside Xcode

查看:123
本文介绍了在Xcode外部运行可可应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Xcode中运行可可应用程序时,它可以正常工作。
但是我要转到.app文件所在的位置,然后从那里运行它,显示此错误:

When I'm running my cocoa application inside Xcode it works fine. But I'm going to where the .app file is and run it from there this error shows up:

Process:         QBLoader [4571]
Path:            /Users/USER/Library/Developer/Xcode/DerivedData/QBLoader-egxdvwlbzueazygfdbjqcxtgyvqz/Build/Products/Debug/QBLoader.app/Contents/MacOS/QBLoader
Identifier:      com.fsm.QBLoader
Version:         1.0 (1)
Code Type:       X86-64 (Native)
Parent Process:  launchd [210]

Date/Time:       2012-05-25 09:25:31.121 +0200
OS Version:      Mac OS X 10.7.3 (11D50)
Report Version:  9

Interval Since Last Report:          62057 sec
Crashes Since Last Report:           10
Per-App Interval Since Last Report:  20 sec
Per-App Crashes Since Last Report:   10
Anonymous UUID:                      5DEC6815-69C3-48FA-A3C4-3EEBC31CC1B6

Crashed Thread:  0

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: /Library/Frameworks/SBJson.framework/Versions/A/SBJson
  Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/QBLoader-egxdvwlbzueazygfdbjqcxtgyvqz/Build/Products/Debug/QBLoader.app/Contents/MacOS/QBLoader
  Reason: image not found


推荐答案

我。
我将SBJson目标的安装目录更改为: @ executable_path /../ Frameworks。
现在可以在Xcode之外运行应用程序了。

This is what worked for me. I changed "Installation directory" for the SBJson target to: "@executable_path/../Frameworks". Now is it possible to run the application outside Xcode.

这篇关于在Xcode外部运行可可应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆