I have a .gdbinit file. I have been using it for years. It is in my home directory. I still need to do Xcode debugging under gdb, not lldb. But Xcode 4.5.1 does not load the file when it runs an app.
I can load it manually with 'source ~/.gdbinit'. But that's a pain! Any way to configure it to load on launch?
How about adding source ~/.gdbinit to the Pre-actions part of the "Run" scheme in your project (Cmd + < to access the scheme editor)?
I read somewhere and have experienced that Xcode 4.5 and 4.5.1 have many bugs in them and this could be one of them. I cannot really help with this but to say:
1.) remove xcode.app from finder in applications
2.) download Xcode 4.4.1 from the apple website: https://developer.apple.com/downloads/index.action?name=Xcode%204.4.1
3.) put it into the applications folder.
4.) Run Xcode 4.4.1 and run your app!
I have had to do this twice due to these two versions of xcode being buggy.
Related
I recently updated my XCode to latest(period) 13.3 and working on a project on that, Now when i moved that project to other mac which has MacOS Catalina and has XCode version 12.3.
When i try to open the project it keeps showing me this dialogue
But i found a solution to make it work on lower version XCode which can be useful to other people too, So i am including answer too.
Hope It Helps :)
Just have to follow steps given below
Right Click On Your_Project_Name.xcodeproj and select Show Package Contents from the option menu. { Even if you have .xcworkspace, ignore it for now }
Open project.pbxproj from opened folder.
Change object version to 46 like given below
Hit Command(⌘) + S to save it and close the window.
If you have pods installed on that project then you have to reinstall them again { I guess you already know how to do that or follow setps given below }
Open Terminal
Run Command cd PATH_TO_YOUR_PROJECT_FOLDER, Hit Enter
Run pod install {No need to open podfile as we never made a change to it} and we're done
Go back to project folder and open Your_Project_Name.xcodeproj or Your_Project_Name.xcworkspace
NOTE:
Since It is work around way, we can not run this on newer iOS version simulator on which we want to test code However, we can run the code on physical device which has newer iOS version { which is also tricky part! }
TO RUN THE CODE ON LATEST IOS PHYSICAL DEVICE, FOLLOW BELOW STEPS
Download zip of your desired iOS version to run from the link
Close the XCode App.
Right click on XCode App from Application and select Show Package Contents
Move the downloaded folder to Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport.
Open the project and run it on physical device
If you get error of Unable to install the Application, click on Details and try to resolve it.
If your error says The code signature version is no longer supported then check out this answer, it solved the error.
Hope It Helps !!!
I'm talking about the GM version. It's not stable enough to get rid of xcode 4. But I'd like to start playing with the new stuff. Is it sufficient to drag it out of the dmg to the desktop and rename it, or is this going to lead to issues once it is dragged into applications?
When you double click to instal it will pop ask you, to overwrite or keep both. Just keep both. Worked for me
Once you extract the app from .dmg the window will be shown with Xcodes' large icon and Application folder. and it will say "Drag XCode Icon to Application Folder to install"(Something like that).
Before doing that, goto application folder just rename the existing Xcode version. And then do the drag and drop.
now you have both versions !
Create New folder in Applications with any name like - "Xcode 5 GM" (whatever new Xcode version, You just need to create folder for that in Applications)
Mount DMG file then Find Xcode file then Drag this file to Application/Xcode 5 GM what you have created earlier.
After file copied go and launch that file to complete installation.
I don't understand all the complication; I install Xcode 4 in /Applications (pretty much have to as it's installed from the MAS) and Xcode 5 in ~/Applications.
The only thing to do then is run xcode-select to ensure the correct command line utilities are used from, err, the command line.
I just installed Xcode 5 and wrote detail instructions Install both Xcode 4 and Xcode 5, especially on how to reuse the old SDKs and Simulators.
Hope it helps
I start by saying that I've installed Mavericks, I was curious to see the new features...
It was better to wait, because (apparently) there are no sensational changes.
Anyway, I'm trying to submit my app to the app store, but after a real hard fight with the code-signing, I have ended up with this message:
"This bundle is invalid. Apple is not currently accepting applications built with this version of the OS."
....From what I read, the only solution seems to uninstall Mavericks and go back to Mountain Lion, but I will be happy if someone else has got a alternative fix.
After some research on Internet I've found a fix for this problem.
1) Open "App Store" and leave it for now.
2) press cmd+shift+g on your desktop and go to /system/library/coreservices/
2) Copy SystemVersion.plist to your desktop, and duplicate the file
3) Open the file with the right name on your desktop, not the copy, and replace the old part with this:
<key>ProductBuildVersion</key>
<string>12E55</string>
<key>ProductCopyright</key>
<string>1983-2013 Apple Inc.</string>
<key>ProductName</key>
<string>Mac OS X</string>
<key>ProductUserVisibleVersion</key>
<string>10.8.4</string>
<key>ProductVersion</key>
<string>10.8.4</string>
4) Now copy this edited file to /system/library/coreservices, and go to "App store" application.
5) Download Xcode 4.6.3, now you can because your OsX is detected as Mountain Lion.
6) Once the download its finish, and Xcode installed, reboot.
7) Open your project in xcode 5 beta, if you have some .xib files, go in the file inspector, document versioning, and change development version to 4.6 instead of 5. Do this for each .xib, then close xcode 5
8) Open Xcode 4.6.3 and reopen your project. Check in the build settings that 10.9 is not present anywhere. Replace it with 10.8 or whatever you need.
9) Make clean, Build for archiving, Archive ... Cross your finger!
10) Your project should be validated now.
11) Once you uploaded your app, rename the SystemVersion.plist (copy) on your desktop, and copy it back to /system/library/coreservices. You don't need to reboot.
It's kinda a hack, but if you don't want to reinstall everything, it's the only way to go.
P.s: after replacing SystemVersion.plist, you will notice strange behaviors in the Os, like safari that isn't working and so on, that's why I suggested to duplicate the plist file, before changing the os version. Anyway if you can still use terminal and "vi" to restore everything, if for some reason you didn't copy the original.
Hope this will help someone. I've lost a day figuring out a solution ;)
Same problem with build 13A3017 on Mavericks
Switched it to 13A603 and it worked.
It's quicker to use this command in terminal and just make a note of the original build number to switch it back afterwards.
sudo nano /System/Library/CoreServices/SystemVersion.plist
but should probably make a copy of the file first just in case
I got this problem while I was using Mavericks 10.9.1 (build 13B40) and Xcode 5.1 dp. I finally solve the problem by:
Use Xcode 5.0.2 instead of Xcode 5.1 dp.
Go to /system/library/coreservices/ and modify the SystemVersion.plist using the copy/paste as #Benz 's answer. Thanks to #Benz
After copying and backing the SystemVersion.plist, modify the content as following:
mod ProductBuildVersion to 13A603, which is the build number of Mavericks 10.9.0 GM.
mod ProductUserVisibleVersion and ProductVersion to 10.9.0
Replace the SystemVersion.plist using the one you've modified.
Restart the Xcode.
Rebuild and achieve the app.
Submit.
Succeed!!!
Restore the SystemVersion.plist using the original file you've backed.
If you don't want to mass with the SystemVersion.plist, here is another way to get through it on 10.10:
After you made the archive, you can modify the .app bundle and .plist in the archive's root to match a valid accepting version. Then use the Xcode to submit it. No need to mass with the code signing or Application Loader.
If you want a simple solution and don't mind to pay for it, I've created a tool to do it with ease: https://vox.vg/xcarchiver/
I am trying to locate Icon Composer, which was supposedly downloaded as part of Xcode, however I can't find it, neither in applications nor with the spotlight.
Any ideas where it might be, or if I have to download it separately? If so, where from? I tried looking for it in the App Store, but nothing found.
Edit: I am using Xcode 4.3.2 if that helps.
Newer Versions
As of Xcode 4.4, Icon Composer is no longer bundled with the IDE. However, you can still download the program from Apple's developer downloads page (developer.apple.com/downloads/)
Search for "Graphics Tools" and download the latest version of the tools, which is currently the version for Xcode 5.1
Older Versions
In Xcode 4.3.1 and up Icon Composer can be located in this directory.
/Applications/Xcode.app/Contents/Applications/
In your applications folder right click on Xcode and click "Show Package Contents."
EDIT: to make this answer as complete as possible.
However, In Xcode versions 4.2 and below, Icon composer can still be located in the following directory.
/Developer/Applications/Utilities
And of course, as Dave DeLong said below, Icon Composer can also be accessed through Xcode by navigating to Xcode Menu >> Open Developer Tool >> Icon Composer.
MDT is correct that the application is now bundled inside of Xcode.app, but there's an easier way to get to it:
Icon Composer cannot be used to create icons compatible with Retina macs and the app should no-longer be used. It is no-longer bundled with recent versions of Xcode.
Instead, you create a directory "foobar.iconset" and fill it with png images at the sizes you need, and then drag that into the image well in Xcode - which will then create a .icns file at build time.
Currently, the png files you should create are (none are required but all are recommended):
icon_16x16.png
icon_16x16#2x.png
icon_32x32.png
icon_32x32#2x.png
icon_128x128.png
icon_128x128#2x.png
icon_256x256.png
icon_256x256#2x.png
icon_512x512.png
icon_512x512#2x.png
You can also create the icns file manually with the iconutil command line tool.
Official documentation and more details are at: http://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html
Have you looked into...
/Developer/Applications/Utilities
Mine is there.
I have opened a project that has always been iphone/ipad. I can't build it now because for some reason my only "Scheme" option is "MyApp My Mac 64-bit". How can I get this set back to iphone/ipad simulator and devices? My "Targeted Device Family" setting is iPhone/iPad.
I had that issue several times. Basically, just set the Base SDK in Build Settings to Latest OS X and it should work properly.
I ran in to this issue recently and i solved it by changing the value of the executable from "None" to "AppName.app" on xcode.
You should change:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> None
to:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> AppName.app
Have you tried editing the Scheme? (I'm assuming you are running XCode 4). I believe you just might need to set the "Base SDK" setting to "iphoneos" (this translates to "Latest iOS").
I was facing same issue in my application and I solved it by following these steps:
1. Go to Project-> Build Settings
2. Change BaseSDK to Latest OS
The above solutions didn't work for me because Xcode 4 didn't give me any choices to go back to iOS. I closed Xcode, opened it again, and then it worked!
I have the same problem, it appears that you also made the jump with the new Xcode 4 upgrade and this appears to be a code incompatibility.
If you want to keep it for IOS (Iphone / Imac ) edit Scheme [Product/Edit Scheme/ Build/ build => Destination drop down list.
Make sure you have installed the Ios SDK before running Xcode.
Elsewhere if you have to compile the same app for the Mac, I'd like also to know the answer as this generate the same errors as you.
I had similar issue recently. Got it solved by doing some changes in Base SDK of Project. Following are steps :
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7", "Latest iOS(6.1)" etc.
I also just ran in to the issue. For me I was trying to "Build for Testing" and was running into this error.
To fix it I had to "Edit Scheme..." and then in the "Build" dropdown click on "Build" and made sure to check the "Test" checkbox for the Target.
I had the same error message. My solution is to delete the info.plist file from build phrases -> copy bundle resources.
Deployment target is missing for specified SDK ...
Choose other "Deployment Target" (in the Build settings) and simulator will appear.
Note:It's happening when use 5.1 SDK(latest) with XCode 4 on Snow Leopard..
I've just got this error, for me it was because of some reasons my device name didn't appear in xcode devices dropdown, just a generic name. Unplugged and plugged back the device and was fine.
For me I had to combine a couple of the solutions here to get it to work. For me the Project Build Settings were set to "Latest iOS" already.
To fix it, I had to change it to "OS X 10.6", then build the app (it will fail to build), then set it back to "Latest iOS", which now works again.
I just installed Xcode 4.1 (painful!) and when I opened one of my apps that built fine before the upgrade, the only active scheme was "My 64-bit Mac". In this case, the required change was to Edit Schemes, and for the Build scheme's Info tab, set the Executable dropdown to my target. It was set to None. As soon as I did that, the simulator/device showed up instead.
Tried the rest of these with no joy.
AFIAK this is a version control problem, in general not just a Git problem!
I gave a colleague a copy of a project that had modified files in it and this problem occurred.
However when I committed/updated the repo and gave him fresh copy.
This problem was fixed!
I've hit the same issue, needing to build with the 10.6 SDK. But I've found that XCode 4.4 doesn't contain this SDK! So I had to put it back, by opening the XCode.app package contents, and going to:
XCode.app/Contents/Developer/Platforms/MacOSX.platforms/Developer/SDKs
and copying in MacOSX10.6.sdk from my old XCode 3 Developer folder.
Surprisingly enough, this works! When you quit and relaunch XCode, and select the Base SDK for the project, 10.6 appears in the drop-down.
But beware, when XCode installs an update, you'll have to repeat this process, as I found just now after updating to 4.4.1.
I got same error and for some reason after going through all these it did not work. Notice in the very top menue is had my App Name> IOS Developer. Changed to App Name> IPhone 5.0 and went right into Simulator and got no error.