{"id":17689657,"url":"https://github.com/naithar/gdnative_ios","last_synced_at":"2025-05-13T01:40:55.072Z","repository":{"id":94053146,"uuid":"276162761","full_name":"naithar/gdnative_ios","owner":"naithar","description":"Starter project for building GDNative modules for iOS platform.","archived":false,"fork":false,"pushed_at":"2021-02-09T06:33:02.000Z","size":25,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T05:41:25.684Z","etag":null,"topics":["gdnative","godot","godotengine","ios"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naithar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-30T17:11:49.000Z","updated_at":"2023-11-11T09:08:23.000Z","dependencies_parsed_at":"2023-03-04T13:30:25.349Z","dependency_job_id":null,"html_url":"https://github.com/naithar/gdnative_ios","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naithar%2Fgdnative_ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naithar%2Fgdnative_ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naithar%2Fgdnative_ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naithar%2Fgdnative_ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naithar","download_url":"https://codeload.github.com/naithar/gdnative_ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856572,"owners_count":21974573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gdnative","godot","godotengine","ios"],"created_at":"2024-10-24T11:48:27.479Z","updated_at":"2025-05-13T01:40:55.038Z","avatar_url":"https://github.com/naithar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS example for GDNative\n\nThis repo contains a *starter* XCode project and SCons configuration to build GDNative library for iOS platform.  \nXCode project allows to build **.framework** or **.xcframework** (using specific script).\nSCons configuration builds a static (**.a**) or dynamic (**.dylib**) iOS library.  \nAll resulting products can be used for creating GDNative library in Godot project. \n\n# Initial Setup\n\n## Compiling GDNative\n\nTo generate **libgdnative.fat.a** perform inside **godot-cpp** directory:\n\n```\nscons platform=ios ios_arch=armv7 target=\u003ctarget\u003e -j4  \nscons platform=ios ios_arch=arm64 target=\u003ctarget\u003e -j4  \n\nscons platform=ios ios_arch=arm64 ios_simulator=yes target=\u003ctarget\u003e -j4  \nscons platform=ios ios_arch=x86_64 ios_simulator=yes target=\u003ctarget\u003e -j4  \n\nlipo -create bin/libgodot-cpp.ios.\u003ctarget\u003e.arm64.a bin/libgodot-cpp.ios.\u003ctarget\u003e.armv7.a -output bin/gdnative.fat.device.a\nlipo -create bin/libgodot-cpp.ios.\u003ctarget\u003e.x86_64.simulator.a bin/libgodot-cpp.ios.\u003ctarget\u003e.arm64.simulator.a -output bin/gdnative.fat.simulator.a\n```\n\nFor more detailed information about building **gdnative** binary and using resulting dynamic or static library go to [Godot Docs](https://docs.godotengine.org/en/stable/tutorials/plugins/gdnative/gdnative-cpp-example.html)\n\n# Working with XCode\n\nChange **Bundle Identifier** to some unique value. Each framework should have different bundle identifiers.  \nChange **Product Name** parameter in **Build Settings** tab to the name you would want to use.  \nAdd source files to project.\n\n# Building Static library\n\n## Requirements\n\nUsing static (**.a**) library will require adding and linking **libgdnative.fat.a** that was previously built to exported iOS app. This can be simplified by moving **libgdnative.fat.a** to godot project folder and adding it as dependency in **.gdnlib** file.\n\nTo build **.a** library run:\n```\nscons platform=ios arch=\u003carch\u003e target_name=\u003clibrary_name\u003e gdnative_lib_path=\u003coptional path to gdnative libraries\u003e gdnative_lib=\u003coptional library name\u003e\n```\n\n# Building Dynamic library\n\nTo build **.dylib** library run:\n```\nscons platform=ios arch=\u003carch\u003e target_name=\u003clibrary_name\u003e mode=dynamic gdnative_lib_path=\u003coptional path to gdnative libraries\u003e gdnative_lib=\u003coptional library name\u003e\n```\n\n# Building XCFramework\n\n## Requirements\n\nTo create a **.xcframework** from `.a` library run:\n```\nxcodebuild -create-xcframework \\\n    -library \u003clibrary_1\u003e \\\n    ...\n    -library \u003clibrary_2\u003e \\\n    -output \"./bin/$1.$2.xcframework\"\n```\n\nTo create a **.xcframework** from `.dylib` library you will have to create `.framework` from `.dylib` and then run:\n```\nxcodebuild -create-xcframework \\\n    -framework \u003cframework_1\u003e \\\n    ...\n    -framework \u003cframework_2\u003e \\\n    -output \"./bin/$1.$2.xcframework\"\n```\n\nAlternatively you can use `xcframework_build.sh` script, but it might require tweaks in Xcode project.\n\n```\nbash ./xcframework_build.sh \u003cproject_name\u003e \u003cscheme_name\u003e \u003cproduct_name\u003e\n```\n\nExample:\n```\nbash ./xcframework_build.sh gdnative_ios.xcodeproj library gdexample\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaithar%2Fgdnative_ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaithar%2Fgdnative_ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaithar%2Fgdnative_ios/lists"}