Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Can't receive ad in test mode

Discussion in 'Unity Ads & User Acquisition' started by taehunhan0077, Sep 22, 2014.

  1. taehunhan0077

    taehunhan0077

    Joined:
    Dec 12, 2012
    Posts:
    1
  2. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    540
    Are you getting this issue only in editor, or are you also getting the issue after building to the device? Also, what platform are you targeting: iOS, Android, or both?

    I've gotten the same issue in editor for the "pictureZone". I've also gotten the same issue if I didn't spell the zone ID properly. Let me know if you're still experiencing the issue after building to the device.

    Thanks,

    Nikko
     
  3. HeikkiTunkelo

    HeikkiTunkelo

    Unity Technologies

    Joined:
    May 13, 2014
    Posts:
    104
    Hi guys,

    FYI: Not getting picture ads on test-mode in editor is a known issue. It is in our bug list.

    Cheers,
    Heikki
     
    scorpionz and unity-nikkolai like this.
  4. premaliang

    premaliang

    Joined:
    Nov 11, 2014
    Posts:
    2
    I have the same issue in iOS.
    [[UnityAds sharedInstance] canShowAds] returns NO in test mode.

    Currently my implementation is checking whether video is available or not before play touch play button.
    Do you thinking implementing auto checking canShowAds or not. If any video ok for playing, just call delegate's methods or post a notification.
     
  5. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    540
    Are you using the latest version of the Unity Ads SDK? Version 1.3.9 released just a couple weeks ago.
     
  6. premaliang

    premaliang

    Joined:
    Nov 11, 2014
    Posts:
    2
    Yes. I started implement Unity Ads. yesterday.
    My app is not life yet.

    ============
    Below are console log

    2014-11-12 11:22:41.371 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAds startWithGameId:andViewController:]:114
    2014-11-12 11:22:41.371 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsDefaultInitializer initAds:]:22
    2014-11-12 11:22:41.371 [1342:70b] DEBUG [T:0x7978d8c0 M] __45-[UnityAdsInitializer createBackgroundThread]_block_invoke:32 Starting background thread
    2014-11-12 11:22:41.372 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsDefaultInitializer initCampaignManager]:57
    2014-11-12 11:22:41.372 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsInitializer initCampaignManager]:93
    2014-11-12 11:22:41.373 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaignManager updateCampaigns]:163 UrlString https://impact.applifier.com/mobile...deviceType=ipad&connectionType=none&test=true
    2014-11-12 11:22:41.373 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsInitializer initAnalyticsUploader]:106
    2014-11-12 11:22:42.215 [1342:70b] Unity Ads ad unit is NOT available ==> This is the fail message of [[UnityAds sharedInstance] canShow]
    2014-11-12 11:22:42.542 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaignManager _processCampaignDownloadData]:91 {"data":{"gamerId":"50507b163822f20000000001","connectionType":"none","campaigns":[{"gameName":"Test Game (ios) 1","customClickUrl":"","gameIcon":"http://static.everyplay.com/impact/intergration_images/ios/impact_icon_aqua.jpg","endScreenPortrait":"https://dl.dropboxusercontent.com/u/12599603/384_512_ios.jpg","endScreen":"https://dl.dropboxusercontent.com/u/12599603/512_384_ios.jpg","tagLine":"Applifier Integration Test 1","rating":"4.5","clickUrl":"http://impact.applifier.com/mobile/...000000001?test=true&platform=ios&gameId=19597","id":"000000000000000000000000","ratingCount":"10000","trailerStreaming":"http://static.everyplay.com/impact/13/5374eb73b202668db3106c063c485b9e02db2c51/b30-400.mp4","trailerDownloadable":"http://static.everyplay.com/impact/11017/applifier_integration_video/b30-600.mp4","bypassAppSheet":true,"iTunesId":"481639897","gameId":"11017","cacheVideo":true,"network":"mobile","picture":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_aqua.jpg","trailerSize":"361725","allowCache":true},{"gameName":"Test Game (ios) 2","customClickUrl":"","gameIcon":"http://static.everyplay.com/impact/intergration_images/ios/impact_icon_blue.jpg","endScreenPortrait":"http://static.everyplay.com/impact/intergration_images/ios/impact_portrait_blue.jpg","endScreen":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_blue.jpg","tagLine":"Applifier Integration Test 2","rating":"4.5","clickUrl":"http://impact.applifier.com/mobile/...000000001?test=true&platform=ios&gameId=19597","id":"000000000000000000000001","ratingCount":"10000","trailerStreaming":"http://static.everyplay.com/impact/13/5374eb73b202668db3106c063c485b9e02db2c51/b30-400.mp4","trailerDownloadable":"http://static.everyplay.com/impact/11017/applifier_integration_video/b30-600.mp4","bypassAppSheet":false,"iTunesId":"481639897","gameId":"11017","cacheVideo":false,"network":"mobile","picture":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_blue.jpg","trailerSize":"361725","allowCache":true},{"gameName":"Test Game (ios) 3","customClickUrl":"","gameIcon":"http://static.everyplay.com/impact/intergration_images/ios/impact_icon_green.jpg","endScreenPortrait":"http://static.everyplay.com/impact/intergration_images/ios/impact_portrait_green.jpg","endScreen":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_green.jpg","tagLine":"Applifier Integration Test 3","rating":"4.5","clickUrl":"http://impact.applifier.com/mobile/...000000001?test=true&platform=ios&gameId=19597","id":"000000000000000000000002","ratingCount":"10000","trailerStreaming":"http://static.everyplay.com/impact/13/5374eb73b202668db3106c063c485b9e02db2c51/b30-400.mp4","trailerDownloadable":"http://static.everyplay.com/impact/11017/applifier_integration_video/b30-600.mp4","bypassAppSheet":false,"iTunesId":"481639897","gameId":"11017","cacheVideo":false,"network":"mobile","picture":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_green.jpg","trailerSize":"361725","allowCache":true}],"refreshCampaignsAfterViewed":10,"webViewUrl":"http://cdn.applifier.com/impact/web...sion=8cf570f86653cab6df104e88ff5b4d8e7d2a2051","analyticsUrl":"https://log.applifier.com/videoads-tracking","nativeSdkVersion":"1305","ab_group":0,"impactUrl":"http://impact.applifier.com/mobile/","sdkIsCurrent":true,"allowSkipVideoInSeconds":2,"country":"TW","customOptions":{"bufferingBackground":"rgba(0,0,0,1)"},"refreshCampaignsAfterSeconds":86400,"zones":[{"id":"rewardedVideoZone","default":true,"allowClientOverrides":["noOfferScreen","openAnimated","muteVideoSounds","useDeviceOrientationForVideo"],"noOfferScreen":true,"defaultRewardItem":{"key":"Key1415688467186","name":"Gold Coin","picture":"http://static.everyplay.com/impact/images/19597/1a11d7520b091a99/iap-icons-small-one-coin.png"},"enabled":true,"allowedCampaignTypes":["video"],"incentivised":true,"useDeviceOrientationForVideo":true,"name":"Rewarded Video Placement","muteVideoSounds":false,"rewardItems":[{"key":"Key1415688467186","name":"Gold Coin","picture":"http://static.everyplay.com/impact/images/19597/1a11d7520b091a99/iap-icons-small-one-coin.png"}],"openAnimated":true},{"id":"pictureZone","default":false,"allowClientOverrides":["noOfferScreen","openAnimated","muteVideoSounds","useDeviceOrientationForVideo"],"noOfferScreen":true,"defaultRewardItem":{"key":"default","name":"Default","picture":"http://cdn.applifier.com/unityads/unityicon_62.png"},"enabled":true,"allowedCampaignTypes":["picture"],"incentivised":false,"useDeviceOrientationForVideo":false,"name":"Picture Placement","muteVideoSounds":false,"rewardItems":[],"openAnimated":true}]},"responseCode":200,"status":"ok"}

    2014-11-12 11:22:42.581 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaign setupFromData:]:53 Found endScreenPortraitURL
    2014-11-12 11:22:42.582 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaign setupFromData:]:146 Not a valid URL:
    2014-11-12 11:22:42.582 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaign setupFromData:]:53 Found endScreenPortraitURL
    2014-11-12 11:22:42.582 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaign setupFromData:]:146 Not a valid URL:
    2014-11-12 11:22:42.582 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaign setupFromData:]:53 Found endScreenPortraitURL
    2014-11-12 11:22:42.582 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaign setupFromData:]:146 Not a valid URL:
    2014-11-12 11:22:42.582 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCampaignManager _processCampaignDownloadData]:121 Got SDK Version: 1305
    2014-11-12 11:22:42.583 [1342:6803] DEBUG [T:0x7ded0440 S] -[UnityAdsCacheManager init]:119 creating downloadqueue
    2014-11-12 11:22:42.584 [1342:8103] DEBUG [T:0x7dfc9880 S] -[UnityAdsCacheManager cacheOperationStarted:]:243 for campaign 000000000000000000000000
    2014-11-12 11:22:42.584 [1342:8103] DEBUG [T:0x7dfc9880 S] -[UnityAdsCacheManager cacheOperationFinished:]:253 for campaign 000000000000000000000000
    2014-11-12 11:22:43.479 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsDefaultInitializer campaignManagerCampaignDataReceived]:72 Campaign data received.

    2014-11-12 11:22:43.610 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController webView:shouldStartLoadWithRequest:navigationType:]:230 url http://cdn.applifier.com/impact/web...sion=8cf570f86653cab6df104e88ff5b4d8e7d2a2051
    2014-11-12 11:22:43.611 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController webViewDidStartLoad:]:240
    2014-11-12 11:22:43.686 [1342:70b] (null)
    2014-11-12 11:22:43.866 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController webViewDidFinishLoad:]:244
    2014-11-12 11:22:43.866 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController initWebAppWithValues:]:221
    2014-11-12 11:22:43.867 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController runJavascript:]:152 Running JavaScriptString: unityads.init({"iOSVersion":"7.0.3","deviceId":"4a18f16f0db869a5647cf26bfbfaba9a","deviceType":"ipad","gameId":"19597","platform":"ios","sdkVersion":"1309","macAddress":"31036148863baaeda5bafdbcf70782fc","campaignData":{"data":{"gamerId":"50507b163822f20000000001","connectionType":"none","campaigns":[{"gameName":"Test Game (ios) 1","customClickUrl":"","gameIcon":"http://static.everyplay.com/impact/intergration_images/ios/impact_icon_aqua.jpg","endScreenPortrait":"https://dl.dropboxusercontent.com/u/12599603/384_512_ios.jpg","endScreen":"https://dl.dropboxusercontent.com/u/12599603/512_384_ios.jpg","tagLine":"Applifier Integration Test 1","rating":"4.5","clickUrl":"http://impact.applifier.com/mobile/...000000001?test=true&platform=ios&gameId=19597","id":"000000000000000000000000","ratingCount":"10000","trailerStreaming":"http://static.everyplay.com/impact/13/5374eb73b202668db3106c063c485b9e02db2c51/b30-400.mp4","trailerDownloadable":"http://static.everyplay.com/impact/11017/applifier_integration_video/b30-600.mp4","bypassAppSheet":true,"iTunesId":"481639897","gameId":"11017","cacheVideo":true,"network":"mobile","picture":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_aqua.jpg","trailerSize":"361725","allowCache":true},{"gameName":"Test Game (ios) 2","customClickUrl":"","gameIcon":"http://static.everyplay.com/impact/intergration_images/ios/impact_icon_blue.jpg","endScreenPortrait":"http://static.everyplay.com/impact/intergration_images/ios/impact_portrait_blue.jpg","endScreen":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_blue.jpg","tagLine":"Applifier Integration Test 2","rating":"4.5","clickUrl":"http://impact.applifier.com/mobile/...000000001?test=true&platform=ios&gameId=19597","id":"000000000000000000000001","ratingCount":"10000","trailerStreaming":"http://static.everyplay.com/impact/13/5374eb73b202668db3106c063c485b9e02db2c51/b30-400.mp4","trailerDownloadable":"http://static.everyplay.com/impact/11017/applifier_integration_video/b30-600.mp4","bypassAppSheet":false,"iTunesId":"481639897","gameId":"11017","cacheVideo":false,"network":"mobile","picture":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_blue.jpg","trailerSize":"361725","allowCache":true},{"gameName":"Test Game (ios) 3","customClickUrl":"","gameIcon":"http://static.everyplay.com/impact/intergration_images/ios/impact_icon_green.jpg","endScreenPortrait":"http://static.everyplay.com/impact/intergration_images/ios/impact_portrait_green.jpg","endScreen":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_green.jpg","tagLine":"Applifier Integration Test 3","rating":"4.5","clickUrl":"http://impact.applifier.com/mobile/...000000001?test=true&platform=ios&gameId=19597","id":"000000000000000000000002","ratingCount":"10000","trailerStreaming":"http://static.everyplay.com/impact/13/5374eb73b202668db3106c063c485b9e02db2c51/b30-400.mp4","trailerDownloadable":"http://static.everyplay.com/impact/11017/applifier_integration_video/b30-600.mp4","bypassAppSheet":false,"iTunesId":"481639897","gameId":"11017","cacheVideo":false,"network":"mobile","picture":"http://static.everyplay.com/impact/intergration_images/ios/impact_landscape_green.jpg","trailerSize":"361725","allowCache":true}],"refreshCampaignsAfterViewed":10,"webViewUrl":"http://cdn.applifier.com/impact/web...sion=8cf570f86653cab6df104e88ff5b4d8e7d2a2051","analyticsUrl":"https://log.applifier.com/videoads-tracking","nativeSdkVersion":"1305","ab_group":0,"impactUrl":"http://impact.applifier.com/mobile/","sdkIsCurrent":true,"allowSkipVideoInSeconds":2,"country":"TW","customOptions":{"bufferingBackground":"rgba(0,0,0,1)"},"refreshCampaignsAfterSeconds":86400,"zones":[{"id":"rewardedVideoZone","default":true,"allowClientOverrides":["noOfferScreen","openAnimated","muteVideoSounds","useDeviceOrientationForVideo"],"noOfferScreen":true,"defaultRewardItem":{"key":"Key1415688467186","name":"Gold Coin","picture":"http://static.everyplay.com/impact/images/19597/1a11d7520b091a99/iap-icons-small-one-coin.png"},"enabled":true,"allowedCampaignTypes":["video"],"incentivised":true,"useDeviceOrientationForVideo":true,"name":"Rewarded Video Placement","muteVideoSounds":false,"rewardItems":[{"key":"Key1415688467186","name":"Gold Coin","picture":"http://static.everyplay.com/impact/images/19597/1a11d7520b091a99/iap-icons-small-one-coin.png"}],"openAnimated":true},{"id":"pictureZone","default":false,"allowClientOverrides":["noOfferScreen","openAnimated","muteVideoSounds","useDeviceOrientationForVideo"],"noOfferScreen":true,"defaultRewardItem":{"key":"default","name":"Default","picture":"http://cdn.applifier.com/unityads/unityicon_62.png"},"enabled":true,"allowedCampaignTypes":["picture"],"incentivised":false,"useDeviceOrientationForVideo":false,"name":"Picture Placement","muteVideoSounds":false,"rewardItems":[],"openAnimated":true}]},"responseCode":200,"status":"ok"}});
    2014-11-12 11:22:43.869 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController runJavascript:]:161 Got unexpected response when running javascript: cached
    2014-11-12 11:22:43.937 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController handleWebEvent:data:]:96 Gotevent: initComplete withData: {

    }
    2014-11-12 11:22:43.938 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsDefaultInitializer webAppReady]:97 webAppReady
    2014-11-12 11:22:43.938 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsInitializer checkForVersionAndShowAlertDialog]:68
    2014-11-12 11:22:43.938 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController setWebViewCurrentView:data:]:84
    2014-11-12 11:22:43.938 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAds initComplete]:84
    2014-11-12 11:22:43.938 [1342:70b] unityAdsFetchCompleted called. ==>Message from delegate's method.
    2014-11-12 11:22:43.939 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController runJavascript:]:152 Running JavaScriptString: unityads.setView("none", {"action":"initComplete","itemKey":"Key1415688467186"});
    2014-11-12 11:22:43.941 [1342:70b] DEBUG [T:0x7978d8c0 M] -[UnityAdsWebAppController runJavascript:]:158 JavaScript call successfull.
     
  7. unity-nikkolai

    unity-nikkolai

    Unity Technologies

    Joined:
    Sep 18, 2014
    Posts:
    540
    Looks like you're checking to see if ads are ready before Unity Ads has finished initializing.

    If you're trying to show an ad when your game first starts up, you'll need to first wait until Unity Ads is initialized, then make sure ads are both available and ready to show.

    In this situation, you should also design in a timeout when checking so that if Unity Ads doesn't get initialized, or is unable to show an ad. This way the game doesn't stall on the initial opening sequence, allowing the user to continue into game even if ads are unable to be shown.
     
  8. BornaFana

    BornaFana

    Joined:
    Dec 2, 2013
    Posts:
    4
    Just go to EDIT < PROJECT SETTINGS. Change your default build to what you want to use i.e iOS or Android
     
  9. mozis

    mozis

    Joined:
    Jan 8, 2016
    Posts:
    2
    Similar here, although I can't get rewarded ads to show up (both editor and on the phone). Project is set to android, I am using unity 5.3 and intergrated ads (not the assets option).

    Simple (not rewarded) ads work properly, but Advertisement.IsReady("rewardedVideoZone") is always false. And I used the code snippet that was offered after turning on ad services in the editor, so I don't think I did something wrong... And I am not trying to show the ad immediately after the start of the app, so there should be enough time to initialize..
     
  10. Rostam24

    Rostam24

    Joined:
    Mar 5, 2014
    Posts:
    119
    I have the same problem as mozis, Advertisement.IsReady("rewardedVideoZone") is always false.
     
  11. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Sorry, there's a bug in our documentation code samples. You should likely use
    Code (CSharp):
    1. Advertisement.IsReady("rewardedVideo")
    instead. Check your dashboard to see the actual zone ids.

    -Rasmus