Hello
@ar2rsawseenI'm trying to build the Gideros Player for an iOS device with the Ads interface and I'm stuck with an error.
When building the project XCode fails with a semantic issue : "Use of undeclared identifier 'NSFoundationVersionNumber_iOS_6_1' at "Adslad.m".
Here is the code:
"
-(void)loadAd:(NSMutableArray*)parameters{
NSString *type = [parameters objectAtIndex:0];
if ([type isEqualToString:
@interstitial]) {
HERE ==> if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1 || [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
ADInterstitialAd *interstitial_ = [[ADInterstitialAd alloc] init];
interstitial_.delegate = self;
AdsStateChangeListener *listener = [[AdsStateChangeListener alloc] init];
[listener setShow:^(){
[AdsClass adDisplayed:[self class] forType:type];
[interstitial_ presentFromViewController:[AdsClass getRootViewController]];
}];
"
The XCode version is 4.5.1 (4G1004).
EDIT: I've found that in the NSObjCRuntime.h the entry required for "NSFoundationVersionNumber_iOS_6_1" is missing...
I suppose I have to update the XCode version? I don't want to update it because until now all is working...
Please, let me know.
Thanks.
Comments
The solution would be to change the code like this:
- if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) ...
+ if (floor(NSFoundationVersionNumber) > 993.0) ...
Regards,
SimplesApps.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
Now error for HeyZap at the linking phase:
Undefined symbols for architecture armv7:
"_MPMoviePlayerLoadStateDidChangeNotification", referenced from:
-[HZVideoView registerForNotifications] in HeyzapAds(HZVideoView.o)
"_MPMoviePlayerPlaybackStateDidChangeNotification", referenced from:
-[HZVideoView registerForNotifications] in HeyzapAds(HZVideoView.o)
"_MPMoviePlayerScalingModeDidChangeNotification", referenced from:
-[HZVideoView registerForNotifications] in HeyzapAds(HZVideoView.o)
"_MPMoviePlayerReadyForDisplayDidChangeNotification", referenced from:
-[HZVideoView registerForNotifications] in HeyzapAds(HZVideoView.o)
"_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
-[HZVideoView registerForNotifications] in HeyzapAds(HZVideoView.o)
"_MPMoviePlayerNowPlayingMovieDidChangeNotification", referenced from:
-[HZVideoView registerForNotifications] in HeyzapAds(HZVideoView.o)
"_MPMoviePlayerPlaybackDidFinishReasonUserInfoKey", referenced from:
-[HZVideoView mediaPlayerPlaybackDidFinish:] in HeyzapAds(HZVideoView.o)
"_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
objc-class-ref in HeyzapAds(HZVideoView.o)
"_MPMovieDurationAvailableNotification", referenced from:
-[HZVideoView registerForNotifications] in HeyzapAds(HZVideoView.o)
ld: symbol(s) not found for architecture armv7
Which is the solution here?
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
About the second one, check that you have all required linker flags and linked libraries from this table:
http://docs.giderosmobile.com/interface/ads
(Installation IOS) find your ad interface in the table and add all required frameworks and linker flags. There is a description on how to do that in the top of the table
Sorry I'm just not at Mac (and won't be for some time), so I can
If you done it already, than maybe something have changed and is missing in the docs.
For example, MPMoviePlayer most probably refers to MediaPlayer.framework
Checking the table MediaPlayer.framework is missing for HeyZap.
Added to the XCode project and now the building is ok.
Next..., now trying to add an Admob banner to the game but I have an error (from the Listener)
"Admob AD_FAILED Request Error: Invalid ad request parameter(s).
Admob AD_DISMISSED"
After executing this:
...
admob = Ads.new("admob")
admob:setKey(...)
admob:enableTesting()
admob:setAlignment("left", "bottom")
admob:showAd("banner")
What it's wrong here?
Thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
I see in the XCode console that "Test ads are only available on iOS 6+" ... I'm testing with a iOS 5.1 device...
Another warning in the console:
"Google Mobile Ads SDK: You are currently using 6.8.0 of the SDK. A new version, 6.9.2, is available at http://goo.gl/Zc0BYt . Please consider updating your SDK to get the latest features and bug fixes."
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
And yes I'm waiting for chartboost to release new Android SDK and then start updating all ads interfaces, but I think that you can simply update admob SDK and it should work with same AdsInterface without changes
I tried it and this error is issued:
"
Invalid Request: {
"base_uri" = "http:";
errors = "Cannot determine request type. Is your ad unit id correct?";
"google.afma.Notify_dt" = ... ;
"request_id" = 1;
"request_scenario" = "online_request";
type = unknown;
"use_webview_loadurl" = 0;
}
"
What I'm doing wrong?
Thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
http://stackoverflow.com/questions/19163291/invalid-unknown-request-error-cannot-determine-request-type-is-this-ad-unit-id
like:
I continue the process... Although I set alignment left & bottom the banner appears left & top... If I set position to (0,0) or (0,max_height) the banner appears also in the top-left corner.
My game is in landscape mode and I'm using the GiderosPlayer in the device to test it.
What's wrong now?
Many thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
I set it in the listener function for the AD_RECEIVED but I have to do when the app starts (in the main). If I set afterwards then the ad appears upper (not bottom as I want) or vertically (not horizontally).
Another thing is the size. Is there any way to know the ad size in order to set it with the correct position in the screen?
Thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
I tested with 2 banners (admob) and only the last one is showed.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
I continue testing the ads plugin. There are strange behaviours.
For example, for the Admob banner the first time the app is executed the banner appears vertically although is under Landscape mode. I have to move the device in order the banner change to the horizontally coordinates.
I test it with the Gideros Player. I don't know if it's a bug of the player or what.
@ar2rsawseen Do you know?
Thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
Enable auto rotation for ios in project settings and in xcode select only landscape orientations.
About Gideros player for now I think you can't limit Player's orientation (you can limit only when not in player mode) or it will result in error
The first time the app is executed after building against the device, the ad banner appears vertical disposed (like in portrait) but the rest of the images is in lanscape mode. After move the device the ad banner goes to horizontal orientation (the banner only the other images are ok).
I don't know if will be ok with the app running in the device (without the Gigeros player).
The problem appears to be with any framework, I tested with admob & iAd.
I show the banner with "ad:showAd("banner")" not with "ad:showAd("auto").
I attach a screenshot with the case.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
Then you have autorotation enabled
Then in xcode you have landscapes only selected (and portraits deselected) on both iPhone and iPad tabs?
but most probably yes, it is Gideros Player issue, because player it self was designed to work in any orientation
In my Gideros project settings I have Landscape left and 768 (width) x1024 (height) as logical dimensions. This setting works as Landscape because I set the images position related to these logical dimensions. Although it would be logical to have 1024x768.
Therefore I assume the ads will be well positioned with the app (without the player).
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989