iPhone project has "My Mac 64-bit" - ios

I'm working on an iPhone project and somehow the schema has "My Mac 64-bit" and "My Mac 32-bit" in addition to the normal "Simulator 4.3" and "IOS Device".
Is there anyway to remove the "My Mac..." options? It always wants to switch to these when I switch git branches and I end up building without realizing it and get an error. More of an annoyance than anything.

Could possibly be something with your xcuserdata folder.
Right-click on the xcodeproj file and select "show package contents."
Make a backup copy of the xcuserdata folder.
Now delete everything inside the xcuserdata folder, and restart xcode.
If causes a problem, then put backup folder back in.

This happens to me every time files get modified outside of Xcode, and Xcode needs to reload the project file. Closing the project and re-opening it always fixes the issue for me.

If you are porting your Xcode project from one mac to other then this issue happens most often. You can Try These two resolutions: First one only worked for me:
Resolution:1
Open Your project folder > Right Click on Xcode and Select “Show Package Content” Inside there we will get one folder “XcuserData”.> Open the Xcuserdata folder and delete all its content. >Now Launch the Xcode project again, the problem should be fixed now.
if the above resolution is not working then try this one:
Resolution:2
open Xcode > clicked on Manage Schemes and then Autocreate Schemes Now > Then select the new scheme in Xcode.
Hope either resolution should work for you.

This is a bug in the beta builds for Xcode 4.2, with regards to their handling of Git repos (confirmed at WWDC with Xcode devs). According to a friend of mine it's been fixed in Xcode 4.2 beta 5, but there are a bunch of issues with that build and you might want to hold off until beta 6.

Step 1: Right Click on Xcode project > Show Package contents > xcuserdata > Delete All content
Step 2: Open project > select target > (Project name)Tests > Host Application > select application > allow testing application APIs
Resolved :) Enjoy your Code

I always open my projects from within Finder to get around this problem. Browse to your project directory, eg /apps/iOS/iPhone/SingleViewApp. Double clicking the .xcodeproj file launches the project within Xcode. I see "Checking DDI Symbols" msg and soon after iPhone device name appears.

Related

With Xcode how can I export and share an app with a team member in the simulator?

So I have a teammate/client I need to share an app I'm developing.
They have android and a Mac Desktop so it would be shared through the Simulator only.
I've tried the archive app and there seems to be no way to get this work with the .ipa file which is generated.
Does anyone know of a way to achieve this?
Share the source code, then run the app in Xcode. Voila, it is now in the Simulator. They have to install Xcode anyway to get the Simulator so there really isn't any extra work involved other than building the app.
The .ipa is built for iOS devices and cannot run in the Simulator. I suppose you could transfer the binary to another simulator and get it to work, but I have not heard of anyone doing it that way and, frankly, it seems like potentially more work than "clone this git repo, load the project/workspace in Xcode, click the triangle button and wait a bit."
All you can do is you can just generate the .app file. But how you can run it on a simulator (applies only if Xcode 8.2 or above isn't installed), I really don't have the idea. If you want to have your .app generated, follow this:
Connect any iPhone with your mac
Open your project in Xcode
Wait for the setup (processing symbol files, blah, blah) to be completed
Run your project in that iPhone once
Now just build your project while the iPhone is connected
Search for the Product group (or, folder) and expand it
You will see a file (maybe more) named as your target (project name)
Right click on that file and select show in finder. And voila, you have your .app file
What generates the .app
You will need to have previously built the app for the intended target. The "Product" option in the top menu bar includes a couple of ways to trigger this including: "Build for" of "Destination".
Where is the .app?
The yourApp.app you are looking for is stored in: <<YOURUSERHOME>>/Library/Developer/Xcode/DerivedData/<<YOURAPPNAME-UID>>/Build/Products/Debug-iphonesimulator
Easier way to locate
Open you app in XCODE
Browse the file tree in the left sidebar
Expand the "Products" directory
Right click the .app file you want to share, and select "Show In Finder"
What you are trying to do is not going to work. You can not share the .ipa file for someone else to install it on an iPhone simulator.

Renaming xcode project giving issues

I renamed my xcode (version 6.3) project and it worked fine, but as I shifted it to another machine, it didn't show any classes/ scheme. Even clicking on a new scheme is showing a "None" Target. See the screen shot.
Click on the left of the "My Mac" (where it usually says the name of the scheme), select Edit scheme, and on Run set the Executable to your APP_NAME.app
I resolved the issue by choosing the file inspector of .xcodeproj file and corrected the Location. It was picking some other location of any previous version. After that I created a new scheme and it works like a charm now!!

XCode won't run my application on a device/simulator anymore

I am kind of stuck with my XCode problem. First of all: I have a project that contains 5 different targets. Now something went wrong (I can't remember changing anything related to project settings).
If I want to run any target on device or simulator the build succeeds but then nothing happens. Neither the app is started in simulator nor on a device. So I checked the Scheme (-> "Edit scheme") and I could not select my app in the Executable menu. I think I can remember that the .app file was selected there before (as it is if i create any new project). Does anyone know why I can't select anything there?
What I am curious about, is the fact that choosing "Other" in the Executable menu brings me to my DerivedData directory that indeed contains the *.app file resulting from the build. That leads me to my next problem.
If I select this *.app file explicitly and try to run the app XCode gives me the error " does not have an architecture that can execute." But I checked my settings many times and I am definitly using $(ARCHS_STANDARD) in every target.
I am a little bit lost here ... does anyone has a hint, what could have messed up my project and how to fix it?
Might not work, but I've found a lot of bugs in xcode which simply require quitting it, and reopening.
You could also try clearing out the DerivedData directory. Do a full clean build (hold down option key when selecting clean build).
And lastly, reset the simulator via the menu iOS Simulator > Reset Content and Settings.
I got this when I changed the name of my App on one development machine and then tried to work on it a few months later on another machine. I fixed it by deleting the old scheme and Autocreating the new scheme. The settings are under Product - Scheme - Manage Schemes.
OK I solved the problem by myself. I was on the right track before. I did compare the project.pbxproj file again using FileMerge. I merged all lines related to an *.app file from the working version into my corrupt project file. After that my project was fixed. The *.app files showed up under the "Product" group in XCode and I could run the application on simulator/devices again. It seems that I forgot something while I was merging the files via copy & paste. ;)
Rather than cleaning out the DerivedData directory from Xcode, have you tried the "old fashioned" way from Finder? Try quitting Xcode, nuking ~/Library/Developer/Xcode/DerivedData/ModuleCache from Finder, and restarting Xcode.

Compilation fails in Xcode 4.6 while creating archive for adhoc distribution.

I am new to iOS. and i am trying adhoc distribution ipa file from xcode.
1) I could able compile and run the application in the iphone/ipad.
2) But when i create archive, i am getting compilation error saying 'something.h' not found.
Could someone kindly direct me what could be wrong?
1-Try to open the organizer (Window -> Organizer), then the Projects tab. Select your project then hit the delete button next to the derived data path (to the right). Confirm and let it re-index your project.
2-Go to your project folder, Press on YOURPROJECTNAME.xcodeproj and right click and go to show package contents . Leave the project.pbxproj file, but delete the project.xcworkspace file, any .pbxuser files, and the entire userdata folder.
I hope it works..
If you are putting things in a group in the XCode project navigator, and it is not an actual folder, you do not need to do Mountain/Mountain.h. You would just include Mountain.h.
When creating a group in the project navigator, by default, these are not actual folders, they are just virtual project folders, so if it is trying to see the Mountain folder and it does not exist, you will get that error.
It is weird that it will compile and run otherwise, but just give that a shot, let me know if it works.

