120

Please correct me if I'm wrong.

I'm new to mobile development and I would like to develop an app to submit to the apple store.

But I am heavily discouraged by the prices of the macs that I am developing the app in mind.

Let's say I know exactly what I want and how to code it.

If I was to create a developers account and pay the fee - then borrow my friends mac, write the code and submit my code to apple. Is that all I need the mac for? And then I'll be able to access all the stats etc through iTunes on my windows computer?

Can someone please tell me I'm delusional?

Cescy
  • 1,921
  • 3
  • 18
  • 21
  • 2
    it might be achieved the way you talking about but think on this bit that if your app need any update or minor bug or changes then? every time you'll ask your friend for a favor? – D-eptdeveloper Sep 11 '13 at 11:18
  • 5
    You need a Mac for serious iOS development. Period. And they are not that expensive after all. And don't forget a handful of iOS devices to test on - apps that didn't get tested on the available hardware generally show deficiencies. – Eiko Sep 11 '13 at 11:22
  • 2
    The delusional part begins with "I know how to code it"... if you code your self (i.e. no contract work by others), you will need *a lot* of testing and debugging. Think of some weeks to get a project running that's worth showing someone. Polishing it and making it "shop-worthy" will be tough work. I really can only think of the most useless apps (i.e. "website wrappers") that are built within a day on a Mac *if* you are already experienced iOS developer. – Eiko Sep 11 '13 at 11:54
  • It is possible to build a GCC-based iOS toolchain on Linux. Xcode is not a compiler - it is only necessary for generating the certificates to submit your app to the AppStore. – The Paramagnetic Croissant Apr 01 '15 at 07:04
  • 2
    You can search for Hackintosh, that allows to run Mac OS on Intel processors, but this is illegal I think. – Borzh Feb 01 '16 at 18:53
  • Possible duplicate of [How can I develop for iPhone using a Windows development machine?](https://stackoverflow.com/questions/22358/how-can-i-develop-for-iphone-using-a-windows-development-machine) – Vanity Slug - codidact.com Jul 19 '18 at 15:19
  • 2
    This isn't off-topic. It's mainly about programming iOS apps, which is definitely on-topic. – Donald Duck Jul 15 '20 at 22:38

12 Answers12

44

On Windows, you can use Mac on a virtual machine (this probably also works on Linux but I haven't tested). A virtual machine is basically a program that you run on your computer that allows you to run one OS in a window inside another one. Make sure you have at least 60GB free space on your hard drive. The virtual hard drive that you will download takes up 10GB initially but when you've installed all the necessary programs for developing iOS apps its size can easily increase to 50GB (I recommend leaving a few GBs margin just in case).

Here are some detailed steps for how install a Mac virtual machine on Windows:

  1. Install VirtualBox.

  2. You have to enable virtualization in the BIOS. To open the BIOS on Windows 10, you need to start by holding down the Shift key while pressing the Restart button in the start menu. Then you will get a blue screen with some options. Choose "Troubleshoot", then "Advanced options", then "UEFI Firmware Settings", then "Restart". Then your computer will restart and open the BIOS directly. On older versions of Windows, shut down the computer normally, hold the F2 key down, start your computer again and don't release F2 until you're in the BIOS. On some computers you may have to hold down another key than F2.

  3. Now that you're in the BIOS, you need to enable virtualization. Which setting you're supposed to change depends on which computer you're using. This may vary even between two computers with the same version of Windows. On my computer, you need to set Intel Virtual Technology in the Configuration tab to Enabled. On other computers it may be in for example Security -> Virtualization or in Advanced -> CPU Setup. If you can't find any of these options, search Google for enable virtualization (the kind of computer you have). Don't change anything in the BIOS just like that at random because otherwise it could cause problems on your computer. When you've enabled virtualization, save the changes and exit the BIOS. This is usually done in the Exit tab.

  4. Download this file (I uploaded the file which I previously downloaded from a link which is now broken). If the link gets broken, post a comment to let me know and I will try to upload the file somewhere else. The password to open the 7Z file is stackoverflow.com. This 7Z file contains a VMDK file which will act as the hard drive for the Mac virtual machine. Extract that VMDK file. If disk space is an issue for you, once you've extracted the VMDK file, you can delete the 7Z file and therefore save 7GB.

  5. Open VirtualBox that you installed in step 1. In the toolbar, press the New button. Then choose a name for your virtual machine (the name is unimportant, I called it "Mac"). In "Type", select "Mac OS X" and in "Version" select "macOS 10.13 High Sierra (64 bit)" (the Mac version you will install on the virtual machine is actually Catalina, but VirtualBox doesn't have that option yet and it works just fine if VirtualBox thinks it's High Sierra).

    It's also a good idea (though not required) to move the VMDK file you extracted in step 4 to the folder listed under "Machine Folder" (in the screenshot above that would be C:\Users\myname\VirtualBox VMs).

  6. Select the amount of memory that your virtual machine can use. Try to balance the amount because too little memory will result in the virtual machine having low performance and a too much memory will result making your host system (Windows) run out of memory which will cause the virtual machine and/or other programs that you're running on Windows to crash. On a computer with 4GB available memory, 2GB was a good amount. Don't worry if you select a bad amount, you will be able to change it whenever you want (except when the virtual machine is running).

  7. In the Hard disk step, choose "Use an existing virtual hard disk file" and click on the little folder icon to the right of the drop list. That will open a new window. In that new window, click on the "Add" button on the top left, which will open a browse window. Select the VMDK file that you downloaded and extracted in step 4, then click "Choose".

    When you're done with this, click "Create".

  8. Select the virtual machine in the list on the left of the window and click on the Settings button in the toolbar. In System -> Processor, select 2 CPUs; and in Network -> Attached to, select Bridged Adapter. If you realize later that you selected an amount of memory in step 6 that causes problems, you can change it in System -> Motherboard. When you're done changing the settings, click OK.

  9. Open the command prompt (C:\Windows\System32\cmd.exe). Run the following commands in there, replacing "Your VM Name" with whatever you called your virtual machine in step 5 (for example "Mac") (keep the quotation marks):

    cd "C:\Program Files\Oracle\VirtualBox\"
    VBoxManage.exe modifyvm "Your VM Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
    VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
    VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
    VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
    VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
    VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
    VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" C02L280HFMR7
    
  10. Now everything is ready for you to use the virtual machine. In VirtualBox, click on the Start button and follow the installation instructions for Mac. Once you've installed Mac on the virtual machine, you can develop your iOS app just like if you had a real Mac.

Remark: If you want to save space on your hard disk, you can compress the VMDK file that you extracted in step 4 and used in step 7. To do this, right click on it, select Properties, click on the Advanced... button on the bottom right, and check the checkbox "Compress contents to save disk space". This will make this very large file take less disk space without making anything work less well. I did it and it reduced the disk size of the VMDK file from 50GB to 40GB without losing any data.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
  • 2
    The Vm works fine. But it is very slow on my machine, which is a gaming machine. – Reuel Ribeiro Feb 25 '18 at 14:58
  • @ReuelRibeiro You may want to check your virtual machine's configuration to make sure it's optimized for your computer. Here's a helpful article on the topic: https://www.hanselman.com/blog/VMPerformanceChecklistBeforeYouComplainThatYourVirtualMachineIsSlow.aspx – Technoguyfication Mar 30 '18 at 04:17
  • On linux 64bit also works. Nice work! But how about newest versions of mac? Is it possible – Vlad May 11 '18 at 15:11
  • @V.Kalyuzhnyu If you need the newest version of Mac on the virtual machine, you can start by installing El Capitan as I explained in my answer and then upgrade to High Sierra as explained [here](https://support.apple.com/en-us/HT201475). – Donald Duck Sep 14 '18 at 18:50
  • 2
    At step 9 I've had to add VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" W1234567980 in order to get able to login using my Apple ID – ikleiman Oct 15 '18 at 23:13
  • 1
    Although this might work, the latest xcode version is not compatible with IOS 10.11 (El Captain) that is currently on google drive. Do you have a later version of MacOS? – CularBytes Dec 18 '18 at 20:12
  • @CularBytes As I said in another comment: If you need the newest version of Mac on the virtual machine, you can start by installing El Capitan as I explained in my answer and then upgrade to High Sierra as explained [here](https://support.apple.com/en-us/HT201475). – Donald Duck Dec 19 '18 at 09:55
  • ah woeps read over that, thanks – CularBytes Dec 19 '18 at 10:07
  • can we submit app to app store using this method of virtualbox ? – Rahul Shah Sep 28 '19 at 09:27
  • 1
    @RahulShah You can do anything you could do on a real Mac. – Donald Duck Oct 03 '19 at 10:33
  • I'm trying to create a Catalina virtual machine, how would I do that? I've created the El Capitan virtual machine, but I need Catalina for the latest version of XCode. I've tried installing it directly within the virtual machine, but the install fails. There is some sort of error on reboot after the "install" and El Capitan reloads. – Prescott Chartier May 21 '20 at 20:57
  • thanks for your detail guiding <3 – Noname Aug 27 '20 at 07:32
  • @CularBytes I've updated my answer so that now it installes Catalina instead of El Capitan. – Donald Duck Aug 28 '20 at 09:28
  • @PrescottChartier I've updated my answer so that now it installes Catalina instead of El Capitan. – Donald Duck Aug 28 '20 at 09:28
  • @Donald Duck Thank you. I'll give it a try. – Prescott Chartier Aug 28 '20 at 20:27
  • For AMD users i had to add the command: VBoxManage modifyvm "VM name" --cpu-profile "Intel Core i7-6700K" – Jordan Mar 12 '21 at 13:03
  • @DonaldDuck Do you have an alternative download option because GDrive says it reached D/L quota – jason Apr 26 '21 at 18:19
  • @jason I tried downloading it just now and it worked fine. – Donald Duck Apr 28 '21 at 09:35
  • @DonaldDuck the link is already dead, can you share another link good sir? thank you – HadidM Mar 10 '23 at 07:13
  • @HadidM Done (comments must be at least 15 characters) – Donald Duck Mar 10 '23 at 11:41
29

Update from 09/2017

It is possible to develop iOS (and Android at the same time) application using React Native + Expo without owning a mac. You will also be able to run your iOS application within iOS Expo app while developing it. (You can even publish it for other people to access, but it will only run within Expo app). Here is page from Expo on how to generate standalone app.

Steps from that page:

One: Install exp by running npm install -g exp

Two: Configure app.json (somewhere along these lines):

{
   "expo": {
    "name": "Your App Name",
    "icon": "./path/to/your/app-icon.png",
    "version": "1.0.0",
    "slug": "your-app-slug",
    "sdkVersion": "17.0.0",
    "ios": {
      "bundleIdentifier": "com.yourcompany.yourappname"
    },
    "android": {
      "package": "com.yourcompany.yourappname"
    }
   }
 }

Three: Start exp packeger with exp start

Four: run exp build:android or exp build:ios.

You will be prompted for some input. For android you can choose 1) Let Expo handle the process! if you don't have keystore (or if you don't know what it is). For iOS you will have to enter your Apple developer credentials. Then you can provide distribution certificate or let expo handle it.

Five: Once in a while you will have to come back and run exp build:status command to check whether your build was complete. If complete you will be provided a direct link to .apk or .ipa file.

The only drawback to this approach is that it won't be as native as writing iOS app in Swift, and you will have to put up with parade of issues you may run into while developing with weakly typed js, npm, and it's dependency-on-particular-version-of-some-other-library issues, and other stuff.

28

Let me tell you step by step few years back I was in same situation.

So We have two Phases

  1. iPhone/iPad (iOS) app development
  2. iPhone/iPad (iOS) app development and Publish to iTunes Store

1. iPhone/iPad (iOS) app development

So If you just want to develop iOS apps you don't want to pay anything,

You just need Mac + XCode IDE

  1. Get Mac Mini or Mac Machine
  2. Create Developer Account on Apple its free
  3. After login developer account you can download Xcode IDE's .dmg file
  4. That's all.

Now you just install Xcode and start developing iOS apps and test/debug with Simulator..

2. iPhone/iPad (iOS) app development and Publish to iTunes Store

for publishing your app on iTunes store you need to pay (example $99 / year) .

So For complete iOS Development Setup you need

  1. Get Mac Mini or Mac Machine
  2. Create Developer Account on Apple its free
  3. After login developer account you can download Xcode IDE's .dmg file
  4. pay $99 for publish apps on iTunes
  5. create your certificates for development/distribution on your apple account
  6. download all certificate on mac machine and install into XCode using Keychain tool
  7. Get at least one iOS Device
  8. Register you device on your apple account
  9. Now you can develop iOS app, test on Real Device and also publish on iTunes Store
swiftBoy
  • 35,607
  • 26
  • 136
  • 135
18

Some cloud solutions exist, such as macincloud (not free)

Laurent
  • 436
  • 5
  • 8
  • Microsoft now also has a solution for this where they host an macOS Agent in Azure DevOps for you https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#xcode – Eric D. Johnson Apr 04 '19 at 21:48
  • being using it. The fact that they do not give you admin access is atrocious to install cocoapods... – PptSbzzgt May 26 '22 at 19:39
14

Short answer : theoretically YES, but this has to be a VERY GOOD friend of yours, then again, you might prefer to buy a used mac-mini!

TLDR : You will need this Mac for a really long time, depending on your app requirements, your development skills, and your luck with Apple. For example:

  1. You might need some days to set up Xcode and the required SDKs and Libraries.
  2. It might take some time to get that Developer Account, sometimes you can wait too long just to get your request reviewed.
  3. When you submit your application for the first time, you will have to wait, maybe up to several weeks, or even months, to get your app reviewed.
  4. Each time your app gets rejected, you will need to find and fix your issues (without much help from Apple, other that pointing out the guideline rule that you broke ), then re-submit your app for review, and wait again.
  5. Each time you try to apply a patch for your already deployed app, you will have to get your app reviewed and there is a chance that your previously legit app, now breaks a new guideline, so you re-submit and wait.

So, from my experience the development of an iOS app is a very lengthy proccess, without even considering the actual code-development time. Can you borrow a Mac for that long ?

yannicuLar
  • 3,083
  • 3
  • 32
  • 50
  • Both you and the other guy have clarified a lot for me so I thank you – Cescy Sep 12 '13 at 02:01
  • 1
    You're welcome. The way I see it, an iOS app for an unexperienced dev, is a long shot and a great commitment. You could start with an android app that will cost you $25 (lifetime dev licence) first. – yannicuLar Sep 12 '13 at 07:00
13

You can use Phonegap (Cordova) to develop iOS Apps without a Mac, but yout would still need a Mac to submit your application to the App Store. We developed a cloud application which also can publish your app without a Mac https://www.wenz.io/ApplicationLoader. Currently we are in beta and you can use the service for free.

Best regards, Steffen Wenz

(I'm the creator of the site)

Steffen Wenz
  • 155
  • 1
  • 2
12

Update Intel XDK is no longer available.

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

Click here for detail.

Hemant Singh Rathore
  • 2,153
  • 1
  • 24
  • 38
4

Also if you want to save some money you don't must buy a Mac. There is other ways how to do it:

1.) You can use practically any OS to run latest MacOS in virtual machine (look at YouTube). I am using this method really long time without any problems on windows with VMWare.

2.) Hackintosh. Install MacOS to your PC. You must have compatible components, but if you have, this is the best way, because you eliminate the lags in VM... I am using this in this time. Perfect. On my laptop, but please don't tell this to Apple, because practically this is illegal

3.) If you are making simple apps with minimum UI, you can use Theos. Also with Theos you can create cydia tweaks. Only one problem: codesign. If you want to publish app on App Store you still must have MacOS, but if you want to make app in home you can use CydiaImpactor to sign the apps with Apple ID.

