Skip to content

Commit

Permalink
Merge pull request #21 from rakuten-ads/doc/1.10.0-click_delegation
Browse files Browse the repository at this point in the history
release 1.10.0
  • Loading branch information
wei-b-wu-rakuten authored Jul 8, 2022
2 parents 48a8fab + eb0ae6c commit 09fe822
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 15 deletions.
44 changes: 44 additions & 0 deletions RUNA/1.10.0/RUNA.podspec
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions RUNABanner/1.9.0/RUNABanner.podspec
Original file line number Diff line number Diff line change
@@ -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
22 changes: 17 additions & 5 deletions doc/bannerads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) :**<br>
After the banner is clicked.
Event after the banner is clicked, while the following properties are available.
- `clickURL` : <br>
The URL directs to the advertisement.
- `shouldPreventDefaultClickAction` : <br>
Default `false`. `true` to prevent SDK open the click URL by the system browser.


### Open Measurement
Expand Down Expand Up @@ -136,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");
Expand All @@ -159,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 {
Expand All @@ -175,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
}
Expand Down Expand Up @@ -216,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 {
Expand Down
32 changes: 22 additions & 10 deletions doc/ja/bannerads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ RUNA SDK は三つのイベントをトラッキングすることが可能で
- **失敗 (RUNABannerViewEventTypeFailed) :**
広告内容のリクエストのそう受信、及び広告表示のいずれかで失敗した場合。<br>
 失敗の原因は `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` : <br>
広告を開くリンク。
- `shouldPreventDefaultClickAction` : <br>
デフォルトは `false`. `true`の場合、SDKがシステムブラウザ使って広告を開く動きを止めます。

### Open Measurement

Expand Down Expand Up @@ -137,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");
Expand All @@ -160,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 {
Expand All @@ -176,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
}
Expand Down Expand Up @@ -218,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 {
Expand Down

0 comments on commit 09fe822

Please sign in to comment.