diff --git a/README.md b/README.md index 181e941..320c1ea 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ -# AdInfo for Defold +# Advertising info for Defold -This is a Defold [native extension](https://www.defold.com/manuals/extensions/) which provides access to AD ID and AD tracking status on iOS and Android devices. +Defold [native extension](https://www.defold.com/manuals/extensions/) which provides access to AD ID and AD tracking status on iOS and Android devices. -To learn more please visit the [documentation page](https://defold.github.io/extension-adinfo/) for this extension. - ---- - -If you have any issues, questions or suggestions please [create an issue](https://github.com/defold/extension-adinfo/issues). +## API and installation +[API and setup instructions](https://defold.github.io/extension-adinfo). diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 37f5eaa..0000000 --- a/docs/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source 'https://rubygems.org' -gem 'github-pages', group: :jekyll_plugins diff --git a/docs/_includes/api_ref.md b/docs/_includes/api_ref.md new file mode 100644 index 0000000..dcce1ff --- /dev/null +++ b/docs/_includes/api_ref.md @@ -0,0 +1,112 @@ +## Modules +{% for item in site.data.api %} +### {{ item.name }} +{{ item.desc }} +{% endfor %} + +## Enums + + +{% for module in site.data.api %} + {% for item in module.members %} + {% if item.type contains 'number' %} + + + + + + {% endif %} + {% endfor %} +{% endfor %} + +
{{ module.name }}.{{ item.name }}{{ item.desc | markdownify | replace: "[icon:attention]","

⚠️"}}
+ +
+ +## Functions + + +{% for module in site.data.api %} + {% for item in module.members %} + {% if item.type contains 'function' %} + + + + + {% endif %} + {% endfor %} +{% endfor %} + +
{{ module.name }}.{{ item.name }}(){{ item.desc | truncate: 80 }}
+ +{% for module in site.data.api %} + {% for function in module.members %} + {% if function.type contains 'function' %} +
+

{{ module.name }}.{{ function.name }}({% for param in function.parameters %}{{param.name}}{% unless forloop.last %}, {% endunless %}{% endfor %})

+{% if function.parameters %} + + + + + + + + + + {% for param in function.parameters %} + + + + + + {% endfor %} + +
ParameterTypeDescription
+ {{ param.name }} + {% if param.optional %} + (optional) + {% endif %} + {{ param.type }}{{ param.desc | markdownify }} + {% if param.type == "function" %} + {% include type-function.md params=param.parameters %} + {% endif %} + {% if param.type == "table" %} + {% include type-table.md fields=param.members %} + {% endif %} +
+{% endif %} +{% if function.returns %} + + + + + + + + + +

Returns

+ {% for return in function.returns %} + + + + + + {% endfor %} + +
Return valueTypeDescription
{{ return.name }}{{ return.type }}{{ return.desc | markdownify }}
+{% endif %} +{{ function.desc | markdownify | replace: "[icon:attention]","

⚠️" | replace: "[type:string]","string" | replace: "[type:number]","number" | replace: "[type:table]","table" | markdownify}} + +{% if function.examples %} +

Examples

+{% for example in function.examples %} +{{ example.desc | markdownify }} +{% endfor %} +{% endif %} +
+ + {% endif %} + {% endfor %} +{% endfor %} diff --git a/docs/_includes/description.md b/docs/_includes/description.md deleted file mode 100644 index bf81741..0000000 --- a/docs/_includes/description.md +++ /dev/null @@ -1,38 +0,0 @@ -{% assign truncate = 10000 %} -{% if include.truncate %} - {% assign truncate = include.truncate %} -{% endif %} -{{ include.desc - | truncate: truncate - | replace: "[type:string]","string" - | replace: "[type:number]","number" - | replace: "[type:table]","table" - | replace: "[icon:attention]","

" - | replace: "[icon:android]", "" - | replace: "[icon:gameroom]", "" - | replace: "[icon:apple]", "" - | replace: "[icon:clipboard]", "" - | replace: "[icon:king]", "" - | replace: "[icon:defold]", "" - | replace: "[icon:search]", "" - | replace: "[icon:link-ext]", "" - | replace: "[icon:link]", "" - | replace: "[icon:amazon]", "" - | replace: "[icon:html5]", "" - | replace: "[icon:ios]", "" - | replace: "[icon:linux]", "" - | replace: "[icon:windows]", "" - | replace: "[icon:macos]", "" - | replace: "[icon:clock]", "" - | replace: "[icon:star]", "" - | replace: "[icon:googleplay]", "" - | replace: "[icon:dropbox]", "" - | replace: "[icon:twitter]", "" - | replace: "[icon:slack]", "" - | replace: "[icon:instagram]", "" - | replace: "[icon:steam]", "" - | replace: "[icon:github]", "" - | replace: "[icon:facebook]", "" - - | markdownify -}} \ No newline at end of file diff --git a/docs/_includes/type-function.md b/docs/_includes/type-function.md index afc51be..6fb42f6 100644 --- a/docs/_includes/type-function.md +++ b/docs/_includes/type-function.md @@ -11,7 +11,7 @@ {{ param.name }} {{ param.type }} - {% include description.md desc=param.desc %} + {{ param.desc | markdownify }} {% if param.type == "table" %} {% include type-table.md fields=param.members %} diff --git a/docs/_includes/type-table.md b/docs/_includes/type-table.md index 5905214..fc66a97 100644 --- a/docs/_includes/type-table.md +++ b/docs/_includes/type-table.md @@ -5,7 +5,7 @@ {% if field.optional %} (optional) {% endif %} - {{ field.type }} - {% include description.md desc=field.desc %} + {{ field.type }} - {{ field.desc | markdownify }} {% endfor %} diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 9585f01..0255072 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -4,9 +4,9 @@ - - - + + + @@ -14,39 +14,8 @@
-
-

Defold ADInfo API documentation

-

Function for receiving AD ID and AD tracking status. Supported on iOS and Android.

- -

To use this library in your Defold project, add the following URL to your game.project dependencies: -

https://github.com/defold/extension-adinfo/archive/master.zip
-

- -

We recommend using a link to a zip file of a specific release.

- -

This extension requires the following dependency (specific release): -

https://github.com/defold/extension-gps/archive/master.zip
-

- -

The source code can be viewed at: https://github.com/defold/extension-adinfo

- -

-

Submitting to the App Store

- When submitting, Apple has three checkboxes for their three valid use cases for the IDFA: -
-
1. Serve ads within the app -
2. Install attribution from ads -
3. User action attribution from ads -
-
If you check option 1, the app reviewer will look for ads to show up in the app. If your game does not show ads, the game might get rejected. Using AdInfo you should check option 2 or 3 depends on how you are using AdInfo extension. -

- -
-
- {{ content }} -
diff --git a/docs/fonts.css b/docs/css/fonts.css similarity index 83% rename from docs/fonts.css rename to docs/css/fonts.css index 1230c7f..bdf2563 100644 --- a/docs/fonts.css +++ b/docs/css/fonts.css @@ -53,15 +53,3 @@ url('fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf') format('truetype'), url('fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg#NotoSans') format('svg'); } - -@font-face { - font-family: fontello; - font-weight: 400; - font-style: normal; - src: url(fonts/fontello/fontello_ef8859ce.eot); - src: url(fonts/fontello/fontello_ef8859ce.eot#iefix) format("embedded-opentype"), - url(fonts/fontello/fontello_248ab5dd.woff2) format("woff2"), - url(fonts/fontello/fontello_b6287553.woff) format("woff"), - url(fonts/fontello/fontello_df5eac8f.ttf) format("truetype"), - url(fonts/fontello/fontello_793be834.svg#fontello) format("svg"); -} diff --git a/docs/rouge.css b/docs/css/rouge.css similarity index 56% rename from docs/rouge.css rename to docs/css/rouge.css index c8b3266..daf76ad 100644 --- a/docs/rouge.css +++ b/docs/css/rouge.css @@ -207,136 +207,3 @@ .highlight { background-color: #f8f8f8; } - -.icon-amazon:before, .icon-android:before, .icon-apple:before, -.icon-attention:before, .icon-clipboard:before, .icon-clock:before, -.icon-defold:before, .icon-dropbox:before, .icon-facebook:before, -.icon-gameroom:before, .icon-github:before, .icon-googleplay:before, -.icon-html5:before, .icon-instagram:before, .icon-ios:before, .icon-king:before, -.icon-link-ext:before, .icon-link:before, .icon-linux:before, .icon-macos:before, -.icon-search:before, .icon-slack:before, .icon-star:before, .icon-steam:before, -.icon-twitter:before, .icon-windows:before { - font-family: fontello; - font-style: normal; - font-weight: 400; - speak: none; - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: .2em; - text-align: center; - font-variant: normal; - text-transform: none; - line-height: 1em; - margin-left: .2em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale -} - -.icon-gameroom:before { - content: "\E800" -} - -.icon-apple:before { - content: "\E809" -} - -.icon-clipboard:before { - content: "\E819" -} - -.icon-king:before { - content: "\E858" -} - -.icon-defold:before { - content: "\E859" -} - -.icon-search:before { - content: "\E86A" -} - -.icon-link-ext:before { - content: "\E86F" -} - -.icon-link:before { - content: "\E870" -} - -.icon-attention:before { - content: "\E871"; - color:#ffa500; -} - -.icon-amazon:before { - content: "\E872" -} - -.icon-android:before { - content: "\E873"; - color: #A4C639; -} - -.icon-html5:before { - content: "\E875"; - color:#f16529; -} - -.icon-ios:before { - content: "\E876"; - color:#147efb; -} - -.icon-linux:before { - content: "\E877" -} - -.icon-windows:before { - content: "\E878" -} - -.icon-macos:before { - content: "\E87A" -} - -.icon-clock:before { - content: "\E87B" -} - -.icon-star:before { - content: "\E87C" -} - -.icon-googleplay:before { - content: "\E87D" -} - -.icon-dropbox:before { - content: "\E87F" -} - -.icon-twitter:before { - content: "\E881" -} - -.icon-slack:before { - content: "\E883" -} - -.icon-instagram:before { - content: "\E884" -} - -.icon-steam:before { - content: "\E885" -} - -.icon-github:before { - content: "\E886" -} - -.icon-facebook:before { - content: "\E887" -} diff --git a/docs/style.css b/docs/css/style.css similarity index 100% rename from docs/style.css rename to docs/css/style.css diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.eot b/docs/fonts/Noto-Sans-700/Noto-Sans-700.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.svg b/docs/fonts/Noto-Sans-700/Noto-Sans-700.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.ttf b/docs/fonts/Noto-Sans-700/Noto-Sans-700.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff b/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff2 b/docs/fonts/Noto-Sans-700/Noto-Sans-700.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2 b/docs/fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.eot b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.svg b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.ttf b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff2 b/docs/fonts/Noto-Sans-italic/Noto-Sans-italic.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.eot b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.eot old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.svg b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.svg old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.ttf b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.ttf old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff old mode 100755 new mode 100644 diff --git a/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff2 b/docs/fonts/Noto-Sans-regular/Noto-Sans-regular.woff2 old mode 100755 new mode 100644 diff --git a/docs/fonts/fontello/fontello_248ab5dd.woff2 b/docs/fonts/fontello/fontello_248ab5dd.woff2 deleted file mode 100644 index 27685c9..0000000 Binary files a/docs/fonts/fontello/fontello_248ab5dd.woff2 and /dev/null differ diff --git a/docs/fonts/fontello/fontello_793be834.svg b/docs/fonts/fontello/fontello_793be834.svg deleted file mode 100644 index e2a9d96..0000000 --- a/docs/fonts/fontello/fontello_793be834.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - -Copyright (C) 2018 by original authors @ fontello.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/fontello/fontello_b6287553.woff b/docs/fonts/fontello/fontello_b6287553.woff deleted file mode 100644 index 82c9dd9..0000000 Binary files a/docs/fonts/fontello/fontello_b6287553.woff and /dev/null differ diff --git a/docs/fonts/fontello/fontello_df5eac8f.ttf b/docs/fonts/fontello/fontello_df5eac8f.ttf deleted file mode 100644 index b5d9d9a..0000000 Binary files a/docs/fonts/fontello/fontello_df5eac8f.ttf and /dev/null differ diff --git a/docs/fonts/fontello/fontello_ef8859ce.eot b/docs/fonts/fontello/fontello_ef8859ce.eot deleted file mode 100644 index 7700a31..0000000 Binary files a/docs/fonts/fontello/fontello_ef8859ce.eot and /dev/null differ diff --git a/docs/index.md b/docs/index.md index ba41170..5afce44 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,102 +1,23 @@ --- layout: default --- -## Modules -{% for item in site.data.api %} -### {{ item.name }} -{% include description.md desc=item.desc %} -{% endfor %} -
+# Defold AdInfo API documentation -## Functions - - -{% for module in site.data.api %} - {% for item in module.members %} - {% if item.type contains 'function' %} - - - - - {% endif %} - {% endfor %} -{% endfor %} - -
{{ module.name }}.{{ item.name }}(){% include description.md desc=item.desc %}
+This extension provides functions for receiving Ad ID and Ad tracking status. Supported on iOS and Android. -{% for module in site.data.api %} - {% for function in module.members %} - {% if function.type contains 'function' %} -
-

{{ module.name }}.{{ function.name }}({% for param in function.parameters %}{{param.name}}{% unless forloop.last %}, {% endunless %}{% endfor %})

-{% include description.md desc=function.desc %} -{% if function.parameters %} - - - - - - - - - - {% for param in function.parameters %} - - - - - - {% endfor %} - -
ParameterTypeDescription
- {{ param.name }} - {% if param.optional %} - (optional) - {% endif %} - {{ param.type }}{% include description.md desc=param.desc %} - {% if param.type == "function" %} - {% include type-function.md params=param.parameters %} - {% endif %} - {% if param.type == "table" %} - {% include type-table.md fields=param.members %} - {% endif %} -
-{% endif %} -{% if function.returns %} - - - - - - - - - -

Returns

- {% for return in function.returns %} - - - - - - {% endfor %} - -
Return valueTypeDescription
{{ return.name }}{{ return.type }}{% include description.md desc=return.desc %} - {% if return.type == "table" %} - {% include type-table.md fields=return.members %} - {% endif %} -
-{% endif %} +# Usage +To use this library in your Defold project, add the following URL to your game.project dependencies: -{% if function.examples %} -

Examples

-{% for example in function.examples %} -{{ example.desc | markdownify }} -{% endfor %} -{% endif %} -
+ https://github.com/defold/extension-adinfo/archive/master.zip - {% endif %} - {% endfor %} -{% endfor %} +We recommend using a link to a zip file of a [https://github.com/defold/extension-adinfo/releases](specific release). + +## Source code + +The source code is available on [GitHub](https://github.com/defold/extension-adinfo) + + +# API reference + +{% include api_ref.md %} diff --git a/game.project b/game.project index b8b9dc3..87fcc5f 100644 --- a/game.project +++ b/game.project @@ -13,7 +13,7 @@ input_method = HiddenInputField [project] title = extension-adinfo -dependencies = https://github.com/andsve/dirtylarry/archive/master.zip,https://github.com/defold/extension-gps/archive/master.zip +dependencies = https://github.com/andsve/dirtylarry/archive/master.zip,https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-measurement-16.4.0.zip [library] include_dirs = extension-adinfo