-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Google Play Game Services Android Blinking fixed thanks to cocos2d/cocos2d-x#5320 AdMob added JNIHelpers add pragma validation just for android and can include on xcode project.
- Loading branch information
Showing
153 changed files
with
7,778 additions
and
164 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+875 Bytes
(100%)
...s.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
23 changes: 23 additions & 0 deletions
23
...layGameServices.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Bucket | ||
type = "1" | ||
version = "2.0"> | ||
<Breakpoints> | ||
<BreakpointProxy | ||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
<BreakpointContent | ||
shouldBeEnabled = "No" | ||
ignoreCount = "0" | ||
continueAfterRunningActions = "No" | ||
filePath = "GooglePlayGameServices/Classes/NativeUtils.cpp" | ||
timestampString = "419211654.663543" | ||
startingColumnNumber = "9223372036854775807" | ||
endingColumnNumber = "9223372036854775807" | ||
startingLineNumber = "117" | ||
endingLineNumber = "117" | ||
landmarkName = "NativeUtils::showLeaderboards()" | ||
landmarkType = "5"> | ||
</BreakpointContent> | ||
</BreakpointProxy> | ||
</Breakpoints> | ||
</Bucket> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// AdMobConstants.h | ||
// GooglePlayGameServices | ||
// | ||
// Created by Carlos Pinan on 14/04/14. | ||
// | ||
// | ||
|
||
#ifndef GooglePlayGameServices_AdMobConstants_h | ||
#define GooglePlayGameServices_AdMobConstants_h | ||
|
||
#define MY_BANNER_UNIT_ID "ca-app-pub-3855348217239115/3776780188" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// AdMobBannerView.h | ||
// BTEndlessTunnel | ||
// | ||
// Created by NSS on 4/8/14. | ||
// | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import <GADBannerView.h> | ||
|
||
@interface AdMobBannerView : UIViewController | ||
{ | ||
GADBannerView* bannerView_; | ||
} | ||
|
||
-(void)show; | ||
-(void)hide; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// | ||
// AdMobBannerView.m | ||
// BTEndlessTunnel | ||
// | ||
// Created by NSS on 4/8/14. | ||
// | ||
// | ||
|
||
#import "AdMobBannerView.h" | ||
#import "AdMobConstants.h" | ||
#import "cocos2d.h" | ||
|
||
@implementation AdMobBannerView | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
NSLog(@"View Did Load AdMobBanner"); | ||
// Do any additional setup after loading the view. | ||
|
||
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; | ||
bannerView_.adUnitID = [NSString stringWithUTF8String:MY_BANNER_UNIT_ID]; | ||
bannerView_.rootViewController = self; | ||
bannerView_.adSize = kGADAdSizeSmartBannerLandscape; | ||
bannerView_.translatesAutoresizingMaskIntoConstraints = YES; | ||
|
||
[self.view addSubview:bannerView_]; | ||
|
||
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:bannerView_ attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0]]; | ||
|
||
//cocos2d::CCSize size = cocos2d::CCDirector::sharedDirector()->getOpenGLView()->getFrameSize(); | ||
//bannerView_.frame = CGRectMake(0, 0, size.width, size.height * 0.1f); | ||
|
||
[bannerView_ loadRequest:[GADRequest request]]; | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
bannerView_.delegate = nil; | ||
[bannerView_ release]; | ||
[super dealloc]; | ||
} | ||
|
||
- (void)hide | ||
{ | ||
if(!self.view.hidden) | ||
self.view.hidden = YES; | ||
} | ||
|
||
- (void)show | ||
{ | ||
if(self.view.hidden) | ||
self.view.hidden = NO; | ||
} | ||
|
||
/* | ||
#pragma mark - Navigation | ||
// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | ||
{ | ||
// Get the new view controller using [segue destinationViewController]. | ||
// Pass the selected object to the new view controller. | ||
} | ||
*/ | ||
|
||
@end |
Oops, something went wrong.