ryan
ryan

Reputation: 5099

How can I develop for iPhone using a Windows development machine?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?

The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although I'm not too sure how legal this is.

Upvotes: 1271

Views: 1140692

Answers (30)

Fattie
Fattie

Reputation: 12373

FWIW a 2020s answer ...

If you just want to "make something that runs on an iPhone",

just make a web app or use some cross-platform crap like Unity, Flutter, electron or whatever.

If, for whatever reason, you want to tinker with Swift/SwiftUI/UIKit as such, then ...

  1. note that even if you have a Mac! or a large number of Macs, it's all-but impossible to make native iOS apps unless you have an absolute minimum of 1x iPhone, and it has to be a recent one, and 1x iPad, ditto. The simulators are getting better all the time but other than for the most trivial "hello" apps, you need the devices

  2. note that Xcode and the "Xcode environment/universe" is extremely and annoyingly connected, Xcode is constantly hooked in to Apple's servers with your apple developer account. Among other issues you constantly get security pings on your macs, watches, etc etc about certificates, permissions, "capabilities" etc. "iOS development" other than the most trivial "here's a green square" apps is all about the universe of notifications, permissions, capabilities, etc etc. (Thus: it's a real pain to use Xcode when you are merely on an old-fashioned flight which doesn't have wifi, far less trying to use VirtualBox or some such.) Further, when working with Xcode/iPhones, the version of MacOS is inherently tied in to things - you are forever constantly updating your mac, because a Mac update is needed so as to update Xcode, and so on.

  3. Indeed, it's becoming more and more difficult to really use Xcode even if you don't have the we-make-our-own-chips latest Macs. The subtleties of the simulators for anything beyond drawing a square (video, metal, gpu, fifty minor issues like GPS simulation etc etc) are nightmarish even when on a Mac, it's a total nonstarter if you're running some sort of virtual mac. I personally just won't bother doing development if the only mac laying around is Intel era, it's too painful.

The simple answer has three parts:

  • You can't do Swift/SwiftUI/UIKit unless you have a (fairly recent!) Mac

  • Every hackintosh -like approach such as VirtualBox is: complete crap. It's great fun if, as such, you're in to stuff like "I made Splatoon3 run on a Blackberry" but it's completely unusable

  • If you just want to "make something that runs on an iPhone", ie, your aim is NOT specifically to fool with Swift/SwiftUI/UIKit, then just make a web app or use some cross-platform crap like Unity, Flutter, electron or whatever.

Note, as everyone has said, the least powerful (recent!) Mac is 100.0% OK for Xcode. Xcode is actually remarkably efficient and fast these days. So just buy a used one of the cheapest Mac, or use any of the numerous online rental services.

Upvotes: 0

user2233706
user2233706

Reputation: 7225

I use Flutter. I develop on my Windows machine and test on an Android emulator. When I'm ready to test on iOS, I run the code on macOS. From my experience, a Flutter app runs exactly the same on Android and iOS. If you don't have a Mac, you can download VirtualBox and install macOS on it. On VirtualBox, macOS runs exactly as it does on a real Mac, and you can build your app on it.

Upvotes: 0

9pfs
9pfs

Reputation: 640

Just make a web application. iOS web applications are:

  1. Reliable. The amount of time it takes to make an update is far shorter than with Xcode.
  2. Fast. JavaScript on iOS is, by nature, far faster than native apps.
  3. Free. You never have to pay Apple a cent, as Apple doesn't have any control over you.
  4. Safer. If a crash occurs with a native app, it can take down even the newest iOS devices for hours or even days, until the user can fix them. If a web app crashes, the user just has to close and reopen it, worst case scenario.
  5. Offline. You can easily create a service worker to handle your app.
  6. Secure. Because you do not have access to native APIs, a security breach will be significantly less dangerous.
  7. Easy to program. A basic iOS web app can be programmed from the Safari URL bar on an iPhone. Literally. I've done it myself.

Upvotes: -11

Andrew Grant
Andrew Grant

Reputation: 58804

It's certainly possible to develop on a Windows machine, in fact, my first application was exclusively developed on the old Dell Precision I had at the time :)

