I have a very old Mac which is currently running Mac OSX Lion. It has Xcode 4 on it, and I created an app using that. Is it possible to deploy this app onto a newer iPhone? If not, do have any options to reuse the code on a newer version of Xcode?
2 Answers
If you want to deploy app on a device running iOS version more current than your Xcode supports, you won’t be able to launch it directly from Xcode. Just build the app for a generic device and then install the app manually. E.g. https://stackoverflow.com/a/35044362/1271826.
Just to warn you, while you can often install apps built on old Xcode versions on contemporary devices, occasionally there are little OS changes that break apps (and going back this many OS/SDK versions increases the probability of that). If this happens, without a contemporary Xcode version it will be exceedingly difficult to debug/diagnose the issue. Also, needless to say, you won’t be able to take advantage of contemporary device features (like bigger screens or whatever).
One final caveat: You won’t be able to distribute this app to the App Store until you build the app using a contemporary SDK version, generally achieved by building using a recent Xcode version. Review the Apple’s Developer News for references to minimum SDK versions.

- 415,655
- 72
- 787
- 1,044
-
1To add on, considering that Xcode 4 supports at most iOS 6 SDKs, all compiled apps should be 32 bit only, meaning even if everything else is successful, it should only work on modern devices running below iOS 11. – vincent May 07 '20 at 16:18
Xcode 4 did not have Swift built-in, iirc, so your code is likely to be Objective-C.
You will have to update stuff, but nothing major like the conversion from Swift 1 to 5 would require.

- 17,258
- 4
- 42
- 73