Alternatives to Xcode and Swift

The most common question when starting out writing apps for iPhone is: Can I create iPhone apps on my Windows PC? If you ask this question on Google, you'll get 7 million results. The second most common question is: Can I create iPhone apps on my iPad? This questions has 5 million matches on Google.

TL;DR: There are no viable alternatives to using a Mac and Xcode if you wish to succeed in this course.

Understanding Swift vs. Understanding the Frameworks

You might have heard that Swift is now open source and you can run it on many different platforms, including Linux, Windows, Android, and even over the web. This is true. However, iOS development involves much more than just the Swift language. Developing for iOS also means you need to understand the various frameworks. These are some of the frameworks we will explore in this course:
  • AV Foundation
  • Core Data
  • Core Foundation
  • Core Graphics
  • Core Location
  • Map Kit
  • UI Kit
Xcode also includes the Interface Builder for laying out your screens, which are called storyboards.  It is possible to lay out your screens using code only without the Interface Builder, but this is tedious. Learning to use Interface Builder to create storyboards using constraints is an important part of this course. Constraints are a way of building apps that work on many different devices, regardless of their screen size, pixel density, or screen aspect ratio.

Xcode vs. Other Tools

There are competing technologies such as PhoneGap, Sencha Touch, Ionic, Cordova, Appcelerator, and Xamarin, which allow you to develop apps without Swift and Xcode. Xamarin lets you write your code in C#. The other technologies let you write your code in HTML, CSS, and JavaScript, which is especially nice if you already know how to develop web apps. In general, these technologies tend to be on the slow side compared to native apps written in Swift on Xcode. But their advantage is that you can write one code base and deploy to various platforms, such as iOS, Android, Blackberry, etc.

If you wish to develop apps using such tools, I suggest you keep an eye out for this course: GDS 051: Mobile App Development Using Web Standards, which is offered from time to time.

However, the stated purpose of this course is to teach iOS development using the Apple tools (Xcode and Swift).

Xcode on iPad

The CPU on this device is not sufficient to run Xcode. The iPad has no command line interface or text editor. There is no version of Xcode or the iOS Simulator available for iPad. There is no file system on the iPad, so you'd have to store all your files, which could be quite large, in the cloud, and this would cause the system to be slow.

There is an iPad app called Swift Playgrounds, and it is useful for beginning programmers who wish to learn the Swift programming language, but it does not include the Interface Builder, the iOS Frameworks, or the iOS Simulator. It is only useful for learning the Swift programming language itself.

Xcode on Windows

Some will tell you that you can get Xcode to run on a Windows or PC box or Linux, by using a virtualization machine, such as Virtual Box or VMWare. While is it possible to get Xcode running on a non-Mac box, it is generally acknowledged that it is next to impossible to get the iOS Simulator running. This leaves you with a system where you can write and compile code, but you can't test it or deploy it.

I have had several students attempt to create a Hackintosh or try to run Xcode on a non-Mac box in other ways. I've never seen a student succeed. I had a student in the high school whose father was a manager in industry (and was on our school's advisory board) and had a whole engineering department at his disposal, and they could not make it happen. Even if it is technically possible to accomplish this, it is likely that you'd spend weeks working on it, only to fall so far behind that you'd fail the course.

Resources
Q&A: Can I Use a PC for iPhone App Development? from Code With Chris

Use Xcode On Windows 10 For iOS App Development on Windows from Webile Technologies

Why take this course?

Since 2014, the majority of internet traffic is generated from mobile devices (phones and tablets). Sales of desktop and notebook computers ...