There are three routes;

  1. Install OSx86 (aka iATKOS / Kalyway) on a second partition/disk and dual boot.
  2. Run Mac OS X Server under VMWare (Mac OS X 10.7 (Lion) onwards, read the update below).
  3. Use a framework and/or toolset, which allows developing on Windows, like Delphi XE4 with the mac-in-cloud service, which can build without MacOS device need. This is a commercial toolset, but the component and lib support is growing.

    Other honorable mentions are Flutter, Xamarin and similar; which may at end need actual MacOS device for final build (but you can test on Android till then, as they're cross-platform).

The first route requires modifying (or using a pre-modified) image of Leopard that can be installed on a regular PC. This is not as hard as you would think, although your success/effort ratio will depend upon how closely the hardware in your PC matches that in Mac hardware - e.g. if you're running a Core 2 Duo on an Intel Motherboard, with an NVidia graphics card you are laughing. If you're running an AMD machine or something without SSE3 it gets a little more involved.

If you purchase (or already own) a version of Leopard then this is a gray area since the Leopard EULA states you may only run it on an "Apple Labeled" machine. As many point out if you stick an Apple sticker on your PC you're probably covered.

The second option is more costly. The EULA for the workstation version of Leopard prevents it from being run under emulation and as a result, there's no support in VMWare for this. Leopard server, however, CAN be run under emulation and can be used for desktop purposes. Leopard server and VMWare are expensive, however.

If you're interested in option 1) I would suggest starting at Insanelymac and reading the OSx86 sections.

I do think you should consider whether the time you will invest is going to be worth the money you will save though. It was for me because I enjoy tinkering with this type of stuff and I started during the early iPhone betas, months before their App Store became available.

Alternatively, you could pick up a low-spec Mac Mini from eBay. You don't need much horsepower to run the SDK and you can always sell it on later if you decide to stop development or buy a better Mac.

Update: You cannot create a Mac OS X Client virtual machine for OS X 10.6 and earlier. Apple does not allow these Client OSes to be virtualized. With Mac OS X 10.7 (Lion) onwards, Apple has changed its licensing agreement in regards to virtualization. Source: VMWare KnowledgeBase

Upvotes: 538

Parand
Parand

Reputation: 106370

The SDK is only available on OS X, forcing you to use a mac. If you don't want to purchase a mac you can either run OS X on a virtual machine on your windows box, or you can install OS X on your PC.

In my experience the virtual machine solution is unusably slow (on a core2 duo laptop with 2G ram). If you feel like trying it search for the torrent. It's probably not worthwhile.

The other option is to install OS X on your PC, commonly referred to as a hackintosh. Hackintoshes work quite well - my friend just sold his mac because his Dell quad core hackintosh was actually much faster than the apple hardware (and cost about 1/3).

Of course both of these options are likely counter to some licensing scheme, so proceed at your own risk.

Upvotes: 61

iaskquestions
iaskquestions

Reputation: 36

You can make apps for iPhone using Java, and Java can connect to the web.

Upvotes: -8

jjxtra
jjxtra

Reputation: 21160

Xamarin is a solid choice. It was purchased by Microsoft and is now built directly into Visual Studio. You code in C#. With all the updates and features they are adding, you can do everything but submit to the App Store from Windows, even compile, build and deploy to an iOS device.

For games, Unity 3D is a great option. The editor is free to use for development, and even for distribution (if you have less than 100K USD in annual revenue). Unity supports iOS, Android and most other platforms. It may be possible to use Unity's "Cloud Build" feature to avoid having to use a Mac for deployment, although by default Unity actually spits out an Xcode project when building for iOS.

Other options:

PhoneGap (html/javascript) also works. It isn't quite as nice for gaming, but it's pretty decent for regular GUI applications.

Flutter (dart) is a free cross platform mobile app development framework from Google. Write your code in Dart.

React Native (javascript) is another popular cross-platform framework created by Facebook.

Note that: for all of these options, all or most of the development can be done on Windows, but a MacOS device is still required to build a binary for submission to the App Store. One option is to get a cheap MAC Mini to do your final build.

Upvotes: 197

Rachel Henderson
Rachel Henderson

Reputation: 629

Most of "so called Windows solutions for iOS development without Mac" require Mac at the end just to sign and send to app store. I checked a few, not all though (who has the time?)

At the end it's just too much trouble to learn "their super special easy way to program iOS without Objective-C", they have lots of bugs. Really the goal they are setting is unachievable in my view.

Also a lot of time they make you use Objective-C equivalent statements simply in another language. They kind of look the same but there are always subtle differences that you have to learn on top of obj-c. Which also makes even less sense, because now instead of learning less you have to learn more. So where is the gain? Also they cost a lot, because they are very hard to develop.

Many lack any debugging abilities whatsoever.

In my honest opinion, if you are a hard-core iOS developer then for sure buy the best Mac and learn objective-c. It's expensive and takes time, but if it's your path, it's worth it.

For an occasional use, it's just easier to rent a remote Mac service, like XCodeClub.com

Upvotes: 84

wisty
wisty

Reputation: 7061

If you have ssh access to a Mac, then you can use a VNC (like Vine VNC, which allows multiple uses at once - thin thin client) to control XCode.

This could be useful if you wanted to access a Mac Mini from a laptop, or your S.O. is hogging your MacBook.

Upvotes: 3

veerendra pratap singh
veerendra pratap singh

Reputation: 235

Develop iOS Apps on Windows With Cross-Platform Tools

Cross-platform tools are awesome: you code your app once, and export it to iOS and Android. That could potentially cut your app development time and cost in half. Several cross-platform tools allow you to develop iOS apps on a Windows PC, or allow you to compile the app if there’s a Mac in your local network.

Well, not so fast…

The cross-platform tool ecosystem is very large. On the one side you have complete Integrated Development Environments (IDEs) like Xamarin, that allow you to build cross-platform apps with C#.

The middle ground is covered by tools like PhoneGap, Cordova, Ionic and Appcelerator, that let you build native apps with HTML5 components. The far end includes smaller platforms like React Native that allow you to write native apps with a JavaScript wrapper.

The one thing that stands out for all cross-platform tools is this: they’re not beginner friendly! It’s much easier to get access to a Mac, learn Swift, and build a simple app, than it is to get started with Xamarin.

Most of the cross-platform tools require you to have a basic understanding of programming, compilation options, and the iOS and Android ecosystems. That’s something you don’t really have as a beginner developer!

Having said that, let’s look at a couple of options:

If you’re familiar with Windows-based development tools and IDEs, and if you already know how to code, it’s worthwhile to check out Xamarin. With Xamarin you code apps in C#, for multiple platforms, using the Mono and MonoTouch frameworks. If you’re familiar with web-based development, check out PhoneGap or Ionic. You’ll feel right at home with HTML 5, CSS and JavaScript. Don’t forget: a native app works different than a website… If you’re familiar with JavaScript, or if you’d rather learn to code JavaScript than Swift, check out React Native. With React Native you can code native apps for iOS and Android using a “wrapper”. Always deliberately choose for cross-platform tools because it’s a smart option, not because you think a native platform language is bad. The fact that one option isn’t right, doesn’t immediately make another option smarter!

If you don’t want to join the proprietary closed Apple universe, don’t forget that many cross-platform tools are operated by equally evil companies like Google, Facebook, Microsoft, Adobe and Amazon.

An often heard argument against cross-platform tools is that they offer limited access to and support for smartphone hardware, and are less “snappy” than their native counterparts. Keep in mind that any cross-platform tool will require you to write platform-specific code at one point, especially if you want to code custom features.

Upvotes: 3

Karoly Nyisztor
Karoly Nyisztor

Reputation: 3605

Visual Studio + Xamarin will do the job.

Visual Studio

Yet, I'd recommend you get a Mac and develop iOS apps in Xcode.

When in Rome, live like the Romans do.

Upvotes: 1

fb55
fb55

Reputation: 1227

Oracle VirtualBox allows users to install Mac OS X in a virtual machine. If you are comfortable with it, you could just use that way to use Xcode. This is legal if you "dual boot" your mac into windows, then install the VirtualBox within windows (or linux).

Other possibilities are cross-compilers such as Appcelerator Titanium (HTML, CSS and JavaScript) or MonoTouch (.NET).

Upvotes: 8

Durai Amuthan.H
Durai Amuthan.H

Reputation: 32320

Using Xamarin now we can develop iPhone applications in Windows machine itself with the help of Xamarin Live Player.

Using this Xamarin live player dev/deploy/debug cycle can now be done without an Apple system.

But to sign and release the app Apple system is required.

Find the reference here

I checked the reference nothing dodgy

Upvotes: 6

Red Mak
Red Mak

Reputation: 676

This is a new tool: oxygene which you can use to build apps for iOS/Mac, Windows RT/8 or Android. It uses a specific language derived from Object Pascal and Visual Studio (and uses .net or java.). It seem to be really powerful, but is not free.

Upvotes: 1

dawnerd
dawnerd

Reputation: 756

You can use WinChain

Quoting the project page:

It's the easiest way to build the iPhone toolchain on a Windows XP/Vista computer, which in turn, can take Objective-C source code that you write using their UIKit Headers (included with winChain) and compile it into an application that you can use on your iPhone.

Upvotes: 57

Hemant Singh Rathore
Hemant Singh Rathore

Reputation: 2139

You can use Intel XDK with that you can develop and publish app for iOS without mac.

Click here for detail.

Upvotes: 9

prusswan
prusswan

Reputation: 7101

(accurate as of late 2014)

For access to the native tools (Xcode etc) there are two main options:

1. Virtual machine

Look around for the mavericks (10.9) vmware image that works with a modified Vmware Workstation/Player. Once the machine is able to boot, it can be updated to 10.9.5 with no apparent issues.

The good: relatively low learning curve (if you are somewhat familiar with vms)

The bad: reduced performance due to virtualized environment, no 3d acceleration (QE/CL)

2. Hackintosh

This is the sensible option if you are planning to procure new hardware (or at least partly), instead of retrofitting existing equipment (but you might be lucky to have one of the common OEM models (like Dell) that already have recipes written for it)

The good: no penalty on hardware performance, which might even surpass that of a real mac. The same hardware can also be used for other OSes if you are open to multibooting

The bad: higher learning curve, more hardware limitations (no drivers for certain Intel wifi etc) which may translate into higher investment if you had no intention to get new hardware originally

Needless to say, both options above are frown upon by the fruit company, so licensing compliance is not part of the discussion.

3. An actual mac (added in 2016)

This option is perfect for people who already have a mac and use it as a Windows development machine via Bootcamp etc. This also has the least support issues (apart from complications that may result from multi-booting), so it is recommended for those looking for a long-term solution (hardware that works not just for the current OSX version but future versions as well)

Upvotes: 2

OZY
OZY

Reputation: 3

If you want it to be legitimate, you have two options, cloud based Mac solutions or cross-platform development tools. You may consider the hackintosh approach or virtual machines if you don't care about legal stuff. If you have a decent PC, running a virtual machine would be the easiest way to go. You may never know which hardware will have driver issues on a hackintosh.

I've tried all these approaches and they all have pros and cons, but for the second group, I feel kind of guilty. I develop apps to make a living and I wouldn't want to rip off someone else for it.

If you are making a small project, cloud based Macs may prove useful. Rent it for a short time, develop your project and off you go. Don't bother learning anything new.

However, if your project is getting big, cross-platform frameworks seem to be the only alternative. The critical thing is that you need to choose wisely. There are so many hybrid frameworks, but what they do can be summarized in one sentence as "diplaying web pages in an app wrapper" and developers' negative experience with hybrid frameworks also affects native frameworks.

I tried three of these (Titanium, Smartface and Xamarin) and they all claim to produce "real native output" and in my opinion their claims are correct. You need to test and see it yoursrlf, it's not easy to describe the native feeling. In a previous comment, it was indicated that it takes some effort to learn these platforms, but once you get to know them, you can develop not just iOS applications but Android applications as well, all with the common code base. And of course, they are much cheaper than a cloud Mac. Some of them are even free. You would need a Mac only for store submission.

If you know JavaScript, try Titanium and Smartface and if you know C#, try Xamarin. Just note that for the device simuator, Titanium is dependent on a Mac, but Smartface has a simulator app for Windows development and it works better than I expected. On the other hand, Xamarin requires a Mac in your network.

Upvotes: 11

Oscar Acevedo
Oscar Acevedo

Reputation: 1212

If you want to create iPhone apps but no Mac, then you should try http://www.pmbaty.com/iosbuildenv/

It allows you to easily develop native iOS apps, like with XCode, deployable on any iPhone, iPod or iPad (jailbroken or not).

Use your favourite IDE to code in Objective-C, C++, C or ARM assembly, like in XCode. ARC and blocks are supported.

Compile your iPhone apps directly inside Visual Studio

It works on Windows all versions (XP, 7, 8), FreeBSD and Linux

Now with iOS8 support.

Upvotes: 10

Erel
Erel

Reputation: 1802

B4i is a new development tool that creates native iOS apps. It runs on Windows. When a full compilation is required (in most cases it is not required) the project is compiled on a hosted builder. Each compilation takes about 5 seconds. B4i

Upvotes: 0

Seryozha
Seryozha

Reputation: 1639

As many people already answered, iPhone SDK is available only for OS X, and I believe Apple will never release it for Windows. But there are several alternative environments/frameworks that allow you to develop iOS applications, even package and submit to AppStore using windows machine as well as MAC. Here are most popular and relatively better options.

PhoneGap, allow to create web-based apps, using HTML/CSS/JavaScript

Xamarin, cross-platform apps in C#

Adobe AIR, air applications with Flash / ActionScript

Unity3D, cross-platform game engine

Note: Unity requires Xcode, and therefore OS X to build iOS projects.

Upvotes: 2

ghenne
ghenne

Reputation: 1903

Check out NS Basic/App Studio. It's Visual Basic for the iPhone. (though you can also code in JavaScript). It produces WebApps which can be distributed without going through the App Store. Apps will also run on other platforms, like Android. NS Basic/App Studio

Upvotes: 0

Some Guy
Some Guy

Reputation:

Check out this:

Over view

It is a project that attempts to be able to cross-compile programs written in a variety of source languages to a variety of target languages. One of the initial test cases was to write programs in Java and run them on an iPhone. Watching the video on the site is worthwhile.

With that said, I haven't tried it. The project seems quite beta, and there isn't a lot of activity on their SourceForge site.

Upvotes: 9

priamos
priamos

Reputation: 31

A devkit that allows one to develop iPhone apps in Objective-C, C++ or just plain C with Visual Studio:

Check it out at iOS build env

You can build iPhone apps directly within Visual Studio (2008, 2010, Express).

Pretty neat, it even builds IPA files for your app after a successful compilation. The code works as is on jailbroken devices, for the rest of the planet I believe the final compilation & submission to the App Store has to be done on a Mac. But still, it enables you to develop using a well-known IDE.

Upvotes: 22

Keith Adler
Keith Adler

Reputation: 21178

You will soon be able to use Adobe Flash CS 5 to create Apps for the iPhone on Windows:

flashcs 5

flashcs5 apps for iphone

Upvotes: 18

gfdx
gfdx

Reputation: 1749

Please take a look at Xamarin. They have an extension for Visual Studio (http://xamarin.com/visual-studio).

Taken from their site:

Xamarin provides Visual Studio add-ins so that you can develop your iOS, Android and Windows apps all in a single solution. The Xamarin extensions support building, deploying, and debugging on simulator or device.

Upvotes: 0

Prashant Nikam
Prashant Nikam

Reputation: 2251

So the bad news is that XCode is needed for its iOS Simulator as well as its Application Loader facility for actually uploading the programs to iOS devices for "real" testing. You'll need XCode for signing your apps before submitting to the App Store. Unfortunately, XCode is only available for OS X.

However, the good news is that you may be able to purchase OS X and run it in a virtual machine such as VMWare Workstation. I don't know how straightforward this is, as it is rather difficult to get OS X to run on non-Apple hardware, but a quick Google search shows that it is possible. This method would (likely) be cheaper than purchasing a new Mac, although the Mac Mini retails in the US for only $599. Some posts I've seen indicate that this may or may not be legal, others say you need OS X Server for virtualization. I'll leave the research up to you.

There are also services such as MacInCloud that allow you to rent a Mac server that you can access from Windows via remote desktop, or through your browser. Unfortunately, I don't think you'd be able to use Application Loader, as you have to physically connect the device to your computer, but it would work for development and simulation, at least.

Good luck!

Upvotes: 1

Maurice
Maurice

Reputation: 477

You don't need to own a Mac nor do you need to learn Objective-C. You can develop in different environments and compile into Objective-C later on.

developing for the iphone and ipad by runing osx 10.6(snow leopard)

This article one of our developers wrote gives a pretty comprehensive walk through on installing OS X Snow Leopard on Windows using iBoot, then installing Vmware (with instructions), then getting your iPhone dev environment going... and a few extra juicy things. Super helpful for me.

Hope that helps. It uses Phonegap so you can develop on multiple smart phone platforms at once.

Upvotes: 28

Mark Gibaud
Mark Gibaud

Reputation: 2061

Hooray! You can now more easily accomplish this with the latest Xamarin.iOS, using a network-linked mac providing the build and deployment capabilities.

See here for more details:

introduction to xamarin ios for visual studio

Upvotes: 12

Taranfx
Taranfx

Reputation: 10447

You can install OSX on PC but experience wont be great and it needs lot of work. Alternate is to use a framework/SDK Codename one: which is based on JAVA and can be used to code in WP8, Android, iOS on Windows (eclipse) with all extensive features

Features Overview:

  1. Full Android environment with super fast android simulator
  2. An iPhone/iPad simulator with easy to take iPhone apps to large screen iPad in minutes.
  3. Full support for standard java debugging, profiling for apps on any platform.
  4. Easy themeing / styling – Only a click away

More at Develop Android, iOS iPhone, WP8 apps using Java Disclaimer: This is my review for the product

Upvotes: 4

Related Questions