Hi all - I’m trying to get Corona ad’s setup and I’m running into a few issues and I’d appreciate any help getting my code up and running.
I’ve followed the example in the docs and if I use the test api key in the examples I get active ad’s showing and hiding correctly (this is using the new live build feature to dev on the device)
If I replace the test key with my own api key I do get a single static ad (but only during the current live server session) - If I compile and put the build on my device then I get nothing (but the following log output in the simulator console window.
Dec 07 01:48:45.938 [Device] bundleid: com.JonHoward.TheUkuleleApp, enable\_level: 0, persist\_level: 0, propagate\_with\_activity: 0 Dec 07 01:48:45.985 [Device] [FBSScene] [com.JonHoward.TheUkuleleApp] Created client agent: \<UIApplicationSceneClientAgent: 0x170009930\> Dec 07 01:48:46.025 [Device] CoreUI(DEBUG): Current version = 427.2, Linked UIKit version = 3600, Compatibility mode = 9999 Dec 07 01:48:46.210 [Device] Platform: iPad / iPad5,1 / 10.1.1 / Apple A8 GPU / OpenGL ES 2.0 Apple A8 GPU - 95.16 / 2016.2992 / en-GB | GB | en\_GB | en Dec 07 01:48:46.252 [Device] SDK is initialized and GIT repo is changed Dec 07 01:48:46.253 [Device] Test Server Environment 1 = 1 and SDK Version = 1.5 Dec 07 01:48:46.255 [Device] Test Server Environment 1 = 1 and SDK Version = 1.5 Dec 07 01:48:46.367 [Device] Could not successfully update network info during initialization. Dec 07 01:48:46.390 [Device] \<private\> adding listener `\<private\>` for service: iMessage Dec 07 01:48:46.390 [Device] \<private\> creating monitor for service: iMessage Dec 07 01:48:46.392 [Device] \<private\> updating availability for FTCServiceTypeiMessage =\> from FTCServiceAvailabilityUnavailable to FTCServiceAvailabilityAvailable Dec 07 01:48:46.657 [Device] Beginning operation. Dec 07 01:48:47.077 [Device] received client will resign active notification Dec 07 01:48:50.525 [Device] received client did become active notification Dec 07 01:48:50.590 [Device] delivering locations to client's delegate Dec 07 01:48:50.597 [Device] Device Info - app\_name=The Ukulele App;sdk\_version=1.5;app\_bundle\_id=com.JonHoward.TheUkuleleApp;product\_identifier=coronaads\_Corona;device\_manufacturer=Apple;device\_model=iPad5,1;device\_resolution=640x960;os\_name=iOS;os\_version=10.1.1;ios\_idfa=36DBA783-B611-432C-9D85-DF941EDBFACA;ios\_idfv=E5ADDE27-FB85-4791-8880-B28BFA9B1BA8;api\_key=f4f2e7cc-943a-4be6-852b-426fe318c45e;app\_version=1.0;tracking\_enabled=true;open\_udid=36DBA783-B611-432C-9D85-DF941EDBFACA;lat=-2.096253;long=52.795574 Dec 07 01:48:50.597 [Device] URL = https://monetize-api.coronalabs.com/v3/init.json?api\_key=f4f2e7cc-943a-4be6-852b-426fe318c45e Dec 07 01:48:50.626 [Device] delivering locations to client's delegate Dec 07 01:48:51.333 [Device] ---{ Dec 07 01:48:51.335 [Device] init success happend Dec 07 01:48:51.569 [Device] 121: Primary session 0x18072 is valid. Not creating a new session. Dec 07 01:48:51.572 [Device] 1303: Starting AURemoteIO(0x1010f7040) Dec 07 01:48:52.187 [Device] AVAudioSession.mm:2227:-[AVAudioSession privateHandlePickableRoutesChange]: Notifying listeners that pickable routes changed Dec 07 01:48:55.076 [Device] SHOW - request CoronaAd Dec 07 01:48:55.079 [Device] toggle button 0 Dec 07 01:48:55.081 [Device] placement ID = bottom-banner-320x50 Dec 07 01:48:55.086 [Device] size value array = ( Dec 07 01:48:55.086 [Device] SDK is initialized Dec 07 01:48:55.119 [Device] [FBAudienceNetworkLog/FBAdSettings:96] When testing your app with Facebook's ad units you must specify the device hashed ID to ensure the delivery of test ads, add the following code before loading an ad: [FBAdSettings addTestDevice:@"1641f96facb695e1badacc96fe5e2438612674d3"] Dec 07 01:48:55.119 [Device] [FBAudienceNetworkLog/FBAdSettings:97] Test mode device hash: 1641f96facb695e1badacc96fe5e2438612674d3 Dec 07 01:48:55.216 [Device] Setting matching multiple Dec 07 01:48:55.218 [Device] Event system client initialized successfully Dec 07 01:48:55.218 [Device] IOHIDEventSystemClientCopyServices() returned NULL [Device] Service with event type \<private\> is not ready [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> Dec 07 01:48:55.220 [Device] Could not set all properties. Setting timer to fire \<private\> seconds from now Dec 07 01:48:55.220 [Device] Adding match entry for usage pair {\<private\>,\<private\>} [Device] Setting matching multiple [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> Dec 07 01:48:55.221 [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> Dec 07 01:48:55.233 [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> Dec 07 01:48:55.234 [Device] Service with event type \<private\> is not ready [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] Could not set all properties. Setting timer to fire \<private\> seconds from now [Device] Service with event type \<private\> is not ready [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] Service with event type \<private\> is not ready [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] Could not set all properties. Setting timer to fire \<private\> seconds from now [Device] Service with event type \<private\> is not ready [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] Service with event type \<private\> is not ready [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] Service with event type \<private\> is not ready [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] Could not set all properties. Setting timer to fire \<private\> seconds from now [Device] Adding match entry for usage pair {\<private\>,\<private\>} [Device] Adding match entry for usage pair {\<private\>,\<private\>} [Device] Setting matching multiple [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> Dec 07 01:48:55.258 [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> Dec 07 01:48:55.258 [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> Dec 07 01:48:55.454 [Device] #WK: 0x10c588300 - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process Dec 07 01:48:55.514 [Device] #WK: 0x10c580120 - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC Dec 07 01:48:55.703 [Device] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/B20BE88E-A484-4F2C-9972-FD829811AFAF/Library/Cookies/Cookies.binarycookies Dec 07 01:48:55.727 [Device] DiskCookieStorage changing policy from 0 to 2, cookie file: file:///private/var/mobile/Containers/Data/Application/B20BE88E-A484-4F2C-9972-FD829811AFAF/Library/Cookies/Cookies.binarycookies Dec 07 01:48:55.727 [Device] [FBAudienceNetworkLog/FBAdProvider:146 \<error\>] Ad request error: Error Domain=com.facebook.ads.sdk Code=1001 "No fill" UserInfo={NSLocalizedDescription=No fill, FBAdErrorDetailKey={ [Device] Ad failed to load [Device] advertCountWithWaterFall = 1 [Device] AD PLC VALUE [Device] size value array = ( [Device] SDK is initialized Dec 07 01:48:55.910 [Device] ad request: { Dec 07 01:48:55.935 [Device] ---{ Dec 07 01:48:55.981 [Device] delivering locations to client's delegate Dec 07 01:48:56.004 [Device] locationManager:didUpdateLocations: Dec 07 01:48:56.004 [Device] locationManager:didUpdateLocations: ( [Device] delivering locations to client's delegate [Device] locationManager:didUpdateLocations: [Device] locationManager:didUpdateLocations: ( [Device] delivering locations to client's delegate [Device] locationManager:didUpdateLocations: [Device] locationManager:didUpdateLocations: ( [Device] delivering locations to client's delegate [Device] locationManager:didUpdateLocations: [Device] locationManager:didUpdateLocations: ( Dec 07 01:48:56.030 [Device] #WK: Starting frame load, frame = 0x10c47cf00, main = 1 Dec 07 01:48:56.054 [Device] delivering locations to client's delegate Dec 07 01:48:56.055 [Device] locationManager:didUpdateLocations: [Device] locationManager:didUpdateLocations: ( Dec 07 01:48:56.083 [Device] #WK: Finished frame load without error, frame = 0x10c47cf00, main = 1 Dec 07 01:48:56.483 [Device] ---{ Dec 07 01:48:56.516 [Device] ad response: { Dec 07 01:48:56.541 [Device] stopFindingLocation Dec 07 01:48:56.541 [Device] advertCountWithWaterFall = 2 [Device] AD PLC VALUE [Device] URL = https://monetize-api.coronalabs.com/v2/ad.json?api\_key=\<\<snip\>\>&placement=bottom-banner-320x50 Dec 07 01:48:57.135 [Device] ---{ Dec 07 01:48:57.198 [Device] advertCountWithWaterFall = 3 Dec 07 01:48:57.223 [Device] size value array = ( Dec 07 01:48:57.223 [Device] SDK is initialized [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> Dec 07 01:48:57.272 [Device] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/B20BE88E-A484-4F2C-9972-FD829811AFAF/Library/Cookies/Cookies.binarycookies Dec 07 01:48:57.299 [Device] DiskCookieStorage changing policy from 0 to 2, cookie file: file:///private/var/mobile/Containers/Data/Application/B20BE88E-A484-4F2C-9972-FD829811AFAF/Library/Cookies/Cookies.binarycookies Dec 07 01:48:57.299 [Device] [FBAudienceNetworkLog/FBAdProvider:146 \<error\>] Ad request error: Error Domain=com.facebook.ads.sdk Code=1001 "No fill" UserInfo={NSLocalizedDescription=No fill, FBAdErrorDetailKey={ [Device] Ad failed to load [Device] placement ID = bottom-banner-320x50 [Device] AD PLC VALUE Dec 07 01:48:57.766 [Device] ---{ Dec 07 01:48:57.913 [Device] ---{ Dec 07 01:49:25.516 [Device] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service Dec 07 01:49:25.544 [Device] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service Dec 07 01:49:25.801 [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> Dec 07 01:49:25.828 [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> Dec 07 01:49:25.829 [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\> [Device] IOHIDServiceClientSetProperty() successfully set property for event \<private\> [Device] Property for usage pair {\<private\>,\<private\>}: {\<private\> = \<private\>} was set \<private\>
I noticed from looking through the log that there was a specific url mentioned
https://monetize-api.coronalabs.com/v2/ad.json?api\_key=\<\<snip\>\>&placement=bottom-banner-320x50
and if visit that then I can see the following JSON data
{“status”:“fail”,“message”:“Device-Info header is missing”,“data”:null}
Any idea what I’m doing wrong or what header data is missing (and how to specify it?)
Thanks (in advance) for any help you can provide on this.
Regards
Jon…