Godot iOS Share Plugin allows sharing of text and images on the iOS platform.
Android version of this plugin can be found at the following link:
There are 2 ways to install the Share Plugin
into your project:
- Through the Godot Editor's AssetLib
- Manually by downloading the release archive from Github
- search for and select the
iOS Share Plugin
in Godot Editor's AssetLib tab - click
Download
button - on the installation dialog...
- leave your project's root directory selected as the target directory
- leave
Ignore asset root
checkbox checked - click
Install
button
- enable the addon via the
Plugins
tab ofProject->Project Settings...
menu, in the Godot Editor - enable the plugin in your project's iOS export settings via
Project->Export...->iOS
in the Godot Editor
- download release archive from Github
- unzip the release archive
- copy contents of the unzipped directory into your project's root directory
- enable the plugin via the
Plugins
tab ofProject->Project Settings...
menu, in the Godot Editor
Add a Share
node to your scene and follow the following steps:
- use one of the following methods of the
Share
node to share text or images:share_text(title, subject, content)
share_image(full_path_for_saved_image_file, title, subject, content)
- Note that the image you want to share must be saved under the
user://
virtual directory in order to be accessible. TheOS.get_user_data_dir()
method can be used to get the absolute path for theuser://
directory. See the implementation ofshare_viewport()
method for sample code.
- Note that the image you want to share must be saved under the
share_viewport(viewport, title, subject, content)
Follow instructions on the following page to export your project and run on an iOS device:
Based on Shin-NiL's Godot Share Plugin
Developed by Cengiz
Original repository: Godot iOS Share Plugin