Skip to content

Commit

Permalink
Merge pull request #42 from hansemannn/MOD-2182
Browse files Browse the repository at this point in the history
[MOD-2182] Update Ti.Admob to work with iOS 8+, update iOS SDK to 7.6.0
  • Loading branch information
AngelkPetkov committed Jan 28, 2016
2 parents 5e45e75 + 941dc1d commit 7370f60
Show file tree
Hide file tree
Showing 86 changed files with 2,503 additions and 474 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
tmp
bin
build
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
language: objective-c
osx_image: xcode7.1
env:
global:
- "MODULE_NAME=ti.redlaser"
global:
- "ARTIFACTS_AWS_REGION=us-east-1"
- "ARTIFACTS_S3_BUCKET=builds.appcelerator.com"
- "MODULE_NAME=ti.admob"
before_install:
- MODULE_ROOT=$PWD
install:
- cd $MODULE_ROOT
- curl -o install.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/install.sh
- source install.sh
script:
- curl -o install.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/install.sh #change this to appcelerator-modules once PR has been merged
- source install.sh -s "--branch 5_1_X"
script:
- curl -o script.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/script.sh
- source script.sh
after_success: # and this only on success
- curl -o deploy.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/deploy.sh
- source deploy.sh
- curl -o deploy.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/deploy.sh
- source deploy.sh
2 changes: 1 addition & 1 deletion ios/Classes/TiAdmobModule.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2010-2013 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2010-2015 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
Expand Down
11 changes: 8 additions & 3 deletions ios/Classes/TiAdmobModule.m
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2010-2013 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2010-2015 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/

#import "TiAdmobModule.h"
#import "TiAdmobTypes.h"
#import "TiBase.h"
#import "TiHost.h"
#import "TiUtils.h"
#import "GADRequest.h"
#import <GoogleMobileAds/GoogleMobileAds.h>

@implementation TiAdmobModule

Expand Down Expand Up @@ -65,6 +66,10 @@ -(void)didReceiveMemoryWarning:(NSNotification*)notification

#pragma mark Constants

MAKE_SYSTEM_STR(SIMULATOR_ID,GAD_SIMULATOR_ID);
MAKE_SYSTEM_STR(SIMULATOR_ID, kGADSimulatorID);
MAKE_SYSTEM_PROP(GENDER_MALE, kGADGenderMale);
MAKE_SYSTEM_PROP(GENDER_FEMALE, kGADGenderFemale);
MAKE_SYSTEM_PROP(AD_TYPE_BANNER, TiAdmobAdTypeBanner);
MAKE_SYSTEM_PROP(AD_TYPE_INTERSTITIAL, TiAdmobAdTypeInterstitial)

@end
13 changes: 13 additions & 0 deletions ios/Classes/TiAdmobTypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2010-2015 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/

#import <Foundation/Foundation.h>

NS_ENUM(NSUInteger, TiAdmobAdType) {
TiAdmobAdTypeBanner = 0,
TiAdmobAdTypeInterstitial
};
49 changes: 42 additions & 7 deletions ios/Classes/TiAdmobView.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,53 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2010-2013 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2010-2015 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/

#import "TiUIView.h"
#import "GADBannerView.h"
#import "GADBannerViewDelegate.h"
#import <GoogleMobileAds/GoogleMobileAds.h>

@interface TiAdmobView : TiUIView<GADBannerViewDelegate> {

@private
GADBannerView *ad;
@interface TiAdmobView : TiUIView<GADBannerViewDelegate, GADInterstitialDelegate, GADInAppPurchaseDelegate> {
GADBannerView *bannerView;
GADInterstitial *interstitial;
GADRequest *request;
}

- (void)initialize;

- (void)showInterstitial;

- (void)setAdUnitId_:(id)value;

- (void)setKeywords_:(id)value;

- (void)setDateOfBirth_:(id)value;

- (void)setTestDevices_:(id)value;

- (void)setAdBackgroundColor_:(id)value;

- (void)setTagForChildDirectedTreatment_:(id)value;

- (void)setRequestAgent_:(id)value;

- (void)setContentURL_:(id)value;

- (void)setExtras_:(id)args;

- (void)setGender_:(id)value;

- (void)setLocation_:(id)args;

- (void)setPublisherId_:(id)value;

- (void)setTesting_:(id)value;

- (GADBannerView*)bannerView;

- (GADInterstitial*)interstitial;

- (GADRequest*)request;

@end
Loading

0 comments on commit 7370f60

Please sign in to comment.