Coder Social home page Coder Social logo

nendsdk-ios's People

Contributors

fan-c-yu avatar fan-e-yokoi avatar fan-n-kunimoto avatar fan-t-fukuoka avatar fan-t-henmi avatar fan-t-kinami avatar fan-y-yamamoto avatar funakoshi-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nendsdk-ios's Issues

-[MyAdView nad_nativeAd]:unrecognized selector sent to instance

お世話になっております。

NendSDK_iOS-3.0.3 を自分のプロジェクトに組み込んでネイティブ広告を出そうとしております。
NADNativeViewRendering を実装する @interface MyAdView : UIView<NADNativeViewRendering> を定義して、以下の MyAdView#showAdメソッドで広告を表示するようにして実機およびシミュレータで動かしたところ、なぜか MyAdView のインスタンスに対して nad_nativeAd selector が呼ばれているようで、それが存在しないので落ちるという現象が出て困っております。

-(void)showAd {
    self.client = [[NADNativeClient alloc] initWithSpotId:S2NS(self.spotId)
                                                   apiKey:S2NS(self.apiKey)
                                    advertisingExplicitly:NADNativeAdvertisingExplicitlyPR];
    NSLog(@"[showAd] client.alloc: %@ %@", self, self.client);
//  self.client.delegate = self;
    [self.client loadWithCompletionBlock:^(NADNative *ad, NSError *error) {
        if(ad) {
            NSLog(@"[showAd] client.loadWithCompletionBlock ok: %@", ad);
            [ad intoView:self]; // self is an instance of MyAdView
        } else {
            NSLog(@"[showAd] client.loadWithCompletionBlock error: %@", error);
        }
    }];
}

以下は上記を実行したときのログです。
MyAdView のインスタンスのアドレスは 0x7fb419fc6d00 であり、それに対して nad_nativeAd が呼ばれています。

2016-03-17 03:07:40.528 BabaTaxi3D[9454:3307260] [showAd] client.alloc: <MyAdView: 0x7fb419fc6d00; frame = (0 0; 100 100); layer = <CALayer: 0x7fb419fc71b0>> <NADNativeClient: 0x7fb419c40d00>

...

2016-03-17 03:07:44.473 BabaTaxi3D[9454:3307260] [showAd] client.loadWithCompletionBlock ok: <NADNative: 0x7fb41ea443c0>
2016-03-17 03:07:44.474 BabaTaxi3D[9454:3307260] -[MyAdView nad_nativeAd]: unrecognized selector sent to instance 0x7fb419fc6d00
2016-03-17 03:07:44.485 BabaTaxi3D[9454:3307260] WARNING: GoogleAnalytics 3.13 void GAIUncaughtExceptionHandler(NSException *) (GAIUncaughtExceptionHandler.m:48): Uncaught exception: -[MyAdView nad_nativeAd]: unrecognized selector sent to instance 0x7fb419fc6d00

NADNativeViewRendering プロトコルで定義されている関数の MyAdView での実装である - (NADNativeLabel *)prTextLabel などに NSLog を仕込んでみましたが、いずれも呼ばれていませんでした。

