Первый шаг в разработке приложений под Mac. Обзор и установка Xcode

15.06.2022 Гаджеты

Приложения для iOS тестируются в Xcode , а для этого нужен Mac . Но не расстраивайтесь, если вы не являетесь счастливым обладателем Mac’a , как и я, то вам просто нужен эмулятор macOS для Windows .

Сразу хочу сказать, что если у вас нет аккаунта разработчика Apple Developer , то вы не сможете протестировать игру на реальном устройстве iPhone или iPad . Тесты можно будет проводить только в среде Xcode .

Что бы установить macOS на Windows , вам понадобиться следующее:

  • Эмулятор VMware Workstation 12 Player + Patch
  • Образ macOS Sierra . Здесь я хотел бы пояснить один момент. Дело в том, что Xcode устанавливается только на macOS последней версии. Поэтому нужна именно macOS Sierra. На момент выхода статьи: версия Xcode — 8.1 и версия macOS Sierra — 10.12.1

Пошаговая установка macOS Sierra на VMware на Windows

1) Извлеките архив macOS 10.12 Sierra.rar , начиная с первого.

2) Установите VMware-player . Затем извлеките архив Patch Tool.zip , откройте папку unlocker208 и запустите файл win-install.cmd от имени администратора:

3) Откройте VMware Player . Вам нужно будет ввести e-mail:

4) Затем нажмите «Create new virtual mahine »:

  • Guest OS: Apple Mac OS X
  • Version: macOS 10.12

5) Дайте имя новой виртуальной машине:

  • введите имя;
  • нажмите кнопку «Browse » и создайте папку, в которую будет установлена macOS Sierra (можно оставить путь по умолчанию);
  • на следующем шаге отметьте пункт «Store virtual disk as a single file ».

6) Настройте виртуальную машину:

  • Нажмите «Edit Virtual Machine Setting »;
  • выберите «Hard Disk (SATA) 40 GB »;
  • нажмите кнопку «Remove ».

  • нажмите кнопку Add ;
  • выберите Hard Disk ;
  • выберите Hard Disk — SATA ;
  • отметьте «Use an Existing Virtual Disk ».



Нажмите «Browse » и выберите файл образа macOS 10.12 Sierra Final by TechReviews.vmdk :

9) Вы можете настроить Ram от 2.56 до 4 Гб и процессор — от 2 до 4 ядра:

Но не у всех есть мощный компьютер способный тянуть эмуляцию на полную катушку, так что лучше настроить:

  • виртуальную память на 2GB , а не на 4GB;
  • процессор на 2 ядра , а не на 4;
  • используйте USB 2.0 , вместо USB 3.0 (с ним бывают проблемы).

10) Отредактируйте файл VMX.
Щелкните правой кнопкой мыши на файле vmx (в папке, которую вы создали на шаге 5) затем выберите Открыть с помощью «Блокнот»:

Скопируйте этот код: smc.version = "0" и вставьте его последней строчкой:


Сохраните файл.

Всё! Теперь запустите эмулятор кнопкой «Play virtual machine ».

Если у вас возникает ошибка при запуске эмуляции, значит вам нужно включить в BIOS так называемую опцию intel virtualization или intel virtual technology :

Установить Xcode

При первом запуске macOS вам нужно будет пройти этапы настроек Apple . Здесь лучше сразу выполнить вход в Apple ID . Вы можете пропустить этот шаг, но идентификатор iTunes (или Apple ID) все равно нужен, что бы установить Xcode из App Store .

Если у вас нет яблочных устройств, то, скорее всего, нет и Apple ID , зарегистрировать его можно на сайте Apple .

Apple ID — это e-mail , который вы указали при регистрации.

Так же нужно будет создать аккаунт учётной записи, пароль можно установить просто 1. Затем для входа в систему введите пароль — 1

Итак, вы сделали Mac из своего компьютера на Windows . Отлично!

Теперь жмите на иконку App Store -> В поиске введите «xcode » -> Установите программу Xcode .

Экспорт проекта iOS из Clickteam Fusion 2.5 и запуск в Xcode

