Issues after installing upgraded XCode version - iphone

I installed XCode DP 4.5 recently - just to try out iOS 6.
I opened a project using it.
When I reopened using XCode 4.2.1 again, I started having storyboard data loss issue mentioned here.
I don't get this issue in 4.5 DP, but then I don't want to continue with XCode 45 DP. I am not sure if its valid to build my app with it. Also, it shows me "iPhoneOS 5.0 sdk not found warning" which is the base sdk I have set within my project.
What should I do to get rid of this issue?
Is it ok to continue using 4.5 DP?
If not, how can I safely go back to 4.2.1?
Is there any workaround in project to make, to regain my storyboard?
I also have storyboard backed up, but as soon as I import it into my project (within 4.2.1) - it complains it cannot open it. So I suspect it's due to a setting shared both by 45 DP and 4.2.1.
Please help...

Download the Golden Master for iOS 6 and use that for your development. As the GM version App may be compiled for distribution with it and Xcode 4.2.1 will become obsolete.

By default storyboards are set to be compatible with the current release of Xcode, and one previous release. You can choose to make them compatible with even older releases by modifying the development version pop up in the storyboard's file inspector.

Related

Installing new and old versions of Xcode

So I saw this post: http://mobiledevelopertips.com/xcode/download-and-install-older-versions-of-xcode-xcode-previous-releases.html
(new location: at iosdevelopertips.com)
about downloading older versions of Xcode. Up to now, I have always just downloaded the newest version of Xcode from the App Store and let it do its thing. Recently on one computer that has Xcode 4.5 installed on it, I noticed that if I create a new project, I only get the iOS 6.0 simulators, not the 5.0 or 5.1.
My first question is, do I need older versions of Xcode to build apps for older OS (e.g. iOS 4, iOS 5.0, 5.1, etc)?
If so, what's the best way of installing these older versions of Xcode. I see that they have the command line tools to download as well. I'm not sure how all that stuff works.
What's the best way to update to the latest Xcode but keeping the old Xcode around? On a different machine that had Xcode 4.4.1 installed, I thought I could download Xcode 4.5 from the ADC website and install it. I downloaded it, double-clicked on the .dmg, then double-clicked on the Xcode file. This then installed Xcode 4.5 without asking me where I wanted it installed so I could keep the older version of Xcode (assuming that I need it as stated in my 1st question).
Thanks!
To answer your questions:
1) Yes. I renname Xcode to add the version number (i.e. Xcode_441.app)
2) I keep an archive of all versions of Xcode that I have downloaded so they are available after Apple pulls them from their download site.
3) Renaming them works for me, and I usually grab the direct download, when available, instead of getting it from the MAS. Try renaming Xcode before doing an install.
You are welcome.
It's possible to have multiple XCode installations by customizing the install path. Also note that the new 4.x install model is app bundles under Applications which are self contained so it's possible to just rename the old before installing the new XCode. You can also download the newest (4.5) from the developer site.
You can also add the old simulators by going to XCode preferences in 4.5.
Look under XCode, preferences, downloads. XCode 4.5 offers the 5.0 and 5.1 simulators for download. The same place that you download the command line tools.
For example, I added the 5.0 Simulator to my XCode 4.5 installation to go along with the 6.0 Simulator:
I noticed that if I create a new project, I only get the iOS 6.0 simulators, not the 5.0 or 5.1.
Choose your project target and in Summary tab, set the lowest Deployment Target for your app (I think the default value is 6.0 in Xcode 4.5).
My first question is, do I need older versions of Xcode to build apps for older OS (e.g. iOS 4, iOS 5.0, 5.1, etc)?
If you've updated from old version of Xcode, you can use the old SDK & simulator in new version.
If so, what's the best way of installing these older versions of Xcode. I see that they have the command line tools to download as well. I'm not sure how all that stuff works.
Actually, different versions of Xcode can stay happily with each other. It is a App Bundle right now.
third question
Just drag the new version of Xcode to Application folder. That's done. :)

iOS simulator only list the latest iOS version. How can I set earlier versions

