Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
iOS용 컴파일
더 보기
이 페이지는 소스로부터 iOS 내보내기 템플릿 바이너리를 컴파일하는 방법을 설명합니다. 프로젝트를 iOS로 내보내는 방법을 찾는다면 :ref:`doc_exporting_for_ios`을 읽으시기 바랍니다.
요구 사항
SCons 4.4+ build system.
MoltenVK SDK <https://github.com/KhronosGroup/MoltenVK#fetching-moltenvk-source-code>`__에서 정적 `.xcframework``를 빌드하려면 README 지침을 다운로드하고 따르세요.
참고
`Homebrew <https://brew.sh/>`_이 설치되어 있는 경우 다음 명령을 사용하여 SCons를 쉽게 설치할 수 있습니다.
brew install scons
Homebrew를 설치하면 Xcode용 명령줄 도구가 아직 없는 경우 자동으로 가져옵니다.
마찬가지로 `MacPorts <https://www.macports.org/>`_이 설치되어 있는 경우 다음 명령을 사용하여 SCons를 쉽게 설치할 수 있습니다.
sudo port install scons
컴파일링
터미널을 열고 엔진 소스 코드의 루트 폴더로 이동한 후 다음을 입력하여 디버그 빌드를 컴파일합니다.
scons platform=ios target=template_debug generate_bundle=yes
출시 빌드에서 컴파일하려면:
scons platform=ios target=template_release generate_bundle=yes
공식 빌드와 같은 Xcode 프로젝트를 생성하려면 misc/dist/ios_xcode``에 있는 템플릿을 사용해야 합니다. 릴리스 및 디버그 라이브러리는 각각 ``libgodot.ios.debug.xcframework 및 libgodot.ios.release.xcframework``에 배치되어야 합니다. 이 프로세스는 내보내기 템플릿을 빌드하는 데 사용되는 *last* SCons 명령의 ``generate_bundle=yes 옵션을 사용하여 자동화할 수 있습니다(따라서 모든 바이너리가 포함될 수 있음).
MoltenVK 정적 .xcframework 폴더도 일단 생성되면 ios_xcode 폴더에 배치해야 합니다. MoltenVK는 iOS에서 항상 정적으로 연결됩니다. macOS와 달리 사용 가능한 동적 연결 옵션이 없습니다.
경고
The iOS simulator only supports the Compatibility renderer.
Apple Silicon Macs can run iOS apps natively, so you can run exported iOS projects directly on an Apple Silicon Mac without iOS simulator limitations.
실행
To run on a device, follow these instructions: iOS로 내보내기.
iOS 내보내기는 Apple Silicon Mac에서 직접 실행할 수 있습니다. 내보낸 iOS 프로젝트를 Mac에서 실행하려면 Xcode에서 내보낸 프로젝트를 열고 Run Destinations 드롭다운에서 ``My Mac``를 선택하세요.
문제 해결
치명적인 오류: 'cstdint' 파일을 찾을 수 없습니다.
초기에 이 양식의 컴파일 오류가 발생하는 경우 macOS 또는 Xcode 업데이트 후 Xcode 명령줄 도구 설치를 복구해야 하기 때문일 가능성이 높습니다.
./core/typedefs.h:45:10: fatal error: 'cstdint' file not found
45 | #include <cstdint>
| ^~~~~~~~~
Xcode 명령줄 도구를 다시 설치하려면 다음 두 명령을 실행하세요(필요에 따라 관리자 비밀번호 입력).
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
그래도 작동하지 않으면 Mac App Store에서 Xcode를 업데이트하고 다시 시도해 보세요.