Выберите тип построения проекта — iOS final Xcode project . Clickteam Fusion 2.5 предложит вам выбрать один из размеров экрана.

  • 320×480 — старые модели iPhone
  • 640×960 iPhone 4/4S
  • 768×1024 iPad , iPad 2 , iPad mini
  • 640×1136 iPhone 5 , iPhone 5C/5S , iPhone SE .
  • 1536×2048 iPad (3gen) , iPad 4 , iPad Air , iPad Air 2 , iPad mini (Retina) , iPad mini 2 , iPad mini 3 , iPad mini 4 , iPad Pro .
  • Вторая строка — это те же самые устройства в положении landscape .

Нажмите File -> Build -> Application и вы получите zip-архив проекта.

Важно: название проекта не должно содержать русских букв.

Я подготовил такой файл для тех, кто ещё не обзавёлся экспортом Clicteam Fusion 2.5 для iOS (скачать App-iOS.zip)

Далее нужно перенести этот zip-архив на Mac . И здесь не получится просто скопировать и вставить файл. Вам нужно скинуть архив на флешку, затем открыть эмулятор, вытащить и снова воткнуть флешку.

Распакованную папку лучше скопировать на рабочий стол и запускать файл с Mac’а , а не с флешки.

Откройте папку и кликните двойным щелчком мыши по файлу с расширением .xcodeproj .

Проект откроется в Xcode . Слева вверху вы можете выбрать устройство для тестирования.


Выберите желаемое устройство и нажмите кнопку Run .
Если нажать и держать лкм в левом нижнем углу кнопки, появиться дополнительное меню.

Когда загрузиться окно симулятора устройства, кликните на иконку приложения.

Что бы закрыть симулятор нажмите Quit в выпадающем меню по клику правой кнопки мыши.

Недостатки:

  • Конечно, приложение будет притормаживать.
  • Невозможно протестировать множественные касания (Multiple Touch ).
  • В симуляторе не работают кнопки клавиатуры. Ну, это и понятно, вы же как бы находитесь в iPhone /iPad .
  • И ещё, на всякий случай, в Mac не работает правый Shift .

Но даже несмотря на недостатки, это уже кое-что. И этот способ даёт возможность бесплатно протестировать приложение для iOS .

Приложения для iOS тестируются в Xcode, а для этого нужен Mac. Но не расстраивайтесь, если вы не являетесь счастливым обладателем Mac"a, как и я, то вам просто нужен эмулятор macOS для Windows. Сразу хочу сказать, что если у вас нет аккаунта разработчика Apple Developer, то вы не сможете протестировать игру на реальном устройстве iPhone или iPad. Тесты можно будет проводить только в среде Xcode. Что бы установить macOS на Windows, вам понадобиться следующее: Эмулятор VMware Workstation 12 Player + Patch Образ macOS Sierra. Здесь я хотел бы пояснить один момент. Дело в том, что Xcode устанавливается только на macOS последней…

Как тестировать проект игры под iOS

Как тестировать проект игры под iOS

Nowadays, every operating system got their own app development programs. Like we have used Windows apps on Linux and vice versa. But when we talk about Mac OS, it’s not easy to use Mac apps on Windows or Linux like the rest. Mac uses an SDK called Xcode to develop apps in itself. Seeing it, a few Windows users started craving for it, ignorant of the fact that Xcode cannot be used on Windows.

But is it really so?

Xcode is available only for Mac and iOS platforms and not for any other OS. The reason for this unavailability is a number of compatibility issues.

So is there any fix for this?

We firmly believe that everything is possible when it comes to technology. So we’ve brought you a detailed method to install Xcode on Windows . But before that, you need to learn what actually Xcode is and what it includes.

What is Xcode ?

Xcode is an IDE (Integrated Development Environment) that contains a set of software development tools, designed by Apple. These tools are available specifically for developing software on Mac OS X, iOS, and Apple TV. And this IDE is programmed in such a way that you cannot install it on any other OSs.

