Was just wondering if anyone has implemented iad into a SDL 1.3 game? I was looking at all the code snippets and didn’t know where to begin. I know in a standard ios app you would add the iad frame work then set up the banner in your view controller.
Ok so Ive tested my code out in a non sdl ios app and the test iad banner shows up fine. But when I put it in the UIkitviewcontroller.h and .m files the banner doesnt show up. It compiles with no errors or warnings but I think it has somthing to do with the sdl window. Any help or input would be a great help.
cory_mcm <cory_mcm hotmail.com> writes:
Ok so Ive tested my code out in a non sdl ios app and the test iad banner
shows up fine. But when I put it in the UIkitviewcontroller.h and .m files the
banner doesnt show up. It compiles with no errors or warnings but I think it has
somthing to do with the sdl window. Any help or input would be a great help.
SDL mailing list
SDL lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
I also started trying that right now. any progress for you? Post back if you
make it successfully integrated.
cory_mcm <cory_mcm hotmail.com> writes:
Ok so Ive tested my code out in a non sdl ios app and the test iad banner
shows up fine. But when I put it in the UIkitviewcontroller.h and .m files the
banner doesnt show up. It compiles with no errors or warnings but I think it has
somthing to do with the sdl window. Any help or input would be a great help.
SDL mailing list
SDL lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
http://forums.libsdl.org/viewtopic.php?t=7352&sid=6b714337317597eaca026ae6be968b3e
please take a look. not sure it will help you or not.
void CGameCenter_ShowLeaderBoard (void )
{
SDL_SysWMinfo info;
SDL_VERSION( &info.version );
SDL_Window* window = SDL_GetFocusWindow();
if( SDL_GetWindowWMInfo( window, &info ) )
{
UIWindow* uiWindow = (UIWindow*)info.info.uikit.window;
UIView* view = [uiWindow.subviews objectAtIndex:0];
id nextResponder = [view nextResponder];
if( [nextResponder isKindOfClass:[UIViewController class]] )
{
UIViewController* viewController =
(UIViewController*)nextResponder;
// You can do some terrifying things with Objective-C
//NSString* className = [NSString stringWithUTF8String:viewName];
GKLeaderboardViewController *leaderboardController =
[[GKLeaderboardViewController alloc] init];
if (leaderboardController != NULL)
{
//leaderboardController.category = self.currentLeaderBoard;
leaderboardController.timeScope = GKLeaderboardTimeScopeAllTime;
leaderboardController.leaderboardDelegate = pGameCenterManager;
[viewController presentModalViewController:
leaderboardController animated:YES];
}
}
}
}