0% found this document useful (0 votes)
54 views14 pages

Build For IOS

This document provides a step-by-step guide for building an RPG Maker MZ game for iOS using Cordova and Xcode. It covers the installation of necessary tools like Node.js, Cordova, and Xcode, as well as creating a Cordova project, copying game files, and configuring settings for landscape orientation and local file access. Finally, it explains how to build the project for iOS and test it on an emulator or real device.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views14 pages

Build For IOS

This document provides a step-by-step guide for building an RPG Maker MZ game for iOS using Cordova and Xcode. It covers the installation of necessary tools like Node.js, Cordova, and Xcode, as well as creating a Cordova project, copying game files, and configuring settings for landscape orientation and local file access. Finally, it explains how to build the project for iOS and test it on an emulator or real device.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

How to build an

RPG Maker MZ By Andres Cavallin © 2021

Game for
iOS
Install Node.js
• Open this link
https://nodejs.org/en/download/
• Install the LTS version recommended for most
users. Maybe you already installed Node.js from
previous lecture.
• Open a Terminal Windows by typing Terminal on
Spotlight Search (Command+Space)
• Check that Node.js is working by typing “node
--version” on the Terminal window, the
expected result looks like the image on the right
(version might be higher than 12, for example 14)
Install Cordova
• Open a Terminal and type
npm install -g cordova
If you have permission issues just try the same
command as administrator using sudo
sudo npm install -g cordova
• Check that it installed correctly by typing
cordova --version
You should see an output similar to the one on the
image, currently version 10.0.0 is the latest
Install Xcode 12
• Visit this link, you will need an Apple Developer
Account
• d
https://developer.apple.com/download/all/?q=xco
de
Alternatively, you can just download from the App
Store, but you will need a developer account to
deploy to real devices
https://apps.apple.com/us/app/xcode/id49779983
5?mt=12
• Visit this link, you will need an Apple Developer
Account
• Update to latest vesion of macOS. I was unable
to test the game on vritual devices until I upgraded
to macOS 11.5 (Big Sur) and Xcode 12.5.1 .
Install CLI Tools
• Install Xcode command-line tools by typing
xcode-select --install
Install ios-deploy via Homebrew by running
brew install ios-deploy
If you see some errors try “brew link --
overwrite ios-deploy”. If you don’t have
homebew visit this link:
https://brew.sh/
The CocoaPods tools is needed to build iOS apps
sudo gem install cocoapods
Create Cordova
Project
• Go to you Output/Section8www directory by using
cd and the path, in my machine the path is:
cd
/Users/acavallin/Documents/Output/Sect
ion8www
Create a cordova folder, go to it and then create the
Cordova project. Here are the commands:
mkdir cordova
cd cordova
cordova create section8
life.tools4.section8 "Section 8"
This will create a folder named section8 with a sample
website in it. Instead of life.tools4.section8 you should
use a domain you own. Go into that folder by typing
cd section8
Clear the www
folder
• Open to Finder on your cordova project folder
open .
• On the finder window, select everything inside
the www folder and move it to the Trash as shown
in the image
• Keep the finder window opened
Copy your game
into www folder
• Open a Finder window in the folder where you
deployed your game for Web browsers. On my
machine it is:
/Users/acavallin/Documents/Output/S
ection8www
• Now copy your game’s www folder that you
deployed on previous lectures over the empty
www folder. Alternatively you can copy all files
inside your game’s www folder into the just
emptied www folder. Any would work
• The image shows the empty www folder on the
top, the deployed www folder on the bottom. By
pressing and holding the Option key while you drag
the files, you will copy instead of move those files
to the target folder
Force landscape
• You can make edits in Xcode but making
changes on config.xml will make it easier to build
directly from cordova
Edit config.xml with Visual Studio Code and add the
line
<preference name="Orientation" value=
"landscape" />
Just after the line
<access origin="*" />
So it looks like the image. Save the file.
[don’t copy and paste, just type it]
Allow access to
local files
• RPG Maker needs access to local files using URLs
instead of file names, to fix this add:
<preference name="scheme" value="app"
/>
Just after the line (or inside)
<platform name="ios" />
So it looks like the image. Save the file.
[don’t copy and paste, just type it]
Fix focus
detection
• Open the file “rmmz_manager.js” that is located
in the “www/js” folder with visual studio code
• Add the following line after line 2107 (may
change in the future)
return true;
Just after the line
SceneManager.isGameActive = function() {
So it looks like the image. Save the file.
[don’t copy and paste, just type it]
Build for iOS
• Install iOS platform by running
cordova platform add ios
• Located in your cordova/section8 directory type
cordova build ios
This will create a folder named android inside the
section8/platforms subdirectory. It also generates
the APK that can be installed on a device.
cordova build
Will generate builds for all installed platforms
Open Project on
Xcode
• Open Xcode
• Click on “Open an existing project” or just
“Open” from the “File” menu
• Navigate to your cordova folder, then get inside
section8 and then into platforms. Select ios folder
and click open
Test on
Emulator
• Select the Target device. From the dropdown list
shown on the image start with a newer device,
then test with older devices. Older devices may not
work since WebAssembly is only supported on
recent versions of iOS and the animations require
it. RPG Maker MV may run on older versions fine.
• The emulator is very slow, it is recommended to
test on a real device. Also because real devices
have better chances of supporting the game. But to
run o a real device you need a paid subscription to
Apple Developer program.

You might also like