Giter Site home page Giter Site logo

boyquotes / godot-ios-att Goto Github PK

View Code? Open in Web Editor NEW

This project forked from funseek/godot-ios-att

0.0 0.0 0.0 13 KB

App Tracking Transparency plugin for Godot

Shell 25.05% C++ 2.92% Python 53.19% C 1.97% Objective-C 1.51% Objective-C++ 15.36%

godot-ios-att's Introduction

App Tracking Transparency plugin for Godot

This is a plugin for Godot that calls App Tracking Transparency on iOS.

Instructions

Clone this repository and it's submodules:

git clone --recurse-submodules [email protected]:funseek/godot-ios-att.git

To generate Godot headers you need to run compilation command inside godot submodule directory.
Example:

./scripts/generate_headers.sh

Building a .a library

./scripts/release_static_library.sh 3.5

Copy a.library to Godot plugin directory

cp bin/release/att/att.*.a $GODOT_HOME/ios/plugins/att/bin/
cp att.gdip $GODOT_HOME/ios/plugins/

Calling plugin in Godot

extends Node


signal request_completed(status)
var _att = null

# Authorisation statuses:

# 0 = notDetermined
# 1 = restricted
# 2 = denied
# 3 = authorized

func _ready() -> void:
	if Engine.has_singleton('Att'):
		_att = Engine.get_singleton('Att')
		_att.connect('requestCompleted', self, '_on_request_completed')
	else:
		push_warning('App Tracking Transparency plugin not found')

func request() -> void:
	if _att != null:
		_att.requestTracking()

func _on_request_completed(status: int) -> void:
	print_debug("request_completed", status)
	emit_signal('request_completed', status)

License

MIT

godot-ios-att's People

Contributors

yokochi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.