adwhirl(iad, admob, houseAd) add to xcode4
deviece test...
iad : ok see service
houseAd : ok see service
but...
admob : not see!!!
log code
2011-10-19 13:38:07.739 KingKatWorldFree[948:707] <Google> Invalid Request: {
errors = "Cannot determine request type. Is your ad unit id correct?";
"google.afma.notify_dt" = 1318999087687;
"request_id" = undefined;
type = unknown;
}
Why admob not See????
plese help me!!!!
When you configured AdMob on the AdWhirl backend with your AdMob publisher ID, check to make sure there is no whitespace before or after your ID. Otherwise AdMob will not recognize your publisher ID.
Related
I am facing a weired situation where i have implemented a googleadmob in react native app.
<AdMobBanner
bannerSize="fullBanner"
adUnitID="ca-app-pub-3940256099942544/6300978111"
testDeviceID="EMULATOR"
didFailToReceiveAdWithError={this.bannerError} />
where ca-app-pub-3940256099942544/6300978111 is the test id provided by googleadmob
but when i created new Adunit ID and replaced test id with the newly created ad unit id i am unable to any ads Why ??
Note : i am working on dev environment i guess it won't affect but still ..
Try to remove testDeviceID="EMULATOR" when you run on real device.
Sometimes AdMob may take some times to active the ad unit, please ref to: How long does it take for an AdMob Ad unit ID to become active?
One more point, did you input your payment info on AdMob website, AdMob needs your info to serve your ads.
This is my code:
let request = GADRequest()
request.testDevices = [kGADSimulatorID, "XXXX2F32d69CCA859FFB559D0FEA3CF6483D08A6"]
adView.load(request)
Where XXXX is my UDID of my iPhone. Why do I get real ads and not test ads on my iPhone? Test ads on the simulator works. Thank you. Tried the UDID in uppercase and lowercase.
This fixed it for me!
Product -> Scheme -> Arguments -> Environment Variables if there is a key: OS_ACTIVITY_MODE, disable/remove it.
As mentioned in admob guide
while running the app in device you get the below log
<Google> To get test ads on this device, call: request.testDevices = #[
#"2077ef9a63d2b398840261c8221a0c9b" ];
use that id instead of UDID.
As I understood your, I concate your UDID and ID in the log. This is wrong.
You this - pure ID :
let request = GADRequest()
request.testDevices = [kGADSimulatorID, "2F32d69CCA859FFB559D0FEA3CF6483D08A6"]
adView.load(request)
https://firebase.google.com/docs/admob/ios/targeting
I'm looking at adding a rewarded video ad to my app that is written entirely in swift. I believe the setup of the web side of things is correct because when I downloaded the Objective C example app and put in my ad id the video showed up correctly. However, when running the same setup in Swift I get returned
Error Domain=com.google.ads Code=1 "Request Error: No ad to show." UserInfo={NSLocalizedDescription=Request Error: No ad to show., NSLocalizedFailureReason=Request Error: No ad to show.}
I've only had ONE time where it actually returned a video. I'm using Chartboost.
Another interesting point is that if I used chart boost directly it seemed to work.
Also, banners work perfectly fine through AdMob in the same app.
Request I Make
let request = GADRequest()
request.testDevices = [ kGADSimulatorID ]
GADRewardBasedVideoAd.sharedInstance().loadRequest(request, withAdUnitID: "AdUnitID")
Background : I am trying to have the Interstitial Ads from Admob and Facebook separately (Not via Mediation) . The facebook Ads will be triggered if the App is installed from Amazon App store.
Question : I need to declare the variable interstitialFromAdmob and interstitialAdFromFacebook. interstitialFromAdmob is for the Ad from Admob and interstitialAdFromFacebook is for the Ad from Facebook. For this Admob and Facebook has used the same Object InterstitialAd. Hence I am unable to declare the variables pointing the Admob and facebook separate. Please let me know how to resolve this
InterstitialAd interstitialFromAdmob;
InterstitialAd interstitialAdFromFacebook;
This is a very common case.
For those classes have duplicated short class name, a long or full path class name shall be used.
For examples, you can use:
com.facebook.ads.InterstitialAd internstitialAdFromFacebook;
I implement push notification in my application, I check it on my ipad device, in the php file, I put the device token specified:
$deviceToken = '2ca0c25ed7acea73e19c9d9193e57a12c1817ed48ddf8f44baea42e68a51563c';
until now, the notification works fine.
when I want to register devices into database, I got an the below error:
Error in registration. Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x1edda520 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
I don't understand the mentioned error, Note: that I use push notification for development and not for distribution yet.
I got the code of the registration from this link
Thank you for you help!
Have you registered your application for push notifications in the developer center? And if you have, did you re-generate your provisioning profile? You need to make sure your provisioning profile is setup for push messaging.
As pointed out it is most likely a code-signing problem. Be sure to sign with the correct profile! Check your target and project settings if those are correct and not some kind of wildcard ID.
Also may I point out that the How-To you posted is still using UDID.
UIDevice *dev = [UIDevice currentDevice];
NSString *deviceUuid = dev.uniqueIdentifier;
Push only uses the devToken and UDID use is deprecated.
A solution can be found here
This error is related to certificates..Make sure you set your certificate name is correct in php file and it is present in your respective folder. Let me know if you have still error.
As a request,I am posting code of php file which is used to send notification :
<?php
// Adjust to your timezone
date_default_timezone_set('Asia/Calcutta');
// Report all PHP errors
error_reporting(-1);
// Using Autoload all classes are loaded on-demand
require_once 'ApnsPHP/Autoload.php';
// Instantiate a new ApnsPHP_Push object
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
'ck.pem'
);
// Set the Provider Certificate passphrase
$push->setProviderCertificatePassphrase('PUT_HERE_YOUR_PASSPHRASE_WHILE_GENERATING_NOTIFICATION');
// Set the Root Certificate Autority to verify the Apple remote peer
$push->setRootCertificationAuthority('ck.pem');
// Connect to the Apple Push Notification Service
$push->connect();
// Instantiate a new Message with a single recipient
$message = new ApnsPHP_Message('PUT_HERE_DEVICE_TOKEN');
// Set a custom identifier. To get back this identifier use the getCustomIdentifier() method
// over a ApnsPHP_Message object retrieved with the getErrors() message.
$message->setCustomIdentifier("Message-Badge-3");
// Set badge icon to "1"
$message->setBadge(1);
// Set a simple welcome text
$message->setText('Hello APNs-enabled device!');
// Play the default sound
$message->setSound();
// Set a custom property
$message->setCustomProperty('acme2', array('bang', 'whiz'));
// Set another custom property
$message->setCustomProperty('acme3', array('bing', 'bong'));
// Set the expiry value to 30 seconds
$message->setExpiry(30);
// Add the message to the message queue
$push->add($message);
// Send all messages in the message queue
$push->send();
// Disconnect from the Apple Push Notification Service
$push->disconnect();
// Examine the error message container
$aErrorQueue = $push->getErrors();
if (!empty($aErrorQueue)) {
var_dump($aErrorQueue);
}
?>
This code of notification is of APNS library.You can see here : APNS_PHP