iPhone 3G XCode Development for 4.2.1 - iphone

I've managed to resurrect my old iPhone 3G which runs 4.2.1. Can I still develop using XCode on this phone? I would ideally like to use it for learning Obj-C without paying for the Developers Program, Jailbreaking just to test my apps.
Is this feasible?

Yes it is feasible but you will not be able to use xcode the latest xcode 4.5 with it because it supports ios 4.3 and later. You would be able to use lower versions of xcode for 4.2.1 . The latest release notes indicates 4.2.1 and lower will not be supported, we now have to use 2 version of Xcode to develop when supporting older devices.
Please go through
Old Xcode
Xcode 4.5 and iOS 4.2.1 incompatibility
XCode 4 and iOS 4.2.1

Related

Testing on jailbroken brand-new iOS device - using Xcode?

OK. So, here's some details on my situation :
I've got a brand-new iPhone 4.
The iOS version has been updated to 5.1.1 (9B206).
The phone has been jailbroken using redsn0w.
I'm running Lion (10.7.4) and Xcode 4.3.
Now, my issue :
I'm creating a sample test app, which runs fine under the simulator.
Followed everything here, but without any result.
Also tried enabling my device via Organizer ("Use as development device").
When I click on "Use as development device", it keeps saying...
The version of iOS on “Dr.Kameleon’s iPhone” does not match any of the
versions of iOS supported for development with this installation of
the iOS SDK. Please restore the device to a version of the OS listed
below, or update to the latest version of the iOS SDK; which is
available here.
OS Installed on Dr.Kameleon’s iPhone
5.1.1 (9B206)
Xcode Supported iOS Versions Latest
5.0 (9A334)
4.3
4.2
While, when I try running on my "iOS device" (that's how it appears), it claims there's no device with a proper iOS version.
No provisioned iOS devices are available with a compatible iOS
version. Connect an iOS device with a recent enough version of iOS to
run your application or choose an iOS simulator as the destination.
Any ideas? What's going wrong?
Look, everyone who says you can't build directly on a jailbroken device is wrong. You can, and it's quite easy to do. If you don't have a provisioned device (and it looks like you don't), using this guide will work. I've tested it myself on Lion running Xcode 4.3 (it even works on later versions, but those are under NDA).
The real issue seems to be that, for whatever reason, you don't have the iOS 5.1 SDK - you're using the iOS 5.0 SDK. You can confirm this by looking in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport. If you don't see any mention of 5.1, you don't have it installed. Try downloading and installing Xcode again (I believe it's 4.3.2 now), which should have the iOS 5.1 SDK bundled with it.
This error is not due to the jailbroken iPhone, its basically due to your lower version of Xcode which doesn't support the latest iOS, try upgrading your Xcode version to latest.hope it helps

Can I use Xcode 3.1 to develop app for iOS version 4.0, 4.3 and 5

I want to develop an iphone app, I only have OSX 10.5 so I can only install xcode 3.1, can I developer App for iOS version 4.0, 4.3, and 5 respectively? Or I must upgrade to OSX 10.7 Lion and install xcode 4.2?
More specifically, if I use xcode 3.1 and develop an app, will it runs on iphone 4 and 4S?
As far as I know you will not be able to develop for those iOS versions with XCode 3.1, looks like you will need to upgrade unfortunately.
You'll need to upgrade, at least to Snow Leopard (10.6) to be able to develop for iOS 5, as 10.5 is not longer supported
edit:
short answer yes, it will most likely be able to run, but you missed out on so many features added in iOS 4++, also, it's likely you won't be able to test your app on iPhone 4/4S, not sure about iPhone 4, but 4S surely won't get recognized by your XCode
if you make an app for iOS 4.0 it should work with iOS 4.3 and iOS5. But for Xcode 4.2 you don't need Lion, Snow Leopard is enough(I've heard that Lion isn't that good compared to Snow Leopard).
You cannot use Xcode 3.1 to develop apps the use SDK APIs or features new to iOS 4.3 or 5.x, or to debug apps running on devices with those later OS versions.
You can use Xcode 3.1 to develop apps that will run on devices with iOS 4.3 or 5.x by using Ad Hoc deployment and installing the apps via iTunes.
You can develop for newer ios on older XCodes. And, its a matter of managing PATHS nd VERSIONS
STEP 1.
What is known as XCode is more accurately a bundle of a IDE with a SDK. Nevertheless, the two are separate. I have 3.2 and 4.0 xcodes on the same machine. no hitch at all. I used the older 3.2 IDE until the 4.0 IDE became a bit more familiar.
One way is to organize your directory structure around the following schema.
/Developer_3.x.x
/Developer_4.x.x
Another method is to use only one /Developer and copy the SDK and platforms from one into another.
/Developer/SDKs
/Developer/Platforms
*The reason that is easy: those are the expected search PATHS
The cleaner and slightly more difficult route is setting the Project build settings under
Project | Build | Architecture
The two settings are the two top-most ones.
"Additional SDKs" sets the ADDITIONAL_SDK variable.
"Base SDK" sets the SDKROOT variable.
See "Cross-develop using target sdk"
And "Cross-Development Programming Guide"
As pointed out, a caveat is optimizing, mem-leaking and so forth.
STEP 2. (Pain in the *ss)
Then, you will have to start peppering your code with precompiler if statements.
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
if ( [[[ UIDevice currentDevice] systemVersiuon] floatValue] > = 4.0 ) {
...something available in 4.0
}
#endif
This precompiler braches should be in there to support multiple devices, no matter the XCode case.

iPhone: developing with IOS 4.3 on IOS5 device not possible?

I have ios5 installed on my iPhone device, I am developing an application in xcode using SDK IOS 4.3 I got the error:
The version of iOS on "John's iPhone” does not match any of the versions of iOS supported for development with this installation of the iOS SDK. Please restore the device to a version of the OS listed below, or update to the latest version of the iOS SDK; which is available here.
I dont want to do either of them, because I have other ongoing projects since months which I started with using IOS 4.3. So if I download IOS 5 SDK is that possible that I will mess things up with previous projects? And do I have to download all xcode 4.2 again for IOS 5?! and after all.."what the heck is going around?"
The error message is pretty clear about what your options are...
I suggest you upgrade to Xcode 4.2 and the iOS 5 SDK. That still allows you to write apps for iOS 4.x, but you get a better version of Xcode and a better compiler (LLVM 3.0) and the ability to develop on your iOS 5 device.

Is It Possible to Build To iOS 5 Devices from XCode 4.1 or 4.0.2?

XCode 4.2/iOS 5 SDK has broken some frameworks that I depend on to support external MIDI hardware accessories in my app. My app that I built with 4.0.2 works fine on my iPhone 4 running iOS 5 when installed from the store, so I uninstalled XCode 4.2 and downgraded to XCode 4.0.2. But now I can't build to my iOS 5 devices -- the Organizer says the version is unsupported. Is there some way to trick XCode 4.0.2 or 4.1 into building onto a device running 5.0?
Use Xcode 4.2 and make sure that the iOS4 SDK is installed, then set the "Base SDK" build property to that version. I'm pretty sure that building iOS5 apps with Xcode 4.1/4.0 is going to be a world of pain.
I discovered that you can compile and debug on iOS 5 devices even using XCode 3.2. You won't have iOS 5 simulator though. <-- doesn't work with iPhone 4S

What's the latest version of Xcode that comes with iPhone SDK 3.2?

Reviewing the iOS Developer Downloads & ADC Program Assets, I think it's Xcode 3.2.4, but I'm not sure.
I have an XCode 3.2.6, which I strongly believe is the latest version of Xcode 3, after which, Xcode4 is your only option
Here's the link
http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792
XCode 3.2.4 comes with iOS SDK 3.2. It gives options for iPad Simulator 3.2 but not iPhone Simulator 3.2 (only 4.0 & 4.1). It may allow you to build 3.2 on an iPhone device though. I just confirmed this by downloading & installing it. I think it's the latest, although Xcode 3.2.5 might also have iOS SDK 3.2, but I highly doubt it because How do I add the iPhone SDK 3 to the latest version of Xcode? suggests otherwise.