As a developer, I had always felt easy to develop apps for Linux and Windows OS as compared to Mac OS. The reason being is you can develop Linux and Windows apps on any platform while developing apps on Mac requires a toolset called XCode. If you are interested to install Xcode for Windows PC (7, 8.1 and 10), then here is a detailed way on how to install Xcode on Windows 7 and 8/8.1 and Windows 10 PC.

So we’ll be giving you a detailed guide to install Xcode on your Windows 7, Windows 8 and Windows 10 systems.

The procedure to run Xcode on other systems and developing apps for Apple is separated into two parts. First is installing Mac OS on a virtual workstation on Windows or Linux. And the second is, installing Xcode on a virtual Mac OS.

Requirements to Install Xcode on Windows 7/8/10 OS / XCode for Windows

  • A working Mac OS X virtual machine on VMware or VirtualBox
  • Downloaded Xcode package from Apple site. You need to have an Apple ID in order to download Xcode from Apple store.
  • Dual-Core Intel processor in the computer
  • Minimum 2GB of RAM (Recommended: 4 GB+)
  • Availability of the hardware virtualization on the computer

Steps to install Xcode on Windows 10, 8/8.1 and 7 PC or Laptop

Here, we will use Virtual Box to install Xcode on Windows . So if you don’t have a copy of an installed Virtual Box, then you can download it as it is the free and open source.

Follow the below steps so as to install Xcode on Windows 10, 8 or 8.1 and Windows 7 desktop or Laptop for iOS SDK.

Step 1: Download and install VMware or VirtualBox on your Windows computer from the . Search for “VirtualBox 5.2.4 platform packages” and click on “Windows Hosts”.

Step 2: Now, download and install OSX Mavericks ISO as a virtual machine from .

Step 3: Create the virtual machine on your Oracle virtual box. For that, you need to open Virtual Box and click New .

Step 4: Now, you will get a new window asking for the name of the new operating system. Enter Name as OSX, Type of the OS as Mac OS X and also enter the Version as Mac OS X (32 bit). Click Next.

Create New Virtual Machine

Step 5: Select the memory size for the virtual machine as 1024 MB (1 GB) and then click Next.

Select memory size for virtual machine

Step 6: Now, Select and create the type of virtual hard drive file.

Create Virtual machine – Hard Disk

Step 7: Select the type of Hardware file as VDI (VirtualBox Disk Image). It is always recommended to go for VDI in terms of ISO image. Click Next.

Create Virtual Machine-Hard Disk File Type

Step 8: Select the physical hard drive as Dynamically allocated. Now, you need to allocate the file location and size from the physical hard drive on your device. Then, Click on Create.

Create Virtual Machine- Storage

Create Virtual Machine – File Size & Location

Step 9: Now, you have successfully created a virtual machine on your virtual box. Currently, it will be in “Powered Off” state.

Virtual Machine – OSX

Step 10: Now you need to mount the OSX Mavericks ISO that we have downloaded before. For that, Go to Settings -> Storage -> Load iso File -> Click Ok -> Start.

Create VM on Oracle

Step 11: Next, follow the on-screen steps of OSX boot and then OSX will be installed in Oracle Virtual.

Step 12: Go to safari browser in your Virtualbox.

Step 13: Open official Apple App store and sign in using your Apple ID in the App store. You need to enter the Apple ID and password as shown in the image below:

Step 14: After signing, type Xcode in the search box. You can select any of the apps. Click on Free and Download. Then, click OK to download the kit. After completing the installation process, open it from the applications.

Step 15: In order to install Xcode components, you need to be the root user. So now, you need to provide your root credential. Enter your name and password and press OK.

That’s it, we have now successfully installed the latest Xcode version on your Windows 10, 8/8.1 and 7 PC using desktop virtualization software VMware workstation. Start creating new projects and better apps using this interface.

So in this way, you can easily download and install Xcode for windows Personal computer or laptop. The performance and speed of Xcode won’t be extremely high.

Hope this tutorial helps you in the best way to install Xcode on Windows 10, 8/8.1 and 7 OS running PC or Laptop.

