Added Mac target to iOS project in Xcode, now 'Error Starting Executable File'

牧云@^-^@ 提交于 2019-12-22 10:55:04

问题


I've decided to make a Mac OSX port of my iOS app, so based on a number of suggestions I've received I've simply added a new Cocoa target to my iOS project, and set up a series of 'libraries' (which encapsulate the core business logic of my app) which I have added to the OSX target. I have not added all of the UIViewController code to the OSX target - I will have to rewrite the UI code, for obvious reasons. The app is building fine (no compiler errors for missing libraries, etc.), but for some reason I get the following error message when I try to run the 'hello world' program, which I'd like to get working before I start coding in earnest. Here's the message:

Error Starting Executable 'MyExecutableMac'

No executable file found.
Use "file" or "exec-file" command.

As per this SO question, I made sure that the proper executable file was listed under the scheme build settings, so that it will actually run. However it actually appears that the .app file is not being packaged properly - the .app file is stil listed as "red" in the file list, meaning the file is missing. What might be causing this error?


回答1:


I had this problem in Xcode 4.2, I found that first doing a clean (Xcode > Product > Clean and option clicking Product > Clean Build Folder…) fixed it.



来源:https://stackoverflow.com/questions/6065839/added-mac-target-to-ios-project-in-xcode-now-error-starting-executable-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!