I used all of this ways and all is working. By my VM is best solution if you don't want to spend lot of time by installing Hackintosh.

Samuel Tulach
  • 1,319
  • 13
  • 38
4

Most framework like React Native and Ionic allows you to built on their server. Meaning that they can help you compile and provide you with and .ipa file.

The problem is you need Xcode or Application loader to submit your app to Apple App Store Connect. Both of these are only available on OSX. To overcome this solution you have 2 options that I am aware of

  1. Rent mac virtually. http://www.macincloud.com
  2. Use website that helps you to upload your app (You need to have .ipa file). http://www.connectuploader.com
Valehelle
  • 119
  • 3
2

You can use Smartface for developing your app with javascript and deploy to stores directly without a Mac. What they say is below.

With the Cloud Build module, Smartface removes all the hassle of application deployment. You don’t need to worry about managing code signing certificates and having a Mac to sign your apps. Smartface Cloud can store all your iOS certificates and Android keystores in one place and signing and building is fully in the cloud. No matter which operating system you use, you can get store-ready (or enterprise distribution) binaries. Smartface frees you from the lock-in to Mac and allows you to use your favorite operating system for development.

https://www.smartface.io/smartface/

Egemen Çiftci
  • 699
  • 5
  • 13
1

My experience is that Ionic Pro (https://ionicframework.com/pro) can do the most of the Development and Publish job but you still need Mac or Mac in cloud at these steps:

  • create .p12 Certification file
  • upload the .ipa file to the App Store

After you created your Certification file, You can upload it to Ionic Pro. You can build .ipa files with proper credentials in cloud. But unfortunately I didn't found another way to upload the .ipa file to App Store, only with Application Loader from Mac.

So I decided to use a pay-as-you-go Mac in cloud account (you pay only for minutes you are logged in) since the time I spend on Mac is very limited (few minutes per App publication).

gaborp
  • 604
  • 5
  • 16
-9

XAMARIN CROSS Platform

You can use Xamarin , its a cross platform with IDE Visual studio and integrate xamarin into it . It is vey simple to code into xamarin and make your ios apps by using C# code .