From b7ef4a3708ca79af17705d219ce63b33c77478c5 Mon Sep 17 00:00:00 2001 From: hpnrep6 Date: Tue, 13 Jul 2021 03:32:13 -0400 Subject: [PATCH] Fix inline code going out of bounds for 3.3 (#5086) --- tutorials/platform/ios/ios_plugin.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tutorials/platform/ios/ios_plugin.rst b/tutorials/platform/ios/ios_plugin.rst index e495bcc83..b15bf4442 100644 --- a/tutorials/platform/ios/ios_plugin.rst +++ b/tutorials/platform/ios/ios_plugin.rst @@ -56,11 +56,19 @@ To build an iOS plugin: - You should use the same header files for iOS plugins and for the iOS export template. -3. In the ``Build Settings`` tab, specify the compilation flags for your static library in ``OTHER_CFLAGS``. The most important ones are ``-fcxx-modules``, ``-fmodules``, and ``-DDEBUG`` if you need debug support. Other flags should be the same you use to compile Godot. For instance, ``-DPTRCALL_ENABLED -DDEBUG_ENABLED -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -DTYPED_METHOD_BIND``. +3. In the ``Build Settings`` tab, specify the compilation flags for your static library in ``OTHER_CFLAGS``. The most important ones are ``-fcxx-modules``, ``-fmodules``, and ``-DDEBUG`` if you need debug support. Other flags should be the same you use to compile Godot. For instance: + +:: + + -DPTRCALL_ENABLED -DDEBUG_ENABLED -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -DTYPED_METHOD_BIND 4. Add the required logic for your plugin and build your library to generate a ``.a`` file. You will probably need to build both ``debug`` and ``release`` target ``.a`` files. Depending on your needs, pick either or both. If you need both debug and release ``.a`` files, their name should match following pattern: ``[PluginName].[TargetType].a``. You can also build the static library with your SCons configuration. -5. The iOS plugin system also supports ``.xcframework`` files. To generate one, you can use a command such as: ``xcodebuild -create-xcframework -library [DeviceLibrary].a -library [SimulatorLibrary].a -output [PluginName].xcframework``. +5. The iOS plugin system also supports ``.xcframework`` files. To generate one, you can use a command such as: + +:: + + xcodebuild -create-xcframework -library [DeviceLibrary].a -library [SimulatorLibrary].a -output [PluginName].xcframework 6. Create a Godot iOS Plugin configuration file to help the system detect and load your plugin: