From 798a563e789856d7ca0776cae20163cab3169428 Mon Sep 17 00:00:00 2001 From: "Wu, Wei | David" Date: Tue, 28 Jun 2022 10:41:27 +0900 Subject: [PATCH 1/5] introduce properties when click event --- doc/bannerads/README.md | 6 +++++- doc/ja/bannerads/README.md | 16 ++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/bannerads/README.md b/doc/bannerads/README.md index cab7a33..764b667 100644 --- a/doc/bannerads/README.md +++ b/doc/bannerads/README.md @@ -72,7 +72,11 @@ The RUNABanner SDK tracks 3 event types of `RUNABannerViewEvent` if developers n - `unfilled` : Request received while there is no advertisement sources to show. - **Clicked (RUNABannerViewEventTypeClicked) :**
- After the banner is clicked. + Event after the banner is clicked, while the following properties can be referred. + - `clickURL` :
+ The URL directs to the advertisement. + - `shouldPreventDefaultClickAction` :
+ Default `false`. `true` to prevent SDK open the click URL by the system browser. ### Open Measurement diff --git a/doc/ja/bannerads/README.md b/doc/ja/bannerads/README.md index e8891e7..0131010 100644 --- a/doc/ja/bannerads/README.md +++ b/doc/ja/bannerads/README.md @@ -66,14 +66,18 @@ RUNA SDK は三つのイベントをトラッキングすることが可能で - **失敗 (RUNABannerViewEventTypeFailed) :** 広告内容のリクエストのそう受信、及び広告表示のいずれかで失敗した場合。
 失敗の原因は `RUNABannerViewError` プロパーティーとシステムログで確認することができます。 - - `none` : エラーなし. - - `internal` : 予想外のSDK内部エラーUnexpected internal error of SDK. - - `network` : 通信エラー. - - `fatal` : パラメーターの設定ミス. - - `unfilled` : 表示できる広告がない. + - `none` : エラーなし。 + - `internal` : 予想外のSDK内部エラーUnexpected internal error of SDK。 + - `network` : 通信エラー。 + - `fatal` : パラメーターの設定ミス。 + - `unfilled` : 表示できる広告がない。 - **クリック (RUNABannerViewEventTypeClicked) :** - banner 広告がクリックされた時。 + banner 広告がクリックされた。この時参照できるプロパティーは以下です。 + - `clickURL` :