"Base SDK Missing" after upgrading to Xcode 3.2.5

So I took the step upgrading to Xcode 3.2.5 (iPhone SDK 4.2) and now I cannot run to device. I always see this now in the dev environment:
In my current projects, when going to the project settings I can only set the Base SDK to iOS 4.2 but this doesn't change the "Base SDK Missing" problem. :/
I can however deploy to the simulator, and change which version I want the simulator to load as.
Does anyone know how to fix this?
If I create a new project I don't get this...
Thanks
I solved this problem, by doing this:
Project->Edit Project Settings->Build->Base SDK->Latest SDK (4.2)
Project->Edit Project Settings->Build->iOS Target Deployment->iOS 4.2
Project->Edit Active Target (myTarget)->Base SDK->Latest SDK (4.2)
Project->Edit Active Target (myTarget)->iOS Target Deployment->iOS 4.2
And, If you still have problems:
Click the box that says base SDK missing, and select:
Simulator -> Debug
That should do it.
You can double-click or right-click on your target and pull up it's Info. Click on the build tag and look for the setting for Base SDK. You probably want this set to Latest iOS, which is a new option and should prevent this from happening the next time you upgrade.
However, you might be better off doing this at the Project level, by selecting Project -> Edit Project Settings and following the steps above. You can also select the general tab under the project settings and set your Base SDK with the "Base SDK for all Configurations" drop down. That has the advantage of fixing a problem that sometimes crops up with your linked frameworks (if they are all in red in the sidebar, you have the problem).
I found that, with Xcode 3.2.5 after setting the Base SDK to Latest iOS in the Project and Target Build info settings, quitting and restarting Xcode automatically got rid of the "Base Missing SDK" message in the select widget.
Here's what you have to do:
Double click on the main project icon to open properties.
Under the General tab, set "Base SDK for all configurations" to "Latest iOS".
Under Build tab, set Base SDK to the same thing.
Repeat this step for all framework projects under your main project.
Finally, and this is the bit I was missing for an annoying week or so, double-click your TARGET (under "Targets") and perform the same steps.
Things should be back to normal - and since "Latest iOS" should hopefully keep you updated with each new SDK released, you won't have to go through all that again.
Finally - restart Xcode or otherwise cause the project file to be reloaded.
Unless you work with people who haven't upgraded yet and persist in submitting changed project files. Apply a similar penalty as you would for breaking a build until they get it. :-)
RESTarting is must folks .. if u won't restart your project (just close the project and then reopen it ) you will see the same thing " base sdk missing"... i also had the same trouble .. but restarting works..
I do not think you need to restart xCode, nor reopen your projects. Try this:
In the main project window, select Option-Cmd-E, choose build and "latest ios...".
Close the build window.
In the main project window, option-click the dropdown for Base SDK and you should see the latest build available.
Select that and you should be good to go.
Takes 5 seconds. I hope this helps..
This works fine for me. Just don't forget to restart Xcode.

Resources