diff --git a/markdown/guide/programming/01/index.markdown b/markdown/guide/programming/01/index.markdown index 01bb9d298..640d7bdc4 100644 --- a/markdown/guide/programming/01/index.markdown +++ b/markdown/guide/programming/01/index.markdown @@ -43,7 +43,6 @@ If you don't already have a favorite text editor, the following options are reco Editor Add-On Package macOS Windows ------------------------------------------------------------------ ---------------------------------------------------------------------------------------------- ---------- ---------- [Sublime Text](https://www.sublimetext.com) [Solar2D Editor](https://github.com/coronalabs/CoronaSDK-SublimeText) ✓ ✓ -[Atom](https://atom.io) [autocomplete-corona](https://atom.io/packages/autocomplete-corona) ✓ ✓ [Visual Studio Code](https://code.visualstudio.com/) [Solar2d Autocomplete](https://bit.ly/3IfNx6e) ✓ ✓ [Xcode](https://developer.apple.com/xcode/) [Xcode Editor](https://github.com/jcbnlsn/Xcode-Corona-Editor) ✓ [Vim](https://www.vim.org) ✓ ✓ diff --git a/markdown/guide/start/installMac/index.markdown b/markdown/guide/start/installMac/index.markdown index 0f8913032..d8bce16e9 100644 --- a/markdown/guide/start/installMac/index.markdown +++ b/markdown/guide/start/installMac/index.markdown @@ -124,7 +124,6 @@ You'll need a text editor or IDE to write code for your CORONA_CORE_PRODUCT proj Editor Add-On Package ------------------------------------------------------------------ --------------------------------------------- [Sublime Text](https://www.sublimetext.com) [Solar2D Editor](https://github.com/coronalabs/CoronaSDK-SublimeText) -[Atom](https://atom.io) [autocomplete-corona](https://atom.io/packages/autocomplete-corona) [Visual Studio Code](https://code.visualstudio.com/) [Solar2d-companion](https://marketplace.visualstudio.com/items?itemName=M4adan.solar2d-companion) [Xcode](https://developer.apple.com/xcode/) [Xcode Editor](https://github.com/jcbnlsn/Xcode-Corona-Editor) [ZeroBrane Studio](https://studio.zerobrane.com) @@ -158,7 +157,7 @@ The CORONA_CORE_PRODUCT Simulator for macOS features the following basic menu it * The standard macOS application menu provides access to the Simulator __Preferences__. It also lets you manually open/run __Corona Live Server__ for doing [Live Builds][guide.distribution.liveBuild] on actual devices. -* The __File__ menu is where projects (applications) are created or opened. This is also where you __build__ your apps for distribution or testing on devices. +* The __File__ menu is where projects (applications) are created or opened. This is also where you __build__ your apps for distribution or testing on devices. * The __Hardware__ menu is used to simulate physical device actions such as rotating the screen. diff --git a/markdown/guide/start/installWin/index.markdown b/markdown/guide/start/installWin/index.markdown index 1077922ac..5e737dc9b 100644 --- a/markdown/guide/start/installWin/index.markdown +++ b/markdown/guide/start/installWin/index.markdown @@ -90,7 +90,6 @@ You'll need a text editor or IDE to write code for your CORONA_CORE_PRODUCT proj Editor Add-On Package ------------------------------------------------------------------ --------------------------------------------- [Sublime Text](https://www.sublimetext.com) [CORONA_CORE_PRODUCT Editor](https://github.com/coronalabs/CoronaSDK-SublimeText) -[Atom](https://atom.io) [autocomplete-corona](https://atom.io/packages/autocomplete-corona) [Visual Studio Code](https://code.visualstudio.com/) [CORONA_CORE_PRODUCT-companion](https://marketplace.visualstudio.com/items?itemName=M4adan.solar2d-companion) [Notepad++](https://notepad-plus-plus.org) [ZeroBrane Studio](https://studio.zerobrane.com) diff --git a/markdown/plugin/admob/getConsentFormStatus.markdown b/markdown/plugin/admob/getConsentFormStatus.markdown index d35b5093c..7b6c3b48f 100644 --- a/markdown/plugin/admob/getConsentFormStatus.markdown +++ b/markdown/plugin/admob/getConsentFormStatus.markdown @@ -12,11 +12,19 @@ ## Overview -Returns two [Strings][api.type.String] `formStatus` and `consentStatus` +Returns two [Strings][api.type.String] `formStatus` and `consentStatus`: -`formStatus` can be `"available"`, `"unavailable"`, or `"unknown"` +`formStatus` can be `"available"`, `"unavailable"`, or `"unknown"`. -`consentStatus` can be `"obtained"`, `"required"`, `"notRequired"`, or `"unknown"` +`consentStatus` can be `"obtained"`, `"required"`, `"notRequired"`, or `"unknown"`. + +## Gotchas + +* AdMob needs to initialize before you can run `admob.updateConsentForm()`. + +* You must wait after running `admob.updateConsentForm()` before `admob.getConsentFormStatus()` returns non-nil values. + +* The consent form is a legal document and underage users cannot consent to its contents. This means `formStatus` will always be `"unavailable"` for underaged users and `consentStatus` will always be `"obtained"`. AdMob does not specify what the user has consented to. ## Syntax @@ -31,14 +39,20 @@ Returns two [Strings][api.type.String] `formStatus` and `consentStatus` local admob = require( "plugin.admob" ) --- Initialize the AdMob plugin - local function adListener( event ) + if ( event.phase == "init" ) then + -- Wait until "init" phase to update the Consent Form. + admob.updateConsentForm({ underage=false }) + end + end -admob.init( adListener, { appId="YOUR_ADMOB_APP_ID" } ) +-- Initialize the AdMob plugin. +admob.init( adListener, { testMode=true } ) +-- Sometime later, get the form and consent status: +-- (If you don't wait for the consent form to update, then both of these values will be nil.) local formStatus, consentStatus = admob.getConsentFormStatus() -print("Form Status:".. formStatus .." Consent Status: "..consentStatus) +print( "Form Status:" .. tostring( formStatus ) .. ", Consent Status: " .. tostring( consentStatus ) ) `````` diff --git a/markdown/plugin/admob/height.markdown b/markdown/plugin/admob/height.markdown index 07fc4574e..a8b2184c5 100644 --- a/markdown/plugin/admob/height.markdown +++ b/markdown/plugin/admob/height.markdown @@ -45,7 +45,7 @@ local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Load an AdMob banner ad admob.load( "banner", { adUnitId="YOUR_ADMOB_AD_UNIT_ID" } ) - + elseif ( event.phase == "loaded" ) then if ( event.type == "banner" ) then -- Banner ad is loaded bannerHeight = admob.height() -- Get the loaded banner's height @@ -56,5 +56,5 @@ local function adListener( event ) end -- Initialize the AdMob plugin -admob.init( adListener, { appId="YOUR_ADMOB_APP_ID" } ) +admob.init( adListener, { testMode=true } ) `````` diff --git a/markdown/plugin/admob/hide.markdown b/markdown/plugin/admob/hide.markdown index 3936dfba0..58fc95956 100644 --- a/markdown/plugin/admob/hide.markdown +++ b/markdown/plugin/admob/hide.markdown @@ -31,7 +31,7 @@ local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Load an AdMob banner ad admob.load( "banner", { adUnitId="YOUR_ADMOB_AD_UNIT_ID" } ) - + elseif ( event.phase == "loaded" ) then if ( event.type == "banner" ) then -- Banner ad is loaded -- Show a banner ad @@ -41,7 +41,7 @@ local function adListener( event ) end -- Initialize the AdMob plugin -admob.init( adListener, { appId="YOUR_ADMOB_APP_ID" } ) +admob.init( adListener, { testMode=true } ) -- Sometime later, hide the banner admob.hide() diff --git a/markdown/plugin/admob/init.markdown b/markdown/plugin/admob/init.markdown index 2f4d1d4e8..c960e6c77 100644 --- a/markdown/plugin/admob/init.markdown +++ b/markdown/plugin/admob/init.markdown @@ -31,8 +31,8 @@ _[Table][api.type.Table]._ Table containing AdMob initialization values — see The `params` table includes parameters for AdMob initialization. -##### appId ~^(required)^~ -_[String][api.type.String]._ The app ID for your app, gathered from the AdMob [dashboard](https://www.google.com/admob/). +##### appId ~^(deprecated)^~ +_[String][api.type.String]._ The app ID for your app, gathered from the AdMob [dashboard](https://www.google.com/admob/). The appId should be set in build.settings. See [admob][plugin.admob] project settings.