+ 広告を開くリンク。 + - `shouldPreventDefaultClickAction` :
+ デフォルトは `false`. `true`の場合、SDKがシステムブラウザ使って広告を開く動きを止めます。 ### Open Measurement From 7e81401d7944f2f7975f4fd1ef61f6a6430f65e2 Mon Sep 17 00:00:00 2001 From: "Wu, Wei | David" Date: Tue, 28 Jun 2022 10:41:43 +0900 Subject: [PATCH 2/5] fix --- doc/bannerads/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/bannerads/README.md b/doc/bannerads/README.md index 764b667..f307d3d 100644 --- a/doc/bannerads/README.md +++ b/doc/bannerads/README.md @@ -72,7 +72,7 @@ The RUNABanner SDK tracks 3 event types of `RUNABannerViewEvent` if developers n - `unfilled` : Request received while there is no advertisement sources to show. - **Clicked (RUNABannerViewEventTypeClicked) :**
- Event after the banner is clicked, while the following properties can be referred. + Event after the banner is clicked, while the following properties are available. - `clickURL` :
The URL directs to the advertisement. - `shouldPreventDefaultClickAction` :
From 2fad1548c6d20012ca74cf039d47222b202e9254 Mon Sep 17 00:00:00 2001 From: "Wu, Wei | David" Date: Fri, 8 Jul 2022 13:32:08 +0900 Subject: [PATCH 3/5] sample code of click delegation --- doc/bannerads/README.md | 16 ++++++++++++---- doc/ja/bannerads/README.md | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/doc/bannerads/README.md b/doc/bannerads/README.md index f307d3d..8590443 100644 --- a/doc/bannerads/README.md +++ b/doc/bannerads/README.md @@ -140,6 +140,10 @@ banner.position = RUNABannerViewPositionBottom; break; case RUNABannerViewEventTypeClicked: NSLog(@"received event clicked"); + if (banner.clickURL != nil) { + banner.shouldPreventDefaultClickAction = YES; + print("do something with the click url by self") + } break; default: NSLog(@"unknown event"); @@ -163,10 +167,10 @@ banner.position = .bottom // specify disable open measurement by need // banner.disableOpenMeasurement() -banner.load { (banner, event) in +banner.load { (view, event) in switch event.eventType { case .succeeded: - print("received event succceeded") + print("received event succeeded") case .failed: print("received event failed") switch event.error { @@ -179,6 +183,10 @@ banner.load { (banner, event) in } case .clicked: print("received event clicked") + if let url = view.clickURL { + view.shouldPreventDefaultClickAction = true + print("do something with the click url by self") + } default: break } @@ -220,10 +228,10 @@ banner.adSpotCode = "mycode" banner.size = .aspectFit banner.position = .bottom -banner.load { (banner, event) in +banner.load { (view, event) in switch event.eventType { case .succeeded: - print("received event succceeded") + print("received event succeeded") case .failed: print("received event failed") switch event.error { diff --git a/doc/ja/bannerads/README.md b/doc/ja/bannerads/README.md index 0131010..d2f593d 100644 --- a/doc/ja/bannerads/README.md +++ b/doc/ja/bannerads/README.md @@ -141,6 +141,10 @@ banner.position = RUNABannerViewPositionBottom; break; case RUNABannerViewEventTypeClicked: NSLog(@"received event clicked"); + if (view.clickURL != nil) { + view.shouldPreventDefaultClickAction = YES; + print("do something with the click url by self") + } break; default: NSLog(@"unknown event"); @@ -164,10 +168,10 @@ banner.position = .bottom // specify disable open measurement by need // banner.disableOpenMeasurement() -banner.load { (banner, event) in +banner.load { (view, event) in switch event.eventType { case .succeeded: - print("received event succceeded") + print("received event succeeded") case .failed: print("received event failed") switch event.error { @@ -180,6 +184,10 @@ banner.load { (banner, event) in } case .clicked: print("received event clicked") + if let url = view.clickURL { + view.shouldPreventDefaultClickAction = true + print("do something with the click url by self") + } default: break } @@ -222,10 +230,10 @@ banner.adSpotCode = "mycode" banner.size = .aspectFit banner.position = .bottom -banner.load { (banner, event) in +banner.load { (view, event) in switch event.eventType { case .succeeded: - print("received event succceeded") + print("received event succeeded") case .failed: print("received event failed") switch event.error { From ed4a2a2ea0ed4574b96525f87c6b2c4b83a70df0 Mon Sep 17 00:00:00 2001 From: "Wu, Wei | David" Date: Fri, 8 Jul 2022 15:31:26 +0900 Subject: [PATCH 4/5] [Update] RUNABanner (1.9.0) --- RUNABanner/1.9.0/RUNABanner.podspec | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 RUNABanner/1.9.0/RUNABanner.podspec diff --git a/RUNABanner/1.9.0/RUNABanner.podspec b/RUNABanner/1.9.0/RUNABanner.podspec new file mode 100644 index 0000000..c5d6bad --- /dev/null +++ b/RUNABanner/1.9.0/RUNABanner.podspec @@ -0,0 +1,33 @@ +# +# Be sure to run `pod spec lint RUNA.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + s.name = "RUNABanner" + s.version = "1.9.0" + s.summary = "Podspec file of #{s.name} iOS SDK." + s.description = <<-DESC +This repository is used to distribute #{s.name} iOS SDK for CocoaPods users. + DESC + s.homepage = "https://github.com/rakuten-ads/Rakuten-Ads-iOS" + s.license = { + :type => "Copyright", + :text => "Copyright © Rakuten, inc. All Rights Reserved." + } + s.author = "Rakuten" + s.platform = :ios, "10.0" + s.source = { + :http => "https://storage.googleapis.com/rssp-dev-cdn/sdk/ios/prod/#{s.name}/#{s.name}_iOS_#{s.version}.framework.zip" + } + s.vendored_frameworks = "Carthage/Build/iOS/#{s.name}.framework" + + s.frameworks = "Foundation", "AdSupport", "SystemConfiguration", "WebKit", "UIKit" + s.dependency 'RUNACore', '~> 1.4' + s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64 armv7' } + +end From eb0ae6c27424c19c344a049345be205081fa9f2b Mon Sep 17 00:00:00 2001 From: "Wu, Wei | David" Date: Fri, 8 Jul 2022 15:31:41 +0900 Subject: [PATCH 5/5] [Update] RUNA (1.10.0) --- RUNA/1.10.0/RUNA.podspec | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 RUNA/1.10.0/RUNA.podspec diff --git a/RUNA/1.10.0/RUNA.podspec b/RUNA/1.10.0/RUNA.podspec new file mode 100644 index 0000000..3e64f9c --- /dev/null +++ b/RUNA/1.10.0/RUNA.podspec @@ -0,0 +1,44 @@ +# +# Be sure to run `pod spec lint RUNA.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + s.name = "RUNA" + s.version = "1.10.0" + s.summary = "Podspec file of #{s.name} iOS SDK." + s.description = <<-DESC +This repository is used to distribute #{s.name} iOS SDK for CocoaPods users. + DESC + s.homepage = "https://github.com/rakuten-ads/Rakuten-Ads-iOS" + s.license = { + :type => "Copyright", + :text => "Copyright © Rakuten, inc. All Rights Reserved." + } + s.author = "Rakuten" + s.platform = :ios, "10.0" + s.source = { + :git => "https://github.com/rakuten-ads/Rakuten-Ads-iOS.git" + } + + s.default_subspec = 'Banner' + + s.subspec 'CoreOnly' do |ss| + ss.ios.dependency 'RUNACore', '1.4.4' + end + + s.subspec 'Banner' do |ss| + ss.dependency 'RUNA/CoreOnly' + ss.ios.dependency 'RUNABanner', '1.9.0' + end + + s.subspec 'OMAdapter' do |ss| + ss.dependency 'RUNA/Banner' + ss.ios.dependency 'RUNAOMAdapter', '1.0.6' + end + +end