Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

iOS로 내보내기

더 보기

This page describes how to export a Godot project to iOS. If you're looking to compile export template binaries from source instead, read Compiling for iOS.

Xcode에 Godot 프로젝트를 불러오려면 몇 가지 과정이 필요합니다. 이렇게 하면 iOS 기기에 빌드하고 배포할 수 있고, App Store에 출시할 수 있으며, Xcode에서 하는 다른 것도 정상적으로 할 수 있습니다.

주의

Projects written in C# can be exported to iOS as of Godot 4.2, but support is experimental and some limitations apply.

요구사항

  • 반드시 Xcode가 설치된 macOS 컴퓨터에서 iOS를 내보내야 합니다.

  • Godoy 내보내기 템플릿을 다운로드하세요. Godot 메뉴를 사용하세요: 편집기 > 내보내기 템플릿 관리

Godot 프로젝트를 Xcode로 내보내기

Godot 편집기에서, 프로젝트 메뉴에서 내보내기 창으로 갑니다. 내보내기 창이 열리면, 추가하기..를 클릭하고 iOS를 선택합니다.

The App Store Team ID and (Bundle) Identifier options in the Application category are required. Leaving them blank will cause the exporter to throw an error.

참고

If you encounter an error during export similar to
JSON text did not start with array or object and option to allow fragments not set
then it might be due to a malformated App Store Team ID!
The exporter expects a (10 characters long) code like ABCDE12XYZ and not, e.g., your name as Xcode likes to display in the Signing & Capabilities tab.
You can find the code over at developer.apple.com next to your name in the top right corner.

프로젝트 내보내기를 클릭한 뒤에도, 두 개의 중요한 설정이 남아있습니다:

  • 경로는 내보낸 Xcode 프로젝트 파일이 들어가는 빈 폴더입니다.

  • 파일은 Xcode 프로젝트의 이름과 여러 프로젝트 별 파일과 디렉토리의 이름이 될 것입니다.

../../_images/ios_export_file.png

참고

이 튜토리얼은 exported_xcode_project_name을 사용하지만, 나중엔 당신의 프로젝트 이름을 사용할 것입니다. 다음 단계에서 exported_xcode_project_name을 본다면, 그곳을 당신이 사용하는 이름으로 바꾸면 됩니다.

참고

exported_xcode_project_name 을 지정할 때 공백 문자를 사용하면 XCode 프로젝트 파일이 손상될 수 있으므로 공백 문자 사용을 피하십시오.

내보내기를 마치면, 출력 폴더는 다음과 같아야 합니다:

../../_images/ios_export_output.png

exported_xcode_project_name.xcodeproj를 열면 다른 iOS 앱처럼 게임을 빌드하고 배포할 수 있게 됩니다.

능동적 개발 고려사항

위의 방법으로 프로젝트를 내보내서 출시를 위한 빌드를 할 수 있지만, Godot에서 변경사항이 있다면 그 때마다 다시 내보내어야 합니다.

개발 도중, Godot 프로젝트 파일을 앱에 직접 연결함으로써 이 처리 속도를 높일 수 있습니다.

다음 예제에서:

  • exported_xcode_project_name은 내보낸 iOS 애플리케이션의 이름입니다 (위와 같이).

  • godot_project_to_export는 Godot 프로젝트의 이름입니다.

참고

XCode에서 서명 관련 문제가 발생하는 것을 막기 위해 godot_project_to_export 의 이름은 exported_xcode_project_name 과 달라야 합니다.

iOS 용 플러그인

Godot에서는 특수한 iOS 플러그인을 사용할 수 있습니다. iOS 용 플러그인 페이지를 확인하십시오.

Environment variables

You can use the following environment variables to set export options outside of the editor. During the export process, these override the values that you set in the export menu.

iOS export environment variables

Export option

Environment variable

Encryption / Encryption Key

GODOT_SCRIPT_ENCRYPTION_KEY

Options / Application / Provisioning Profile UUID Debug

GODOT_IOS_PROVISIONING_PROFILE_UUID_DEBUG

Options / Application / Provisioning Profile UUID Release

GODOT_IOS_PROVISIONING_PROFILE_UUID_RELEASE

문제 해결

xcode-select points at wrong SDK location

xcode-select is a tool that comes with Xcode and among other things points at iOS SDKs on your Mac. If you have Xcode installed, opened it, agreed to the license agreement, and installed the command line tools, xcode-select should point at the right location for the iPhone SDK. If it somehow doesn't, Godot will fail exporting to iOS with an error that may look like this:

MSB3073: The command ""clang" <LOTS OF PATHS AND COMMAND LINE ARGUMENTS HERE>
"/Library/Developer/CommandLineTools/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"" exited with code 1.

In this case, Godot is trying to find the Platforms folder containing the iPhone SDK inside the /Library/Developer/CommandLineTools/ folder, but the Platforms folder with the iPhone SDK is actually located under /Applications/Xcode.app/Contents/Developer. To verify this, you can open up Terminal and run the following command to see what xcode-select points at:

xcode-select -p

To fix xcode-select pointing at a wrong location, enter this command in Terminal:

sudo xcode-select -switch /Applications/Xcode.app

After running this command, Godot should be able to successfully export to iOS.