stacktraceは以下の通りです。

 Stack Trace: (
    0   CoreFoundation                      0x000000010c866e65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010c238deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010c86f48d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x000000010c7bc90a ___forwarding___ + 970
    4   CoreFoundation                      0x000000010c7bc4b8 _CF_forwarding_prep_0 + 120
    5   BabaTaxi3D                          0x0000000107cee037 -[NADNative intoView:] + 39
    6   BabaTaxi3D                          0x0000000107b048b0 __18-[MyAdView showAd]_block_invoke + 84
    7   BabaTaxi3D                          0x0000000107cfe9c8 __43-[NADNativeClient loadWithCompletionBlock:]_block_invoke + 216
    8   BabaTaxi3D                          0x0000000107cf3842 __57-[NADNativeLoader loadWithSpotId:apiKey:completionBlock:]_block_invoke_2 + 338
    9   BabaTaxi3D                          0x0000000107cf596c __47-[NADNetworkOperation registerCompletionBlock:]_block_invoke_2 + 124
    10  libdispatch.dylib                   0x000000010d2c6e5d _dispatch_call_block_and_release + 12
    11  libdispatch.dylib                   0x000000010d2e749b _dispatch_client_callout + 8
    12  libdispatch.dylib                   0x000000010d2cf2af _dispatch_main_queue_callback_4CF + 1738
    13  CoreFoundation                      0x000000010c7c6d09 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    14  CoreFoundation                      0x000000010c7882c9 __CFRunLoopRun + 2073
    15  CoreFoundation                      0x000000010c787828 CFRunLoopRunSpecific + 488
    16  GraphicsServices                    0x000000010e9d0ad2 GSEventRunModal + 161
    17  UIKit                               0x000000010aade610 UIApplicationMain + 171
    18  BabaTaxi3D                          0x0000000107810908 main + 42
    19  libdyld.dylib                       0x000000010d31b92d start + 1
    20  ???                                 0x0000000000000001 0x0 + 1

ちなみに https://github.com/fan-ADN/nendSDK-iOS/tree/master/Sample は実機で動作し、広告が出ることが確認できました。

また、sampleに出てくる NativeAdViewInternal を自分のプロジェクトに持ってきて、そのインスタンスを intoView: に指定してみましたが、同じく NativeAdViewInternal のインスタンスに対して nad_nativeAd selector が送られ unrecognized selector sent to instance で落ちてしまいました。

同様の現象が起きて解決したなど、何か解決のヒントはありますでしょうか?

[Question] RewardVideo: No Content Error

I tried to load a reward video ad but it returned error:
nadRewardVideoAd(_:didFailToLoadWithError:) error: Error Domain=net.nend.ios.video.ad Code=204 "no content" UserInfo={NSLocalizedDescription=no content}
Please, help me what is this?

インフィード広告のIntervalの変更の仕方。

お世話になります。
NADNativeTableViewPlacementを見ると、ADD系しかメソードが用意されていません。
しかし、場合によってIntervalを変更したい時はどうセットすべきでしょうか?

cocoapodsへメディエーション用のライブラリ追加依頼

お世話になっております。

この度はcocoapodsにてメディエーションのライブラリを追加して頂きたくご連絡させていただきました。

https://github.com/CocoaPods/Specs/blob/master/Specs/NendSDK_iOS/2.5.8/NendSDK_iOS.podspec.json
上記のpodspecに以下のようにメディエーション用のライブラリも追加して頂けないでしょうか。

  s.vendored_libraries = "NendAd/libNendAd.a", "AdMobMediationAdapter/libAdapterNend.a"

また、2.5.8ではディレクトリが変わっているため、source_filesのディレクトリ位置もご確認頂けると幸いです。

何卒ご検討頂けると非常に助かります。
よろしくお願いします。

NADNativeClient.loadAdのcompletionBlockが走らない

nendSDKを利用してネイティブ広告を取得しようとしています。

ですが、titleのとおりNADNativeClient.loadAdの引数completionBlockが走らず困っています。
何か原因わかりますでしょうか。

ソースコード

広告をロードするクラス

class NendManager: NSObject {
    
    var client: NADNativeClient!
    
    override init() {
        self.client = NADNativeClient(spotId: "485507", apiKey: "31e861edb574cfa0fb676ebdf0a0b9a0621e19fc")
        super.init();
    }
    
    func loadAd(nendView:NendView, semaphore:DispatchSemaphore) -> Void { 
        self.client.load(completionBlock: {(ad, error) in
            if let nativeAd = ad {
                nativeAd.intoView(nendView, advertisingExplicitly: .PR)
                semaphore.signal()
            }else {
                nendView.nativeAdPrTextLabel = UILabel.init()
                nendView.nativeAdPrTextLabel.text = "false"
                semaphore.signal()
            }
        })
    }
}

呼び出すメソッド

    func adDataDictionary() -> Dictionary<String,String>{
        let manager = NendManager.init()
        let nendView = NendView()
        var adData:Dictionary = Dictionary<String,String>()
        let semaphore: DispatchSemaphore = DispatchSemaphore.init(value: 0)
        DispatchQueue.global(qos: .default).async {
            manager.loadAd(nendView: nendView, semaphore: semaphore)
        }
        semaphore.wait()
        adData = nendView.toDictionary()
        return adData;

    }
    

以下お問い合わせフォーラムのテンプレートに沿って回答します。

●検証端末またはシュミレータ―の種類とOSバージョン
iPhoneX iOS 12.0

●検証端末またはシュミレータ―の言語設定が日本語以外になっていないか
※日本語以外になっている場合、日本語に設定してお試しください。
日本語になっております。

●テスト用IDで同様の現象が起きるかどうか
発生します。

●nend SDKのバージョン
5.0.3

●(iOS SDKであれば)Xcodeのバージョン
Xcode 10.0

●サードパーティ用モジュール(COCOS/Unity/Admobメディエーション 等)ご利用有無
 ご利用であればその種類とバージョン
Flutter ver0.5.7

●エラーログ
ログなし

About NADNativeTableViewPlacement

Hi development team.
I have a question about NADNativeTableViewPlacement.
It's a very good function, but I have a problem.
When I use func "addRepeatInterval".
Ex: placer.addRepeatInterval(10, inSection: 0)
How can I set the start of first ads?
Ex: I want to show ads in index: 5, 15, 25, 35 ....
Thanks for reading.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.