Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Rating API #328

Open
wants to merge 101 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
736ac7a
update example to react-native 0.46
koenpunt Jul 6, 2017
2986dc4
reimplement PublisherBanner for iOS
koenpunt Jul 9, 2017
86f2f0d
remove initWithEventDispatcher
koenpunt Jul 9, 2017
2d548fd
add examples for multisize and events
koenpunt Jul 9, 2017
e66813a
add example for adSize="fluid" (not working tho)
koenpunt Jul 9, 2017
87cbc8b
export adSize as GADAdSize
koenpunt Jul 10, 2017
ae4702d
remove explicit proptype passing
koenpunt Jul 10, 2017
519a012
reimplement AdMobBanner like PublisherBanner (iOS)
koenpunt Jul 10, 2017
18e3715
add example for AdMobBanner
koenpunt Jul 10, 2017
6620a22
cleanup implementation and naming normalisation
koenpunt Jul 10, 2017
aebb242
add AdMobBanner.simulatorId
koenpunt Jul 10, 2017
ab200da
update event handling for rewarded video
koenpunt Jul 11, 2017
b4a87ac
update event handling for interstitials
koenpunt Jul 13, 2017
a50421f
add example for interstitial
koenpunt Jul 13, 2017
e5898bd
update `testDeviceID` prop to to `testDevices` [android]
koenpunt Jul 13, 2017
92b8192
bannerSize => adSize [android]
koenpunt Jul 13, 2017
532e9c8
unify android and ios example
koenpunt Jul 13, 2017
087acc2
export loadBanner command
koenpunt Jul 14, 2017
19e389a
make basic PublisherBanner work again on android
koenpunt Jul 14, 2017
9e33414
add beta tag
koenpunt Aug 1, 2017
a06719a
disable code minification
koenpunt Aug 1, 2017
990d5c7
fix null pointer exception when no adsize is set
koenpunt Aug 1, 2017
8a4efe7
implement admob banner the same as publisherbanner
koenpunt Aug 1, 2017
6ad1efd
dispatch onSizeChange on ad receive
koenpunt Aug 1, 2017
a4d2bdd
tag as 2.0.0 alpha
koenpunt Aug 1, 2017
082b400
ReadableArray.toArrayList is only available since react 0.46
koenpunt Aug 1, 2017
a89180f
require minimum of react native 0.44
koenpunt Aug 1, 2017
62d90ef
add minimal eslint configuration
koenpunt Aug 1, 2017
f18e1e9
use promises instead of callbacks for request and show (iOS)
koenpunt Aug 2, 2017
6149731
fix reward example
koenpunt Aug 2, 2017
3776a3c
convert native errors to javascript errors
koenpunt Aug 2, 2017
a28d0ca
update README
koenpunt Aug 2, 2017
239cbf7
use promises instead of callbacks for request and show (Android)
koenpunt Aug 2, 2017
a04e9f2
2.0.0-alpha.2
koenpunt Aug 2, 2017
45f1106
define readonly getter for simulatorId
koenpunt Aug 2, 2017
c02f32d
recreate adview when adUnitID is already set
koenpunt Aug 9, 2017
ecf2ecb
2.0.0-alpha.3
koenpunt Aug 9, 2017
3b03f5b
correctly export view constants on android
koenpunt Aug 10, 2017
2bd7ca5
2.0.0-alpha.4
koenpunt Aug 10, 2017
04b0a30
Removed override notation for deprecated method (createJSModules) of …
patw0929 Aug 2, 2017
0d834b0
2.0.0-alpha.5
koenpunt Sep 11, 2017
175b4b8
rename onAdmobDispatchAppEvent => onDidReceiveAppEvent
koenpunt Sep 28, 2017
eb1f6fe
update README
koenpunt Sep 28, 2017
ea0588f
fix error format to be handled correctly (iOS)
koenpunt Sep 28, 2017
9f8a203
add note about version 2 to README
koenpunt Sep 28, 2017
79e10d6
fix error format to be handled correctly (Android)
koenpunt Sep 28, 2017
6b7e96c
log errors as warnings
koenpunt Sep 28, 2017
9a426ca
document onSizeChange prop in README
koenpunt Sep 28, 2017
7d894af
rename events and event properties
koenpunt Sep 29, 2017
467df3d
highlight code as jsx
koenpunt Sep 29, 2017
4ad6850
mention PR for ad targeting
koenpunt Sep 29, 2017
2425ef9
apply code formatting (iOS)
koenpunt Sep 29, 2017
ea1151a
apply code formatting (Android)
koenpunt Sep 29, 2017
9b7ae3a
disallow banner views from having subviews
koenpunt Sep 29, 2017
5498f15
remove some unused properties
koenpunt Oct 3, 2017
551c41f
2.0.0-beta.1
koenpunt Oct 3, 2017
e495e27
Merge branch 'master' into next
koenpunt Oct 3, 2017
a5dc629
Merge pull request #165 from sbugert/next
koenpunt Oct 3, 2017
b8dcf1b
remove obsolete note
koenpunt Oct 3, 2017
728f9dd
Readme updates (#191)
koenpunt Oct 3, 2017
fcb1f5a
add namespace to events (#192)
koenpunt Oct 3, 2017
d7ed001
2.0.0-beta.2
koenpunt Oct 4, 2017
5ac2c58
update badges
koenpunt Oct 21, 2017
bde1b80
update example, update packager config
koenpunt Nov 12, 2017
88792e8
update sample adunit ids
koenpunt Nov 12, 2017
80031dd
fix smart banner display on android
rizzomichaelg Oct 10, 2017
aac550a
Example project smart banner as a new element
rizzomichaelg Oct 12, 2017
06e48fe
update yarn lockfile
koenpunt Nov 12, 2017
5c6d7a4
Fix: add checking for null to avoid exception when .setAdUnitId is se…
almostintuitive Nov 1, 2017
a6d1909
2.0.0-beta.3
koenpunt Nov 12, 2017
c056a65
perf: remove constantsToExport
koenpunt Dec 13, 2017
74370d1
perf: lazy load each module, update eslint config
koenpunt Dec 13, 2017
ab51217
update example to RN 0.51
koenpunt Dec 13, 2017
c4c0df8
add requiresMainQueueSetup for RN 0.51
koenpunt Dec 13, 2017
c1e65f1
remove exported constants from android too
koenpunt Dec 13, 2017
a14fc44
2.0.0-beta.4
koenpunt Dec 13, 2017
f55b080
Override abstract method onRewardedVideoCompleted()
jeongjuwon Mar 22, 2018
ff982ee
Fix "Argument list too long: recursive header expansion failed" issue
lebedev Mar 23, 2018
982e863
restore newline
koenpunt Apr 16, 2018
e8725c8
add iOS implementation for ad video completed
koenpunt Apr 16, 2018
96c3370
add event alias for videoCompleted
koenpunt Apr 16, 2018
52e5863
update README with new event
koenpunt Apr 16, 2018
900216a
Merge pull request #273 from rm3rdmodules/master
koenpunt Apr 16, 2018
3972fbc
Merge pull request #226 from sbugert/performance
koenpunt Apr 27, 2018
5dc25f9
2.0.0-beta.5
koenpunt Apr 27, 2018
f8db0e6
Merge pull request #275 from angly-cat/patch-1
koenpunt May 30, 2018
275617c
Update gradle tooling (#393)
mdekrey Sep 15, 2019
ffe049c
Warning: Accessing view manager configs directly of UIManage (#414)
wandersoncs Sep 15, 2019
43ec340
fix Illegal callback invocation from native module crash (#347)
candyan Sep 15, 2019
4990613
Fix: make sure requestPromise is only invoked once + crash when isLoa…
almostintuitive Sep 15, 2019
33cc489
add podspec file for cocoapods support
koenpunt Sep 22, 2019
e21fdb7
2.0.0-beta.6
koenpunt Sep 22, 2019
1ce42d8
update example app using latest "react-native init"
koenpunt Sep 15, 2019
dc2f6f8
update implementation and add prettier for code formatting
koenpunt Sep 15, 2019
1200b4e
Merge pull request #472 from sbugert/update
koenpunt Sep 22, 2019
2d1432a
add note about android manifest modifications
koenpunt Sep 22, 2019
f081473
add GitHub workflow that sets up a React Native project with the library
koenpunt Sep 23, 2019
9adacb3
run workflow every monday at 12:00 UTC
koenpunt Oct 2, 2019
b160473
Merge pull request #479 from sbugert/ci
koenpunt Oct 2, 2019
24bb5d9
Fix grammer (#486)
soroushchehresa Nov 21, 2019
6eb7003
Update macOS version for CI
koenpunt Jun 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.{js,json}]
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/*.js
!/*.js
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"es6": true,
"node": true
},
"extends": ["plugin:prettier/recommended", "plugin:react/recommended"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6
},
"plugins": [
"react",
"react-native"
],
"rules": {
"comma-dangle": ["error", "always-multiline"],
"react/jsx-handler-names": "error"
}
}
71 changes: 71 additions & 0 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Integrate React Native AdMob
on:
schedule:
- cron: 0 12 * * 1
pull_request:
branches:
- master
jobs:
integrate:
name: Create React Native App and integrate React Native Admob
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install xmlstarlet
run: brew install xmlstarlet
- name: Install xcpretty
run: gem install xcpretty
- name: Configure Xcode
run: sudo xcode-select --switch /Applications/Xcode_11.app
- name: Install React Native CLI
run: sudo npm install -g react-native-cli
- name: Initialize React Native application
run: react-native init ReactNativeAdMobExample
- name: Add react-native-admob
working-directory: ./ReactNativeAdMobExample
run: yarn add react-native-admob@next
- name: Configure Android Project
working-directory: ./ReactNativeAdMobExample
run: |
xml ed -L \
-s /manifest/application -t elem -n meta-data \
-i /manifest/application/meta-data -t attr -n android:name -v "com.google.android.gms.ads.APPLICATION_ID" \
-i /manifest/application/meta-data -t attr -n android:value -v "ca-app-pub-3940256099942544~1458002511" \
./android/app/src/main/AndroidManifest.xml
- name: Configure iOS Project
working-directory: ./ReactNativeAdMobExample/ios
run: |
cp ../../Example/ios/ExampleTests/ExampleTests.m ./ReactNativeAdMobExampleTests/ReactNativeAdMobExampleTests.m
sed -i -e '/target '"'"'ReactNativeAdMobExample'"'"' do/a\
pod '"'"'Google-Mobile-Ads-SDK'"'"'
' Podfile
/usr/libexec/PlistBuddy -c 'Add :GADApplicationIdentifier string ca-app-pub-3940256099942544~1458002511' \
ReactNativeAdMobExample/Info.plist
pod install
- name: Update App.js
working-directory: ./ReactNativeAdMobExample
run: cp ../Example/App.js ./App.js
- name: Start packager
working-directory: ./ReactNativeAdMobExample
run: react-native start &
- name: Run iOS
working-directory: ./ReactNativeAdMobExample
run: react-native run-ios --simulator "iPhone 11 Pro"
- name: Take screenshot after delay
run: sleep 30 && xcrun simctl io booted screenshot screenshot.png
- uses: actions/upload-artifact@master
with:
name: screenshot
path: ./screenshot.png
- name: Run iOS tests
working-directory: ./ReactNativeAdMobExample/ios
run: |
set -o pipefail && xcodebuild \
-workspace ReactNativeAdMobExample.xcworkspace \
-scheme ReactNativeAdMobExample \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
test | xcpretty
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
Expand All @@ -70,3 +70,4 @@ Example/android/app/app.iml
Example/.buckconfig
Example/.vscode/
Example/android/app/BUCK
/yarn.lock
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "es5",
"proseWrap": "always",
"arrowParens": "always"
}
3 changes: 3 additions & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["Example", "node_modules"]
}
4 changes: 4 additions & 0 deletions Example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
94 changes: 76 additions & 18 deletions Example/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,41 +1,99 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

# We fork some components by platform.
.*/*.android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

# Ignore templates with `@flow` in header
.*/local-cli/generator.*
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

# Ignore malformed json
.*/node_modules/y18n/test/.*\.json
; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
node_modules/react-native/Libraries/react-native/React.js

; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/HMRLoadingView.js

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
flow/
node_modules/react-native/flow/

[options]
module.system=haste
emoji=true

esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

experimental.strict_type_args=true
module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

module.system=haste
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
module.system.haste.paths.blacklist=.*/__mocks__/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*

munge_underscores=true

module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.27.0
^0.98.0
1 change: 1 addition & 0 deletions Example/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
27 changes: 22 additions & 5 deletions Example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,39 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
ios/GoogleMobileAds.framework/

# Android/IJ
# Android/IntelliJ
#
*.iml
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
6 changes: 6 additions & 0 deletions Example/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
bracketSpacing: true,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
2 changes: 1 addition & 1 deletion Example/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
Loading
Loading