Добрый день всем. Меня зовут Док и мы начинаем цикл уроков по созданию приложений под мобильную операционную систему IOS (iPad, iPhone). Но первый урок будет посвящен не программированию, а установке операционной системы Mac OS на Windows. Впрочем, если у вас есть компьютер от Apple (iMac, MacBook Air, MacBook Pro итд), можете этот урок пропустить. Все дело в том, что программная среда для разработки приложений под названием Xcode работает только на Mac OS. Можно использовать Хакинтош - специальную взломанную Mac OS, работающую на обычных компьютерах. Но там есть множество нюансов по установке, поэтому мы сделаем проще - будем работать c Mac OS прямо в Windows, используя виртуальную машину VMWare. Виртуальная машина - это обычная программа, эмулирующая еще одну операционную систему. Следовательно нам понадобится сама программа VMWare и образ Mac OS под нее.

VMware Workstation версии 8.0.0 можно скачать . Только KeyGen для нее вам прийдется искать самостоятельно. После скачивания распаковываем архив и устанавливаем со следующими настройками.





Теперь нужно скачать образ Mac OS. Я взял Mac OS 10.7.1 Lion для разработчиков (образ под VMware) . Я не знаю, законно это или нет, но я все равно собираюсь в ближайшем будущем купить MacBook, так что моя совесть чиста. Обратите внимание, что образ весит больше 22 гигабайт, причем это еще и архив. В распакованном виде OS занимает почти 40 гигабайт, так что будьте готовы освобождать место на жестком диске. Пока идет скачивание, откройте диспетчер задач и завершите все задачи, связанные с VMware.


Когда скачается архив с Mac OS, распакуйте его и запустите файл windows.bat , который лежит в папке VMware Patch . Теперь нужно перезагрузить компьютер, после чего запустить VMware Workstation , например, с ярлыка на рабочем столе. В программе нажмите на пункт Open A Virtual Machine и выберите файл Mac OS X 10.7 DP2.vmdk - тот самый, который весит 39 гигабайт.


Теперь нажимайте на пункт Power on this virtual machine .


На этом этапе часто возникает такая ошибка - Software virtualization is incompatible with long mode on this platform .


Чтобы ее побороть, нужно перезагрузиться, выйти в Bios и там включить Intel Virtualization Technology .


Ошибка должна пропасть. Если теперь при запуске появится такая табличка, выбираем I copied it

You can make an app for iOS even if you’re on a PC running Windows 10.

I wish I had known this when I first started because I delayed myself for 3 years before biting the bullet and buying a Mac.

Had I known about running Xcode on Windows or about the solutions below, I might’ve started building iPhone apps much earlier!

Rent a Mac

Before committing to buying a new Mac, you can actually “rent” one for development. You’ll remotely access the Mac and Xcode through your PC.

It’ll be like having the Mac desktop in a window on your Windows Desktop.

The really nice thing about this option is that the cost is really low and it’s the fastest option to get up and running.

If you decide that app development isn’t for you, you just cancel your plan.


These guys were featured in the recent Apple keynote when they introduced the updated Mac Mini! They have the newest Macs available.

(Use coupon code “CODEWITHCHRIS” for 50% off your first month. If you do, please let me know in the comments below. I’ll get a small kick back at no extra expense to you so thank you for supporting my site!)

If you go down this route for iOS app development, make sure you get my Xcode cheatsheet with references and keyboard shortcuts for Windows users .

There are a couple other companies that provide this service:

2. MacInCloud
This is the most well known service out of the three. You won’t have to install Xcode because it comes preinstalled. You can also do pay-as-you-go so it’s a pretty low commitment. Some people complain that it’s slow but you can try it out for yourself since it’s only about a buck an hour!

3. XcodeClub
XcodeClub is run by Daniel who is a passionate developer himself. From the reviews I see, the service is fast and friendly. The pricing is less flexible than MacInCloud and you’ll have to commit to at least a month.

Virtualize MacOS

If you’re a little more technically savvy, you can use virtualization software and run a “virtual Mac” on your PC.

The services above are essentially doing the same thing on their servers and then they charge you a fee to access the virtual machine.

By setting it up yourself on your own PC, you essentially cut the middle man out of the equation.

Unfortunately it does take a little bit of technical know-how to get this up and running.

