I'm trying to run a project on Xcode (4.6.2) with Phonegap (2.7).
I create the project using the create command in the terminal window, and then when I open it in Xcode and click the run button on the top left corner it builds successfully, but does not launch the emulator. Also, when I click the project tab, the "Run" button is not an option.
Any ideas as to why Xcode is not letting me run this project?
Note, I can run other projects in Xcode perfectly, it's just this one I'm having difficulty with.
When you use the create_project script and open the project for the first time in XCode, the CordovaLib sub-project is selected as the Run scheme so it builds CordovaLib OK but there's nothing to run. This has caught me out a few times and left me wondering why my project built but didn't run until I remembered to look at the scheme.
On the main toolbar at the top of Xcode, make sure the Scheme (next to Run and Stop buttons) is set to your project's name (the parent project) and not "CordovaLib" (the child project). The Scheme should read something like "My Project > iPhone" not "CordovaLib > iPhone".
Related
I'm trying to launch an Objective C app built on Xcode5 on Xcode6 beta (Version 6.0 (6A215l)). I get the following message when trying to build for any platform except for iPhone 5s:
Xcode cannot run using the selected device.
The selected device specifies an unsupported architecture.
It's not even obvious how to begin troubleshoting this as I can't get to the point where the console is activated. Any pointers?
I just had this myself.
I tried a few things (closing simulator before running, having it open, resetting), but what seemed to fix it was a simple clean, build and then run
If that's not it then I have a couple of other things I did but I don't think they were responsible
I was getting the same issue when the Xcode-> Targets-> General-> Deployment->Devices selected is iPad. but I am going to run this project on iPhone. check your project.
I bumped into this issue after changing the Executable file field in the info tab of my target settings - changing this back to the default ${EXECUTABLE_NAME} fixed it for me.
I was getting the same issue and no amount of cleaning solved it. I had to remove all Swift files from my project. Then I re-added them, but made sure to unselect the "Add to Target" option in the file add dialog. Finally, manually added them to the "Compile Sources" section of your project's "Build Phases". This did it for me. (Also make sure no Swift files end up in the "Copy Bundle Resources" section of Build Phases).
Close simulator if it is opend
Press Command + shift + k (or clean the project by selecting product menu item from xcode menu) and then press Command + r (or run the project)...
iPhone3gs-->iPhone4s:armv7
iPhone5/iPhone5c: armv7s
iPhone5s --> iPhone6Plus :arm64
add architecture to BuildSetting -> Architecture
I set my Xcode 5 project to use a build target of OSX 10.6, unchecked "Use Autolayout" for MainMenu.xib and followed this answer to turn off base internationalization. This resulted in my MainMenu.xib file being removed from my project. When I build and run my project the window layout is how I left it, but going into finder, opening MainMenu.xib in Interface Builder and changing it's layout does not effect my project when I go to build and run it again.
How do I change the GUI for projects set to a build target of 10.6?
Can be added again to the project by:
Drag MainMenu.xib from Finder to the project files panel in Xcode.
A dialog will open, select copy items (if needed), created folder references, and add to the project's target (not "test"), click Finish and it should work!
If a more complete answer is added, I will best answer it instead of my own.
If I just build my Xcode 4 project (using the cmd-B) command, which target is built?
I'm having trouble understanding the new scheme setup. When I look at the currently selected scheme, under the "Build" tab, all my different build types are checked (ie: Analyze, Test, Run, Profile, Archive). However, when I build, it seems like only "Run" is built. And for the *.app file that is produced, is this built using the "Build Configuration" set under the "Run" tab?
Thanks!
Sunny
Whichever target that is in selection next to your Run, Stop button in your Xcode.
Having some trouble with Xcode 4 here. Sometimes I hit ⌘-U (Launch Tests) instead of ⌘-R (Build and Run) and it's frustrating for a perfectionist like me when error "Unit tests are not implemented yet in XXXXXtests" remains in the Issue Navigator even after a successful Build & Run.
The question, in a nutshell, is how do I remove or ignore individual issues in the Issue Navigator in Xcode 4?
click on your project in the project navigator, in your Project View you should now have a left view with
Project
your project name
Targets
your target name
your target name tests
you know, where u have all the build settings and stuff
right click on the tests one and delete it
When I start an Xcode project I drag in a blank readme.txt file that I use to take notes with while I'm figuring things out. The thing is, the file gets put in the app bundle at build time. Then I have to deselect it in the Detail view so that won't happen.
Is there a way to automatically exclude a file with a known name from every build?
I know Xcode is automatable, but I don't know where to look.
Using the latest non-beta Xcode version.
In the project outline view (by default this is the left hand pane when you open Xcode) locate your application under the 'Targets' section. Expand the subheadings, one of which will be 'Copy bundle resources'. You will probably find your unwanted text file has been placed here automatically. Highlight the file here and delete it - this will leave the file in your project but will prevent Xcode from copying it to your App bundle when you perform a build. To finish off, select 'Clean & Build' from the Xcode build menu to clear out your old bundle completely and recreate it with your new setting.