设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 74|回复: 0

[制作教程] Deploy to iOS Tutorial (Xcode 13)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    4 天前
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4616

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    23239
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    28749

    灌水之王

    发表于 2026-7-7 12:08:00 | 显示全部楼层 |阅读模式
    Overview & Requirements:
    In this tutorial, I will show you how to how to use Cordova to create an Xcode project that will run your game on an iOS device.
    This tutorail will not teach you how to get your game on the App Store.
    You will need a computer running macOS with Xcode 13 installed. You can download Xcode from the Mac App Store.
    You will also need an iOS device, as RPG Maker games do not play nicely with the emulator that Xcode uses.
    I will be walking you through the steps to get a successful Xcode 13 project setup that you can run your game with. There may be extra steps you need to take if any errors come up. Please feel free to use this thread to ask for help, or shoot me a private message.
    It helps to be somewhat comfortable using Terminal, as it is how we will create our Xcode project. But if you just follow these instructions and run these commands in order, you will have a project that opens nicely in Xcode 13.

    Notice: Only use Terminal to run these commands, do not use a third-party terminal software (such as iTerm2). I ran into a lot of permission issues when attempting this with iTerm2 so just use the default terminal app.


    Step 0 - Download and Install Node.js and Brew
    Download Node.js - Follow this link to download Node.js from their website. There is no special configuration needed, just keep clicking next.
    Install Brew - Brew is a package manager for macOS. The link will take you to their website, where you need to run a command in Terminal. Once you have installed Brew, close that Terminal window you opened.



    Step 1 - Install Cordova
    From here on out, when you see a command in code formatting, copy and paste it into the Terminal window and hit Enter/Return.
    We first must install Cordova on our machine. Use this command:
                    Code:        
    sudo npm install -g cordova

    and wait for it to complete.



    Step 2 - Setup our Cordova project folder
    This tutorial assumes you've already deployed your game to the Output folder, using File -> Deployment in RPG Maker MZ.
    First, cd into the Outputs folder:
                    Code:        
    cd ~/Documents/Output

    Then, we use the following command to create our Cordova project directory.
    Before we do that we will look at a breakdown of the command:

    cordova create <folder name> <bundle identifier> <app name>

    folder name – This is the name of the folder that will hold your Cordova project. You can name it whatever you like.
    bundle identifier – this can be set to com.example.example for now, but it will need to be changed
    later on if you wish to deploy to the App Store. Use Google for more info on bundle identifiers.
    app name – this will be the name of your app as it appears on your device.
    For example:
                    Code:        
    cordova create myfirstapp com.example.myfirstapp MyFirstApp

    After we have created our project folder, cd into it:
                    Code:        
    cd myfirstapp


    Step 3 - Setup our iOS deployment platform
    Now that we are in our Cordova app folder, we need to add iOS as one of our deployment platforms. Use this command:
                    Code:        
    cordova platform add ios

    Once that finishes, we next need to install a few iOS specific plugins and tools to help us build our app. Use the following commands, one by one after each finishes:
                    Code:        
    xcode-select -–install

    If you get a message that command line tools are already installed, keep going.
                    Code:        
    brew install ios-deploy

                    Code:        
    sudo gem install cocoapods

                    Code:        
    cordova plugin add https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix

                    Code:        
    cordova plugin add cordova-plugin-nativestorage

    Once all the commands have been used without errors, keep this Terminal window open, and open a Finder window.


    Step 4 - Move our game into our Cordova project
    In the new Finder window, navigate to Documents, then Output, then our game's folder. Inside you should see a file named "index.html". If you don't see it, you're in the wrong spot.
    Select all the files and folders you see (Command+A) and copy them (Command+C).
    Next, navigate out of our game folder and into our Cordova project folder. Inside, there should be a folder named "www". Open that, and delete all the files inside.
    Finally, paste the files and folders you copied (Command+V).
    Once you've done this, head back to that same Terminal window you kept open.



    Step 5 - Build our Cordova project
    Now that we have all of our necessary files in place and plugins installed, we can finally build our Cordova project.
    Make sure you are still inside the Cordova project folder, but not inside the www folder. If you use the 'ls' command, you should see a file named "config.xml". That will confirm you're in the right spot.
    Run this command:
                    Code:        
    cordova build ios

    And wait for it to finish. If all goes well, you should see a "** BUILD SUCCEEDED **" message.

    Now we have a proper Xcode project file that we can open and run on our device! Using Finder, navigate into our Cordova project folder, then into "platforms", then into "ios". Inside, you should see our completed .xcodeproject file!



    本贴来自国际rpgmaker官方论坛作者:HoofedEar处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/deploy-to-ios-tutorial-xcode-13.141534/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-16 18:59 , Processed in 0.094703 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表