The two most popular pieces of software to do virtualization are VirtualBox and VMWare Workstation.

You can download them below and then use Google to find a guide on how to install the latest MacOS (Mojave) with either VirtualBox or VMWare Workstation.

After that, spin up your new virtual Mac and download Xcode. This is as close as you’ll get to running actual Xcode on Windows!

4. VirtualBox
VirtualBox is open source software which means that it’s free. That probably explains why it’s a lot more popular than VMWare Workstation when it comes to running MacOS on your Windows machine!

5. VMWare Workstation
Unfortunately you’ll have to pay for this piece of software and at the time of this writing, a license costs about half the price of a brand new Mac Mini which is perfectly suitable for iOS app development. I would recommend you try VirtualBox first or try to buy a used Mac Mini.

Build a “Hackintosh”

You can also build a “Hackintosh” which is a PC that has been customized to run MacOS.

This requires the most effort out of all the options presented so far but it can work for someone who wants a separate physical computer running MacOS.

6. Hackintosh.com
A great resource for all things Hackintosh. The first How-To section contains links to a number of great tutorials for building your own Hackintosh and installing High Sierra.

7. Hackintosh Subreddit
I love looking for Reddit communities on anything that I’m interested in because there are always interesting conversations happening. Reddit provides a way to have a dialogue with like minded individuals, to get help and to help others!

8. Hackintosh Articles on 9to5mac.com
I included this link because it contains up to date news and articles for Hackintosh builds.

Third Party Solutions

Lastly, there are many third party solutions that you can use to do iOS development on Windows.

You won’t be using Xcode in these solutions but you’ll be able to generate an app that can run on iOS devices.

Check out these great Xcode alternatives:

9. React Native
Use JavaScript to build native mobile apps.

10. Xamarin
Use C# to build a mobile app that you can deploy natively to Android, iOS and Windows.

Всем привет! Сегодня я буду устанавливать Xcode и iOS SDK на MacBook для разработки приложений под iOS и в этой статье хочу описать процесс по шагам.

Первое, что нужно сделать — скачать Xcode с официального сайта apple разработчиков. Переходим на страницу центра разработки и переходим в iOS Dev Center. Здесь нужно войти на сайт, используя AppleID. Apple ID - это учетная запись, которую используют для выполнения любых действий непосредственно связанных с Apple. Переходим по ссылке Log in.

Если у вас еще нет AppleID и вы не зарегистрированы как ios разработчик, то необходимо его получить по ссылке Register. Нужно будет ввести регистрационные данные и оплатить лицензию разработчика на год(99$). Почитать про это вы можете .

Итак. Считаем что у вас уже есть AppleID и лицензия оплачена. В окне Sign in with your Apple ID вводим наш AppleID и пароль

после чего вы попадаете на свою личную страницу в iOS Dev Center. Здесь необходимо найти ссылку на Xcode — Download Xcode и перейти по ней.

Откроется страница с описанием среды Xcode. Находим ссылку View Downloads и переходим по ней.

На странице с загрузками нужно будет выбрать необходимые компоненты и среду разработки. Я буду использовать Xcode версии 4.6 и iOS 6 SDK. Слева выключаем все галочки и оставляем только Developer Tools. Затем в списке справа находим пункт Xcode 4.6. Здесь видим описание среды разработки и ссылки на инсталлятор и документацию. Щелкаем по ссылке Xcode 4.6 и дожидаемся завершения загрузки.

Запускаем скачанный файл dmg. В появившемся окне выбираем Xcode, перетаскиваем его в папку Applications и дожидаемся пока приложение скопируется

После этого заходим в папку с программами в Finder и запускаем установку Xcode

Далее соглашаемся с лицензионным соглашением, жмем Install и дожидаемся завершения установки. После завершения жмем Start Using Xcode. Далее в появившемся окне Нажимаем Create a new Xcode project. Также по желанию можно снять галочку Show this windows when Xcode launches для того, чтобы при следующем запуске среды разработки открывался сразу Xcode. Можно сразу закрепить в Dock ярлык Xcode,перетащив ярлык Xcode в Dock из программ в Finder