According to the documentation should be able to choose which iOS version the simulator should run, however only the latest 4.3.2 is listed under "Hardware/Version".
The helps says:
"To set the iOS release used in the simulation environment, choose Hardware > Version, and choose the version you want to test on."
I don't want to support 3.x (although it would be nice) but at least I want to simulate my app on 4.2, 4.1 and 4.0.
What's going on? Why aren't they listed?
UPDATE:
I'm on Lion so I cannot install an earlier version of Xcode. Before my Upgrade I could test different versions easily.
the problem is that you have no other Simulator SDK installed which can be used. As #dorada has mentioned you have to install an older Xcode which in fact doesn't work because you're using Lion. I haven't tried it with Lion but principally it should work like before with Snow Leopard.
I'm referencing to my other answer how to get an older Xcode (don't know if it's still working)
After you have an older Xcode version, mount the image an navigate with terminal to that volume. There should be a hidden folder Packages. open that folder with open . and locate the two .pkg files you need (e.g. iPhoneSDK4_0.pkg and iPhoneSimulatorSDK4_0.pkg) and install both.
They will appear in your root directory and you have to move them to your Developer dir (don't simply overwrite, it will delete all other SDKs. go to the last different folder it should be iPhoneSimulator4.0.sdk\ and copy that one)
DONE (and at that point I have verified it: it works on my Lion. I used the dvd image which I have started backup'ing since 3.2.1)
Although iPortable has the correct answer I decided to post a step-by-step guide which is easer to follow:
Download Xcode 3.1
Mount the dmg file
In Finder menu select "Go\Go to folder" and enter "/Volumes/Xcode and iOS SDK/Packages"
Install the simulators you need (Double click)
Copy the simulation folders from /Platforms/iPhoneSimulator.platform/Developer/SDKs/ to /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
If your have some SDK missing Install the missing SDK from "/Volumes/Xcode and iOS SDK/Packages" and copy subfolders from /Platforms/iPhoneOS.platform/DeviceSupport/ to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ (for me they were all there from 3.1 to 4.3)
you may download the older ios sdk / xcode from . https://developer.apple.com/downloads/index.action
(i found this answer in another stack overflow topic actually, but now i can not seem to find that question!)
Open Xcode and in the menu at the top left, where you select what device to run on, click "More Simulators..."
The download section of Xcode preferences will open,
Click the "Components" tab.
You will see a list of simulators that can be installed, click install on version you need.
The simulator will need to restart to install.
To run the newly installed version of the simulator just select it from the run menu in Xcode.
You actually have to install previous simulator versions, they aren't there on a new install.
Maybe you can search and download them somewhere? - we keep them on a shared drive at the office.
After installing the Xcode 4.2 for Snow Leopard, I noticed there was a choice for iPad 3.2 Simulator, but using it just brings up some alerts that say "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." and another alert that says "Simulated application quit. Click Relaunch to try again." with Quit, Switch SDK, and Relaunch buttons.
I can successfully use iPhone 4.0 Simulator, iPhone 4.1 Simulator, iPad 4.2 Simulator, etc up to iPad/iPhone 5.0 Simulator, but really would like to have iPad 3.2 Simulator and iPhone 3.1.3 Simulator and earlier down to 3.0 if possible.
Our apps generally run all the way back to 3.0 and we occasionally receive bug reports from earlier iOS users, and would love to be able to debug these issues more effectively.
I tried the technique summarized by Tibidabo and although I am able to copy the simulator folders as mentioned, and though they show up as choices in Xcode, I cannot get them to actually run as simulators and I get the same problem alerts mentioned above.
What are other developers doing to support debugging of older iOS versions?
Go to Project Settings -> Summary an change Deployment Target.

Switch between Xcode 4.0.2 and 4.2

I am developing an app with Xcode 4.0.2 and iOS 4.3. Now I would like to upgrade to Xcode 4.2 and iOS 5 so that I could make my app ready when iOS 5 releases in October.
I am told by Apple's website that I should not submit apps that are built by Xcode 4.2 and should do it with the older Xcode 4.0.2, since the Xcode 4.2 and iOS 5 thing is still in beta.
But in the following few weeks I still need to have newer versions of my app submitted to App Store. So my question is,
If I upgrade my Xcode to 4.2, is it possible for me to switch back to Xcode 4.0.2?
If yes, how?
Thanks in advance!
You can simply install two versions of Xcode at the same time. During the installation it will let you choose the destination folder; you can pick another folder. For example, I use /Developer/Xcode (4.2). (However, if you did install 4.2 over 4.0.2, I don't think you would have a problem if you just ran the 4.0.2 installer again to downgrade.)
Taken from About Xcode.pdf (<Xcode>/About\ Xcode.pdf)
Installation
The Xcode installer will create the folder /Developer on the root of your boot partition, and place the Xcode developer tools and SDKs in this folder. If you have a previous version of Xcode you would like to preserve, you can copy the existing installation from /Developer to another folder to prevent having it updated automatically by the installer.
I would be cautious of this note (possible problems from incompatibility of tools???)
NOTE: The Xcode installer also installs system components and UNIX command line tools in a shared location on your Mac. Only one version of these components can exist on a computer at a time, and the last installed version replaces any previously installed set.
I always make sure I have a bootable drive with a decent working copy of xcode ready for releases in case I need to push a quick fix.
You can install 2 XCode in different folders.
Then you can switch back and forth.
Can I have multiple Xcode versions installed?

Xcode 4: My iPhone projects have become Mac OS projects.. and I can't change this

I have two iOS projects that under Xcode 3 built properly and these iPhone been on sale in the app store for some time. After upgrading to Xcode 4, Xcode now thinks these are Mac OS projects!
When I select Project Settings > Info, it actually says at the top "Mac OS Deployment Target" with a drop down allowing me to select 10.4, 10.5 or 10.6! These are not nor ever have been Mac OS projects.
In my build settings, Xcode allows me to select 32 bit or 64 bit Intel architecture. not armv6 or armv7.
You need to change your build settings. Fortunately, this is really easy to do.
Start by clicking on your project's name in the Project Navigator.
Now, click on your Project Name as it comes up in the list. (You may need to do this for your build as well.)
Next, click on Build Settings. Finally, you should be able to change your Base SDK to the appropriate one.
Note that you might need to repeat steps 3 and 4 after selecting your Target in the screen shown below.
Have you restarted Xcode since the upgrade? Often times Xcode 4 seems to need to be restarted after SDK changes.
I didn't face any issues opening the projects in Xcode 4 which are built in Xcode 3. However there can be wired issue with the Xcode 4 you are using. Try resetting the architecture to armv6 or armv7 and base SDK to latest iOS SDK using the build settings. Also set the deployment target properly. This should allow you to run the application in Xcode 4.
Also, try uninstalling the xcode and install Xcode 4 again. This should fix the wired issue you have with your xcode 4.

Target integrity - mac os deployment target newer than sdk warning

i was add a new target in my existing project.
Everything work fine, but... this warning is become.
Mac OS X Deployment Target '10.6' is newer than SDK 'iOS 4.2' in target snow iphone
Anybody knows how i can disable it?
XCode4 is different and I had trouble finding this option. Here is how to do it - to access the Base SDK for the project, select the project (blue xcode icon) in the navigator top-left; select project properties (not targets) in the next pane; then select "Build Settings".
I tried to post a screenshot but apparently I need to earn more "reputation points" first...
I know this is an old question, but I ran across the same issue and want to provide help. The warning means your version of Xcode is using an SDK older than your deployment target. For example, you have Xcode 6.2 but are deploying for iOS 8.3. You would need to update Xcode to version 6.3 to resolve that error. Another option is to simply download the SDK manually from the Apple Developer center.
Right-click on your target and select Get Info. Go to the Build tab and ensure that the Base SDK setting is Latest iOS.
go to target settings and make sure that Base SDK is set to the latest one. Also check the deployment target.
I hit this problem when I accidentally opened my older version of Xcode. If you have 2 versions of Xcode installed on your computer, make sure you are using the one you intend to! The older version won't understand a newer deployment SDK.