Can I develop iPhone Apps on Windows with cocos2d-x?

Over the past weeks I’ve been looking for a way to develop games for smartphones. I don’t want to create them exclusively for iPhones, so I was looking for multi-platform (2D) engines. I actually found some, but e.g. in Corona SDK, you still need a Mac (or lets say at least a legal copy of OS X) to be able to build for iOS. So I was taking a closer look on cocos2d-x, but I am still not sure if I can really develop iOS apps on my Windows PC. Is this possible? Am I just too blind to see? :slight_smile:

I know that there are tutorials about how to install OS X and iOS SDK (on virtual machines), but I can’t believe this is legal…

This is not a limitation of the engine, it’s a restriction that Apple has. You can only deploy to iOS using OSX. You can create your game in windows for Android and then use a friends Mac to deploy to iOS when you are ready.

I was in this same situation a few months ago. I found a nice used Macbook for really cheap and have been using that with no problems what so ever. You don’t need the newest top of the line mac, just something that can run 10.6 or 10.7.

Hello I have the same issue. I have a Windows PC where I develop my game, and I run MAC OS on VMWare ( virtual machine ). Do you think it would be a problem for me to deploy from this virual machine to AppStore?

I have read that people have done it. But it is against the Apple Developer ToU, so if they figure out they have all rights to pull/deny your app and maybe even block you from the app store all together. Best to just buy a used macbook for ~$400 and not worry about it. The code is portable so what you develop on Windows will work just fine on a Mac once you get one so you don’t need to buy the mac right away.

Stephen Piercey wrote:

I have read that people have done it. But it is against the Apple Developer ToU, so if they figure out they have all rights to pull/deny your app and maybe even block you from the app store all together. Best to just buy a used macbook for ~$400 and not worry about it. The code is portable so what you develop on Windows will work just fine on a Mac once you get one so you don’t need to buy the mac right away.

HI,
So you can actually develop cocos2d-x Ga. with a macbook with this Tech Specs
Model : Apple Macbook 13.3 (A1181, MacBook5,2)
Processor : Intel Core 2 Duo 2.0Ghz
Memory (RAM) : 2048MB
Primary Hard Drive : 160GB
Video Card : Nvidia Geforce 256MB
Operating System : Mac OS X 10.5

Adobe Air can do the whole development process for iOS on windows only last deployment is done on a Mac using app loader.Something also to consider.

You don’t have to waste money on mac because of ridiculus apple policy. Just install hackintosh on your PC. It is a mac os version that you can install on your PC. After you do that you can choose to boot to windows or mac. I advise you to format one of your partitions to exFat and create cocos2d-x project there since exFat can be read/write by mac and windows at the same time so you can work on the same project on mac and windows without copying pasting files al the time. I personally use niresh mavericks - I followed this tutoriall https://www.youtube.com/watch?v=CD9kfotqbCk (The guy in the video overexplains but it is decent tutorial)

1 Like

Another question is if we can upload our app on appstore with virtual machine. Did you try it out?

Some users have done this with success, I have heard others were rejected. YMMV.

Thank may be i need to take a risk, another choice is buying old macbook which using only for upload apps to appstore.

Do you know, by any chance, the lowest Mac os version requirement to upload apps to appstore, must be Mavericks or mountain lion is enough?

I think that the OS doesn’t matter as much as the iOS version and the Xcode version.

However, usually, Apple doesn’t make Xcode version run very far back and iOS versions are tied to specific versions.

Example to run Xcode 6 you need Mavericks or Yosemite.

To target IOS 8.0 and 8.1 You need Xcode 6

See how that works?

I discovered cocos2d-x after the Marmalade platform became unsupported, and I needed an alternative cross-platform GDK.

Why is it that Marmalade allowed you to deploy directly to iOS from Windows, but not cocos2d-x? This makes it sound like it is a limitation of cocos2d-x, unless Apple and Marmalade had some kind of deal with each-other.

It’s inconvenient to not be able to set up a single build-machine which can execute command lines to deploy to all platforms, with a Tortoise-SVN / Jenkins setup. Every time I make a commit, I want to immediately be able to see which platform build it breaks.

At the moment, I just can’t do command-line builds at all, I use Visual Studio and Android-Studio. It definitely slows down development time. I wish Apple didn’t make everything so damn restrictive, they’re a developer’s nightmare.

But as far as I understand, Android builds were possible through command-line, but have recently been made deprecated. I hope there’s some long-term plan to fix the Apple problem, but it seems doubtful.

Can you describe how to? Or post official link how to?

Here is the process for Windows: http://docs.marmalade.shop/display/MD/iOS+requirements+and+supported+devices -> “The iOS linker (ld64) has been ported to Windows and Windows “dummy” versions of Apple frameworks are provided so that you can safely use iOS 8.1 APIs and expect them to link when deploying from Windows.”

So it’s clear, that it’s not an official way to do it on Windows. And cocos will never do it this way…

Note that with iOS the system/Apple frameworks and libs are actually supplied on the devices as part of the OS build. The frameworks on both native Mac and our Widows implementation are essentially unimplemented dummy libs that redirect to the device ones at runtime.

Thats really awkward, with new iOS and new features you always behind and can’t use latest SDK of iOS, need to wait for ports and hope it’s not buggy. And can’t normally test and debug… can continue to infinity describing this…

If you want to create a quality game for iOS it’s not your choice.

For cross-platform game development you just need to use only one system - macOS.
From it you can deploy to major platforms: iOS and android.
Most of development: running, testing & debugging can be easily done for macOS and iOS targets, quickly and conveniently in native systems.

When game ready for say 90% you can start to deploy and test it on android, and fix all problems with it, which you suddenly faced…