diff --git a/Classes/FontCollection.m b/Classes/FontCollection.m index 6df6313..61b2fa0 100644 --- a/Classes/FontCollection.m +++ b/Classes/FontCollection.m @@ -6,7 +6,7 @@ @implementation FontCollection /* Applier function for font dictionaries */ void didScanFont(const char *key, CGPDFObjectRef object, void *collection) { - if (!CGPDFObjectGetType(object) == kCGPDFObjectTypeDictionary) return; + if (CGPDFObjectGetType(object) != kCGPDFObjectTypeDictionary) return; CGPDFDictionaryRef dict; if (!CGPDFObjectGetValue(object, kCGPDFObjectTypeDictionary, &dict)) return; Font *font = [Font fontWithDictionary:dict]; diff --git a/Classes/NSString+WAURLString.m b/Classes/NSString+WAURLString.m index 66ad3a7..531518f 100644 --- a/Classes/NSString+WAURLString.m +++ b/Classes/NSString+WAURLString.m @@ -614,7 +614,7 @@ - (NSString *) titleWithSubscriptionLengthForAppStoreProductId:(NSString*)theId{ if ([theId isEqualToString:[@"MonthlySubscription" appStoreProductIDForLibrelioProductID]] ) ret = [NSString stringWithFormat:@"%@ 1 %@",ret,[[NSBundle mainBundle]stringForKey:@"month"]]; if ([theId isEqualToString:[@"QuarterlySubscription" appStoreProductIDForLibrelioProductID]] ) ret = [NSString stringWithFormat:@"%@ 3 %@",ret,[[NSBundle mainBundle]stringForKey:@"months"]]; if ([theId isEqualToString:[@"HalfYearlySubscription" appStoreProductIDForLibrelioProductID]]||[shortId isEqualToString:@"HalfYearlySubscription2"]||[theId isEqualToString:@"HalfYearlySubscription3"] ) ret = [NSString stringWithFormat:@"%@ 6 %@",ret,[[NSBundle mainBundle]stringForKey:@"months"]]; - if ([theId isEqualToString:[@"YearlySubscription" appStoreProductIDForLibrelioProductID]]||[shortId isEqualToString:@"YearlySubscription2"] ) ret = [NSString stringWithFormat:@"%@ 1 %@",ret,[[NSBundle mainBundle]stringForKey:@"year"]]; + if ([theId isEqualToString:[@"YearlySubscription" appStoreProductIDForLibrelioProductID]]||[shortId isEqualToString:@"YearlySubscription2"] ) ret = [NSString stringWithFormat:@"%@ 1 %@",ret,[[NSBundle mainBundle]stringForKey:@"year"]]; return ret; } @@ -635,12 +635,7 @@ - (NSString*) receiptForUrlString{ if (![tempReceipt isEqualToString:invalidReceipt])receipt = tempReceipt; } } - //If no receipt was found, check whether user has entered a Subscription code - if (!receipt) receipt = [[NSUserDefaults standardUserDefaults] objectForKey:@"Subscription-code"]; - //If no receipt was found, finally check whether user has entered a username and password - if (!receipt) receipt = [[NSUserDefaults standardUserDefaults] objectForKey:@"Username"]; - //SLog( @"Will return receipt ___ %@ ____",receipt); - return (receipt); + return (receipt); } diff --git a/Classes/SHKActivityIndicator.h b/Classes/SHKActivityIndicator.h index bacafc6..ee3f8bf 100644 --- a/Classes/SHKActivityIndicator.h +++ b/Classes/SHKActivityIndicator.h @@ -40,6 +40,7 @@ @property (nonatomic, retain) UILabel *subMessageLabel; @property (nonatomic, retain) UIActivityIndicatorView *spinner; +@property (nonatomic, assign) Boolean mustBeShown; + (SHKActivityIndicator *)currentIndicator; @@ -57,5 +58,6 @@ - (void)hideSpinner; - (void)setProperRotation; - (void)setProperRotation:(BOOL)animated; +- (void)maintain; @end diff --git a/Classes/SHKActivityIndicator.m b/Classes/SHKActivityIndicator.m index da7f925..279fe18 100644 --- a/Classes/SHKActivityIndicator.m +++ b/Classes/SHKActivityIndicator.m @@ -98,6 +98,7 @@ - (void)show self.alpha = 1; [UIView commitAnimations]; + self.mustBeShown = true; } - (void)hideAfterDelay @@ -115,6 +116,7 @@ - (void)hide self.alpha = 0; [UIView commitAnimations]; + self.mustBeShown = false; } - (void)persist @@ -152,6 +154,16 @@ - (void)displayActivity:(NSString *)m [self persist]; } +- (void)maintain { + if (self.mustBeShown){ + [self show]; + [NSTimer scheduledTimerWithTimeInterval:0.1f target:self selector:@selector(maintain) userInfo:nil repeats:NO]; + } else { + [self hide]; + } +} + + - (void)displayCompleted:(NSString *)m { [self setCenterMessage:@"✓"]; diff --git a/Classes/WAAdView.m b/Classes/WAAdView.m index 1741d4e..92f9e73 100644 --- a/Classes/WAAdView.m +++ b/Classes/WAAdView.m @@ -49,12 +49,9 @@ - (void) setUrlString: (NSString *) theString NSString * shortUnitId = [[urlString noArgsPartOfUrlString] lastPathComponent]; //SLog (@"url: %@, short:%@",urlString,shortUnitId); self.adUnitID = [DfpPrefix completeAdUnitCodeForShortCode:shortUnitId]; - //self.adUnitID = @"/6499/example/banner"; - //self.adUnitID = @"/166877488/test3"; + //self.adUnitID = @"ca-app-pub-3940256099942544/2934735716";//This is for testing self.delegate = self; //SLog(@"self.adUnitID %@",self.adUnitID); - //GADRequest *request = [GADRequest request]; - //request.testDevices = @[ GAD_SIMULATOR_ID ]; [self loadRequest:[DFPRequest request]]; diff --git a/Classes/WAAppDelegate.m b/Classes/WAAppDelegate.m index 26c9338..7e794c9 100644 --- a/Classes/WAAppDelegate.m +++ b/Classes/WAAppDelegate.m @@ -1,4 +1,4 @@ -// Copyright 2011 WidgetAvenue - Librelio. All rights reserved. + // Copyright 2011 WidgetAvenue - Librelio. All rights reserved. #import "WAAppDelegate.h" @@ -14,7 +14,8 @@ #import "WADocumentDownloadsManager.h" #import "WANewsstandIssueDownloader.h" - +#import +#import #import "GAI.h" #import "GAIDictionaryBuilder.h" @@ -34,6 +35,8 @@ @implementation WAAppDelegate @synthesize apnsSubDelegate; @synthesize metadataQuery; +static bool neverBecameActive = true; + //////////////////////////////////////////////////////////////////////////////// @@ -118,7 +121,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [self createRootViewController]; //SLog(@"Did updateRootViewController"); - + [Fabric with:@[[Crashlytics class]]]; //Notify appirater that launching is finished [Appirater appLaunched:YES]; @@ -137,19 +140,21 @@ - (void)applicationDidBecomeActive:(UIApplication *)application { //Request ad if appropriate; this needs to be done here (and not in "didFinishLaunchingWithOptions") so that the ad is also displayed when the app awakes from background NSDictionary * app_Dic = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathOfFileWithUrl:@"Application_.plist"]]; NSString * DfpPrefix = [app_Dic objectForKey:@"DfpPrefix"]; - if (DfpPrefix){ - self.startInterstitial = [[DFPInterstitial alloc] init]; + if (DfpPrefix && neverBecameActive){ + neverBecameActive = false; NSString * shortUnitId = @"startup";//startup is the code for startup instertitials - self.startInterstitial.adUnitID = [DfpPrefix completeAdUnitCodeForShortCode:shortUnitId]; + self.startInterstitial = [[DFPInterstitial alloc] initWithAdUnitID:[DfpPrefix completeAdUnitCodeForShortCode:shortUnitId]]; + //self.startInterstitial = [[DFPInterstitial alloc] initWithAdUnitID:@"/6499/example/interstitial"]; + + //self.startInterstitial = [[GADInterstitial alloc] initWithAdUnitID:@"ca-app-pub-3940256099942544/4411468910"];//For testing + //self.startInterstitial.adUnitID = @"/6499/example/interstitial"; //self.startInterstitial.adUnitID = @"/166877488/developer_wind_i000"; //SLog(@"unitId:%@",startInterstitial.adUnitID); - self.startInterstitial.delegate = self; - [self.startInterstitial loadRequest:[DFPRequest request]]; - - - - + self.startInterstitial.delegate = self; + GADRequest *request = [GADRequest request]; + // Requests test ads on simulators. + [self.startInterstitial loadRequest:request]; } @@ -625,14 +630,15 @@ - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectView #pragma mark #pragma mark GADInterstitialDelegate implementation - (void)interstitialDidReceiveAd:(DFPInterstitial *)ad { - //SLog(@"Received ad successfully %@",ad); - [startInterstitial presentFromRootViewController:rootViewController]; + //SLog(@"Received ad successfully %@",ad); + [ad presentFromRootViewController:rootViewController]; + // [startInterstitial] } - (void)interstitial:(DFPInterstitial *)interstitial didFailToReceiveAdWithError:(GADRequestError *)error { - //SLog(@"interstitialDidFailToReceiveAdWithError: %@ for interstitial adunit%@", [error localizedDescription],interstitial.adUnitID); + NSLog(@"interstitialDidFailToReceiveAdWithError: %@ for interstitial adunit%@", [error localizedDescription],interstitial.adUnitID); } - (void)interstitialDidDismissScreen:(DFPInterstitial *)interstitial { diff --git a/Classes/WAAtomParser.m b/Classes/WAAtomParser.m index ed8f21c..4ffcefc 100644 --- a/Classes/WAAtomParser.m +++ b/Classes/WAAtomParser.m @@ -22,8 +22,11 @@ - (void) setUrlString: (NSString *) theString //SLog(@"Started Atom parser"); urlString = [[NSString alloc]initWithString: theString]; NSData * feedData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathOfFileWithUrl:urlString]]; - doc = xmlReadMemory([feedData bytes], [feedData length], "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR); - xpathCtx = xmlXPathNewContext(doc); + /* FIX : Issue #4 + / Adding a cast to an unsigned 32 bit integer to covert it. + */ + doc = xmlReadMemory([feedData bytes], (int32_t)[feedData length], "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR); + xpathCtx = xmlXPathNewContext(doc); xmlXPathRegisterNs(xpathCtx, (xmlChar *)"a", (xmlChar *)"http://www.w3.org/2005/Atom"); } diff --git a/Classes/WABuyView.m b/Classes/WABuyView.m index 29216d7..279606d 100644 --- a/Classes/WABuyView.m +++ b/Classes/WABuyView.m @@ -1,4 +1,4 @@ -// Copyright 2011 WidgetAvenue - Librelio. All rights reserved. + // Copyright 2011 WidgetAvenue - Librelio. All rights reserved. #import "WABuyView.h" @@ -9,6 +9,7 @@ #import "UIView+WAModuleView.m" #import "WADocumentDownloadsManager.h" +#import "ChevalMag-Swift.h" #import "SHKActivityIndicator.h" @@ -42,13 +43,20 @@ - (void) setUrlString: (NSString *) theString urlString = [[NSString alloc]initWithString: theString]; - NSString * receipt = [urlString receiptForUrlString]; + NSString * credential = [urlString receiptForUrlString]; + + //If no receipt was found, check whether user has entered a Subscription code + if (!credential) credential = [[NSUserDefaults standardUserDefaults] objectForKey:@"Subscription-code"]; + //If no receipt was found, finally check whether user has entered a username and password + if (!credential) credential = [[NSUserDefaults standardUserDefaults] objectForKey:@"Username"]; + //SLog( @"Will return receipt ___ %@ ____",receipt); + NSString * login = [urlString valueOfParameterInUrlStringforKey:@"walogin"]; - if (receipt){ - //We have a receipt, proceed to download + if (credential){ + //We have a credential, proceed to download [self startDownloadOrCheckCredentials]; } else if ([WAUtilities featuresInApps]&&!login) { @@ -124,7 +132,7 @@ - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProdu //SLog(@"found %@, looking for %@",[product productIdentifier],productId); if ([[productId appStoreProductIDForLibrelioProductID]isEqualToString:[product productIdentifier]]){ //SLog(@"will try to buy %@",product); - [self orderProduct:product]; + [self confirmOrder:product]; } @@ -159,9 +167,6 @@ - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProdu NSString * completeTitle = [product.localizedTitle titleWithSubscriptionLengthForAppStoreProductId:product.productIdentifier] ; [actionSheet addButtonWithTitle:[NSString stringWithFormat:@"%@: %@",completeTitle, formattedString]]; - - - ; } //Add a Restore my purchases button NSString * locTitle0 = [[NSBundle mainBundle]stringForKey:@"Restore my purchases"];//This is the default title @@ -169,8 +174,10 @@ - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProdu //Add a Code Enter button in case we have a CodeService key in Application_.plist NSString * codeService = nil ; - if (credentials) codeService = [[NSDictionary dictionaryWithContentsOfFile:credentials]objectForKey:@"CodeService"]; - if (codeService) { + if (credentials) { + codeService = [[NSDictionary dictionaryWithContentsOfFile:credentials]objectForKey:@"CodeService"]; + } + if (codeService) { //SLog(@"Code Hash:%@",codeHash); subscriberCodeTitle = [[NSBundle mainBundle]stringForKey:@"I have a subscriber code"]; [actionSheet addButtonWithTitle:subscriberCodeTitle]; @@ -239,7 +246,10 @@ - (void)request:(SKRequest *)request didFailWithError:(NSError *)error { #pragma mark UIActionSheet protocol - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{ - + /*selectedProductIndex = buttonIndex; + subscriptionPressedButtonLabel = [actionSheet buttonTitleAtIndex:buttonIndex]; + [self diplayCGUAlert];*/ + NSString *buttonTitle = [actionSheet buttonTitleAtIndex:buttonIndex]; if (buttonIndex == actionSheet.numberOfButtons-1){ //The cancel button was clicked @@ -255,12 +265,30 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger //The enter username and password button was clicked [self createUsernamePasswordAlert]; } else { - [self orderProduct:[products objectAtIndex:buttonIndex]]; - + [self confirmOrder:[products objectAtIndex:buttonIndex]]; } +} - + + +- (void)diplayCGUAlert:(SKProduct*)product +{ + NSString* EULAStr = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"EULAStr"]; + UIAlertController* alert = [UIAlertController alertControllerWithTitle:[[NSBundle mainBundle]stringForKey:@"CGU"] + message:EULAStr + preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* okAction = [UIAlertAction actionWithTitle:[[NSBundle mainBundle]stringForKey:@"J'accepte"] style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + [self orderProduct:product]; + }]; + UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:[[NSBundle mainBundle]stringForKey:@"Annuler"] style:UIAlertActionStyleCancel + handler:^(UIAlertAction * action) { + + }]; + [alert addAction:cancelAction]; + [alert addAction:okAction]; + [currentViewController presentViewController:alert animated:YES completion:nil]; } #pragma mark - @@ -271,24 +299,23 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto //Cancel button was clicked [self removeFromSuperview]; } - - if (alertView.tag == 1 && buttonIndex == 1) { + + if (alertView.tag == 1 && buttonIndex == 1) { //OK button was clicked in password only alert - UITextField *psField = [alertView textFieldAtIndex:0]; - [[NSUserDefaults standardUserDefaults] setObject:[psField text] forKey:@"Subscription-code"]; + UITextField *psField = [alertView textFieldAtIndex:0]; + [[NSUserDefaults standardUserDefaults] setObject:[psField text] forKey:@"Subscription-code"]; - [self startDownloadOrCheckCredentials]; + [self startDownloadOrCheckCredentials]; } - if (alertView.tag == 2 && buttonIndex == 1) { + if (alertView.tag == 2 && buttonIndex == 1) { //OK button was clicked in username + password alart - UITextField *usernameField = [alertView textFieldAtIndex:0]; - UITextField *passwordField = [alertView textFieldAtIndex:1]; - [[NSUserDefaults standardUserDefaults] setObject:[usernameField text] forKey:@"Username"]; - [[NSUserDefaults standardUserDefaults] setObject:[passwordField text] forKey:@"Password"]; + UITextField *usernameField = [alertView textFieldAtIndex:0]; + UITextField *passwordField = [alertView textFieldAtIndex:1]; + [[NSUserDefaults standardUserDefaults] setObject:[usernameField text] forKey:@"Username"]; + [[NSUserDefaults standardUserDefaults] setObject:[passwordField text] forKey:@"Password"]; [self startDownloadOrCheckCredentials]; } - } - (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView @@ -565,16 +592,40 @@ - (void) requestProducts{ } +- (void) confirmOrder:(SKProduct*)product { + if ([[product.productIdentifier lowercaseString] containsString:@"subscription"]) { + [self performSelector:@selector(showConfirmOrder:) withObject:product afterDelay:0.0]; + //[currentViewController presentViewController:alert animated:YES completion:nil]; + } else { + [self orderProduct:product]; + } +} + +- (void)showConfirmOrder:(SKProduct*) product +{ + cguViewController *cgu = [[cguViewController alloc] initWithNibName:@"cguViewController" bundle:nil]; + cgu.product = product; + cgu.buyView = self; + + //Format the price + NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; + [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4]; + [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; + [numberFormatter setLocale:product.priceLocale]; + NSString *formattedString = [numberFormatter stringFromNumber:product.price]; + [numberFormatter release]; + //Append duration to description if needed + NSString * completeTitle = [product.localizedTitle titleWithSubscriptionLengthForAppStoreProductId:product.productIdentifier] ; + + cgu.titleProduct = [NSString stringWithFormat:@"%@: %@",completeTitle, formattedString]; + + [currentViewController presentViewController:cgu animated:YES completion:nil]; +} + - (void) orderProduct:(SKProduct*)product{ - //Slog(@"Will order product %@ %@",product,product.productIdentifier); - //NSString * itemID = product.productIdentifier; - //SKPayment *payment = [SKPayment paymentWithProductIdentifier:itemID]; - SKPayment * payment = [SKPayment paymentWithProduct:product]; + SKPayment * payment = [SKPayment paymentWithProduct:product]; // Add storeObserver in LibrelioAppDelegate [[SKPaymentQueue defaultQueue] addPayment:payment]; - - - } diff --git a/Classes/WADocumentDownloader.m b/Classes/WADocumentDownloader.m index 784bf19..1b17b25 100644 --- a/Classes/WADocumentDownloader.m +++ b/Classes/WADocumentDownloader.m @@ -126,13 +126,14 @@ - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)err //If a 403 status code is received, trigger didReceiveAuthenticationChallenge //if ([response statusCode]==403) [self didReceiveAuthenticationChallenge:nil forConnection:connection]; - if ([httpStatus isEqualToString:@"403"]){ - [self connection:connection didReceiveAuthenticationChallenge:nil]; + else if ([httpStatus isEqualToString:@"403"]){ + NSURLAuthenticationChallenge * challengeNul; + [self connection:connection didReceiveAuthenticationChallenge:challengeNul]; return; } //If a status code 402 is returned, it comes from appstoreV2.php, and means that the credentails were not fine - if ([httpStatus isEqualToString:@"402"]){ + else if ([httpStatus isEqualToString:@"402"]){ [connection cancel]; //Remove the json certificate from the standard user defaults, since it is not or no longer valid NSString * connUrl = [WAUtilities completeCheckAppStoreUrlforUrlString:currentUrlString]; @@ -143,14 +144,14 @@ - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)err } //If a status code 401 is returned, it comes from pswd.php, and means that the credentials were not fine - if ([httpStatus isEqualToString:@"401"]){ + else if ([httpStatus isEqualToString:@"401"]){ [connection cancel]; //Remove the subscription code from the standard user defaults, since they are no longer valid [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"Subscription-code"]; } //If a status code 461 is returned, it comes from subscribers.php, and means that the credentials were not fine - if ([httpStatus isEqualToString:@"461"]){ + else if ([httpStatus isEqualToString:@"461"]){ [connection cancel]; //Remove the username and password from the standard user defaults, since they are no longer valid [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"Username"]; @@ -158,7 +159,7 @@ - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)err } //If a status code 462 is returned, wipe credentials or store invalid receiptso that issue can be bought - if ([httpStatus isEqualToString:@"462"]){ + else if ([httpStatus isEqualToString:@"462"]){ [connection cancel]; //Wipe credentials @@ -180,6 +181,10 @@ - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)err + } else if (error.code == NSURLErrorCancelled) { + httpStatus = @"-999"; + } else if (error.code == NSURLErrorNotConnectedToInternet) { + httpStatus = @"-1009"; } diff --git a/Classes/WADownloadingView.m b/Classes/WADownloadingView.m index 1080288..4ac8f39 100644 --- a/Classes/WADownloadingView.m +++ b/Classes/WADownloadingView.m @@ -239,10 +239,41 @@ - (void) didFailIssueDownloadWithNotification:(NSNotification *) notification{ if (self.hidden ==NO){ NSString * httpStatus = [notificatedDic objectForKey:@"httpStatus"]; NSString * theMessage = [[NSBundle mainBundle]stringForKey:@"Download failed, please check your connection"]; - if ([httpStatus isEqualToString:@"401"]) theMessage = [[NSBundle mainBundle]stringForKey:@"Invalid Code"]; - if ([httpStatus isEqualToString:@"462"]) theMessage = [[NSBundle mainBundle]stringForKey:@"You don't own this issue"]; - if ([httpStatus isEqualToString:@"461"]) theMessage = [[NSBundle mainBundle]stringForKey:@"Invalid Username Or Password"]; - if ([httpStatus isEqualToString:@"463"]) theMessage = [[NSBundle mainBundle]stringForKey:@"Too Many Devices"]; + + switch([httpStatus integerValue]) { + case 401: { + theMessage = [[NSBundle mainBundle]stringForKey:@"Invalid Code"]; + } + break; + + case 462: { + theMessage = [[NSBundle mainBundle]stringForKey:@"Download failed due to subscription ended"]; + } + break; + + case 461: { + theMessage = [[NSBundle mainBundle]stringForKey:@"Invalid Username Or Password"]; + } + break; + + case 463: { + theMessage = [[NSBundle mainBundle]stringForKey:@"Too Many Devices"]; + } + break; + + case -999: { + theMessage = [[NSBundle mainBundle]stringForKey:@"Download failed due to operation cancelled"]; + } + break; + + case -1019: { + theMessage = [[NSBundle mainBundle]stringForKey:@"Download failed, please check your connection"]; + } + break; + default: + break; + } + UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:theMessage delegate:self diff --git a/Classes/WAEULAPopupDelegate.h b/Classes/WAEULAPopupDelegate.h new file mode 100644 index 0000000..04018a9 --- /dev/null +++ b/Classes/WAEULAPopupDelegate.h @@ -0,0 +1,13 @@ +// +// WAEULAPopupDelegate.h +// Librelio +// +// Created by Odin on 29/05/2017. +// Copyright © 2017 WidgetAvenue - Librelio. All rights reserved. +// + +#import + +@interface WAEULAPopupDelegate : NSObject + +@end diff --git a/Classes/WAEULAPopupDelegate.m b/Classes/WAEULAPopupDelegate.m new file mode 100644 index 0000000..db755a0 --- /dev/null +++ b/Classes/WAEULAPopupDelegate.m @@ -0,0 +1,40 @@ +// +// WAEULAPopupDelegate.m +// Librelio +// +// Created by Odin on 29/05/2017. +// Copyright © 2017 WidgetAvenue - Librelio. All rights reserved. +// + +#import "WAEULAPopupDelegate.h" + + +@implementation WAEULAPopupDelegate + + +- (void)actionSheet:(UIActionSheet *)popup clickedButtonAtIndex:(NSInteger)buttonIndex { + switch (buttonIndex) { + case 0: + [[SHKActivityIndicator currentIndicator] maintain]; + break; + case 1: + if ([popup numberOfButtons] > buttonIndex + 1) { + NSLog(@"%@",@"EULAUrl"); + NSString* EULAUrl = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"EULAUrl"]; + /*NSString* EULAUrl = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"EULAUrla"]; + if (EULAUrl == nil) { + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"erreur" + message:@"L'article dépasse la taille autorisée, il est impossible de l'envoyer" delegate:self cancelButtonTitle:@"OK" + otherButtonTitles:nil, nil]; + [alert show]; + } else { + [self performMenuButtonActionsFromURL:EULAUrl]; + }*/ + [self performMenuButtonActionsFromURL:EULAUrl]; + } + default: + break; + } +} + +@end diff --git a/Classes/WAGridView.m b/Classes/WAGridView.m index 174ee08..929589c 100755 --- a/Classes/WAGridView.m +++ b/Classes/WAGridView.m @@ -284,13 +284,11 @@ - (void)moduleViewWillAppear:(BOOL)animated{ //Add subscribe button if relevant NSString * subscribeString = [WAUtilities subscribeString]; if (subscribeString){ - NSString * subscriptionAndSpaces = [NSString stringWithFormat:@"%@ ",subscribeString]; - [vc addButtonWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace orImageNamed:@"" orString:subscriptionAndSpaces andLink:@"buy://localhost/wanodownload.pdf"]; - + //NSString * subscriptionAndSpaces = [NSString stringWithFormat:@"%@ ",subscribeString]; + //[vc addButtonWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace orImageNamed:@"" orString:subscriptionAndSpaces andLink:@"buy://localhost/wanodownload.pdf"]; + [vc addMenuButtonWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace]; + } - - - } - (void) moduleViewDidAppear{ diff --git a/Classes/WAModuleViewController.h b/Classes/WAModuleViewController.h index f05373b..3e2a00b 100644 --- a/Classes/WAModuleViewController.h +++ b/Classes/WAModuleViewController.h @@ -46,6 +46,8 @@ @property (nonatomic, retain) WATransparentToolbar* rightToolBar; +@property (nonatomic, retain) id lastSender; + - (void)pushViewControllerIfNeededAndLoadModuleView; - (void) initModuleView; diff --git a/Classes/WAModuleViewController.m b/Classes/WAModuleViewController.m index 203f470..3400efa 100644 --- a/Classes/WAModuleViewController.m +++ b/Classes/WAModuleViewController.m @@ -258,59 +258,199 @@ - (void)loadModuleView{ } -(void) addButtonWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem orImageNamed:(NSString*)imageName orString:(NSString*)buttonString andLink:(NSString*)linkString;{ - // create the button - NSMutableArray* buttons = [[NSMutableArray alloc] initWithArray:rightToolBar.items]; - WABarButtonItemWithLink* bi = [[WABarButtonItemWithLink alloc] - initWithBarButtonSystemItem:systemItem target:self action:@selector(performButtonAction:)]; - bi.style = UIBarButtonItemStyleBordered; - if (systemItem == UIBarButtonSystemItemFixedSpace){ - //Conventionally, in this case, we take either an image and a string button - if (![imageName isEqualToString:@""]){ - UIImage * btnImage = [UIImage imageNamed:imageName]; - bi = [[WABarButtonItemWithLink alloc]initWithImage:btnImage style:UIBarButtonItemStyleBordered target:self action:@selector(performButtonAction:)]; - } - else{ - bi = [[WABarButtonItemWithLink alloc]initWithTitle:buttonString style:UIBarButtonItemStyleBordered target:self action:@selector(performButtonAction:)]; - } - - } - bi.link = linkString; - [buttons addObject:bi]; - [bi release]; - - - // create a spacer - WABarButtonItemWithLink* bi2 = [[WABarButtonItemWithLink alloc] - initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; - [buttons addObject:bi2]; - [bi2 release]; - - [rightToolBar setItems:buttons animated:NO]; + // create the button + NSMutableArray* buttons = [[NSMutableArray alloc] initWithArray:rightToolBar.items]; + WABarButtonItemWithLink* bi = [[WABarButtonItemWithLink alloc] + initWithBarButtonSystemItem:systemItem target:self action:@selector(performButtonAction:)]; + bi.style = UIBarButtonItemStyleBordered; + if (systemItem == UIBarButtonSystemItemFixedSpace){ + //Conventionally, in this case, we take either an image and a string button + if (![imageName isEqualToString:@""]){ + UIImage * btnImage = [UIImage imageNamed:imageName]; + bi = [[WABarButtonItemWithLink alloc]initWithImage:btnImage style:UIBarButtonItemStyleBordered target:self action:@selector(performButtonAction:)]; + } + else{ + bi = [[WABarButtonItemWithLink alloc]initWithTitle:buttonString style:UIBarButtonItemStyleBordered target:self action:@selector(performButtonAction:)]; + } + + } + bi.link = linkString; + [buttons addObject:bi]; + [bi release]; + + + // create a spacer + WABarButtonItemWithLink* bi2 = [[WABarButtonItemWithLink alloc] + initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; + [buttons addObject:bi2]; + [bi2 release]; + + [rightToolBar setItems:buttons animated:NO]; - //Calculate the width needed - CGFloat widthNeeded = 4.0; - for (WABarButtonItemWithLink* button in buttons){ - UIView *view = [button valueForKey:@"view"]; - CGFloat width = view? [view frame].size.width : (CGFloat)0.0; - //SLog(@"Button width:%f" , width); - widthNeeded += width; - - } - - rightToolBar.frame = CGRectMake(rightToolBar.frame.origin.x, rightToolBar.frame.origin.y, widthNeeded, self.navigationController.navigationBar.frame.size.height+0.01); - - + //Calculate the width needed + CGFloat widthNeeded = 4.0; + for (WABarButtonItemWithLink* button in buttons){ + UIView *view = [button valueForKey:@"view"]; + CGFloat width = view? [view frame].size.width : (CGFloat)0.0; + //SLog(@"Button width:%f" , width); + widthNeeded += width; + + } + + rightToolBar.frame = CGRectMake(rightToolBar.frame.origin.x, rightToolBar.frame.origin.y, widthNeeded, self.navigationController.navigationBar.frame.size.height+0.01); + + - - - [buttons release]; + + + [buttons release]; + + +} - +-(void) addMenuButtonWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem { + // create the button + NSMutableArray* buttons = [[NSMutableArray alloc] initWithArray:rightToolBar.items]; + WABarButtonItemWithLink* bi = [[WABarButtonItemWithLink alloc] + initWithBarButtonSystemItem:systemItem target:self action:@selector(displayMainMenu:)]; + bi.style = UIBarButtonItemStyleBordered; + if (systemItem == UIBarButtonSystemItemFixedSpace) { + //Conventionally, in this case, we take either an image and a string button + bi = [[WABarButtonItemWithLink alloc]initWithTitle:@" Menu " style:UIBarButtonItemStyleBordered target:self action:@selector(displayMainMenu:)]; + } + [buttons addObject:bi]; + [bi release]; + + + // create a spacer + WABarButtonItemWithLink* bi2 = [[WABarButtonItemWithLink alloc] + initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; + [buttons addObject:bi2]; + [bi2 release]; + + [rightToolBar setItems:buttons animated:NO]; + + //Calculate the width needed + CGFloat widthNeeded = 4.0; + for (WABarButtonItemWithLink* button in buttons){ + UIView *view = [button valueForKey:@"view"]; + CGFloat width = view? [view frame].size.width : (CGFloat)0.0; + //SLog(@"Button width:%f" , width); + widthNeeded += width; + + } + + rightToolBar.frame = CGRectMake(rightToolBar.frame.origin.x, rightToolBar.frame.origin.y, widthNeeded, self.navigationController.navigationBar.frame.size.height+0.01); + + [buttons release]; +} + +- (void) displayMainMenu:(id)sender{ + self.lastSender = sender; + NSString* EULAUrl = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"EULAUrl"]; + UIActionSheet *popup; + if (EULAUrl == nil) { + popup = [[UIActionSheet alloc] initWithTitle:@"Menu" + delegate:self + cancelButtonTitle:@"Annuler" + destructiveButtonTitle:nil + otherButtonTitles:[WAUtilities subscribeString], nil]; + } else { + popup = [[UIActionSheet alloc] initWithTitle:@"Menu" + delegate:self + cancelButtonTitle:@"Annuler" + destructiveButtonTitle:nil + otherButtonTitles:[WAUtilities subscribeString], @"CGU", nil]; + } + [popup showInView:self.view]; + /*UIActionSheet *popup = [[UIActionSheet alloc] initWithTitle:@"Menu" + delegate:self + cancelButtonTitle:@"Annuler" + destructiveButtonTitle:nil + [popup showInView:self.view];*/ + +} + +- (void)actionSheet:(UIActionSheet *)popup clickedButtonAtIndex:(NSInteger)buttonIndex { + NSString* EULAStr = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"EULAStr"]; + UIAlertView *alert; + switch (buttonIndex) { + case 0: + if (EULAStr != nil) { + alert = [[UIAlertView alloc] initWithTitle:@"Conditions générales d'utilisation" + message:EULAStr + delegate:self + cancelButtonTitle:@"Refuser" + otherButtonTitles:@"OK", nil]; + [alert show]; + } + break; + case 1: + if ([popup numberOfButtons] > buttonIndex + 1) { + NSLog(@"%@",@"EULAUrl"); + NSString* EULAUrl = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"EULAUrl"]; + /*NSString* EULAUrl = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"EULAUrla"]; + if (EULAUrl == nil) { + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"erreur" + message:@"L'article dépasse la taille autorisée, il est impossible de l'envoyer" delegate:self cancelButtonTitle:@"OK" + otherButtonTitles:nil, nil]; + [alert show]; + } else { + [self performMenuButtonActionsFromURL:EULAUrl]; + }*/ + [self performMenuButtonActionsFromURL:EULAUrl]; + } + break; + default: + break; + } +} + +- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { + switch (buttonIndex) { + case 1: + [self performMenuButtonActionsFromURL:@"buy://localhost/wanodownload.pdf"]; + [[SHKActivityIndicator currentIndicator] maintain]; + break; + default: + break; + } +} + +- (void) performMenuButtonActionsFromURL:(NSString*) url { + + WABarButtonItemWithLink * buttonItem = ( WABarButtonItemWithLink *) self.lastSender; + //SLog(@"Performing action for button %@ with link: %@",buttonItem.title,buttonItem.link); + + + WAModuleViewController * moduleViewController = [[WAModuleViewController alloc]init]; + moduleViewController.moduleUrlString= url; + + //Release existing module if any + UIView * modView = [self.navigationItem.rightBarButtonItem.customView viewWithTag:999]; + if (modView) [modView removeFromSuperview]; + + if ([[url substringToIndex:7]isEqualToString:@"refresh"]) { + [self checkUpdate:YES]; + + } + else{ + moduleViewController.initialViewController= self; + //moduleViewController.containingView= buttonItem.customView; + UIView * bView = [buttonItem valueForKey:@"view"]; //See http://stackoverflow.com/questions/5066847/get-the-width-of-a-uibarbuttonitem + moduleViewController.containingView= self.navigationItem.rightBarButtonItem.customView; + moduleViewController.containingRect= CGRectMake(bView.frame.origin.x,bView.frame.origin.y,bView.frame.size.width,1.0f);//Hack: we need to set height to 1.0 for popover to display correctly + [moduleViewController pushViewControllerIfNeededAndLoadModuleView]; + moduleViewController.moduleView.tag = 999; + [moduleViewController release]; + + + } } - (void) viewWillAppear:(BOOL)animated{ //Default navBar settings: - self.navigationController.navigationBarHidden = NO; + self.navigationController.navigationBarHidden = NO; self.navigationController.navigationBar.barStyle = UIBarStyleDefault;//Using this style AND setting translucent property to NO prevents the navigationBar from covering the upper part of the view. self.navigationController.navigationBar.translucent = NO; self.navigationController.navigationBar.tintColor = [UIColor blackColor]; diff --git a/Classes/WAPDFParserView.m b/Classes/WAPDFParserView.m index 9a87494..f42d629 100644 --- a/Classes/WAPDFParserView.m +++ b/Classes/WAPDFParserView.m @@ -217,7 +217,8 @@ - (void) didBecomeInvisible { { //SLog(@"Found video"); - if (videoView.movieViewController.moviePlayer.fullscreen) + //Modified for #163, in iOS 7 first condition still holds good. Where as iOS 8 & above where AVKit is used, movieViewController will be nil. + if (videoView.movieViewController.moviePlayer.fullscreen || ((videoView.movieViewController == nil) && videoView.playFullScreen)) { //SLog(@"Video is playing full screen"); return; diff --git a/Classes/WAPaymentTransactionObserver.m b/Classes/WAPaymentTransactionObserver.m index 8467ce8..f0ac74b 100644 --- a/Classes/WAPaymentTransactionObserver.m +++ b/Classes/WAPaymentTransactionObserver.m @@ -23,11 +23,15 @@ - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)tran NSString *tempKey = [NSString stringWithFormat:@"%@-receipt",shortID]; //SLog(@"newjson: %@",[self encode:(uint8_t *)receipt.bytes length:receipt.length]); + + //Begin: Modified for fix #162 + NSData *data = [self transactionReceiptForTransaction:transaction]; + switch (transaction.transactionState) { case SKPaymentTransactionStatePurchased:{ //Store the receipt - NSString *jsonObjectString = [self encode:(uint8_t *)transaction.transactionReceipt.bytes length:transaction.transactionReceipt.length]; + NSString *jsonObjectString = [self encode:(uint8_t *)data.bytes length:data.length]; //SLog(@"Transaction Succceded for product id %@ with json receipt %@",transaction.payment.productIdentifier,jsonObjectString); [[NSUserDefaults standardUserDefaults] setObject:jsonObjectString forKey:tempKey]; // Remove the transaction from the payment queue. @@ -36,7 +40,7 @@ - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)tran case SKPaymentTransactionStateRestored:{ //Store the receipt //NSString *jsonObjectString = [self encode:(uint8_t *)transaction.originalTransaction.transactionReceipt.bytes length:transaction.originalTransaction.transactionReceipt.length]; Do not use original receipt, an empty string is returned for some reason - NSString *jsonObjectString = [self encode:(uint8_t *)transaction.transactionReceipt.bytes length:transaction.transactionReceipt.length]; + NSString *jsonObjectString = [self encode:(uint8_t *)data.bytes length:data.length]; //SLog(@"Transaction restored and for product id %@ and receipt %@ ",transaction.payment.productIdentifier,jsonObjectString); [[NSUserDefaults standardUserDefaults] setObject:jsonObjectString forKey:tempKey]; // Remove the transaction from the payment queue. @@ -50,6 +54,7 @@ - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)tran default: break; } + //End: Modified for fix #162 //Send notification [[NSNotificationCenter defaultCenter] postNotificationName:@"transactionStatusDidChange" object:transaction]; @@ -73,6 +78,22 @@ - (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedW } +//Fix: https://github.com/libreliodev/iOS/issues/162 +//Added for fix #162 +- (NSData *)transactionReceiptForTransaction:(SKPaymentTransaction *)transaction { + NSData *data = nil; + if ([[NSBundle mainBundle] respondsToSelector:@selector(appStoreReceiptURL)]) { + //iOS 7 & above + data =[NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]]; + } + if (data != nil) { + return data; + } + ///As per Apple guide lines, we can't completely avoid this call and must be a backup option for the new implementation above. + return transaction.transactionReceipt; +} + + #pragma mark - #pragma mark Encoding diff --git a/Classes/WASearchListController.m b/Classes/WASearchListController.m index de3ceef..559b78b 100644 --- a/Classes/WASearchListController.m +++ b/Classes/WASearchListController.m @@ -39,12 +39,8 @@ - (void) setUrlString: (NSString *) theString parser = (NSObject *)[[theClass alloc] init]; parser.urlString = urlString; - self.contentSizeForViewInPopover= CGSizeMake(320,480); - - - - - + // FIX - Issue #5 + self.preferredContentSize = CGSizeMake(320, 480); } diff --git a/Classes/WASharePopover.m b/Classes/WASharePopover.m index 8e44e94..e564c2e 100644 --- a/Classes/WASharePopover.m +++ b/Classes/WASharePopover.m @@ -124,7 +124,9 @@ -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogniz - (void)buttonAction:(id)sender{ UIButton * button = (UIButton *) sender; - [self.delegate actionSheet:nil clickedButtonAtIndex:button.tag-100]; + //https://github.com/libreliodev/iOS/issues/180 + //Adding [UIActionSheet new] won't affect any existing functionality. + [self.delegate actionSheet:[UIActionSheet new] clickedButtonAtIndex:button.tag-100]; [self closeView]; } diff --git a/Classes/WAUtilities.m b/Classes/WAUtilities.m index 9b2f7e9..050f2f0 100644 --- a/Classes/WAUtilities.m +++ b/Classes/WAUtilities.m @@ -13,7 +13,7 @@ #define kDownloadUrl @"http://librelio-europe.s3.amazonaws.com/" -#define kCheckAppStoreUrl @"http://download.librelio.com/downloads/appstorev2.php?receipt=%@&sharedsecret=%@&urlstring=%@" +#define kCheckAppStoreUrl @"http://download.librelio.com/downloads/appstorev3.php?receipt=%@&sharedsecret=%@&urlstring=%@" #define kCheckPasswordUrl @"http://download.librelio.com/downloads/pswd.php?code=%@&service=%@&urlstring=%@&client=%@&app=%@&deviceid=%@" #define kCheckUsernamePasswordUrl @"http://download.librelio.com/downloads/subscribers.php?user=%@&pswd=%@&urlstring=%@&client=%@&app=%@&service=%@&deviceid=%@" @@ -402,8 +402,14 @@ + (NSString *) completeDownloadUrlforUrlString:(NSString*)urlString{ else{ NSString * appShortId = [[NSBundle mainBundle] getLibrelioAppId]; NSString * clientShortId = [[NSBundle mainBundle] getLibrelioClientId]; - + + //Handle very special case of Air & Cosmos + /*if ([appShortId isEqualToString:@"airetcomsosliseuse"]) { + appShortId = @"airetcosmos"; + clientShortId = @"discom"; + }*/ NSString * completeUrl = [NSString stringWithFormat:@"%@/%@/%@%@",kDownloadUrl, clientShortId,appShortId,[urlString noArgsPartOfUrlString]]; + //SLog(@"completeUrl %@",completeUrl); return completeUrl; } @@ -422,13 +428,15 @@ + (NSString *) getAuthorizingUrlForUrlString:(NSString*)urlString{ + (NSString *) completeCheckAppStoreUrlforUrlString:(NSString*)urlString{ //Retrieve receipt if it has been stored NSString * receipt = [urlString receiptForUrlString]; + NSLog(@"receipt=%@",receipt); + if (!receipt) return nil; //Retrieve shared secret NSString * sharedSecret = @""; NSString * credentials = [[NSBundle mainBundle] pathOfFileWithUrl:@"Application_.plist"]; if (credentials) sharedSecret = [[NSDictionary dictionaryWithContentsOfFile:credentials]objectForKey:@"SharedSecret"]; //Encode UrlString without args - NSString * encodedUrl = [[urlString noArgsPartOfUrlString] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; + NSString * encodedUrl = [[urlString noArgsPartOfUrlString] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]; NSString * retUrl = [NSString stringWithFormat:kCheckAppStoreUrl,receipt,sharedSecret,encodedUrl]; diff --git a/Classes/WAVideoView.m b/Classes/WAVideoView.m index 0dd9f6d..89655e7 100644 --- a/Classes/WAVideoView.m +++ b/Classes/WAVideoView.m @@ -7,8 +7,18 @@ #import "WAOperationsManager.h" #import "NSString+WAURLString.h" #import "NSBundle+WAAdditions.h" +//https://github.com/libreliodev/iOS/issues/163 +#import +#import +@interface WAVideoView() { + AVPlayerViewController *avPlayerViewController; +} + +@property (nonatomic, retain) AVPlayerViewController *avPlayerViewController; + +@end @implementation WAVideoView @@ -27,9 +37,6 @@ - (NSString *) urlString - (void) setUrlString: (NSString *) theString { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didStopMovie) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil]; - - urlString = [[NSString alloc]initWithString: theString]; NSString * rectString = [urlString valueOfParameterInUrlStringforKey:@"warect"]; @@ -50,28 +57,53 @@ - (void) setUrlString: (NSString *) theString } + ///Modified for fixing 163 + if (url){ - - movieViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; - if (playFullScreen){ - MPMoviePlayerViewController * movieViewController2 = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; - [currentViewController presentMoviePlayerViewControllerAnimated:movieViewController2]; + //Fix: https://github.com/libreliodev/iOS/issues/163 + if (NSClassFromString(@"AVPlayerViewController")) { + AVPlayer *player = [[AVPlayer alloc] initWithURL:url]; + AVPlayerViewController *playerController = [[AVPlayerViewController alloc] init]; + playerController.player = player; + [currentViewController presentViewController:playerController animated:YES completion:^{ + [playerController.player play]; + }]; + player = nil; + } else { + ///Since we are still using iOS 7 as deployment target we can't avoid this. + [self registerMPMoviePlayerNotification]; + MPMoviePlayerViewController * movieViewController2 = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; + [currentViewController presentMoviePlayerViewControllerAnimated:movieViewController2]; + } } else{ - movieViewController.moviePlayer.controlStyle = MPMovieControlStyleEmbedded; - - movieViewController.moviePlayer.view.frame = CGRectMake (0,0,self.frame.size.width,self.frame.size.height); - movieViewController.moviePlayer.view.backgroundColor = [UIColor blackColor]; - movieViewController.moviePlayer.backgroundView.backgroundColor = [UIColor blackColor]; - movieViewController.moviePlayer.scalingMode = MPMovieScalingModeAspectFit; - movieViewController.moviePlayer.view.autoresizingMask = (UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleTopMargin); - [self addSubview:movieViewController.moviePlayer.view]; - + if (NSClassFromString(@"AVPlayerViewController")) { + ///Todo - Something similar here + //https://github.com/libreliodev/iOS/issues/163 + + AVPlayerViewController *playerViewController = + [[AVPlayerViewController alloc] init]; + playerViewController.player = [AVPlayer playerWithURL:url]; + playerViewController.view.frame = self.bounds; + [self addSubview:playerViewController.view]; + self.autoresizesSubviews = TRUE; + self.avPlayerViewController = playerViewController; + [self.avPlayerViewController.player play]; + } else { + [self registerMPMoviePlayerNotification]; + movieViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; + movieViewController.moviePlayer.controlStyle = MPMovieControlStyleEmbedded; + movieViewController.moviePlayer.view.frame = CGRectMake (0,0,self.frame.size.width,self.frame.size.height); + movieViewController.moviePlayer.view.backgroundColor = [UIColor blackColor]; + movieViewController.moviePlayer.backgroundView.backgroundColor = [UIColor blackColor]; + movieViewController.moviePlayer.scalingMode = MPMovieScalingModeAspectFit; + movieViewController.moviePlayer.view.autoresizingMask = (UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleTopMargin); + [self addSubview:movieViewController.moviePlayer.view]; + [movieViewController.moviePlayer play]; + } } - - [movieViewController.moviePlayer play]; //SLog(@"Did start playing"); @@ -83,17 +115,45 @@ - (void) setUrlString: (NSString *) theString } +- (void)registerMPMoviePlayerNotification { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didStopMovie) name:MPMoviePlayerPlaybackStateDidChangeNotification object:nil]; +} + + +- (void)registerAVPlayerNotification { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieStopped) name:AVPlayerItemDidPlayToEndTimeNotification object:self.avPlayerViewController.player.currentItem]; +} + + +- (void)movieStopped:(NSNotification *)aNotification { + ///Equivalent to below method. + //When full screen & status of video is either unknown or failed, remove video view. + if ((playFullScreen)&&(avPlayerViewController.player.currentItem.status != AVPlayerItemStatusReadyToPlay)) { + [self removeFromSuperview]; + } +} + - (void) didStopMovie{ - NSLog(@"Did stop movie"); + //SLog(@"Did stop movie"); if ((playFullScreen)&&(movieViewController.moviePlayer.playbackState==MPMoviePlaybackStateStopped)) [self removeFromSuperview];//This will deallocate this instance } - (void)dealloc { - NSLog(@"Will dealloc"); + //SLog(@"Will dealloc"); + ///Fix for 163 [[NSNotificationCenter defaultCenter] removeObserver:self]; - [movieViewController.moviePlayer stop]; - [movieViewController release]; + if (avPlayerViewController) { + [avPlayerViewController.player pause]; + [avPlayerViewController release]; + avPlayerViewController = nil; + } + + if (movieViewController) { + [movieViewController.moviePlayer stop]; + [movieViewController release]; + movieViewController = nil; + } [urlString release]; [super dealloc]; } @@ -107,7 +167,14 @@ - (void) moduleViewDidAppear{ } - (void) moduleViewWillDisappear:(BOOL)animated{ - [movieViewController.moviePlayer pause]; + ///Fix for 163 + if (movieViewController) { + [movieViewController.moviePlayer pause]; + } + + if (self.avPlayerViewController) { + [self.avPlayerViewController.player pause]; + } } diff --git a/GoogleMobileAds.framework/GoogleMobileAds b/GoogleMobileAds.framework/GoogleMobileAds deleted file mode 120000 index 95e839f..0000000 --- a/GoogleMobileAds.framework/GoogleMobileAds +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/GoogleMobileAds \ No newline at end of file diff --git a/GoogleMobileAds.framework/GoogleMobileAds b/GoogleMobileAds.framework/GoogleMobileAds new file mode 100644 index 0000000..f583957 Binary files /dev/null and b/GoogleMobileAds.framework/GoogleMobileAds differ diff --git a/GoogleMobileAds.framework/Headers b/GoogleMobileAds.framework/Headers deleted file mode 120000 index a177d2a..0000000 --- a/GoogleMobileAds.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h b/GoogleMobileAds.framework/Headers/DFPBannerView.h similarity index 52% rename from GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h rename to GoogleMobileAds.framework/Headers/DFPBannerView.h index f2138a3..8d32895 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h +++ b/GoogleMobileAds.framework/Headers/DFPBannerView.h @@ -5,14 +5,32 @@ // Copyright 2012 Google Inc. All rights reserved. // +#import +#import +#import #import +#import +#import #import -@protocol DFPCustomRenderedBannerViewDelegate; -@protocol GADAdSizeDelegate; -@protocol GADAppEventDelegate; +GAD_ASSUME_NONNULL_BEGIN + +/// The delegate of a GADAdLoader object must conform to this protocol to receive DFPBannerViews. +@protocol DFPBannerAdLoaderDelegate + +/// Asks the delegate which banner ad sizes should be requested. +- (NSArray *)validBannerSizesForAdLoader:(GADAdLoader *)adLoader; + +/// Tells the delegate that a DFP banner ad was received. +- (void)adLoader:(GADAdLoader *)adLoader didReceiveDFPBannerView:(DFPBannerView *)bannerView; + +@end /// The view that displays DoubleClick For Publishers banner ads. +/// +/// To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeDFPBanner (see +/// GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If you +/// request this ad type, your delegate must conform to the DFPBannerAdLoaderDelegate protocol. @interface DFPBannerView : GADBannerView /// Required value created on the DFP website. Create a new ad unit for every unique placement of an @@ -20,60 +38,73 @@ /// for targeting and statistics. /// /// Example DFP ad unit ID: @"/6499/example/banner" -@property(nonatomic, copy) NSString *adUnitID; +@property(nonatomic, copy, GAD_NULLABLE) NSString *adUnitID; /// Optional delegate that is notified when creatives send app events. -@property(nonatomic, weak) IBOutlet id appEventDelegate; +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id appEventDelegate; -/// Optional delegate that is notified when creatives cause the banner to change size. To avoid -/// crashing the app, remember to nil this property before releasing the object that implements the -/// GADAdSizeDelegate protocol. -@property(nonatomic, weak) IBOutlet id adSizeDelegate; +/// Optional delegate that is notified when creatives cause the banner to change size. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id adSizeDelegate; /// Optional array of NSValue encoded GADAdSize structs, specifying all valid sizes that are /// appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined /// standard ad sizes (such as kGADAdSizeBanner), or create one using the GADAdSizeFromCGSize /// method. /// -/// \see setValidAdSizesWithSizes: -/// /// Example: -/// \code +/// +///
 ///   NSArray *validSizes = @[
 ///     NSValueFromGADAdSize(kGADAdSizeBanner),
 ///     NSValueFromGADAdSize(kGADAdSizeLargeBanner)
 ///   ];
 ///
 ///   bannerView.validAdSizes = validSizes;
-///   \endcode
-@property(nonatomic, copy) NSArray *validAdSizes;
+///   
+@property(nonatomic, copy, GAD_NULLABLE) NSArray *validAdSizes; + +/// Correlator object for correlating this object to other ad objects. +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; /// Indicates that the publisher will record impressions manually when the ad becomes visible to the /// user. @property(nonatomic, assign) BOOL enableManualImpressions; /// Optional delegate object for custom rendered ads. -@property(nonatomic, weak) +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id customRenderedBannerViewDelegate; +/// Video controller for controlling video rendered by this ad view. +@property(nonatomic, strong, readonly) GADVideoController *videoController; + /// If you've set enableManualImpressions to YES, call this method when the ad is visible. - (void)recordImpression; /// Use this function to resize the banner view without launching a new ad request. - (void)resize:(GADAdSize)size; +/// Sets options that configure ad loading. +/// +/// @param adOptions An array of GADAdLoaderOptions objects. The array is deep copied and option +/// objects cannot be modified after calling this method. +- (void)setAdOptions:(NSArray *)adOptions; + #pragma mark Deprecated +/// Deprecated. Use the validAdSizes property. /// Sets the receiver's valid ad sizes to the values pointed to by the provided NULL terminated list /// of GADAdSize pointers. /// /// Example: -/// \code +/// +///
 ///   GADAdSize size1 = kGADAdSizeBanner;
 ///   GADAdSize size2 = kGADAdSizeLargeBanner;
 ///   [bannerView setValidAdSizesWithSizes:&size1, &size2, NULL];
-///   \endcode
+///   
- (void)setValidAdSizesWithSizes:(GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property."); @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h b/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h new file mode 100644 index 0000000..eff98fb --- /dev/null +++ b/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h @@ -0,0 +1,29 @@ +// +// DFPBannerViewOptions.h +// Google Mobile Ads SDK +// +// Copyright © 2016 Google Inc. All rights reserved. +// + +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Ad loader options for banner ads. +@interface DFPBannerViewOptions : GADAdLoaderOptions + +/// Optional delegate that is notified if the loaded banner sends app events. +@property(nonatomic, weak, GAD_NULLABLE) id appEventDelegate; + +/// Optional delegate that is notified if the loaded banner changes size. +@property(nonatomic, weak, GAD_NULLABLE) id adSizeDelegate; + +/// Whether the publisher will record impressions manually when the ad becomes visible to the user. +@property(nonatomic, assign) BOOL enableManualImpressions; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h b/GoogleMobileAds.framework/Headers/DFPCustomRenderedAd.h similarity index 73% rename from GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h rename to GoogleMobileAds.framework/Headers/DFPCustomRenderedAd.h index c4543cc..5c2b0ab 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h +++ b/GoogleMobileAds.framework/Headers/DFPCustomRenderedAd.h @@ -7,14 +7,18 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + /// Custom rendered ad. Your application renders the ad. @interface DFPCustomRenderedAd : NSObject /// The ad's HTML. -@property(nonatomic, copy, readonly) NSString *adHTML; +@property(nonatomic, readonly, copy) NSString *adHTML; /// The base URL of the ad's HTML. -@property(nonatomic, copy, readonly) NSURL *adBaseURL; +@property(nonatomic, readonly, copy) NSURL *adBaseURL; /// Call this method when the user clicks the ad. - (void)recordClick; @@ -26,3 +30,5 @@ - (void)finishedRenderingAdView:(UIView *)view; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h b/GoogleMobileAds.framework/Headers/DFPCustomRenderedBannerViewDelegate.h similarity index 67% rename from GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h rename to GoogleMobileAds.framework/Headers/DFPCustomRenderedBannerViewDelegate.h index 59f1965..e15b89e 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h +++ b/GoogleMobileAds.framework/Headers/DFPCustomRenderedBannerViewDelegate.h @@ -7,14 +7,22 @@ #import +#import + @class DFPBannerView; @class DFPCustomRenderedAd; +GAD_ASSUME_NONNULL_BEGIN + +/// The DFPCustomRenderedAd banner view delegate protocol for notifying the delegate of changes to +/// custom rendered banners. @protocol DFPCustomRenderedBannerViewDelegate /// Called after ad data has been received. You must construct a banner from |customRenderedAd| and -/// call the |customRenderedAd| object's finishedRenderingAdView: when the ad is rendered. +/// call the |customRenderedAd| object's finishedRenderingAdView: when the ad has been rendered. - (void)bannerView:(DFPBannerView *)bannerView didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h b/GoogleMobileAds.framework/Headers/DFPCustomRenderedInterstitialDelegate.h similarity index 72% rename from GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h rename to GoogleMobileAds.framework/Headers/DFPCustomRenderedInterstitialDelegate.h index fda75a2..0f1f4a8 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h +++ b/GoogleMobileAds.framework/Headers/DFPCustomRenderedInterstitialDelegate.h @@ -7,9 +7,15 @@ #import +#import + @class DFPCustomRenderedAd; @class DFPInterstitial; +GAD_ASSUME_NONNULL_BEGIN + +/// The DFPCustomRenderedAd interstitial delegate protocol for notifying the delegate of changes to +/// custom rendered interstitials. @protocol DFPCustomRenderedInterstitialDelegate /// Called after ad data has been received. You must construct an interstitial from @@ -19,3 +25,5 @@ didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h b/GoogleMobileAds.framework/Headers/DFPInterstitial.h similarity index 52% rename from GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h rename to GoogleMobileAds.framework/Headers/DFPInterstitial.h index 9ba2019..e3af0d2 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h +++ b/GoogleMobileAds.framework/Headers/DFPInterstitial.h @@ -5,11 +5,16 @@ // Copyright 2012 Google Inc. All rights reserved. // +#import +#import +#import #import +#import -@protocol DFPCustomRenderedInterstitialDelegate; -@protocol GADAppEventDelegate; +GAD_ASSUME_NONNULL_BEGIN +/// DoubleClick For Publishers interstitial ad, a full-screen advertisement shown at natural +/// transition points in your application such as between game levels or news stories. @interface DFPInterstitial : GADInterstitial /// Required value created on the DFP website. Create a new ad unit for every unique placement of an @@ -19,11 +24,16 @@ /// Example DFP ad unit ID: @"/6499/example/interstitial" @property(nonatomic, readonly, copy) NSString *adUnitID; +/// Correlator object for correlating this object to other ad objects. +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; + /// Optional delegate that is notified when creatives send app events. -@property(nonatomic, weak) id appEventDelegate; +@property(nonatomic, weak, GAD_NULLABLE) id appEventDelegate; /// Optional delegate object for custom rendered ads. -@property(nonatomic, weak) +@property(nonatomic, weak, GAD_NULLABLE) id customRenderedInterstitialDelegate; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h b/GoogleMobileAds.framework/Headers/DFPRequest.h similarity index 51% rename from GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h rename to GoogleMobileAds.framework/Headers/DFPRequest.h index af2e40c..08f070f 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h +++ b/GoogleMobileAds.framework/Headers/DFPRequest.h @@ -10,6 +10,8 @@ #import #import +GAD_ASSUME_NONNULL_BEGIN + /// Add this constant to the testDevices property's array to receive test ads on the simulator. GAD_EXTERN const id kDFPSimulatorID; @@ -17,16 +19,19 @@ GAD_EXTERN const id kDFPSimulatorID; @interface DFPRequest : GADRequest /// Publisher provided user ID. -@property(nonatomic, copy) NSString *publisherProvidedID; +@property(nonatomic, copy, GAD_NULLABLE) NSString *publisherProvidedID; /// Array of strings used to exclude specified categories in ad results. -@property(nonatomic, copy) NSArray *categoryExclusions; +@property(nonatomic, copy, GAD_NULLABLE) NSArray *categoryExclusions; /// Key-value pairs used for custom targeting. -@property(nonatomic, copy) NSDictionary *customTargeting; +@property(nonatomic, copy, GAD_NULLABLE) NSDictionary *customTargeting; -/// Update the ad correlator. Ad slots with the same correlation value are grouped for roadblocking. -/// After updating the correlator, load new requests in all DFP ads. -+ (void)updateCorrelator; +/// This API is deprecated and a no-op, use an instance of GADCorrelator set on DFPInterstitial or +/// DFPBannerView objects to correlate requests. ++ (void)updateCorrelator GAD_DEPRECATED_MSG_ATTRIBUTE( + "Set GADCorrelator objects on your ads instead. This method no longer affects ad correlation."); @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADAdChoicesView.h b/GoogleMobileAds.framework/Headers/GADAdChoicesView.h new file mode 100644 index 0000000..c9bab80 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADAdChoicesView.h @@ -0,0 +1,25 @@ +// +// GADAdChoicesView.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Displays AdChoices content. +/// +/// If a GADAdChoicesView is set on GADNativeAppInstallAdView or GADNativeContentAdView prior to +/// calling -setNativeAppInstallAd: or -setNativeContentAd:, AdChoices content will render inside +/// the GADAdChoicesView. By default, AdChoices is placed in the top right corner of +/// GADNativeAppInstallAdView and GADNativeContentAdView. +@interface GADAdChoicesView : UIView + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h b/GoogleMobileAds.framework/Headers/GADAdLoader.h similarity index 55% rename from GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h rename to GoogleMobileAds.framework/Headers/GADAdLoader.h index 92443db..f572161 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h +++ b/GoogleMobileAds.framework/Headers/GADAdLoader.h @@ -8,35 +8,46 @@ #import #import -@class GADRequest; -@class GADRequestError; -@protocol GADAdLoaderDelegate; +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions +/// subclasses. +@interface GADAdLoaderOptions : NSObject +@end /// Loads ads. See GADAdLoaderAdTypes.h for available ad types. @interface GADAdLoader : NSObject /// Object notified when an ad request succeeds or fails. Must conform to requested ad types' /// delegate protocols. -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// The ad loader's ad unit ID. +@property(nonatomic, readonly) NSString *adUnitID; + +/// Indicates whether the ad loader is loading. +@property(nonatomic, getter=isLoading, readonly) BOOL loading; /// Returns an initialized ad loader configured to load the specified ad types. /// -/// @param rootViewController The root view controller is used to present ad click actions. Cannot -/// be nil. +/// @param rootViewController The root view controller is used to present ad click actions. /// @param adTypes An array of ad types. See GADAdLoaderAdTypes.h for available ad types. /// @param options An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to /// use default options. See each ad type's header for available GADAdLoaderOptions subclasses. - (instancetype)initWithAdUnitID:(NSString *)adUnitID - rootViewController:(UIViewController *)rootViewController - adTypes:(NSArray *)adTypes - options:(NSArray *)options; + rootViewController:(UIViewController *GAD_NULLABLE_TYPE)rootViewController + adTypes:(NSArray *)adTypes + options:(NSArray *GAD_NULLABLE_TYPE)options; /// Loads the ad and informs the delegate of the outcome. -- (void)loadRequest:(GADRequest *)request; +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; @end -/// Ad loader options base class. See each ad type's header for available GADAdLoaderOptions -/// subclasses. -@interface GADAdLoaderOptions : NSObject -@end +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h b/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h new file mode 100644 index 0000000..e63230d --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h @@ -0,0 +1,37 @@ +// +// GADAdLoaderAdTypes.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +typedef NSString *GADAdLoaderAdType GAD_STRING_ENUM; + +/// Use with GADAdLoader to request native app install ads. To receive ads, the ad loader's delegate +/// must conform to the GADNativeAppInstallAdLoaderDelegate protocol. See GADNativeAppInstallAd.h. +/// +/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. +GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeNativeAppInstall; + +/// Use with GADAdLoader to request native content ads. To receive ads, the ad loader's delegate +/// must conform to the GADNativeContentAdLoaderDelegate protocol. See GADNativeContentAd.h. +/// +/// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. +GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeNativeContent; + +/// Use with GADAdLoader to request native custom template ads. To receive ads, the ad loader's +/// delegate must conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. See +/// GADNativeCustomTemplateAd.h. +GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeNativeCustomTemplate; + +/// Use with GADAdLoader to request DFP banner ads. To receive ads, the ad loader's delegate must +/// conform to the DFPBannerAdLoaderDelegate protocol. See DFPBannerView.h. +GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeDFPBanner; + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h b/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h new file mode 100644 index 0000000..a72a95f --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h @@ -0,0 +1,31 @@ +// +// GADAdLoaderDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +@class GADAdLoader; + +GAD_ASSUME_NONNULL_BEGIN + +/// Base ad loader delegate protocol. Ad types provide extended protocols that declare methods to +/// handle successful ad loads. +@protocol GADAdLoaderDelegate + +/// Called when adLoader fails to load an ad. +- (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(GADRequestError *)error; + +@optional + +/// Called after adLoader has finished loading. +- (void)adLoaderDidFinishLoading:(GADAdLoader *)adLoader; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h b/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h similarity index 81% rename from GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h rename to GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h index d33de74..55c62f1 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h +++ b/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h @@ -7,6 +7,10 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + /// An object implementing this protocol contains information set by the publisher on the client /// device for a particular ad network. /// @@ -14,3 +18,5 @@ /// use. @protocol GADAdNetworkExtras @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h b/GoogleMobileAds.framework/Headers/GADAdReward.h similarity index 80% rename from GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h rename to GoogleMobileAds.framework/Headers/GADAdReward.h index 5657a21..38aeefb 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h +++ b/GoogleMobileAds.framework/Headers/GADAdReward.h @@ -7,6 +7,11 @@ #import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Reward information for GADRewardBasedVideoAd ads. @interface GADAdReward : NSObject /// Type of the reward. @@ -21,3 +26,5 @@ rewardAmount:(NSDecimalNumber *)rewardAmount NS_DESIGNATED_INITIALIZER; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h b/GoogleMobileAds.framework/Headers/GADAdSize.h similarity index 76% rename from GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h rename to GoogleMobileAds.framework/Headers/GADAdSize.h index a3695d0..c92b767 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h +++ b/GoogleMobileAds.framework/Headers/GADAdSize.h @@ -10,6 +10,8 @@ #import +GAD_ASSUME_NONNULL_BEGIN + /// A valid GADAdSize is considered to be one of the predefined GADAdSize constants or a GADAdSize /// constructed by GADAdSizeFromCGSize, GADAdSizeFullWidthPortraitWithHeight, /// GADAdSizeFullWidthLandscapeWithHeight. @@ -17,10 +19,15 @@ /// Do not create a GADAdSize manually. Use one of the kGADAdSize constants. Treat GADAdSize as an /// opaque type. Do not access any fields directly. To obtain a concrete CGSize, use the function /// CGSizeFromGADAdSize(). -typedef struct GADAdSize { - CGSize size; - NSUInteger flags; -} GADAdSize; +typedef struct GAD_BOXABLE GADAdSize GADAdSize; + +/// Ad size. +/// +/// @see typedef GADAdSize +struct GAD_BOXABLE GADAdSize { + CGSize size; ///< The ad size. Don't modify this value directly. + NSUInteger flags; ///< Reserved. +}; #pragma mark Standard Sizes @@ -52,6 +59,10 @@ GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerPortrait; /// typically 32 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI. GAD_EXTERN GADAdSize const kGADAdSizeSmartBannerLandscape; +/// An ad size that spans the full width of its container, with a height dynamically determined by +/// the ad. +GAD_EXTERN GADAdSize const kGADAdSizeFluid; + /// Invalid ad size marker. GAD_EXTERN GADAdSize const kGADAdSizeInvalid; @@ -59,37 +70,40 @@ GAD_EXTERN GADAdSize const kGADAdSizeInvalid; /// Returns a custom GADAdSize for the provided CGSize. Use this only if you require a non-standard /// size. Otherwise, use one of the standard size constants above. -GADAdSize GADAdSizeFromCGSize(CGSize size); +GAD_EXTERN GADAdSize GADAdSizeFromCGSize(CGSize size); /// Returns a custom GADAdSize that spans the full width of the application in portrait orientation /// with the height provided. -GADAdSize GADAdSizeFullWidthPortraitWithHeight(CGFloat height); +GAD_EXTERN GADAdSize GADAdSizeFullWidthPortraitWithHeight(CGFloat height); /// Returns a custom GADAdSize that spans the full width of the application in landscape orientation /// with the height provided. -GADAdSize GADAdSizeFullWidthLandscapeWithHeight(CGFloat height); +GAD_EXTERN GADAdSize GADAdSizeFullWidthLandscapeWithHeight(CGFloat height); #pragma mark Convenience Functions /// Returns YES if the two GADAdSizes are equal, otherwise returns NO. -BOOL GADAdSizeEqualToSize(GADAdSize size1, GADAdSize size2); +GAD_EXTERN BOOL GADAdSizeEqualToSize(GADAdSize size1, GADAdSize size2); /// Returns a CGSize for the provided a GADAdSize constant. If the GADAdSize is unknown, returns /// CGSizeZero. -CGSize CGSizeFromGADAdSize(GADAdSize size); +GAD_EXTERN CGSize CGSizeFromGADAdSize(GADAdSize size); /// Returns YES if |size| is one of the predefined constants or is a custom GADAdSize generated by /// GADAdSizeFromCGSize. -BOOL IsGADAdSizeValid(GADAdSize size); +GAD_EXTERN BOOL IsGADAdSizeValid(GADAdSize size); + +/// Returns YES if |size| is a fluid ad size. +GAD_EXTERN BOOL GADAdSizeIsFluid(GADAdSize size); /// Returns a NSString describing the provided GADAdSize. -NSString *NSStringFromGADAdSize(GADAdSize size); +GAD_EXTERN NSString *NSStringFromGADAdSize(GADAdSize size); /// Returns an NSValue representing the GADAdSize. -NSValue *NSValueFromGADAdSize(GADAdSize size); +GAD_EXTERN NSValue *NSValueFromGADAdSize(GADAdSize size); /// Returns a GADAdSize from an NSValue. Returns kGADAdSizeInvalid if the value is not a GADAdSize. -GADAdSize GADAdSizeFromNSValue(NSValue *value); +GAD_EXTERN GADAdSize GADAdSizeFromNSValue(NSValue *value); #pragma mark Deprecated Macros @@ -99,3 +113,5 @@ GADAdSize GADAdSizeFromNSValue(NSValue *value); #define GAD_SIZE_468x60 CGSizeFromGADAdSize(kGADAdSizeFullBanner) #define GAD_SIZE_728x90 CGSizeFromGADAdSize(kGADAdSizeLeaderboard) #define GAD_SIZE_120x600 CGSizeFromGADAdSize(kGADAdSizeSkyscraper) + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h b/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h similarity index 85% rename from GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h rename to GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h index 324a571..ce82adc 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h @@ -8,9 +8,12 @@ #import #import +#import @class GADBannerView; +GAD_ASSUME_NONNULL_BEGIN + /// The class implementing this protocol will be notified when the DFPBannerView changes ad size. /// Any views that may be affected by the banner size change will have time to adjust. @protocol GADAdSizeDelegate @@ -19,3 +22,5 @@ - (void)adView:(GADBannerView *)bannerView willChangeAdSizeTo:(GADAdSize)size; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h b/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h similarity index 75% rename from GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h rename to GoogleMobileAds.framework/Headers/GADAppEventDelegate.h index 34fbcce..a9f79cf 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h @@ -7,9 +7,13 @@ #import +#import + @class GADBannerView; @class GADInterstitial; +GAD_ASSUME_NONNULL_BEGIN + /// Implement your app event within these methods. The delegate will be notified when the SDK /// receives an app event message from the ad. @protocol GADAppEventDelegate @@ -19,11 +23,13 @@ /// Called when the banner receives an app event. - (void)adView:(GADBannerView *)banner didReceiveAppEvent:(NSString *)name - withInfo:(NSString *)info; + withInfo:(NSString *GAD_NULLABLE_TYPE)info; /// Called when the interstitial receives an app event. - (void)interstitial:(GADInterstitial *)interstitial didReceiveAppEvent:(NSString *)name - withInfo:(NSString *)info; + withInfo:(NSString *GAD_NULLABLE_TYPE)info; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h b/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h new file mode 100644 index 0000000..c89d64e --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h @@ -0,0 +1,34 @@ +// +// GADAudioVideoManager.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Provides audio and video notifications and configurations management. Available only on iOS 7 +/// and above. +/// +/// Don't create an instance of this class and use the one available from GADMobileAds +/// sharedInstace's audioVideoManager. +@interface GADAudioVideoManager : NSObject + +/// Delegate for receiving video and audio updates. +@property(nonatomic, weak, nullable) id delegate; + +/// Indicates whether the application wishes to manage audio session. If set as YES, the Google +/// Mobile Ads SDK will stop managing AVAudioSession during the video playback lifecycle. If set as +/// NO, the Google Mobile Ads SDK will control AVAudioSession. That may include: setting +/// AVAudioSession's category to AVAudioSessionCategoryAmbient when all videos are muted, setting +/// AVAudioSession's category to AVAudioSessionCategorySoloAmbient when any playing video becomes +/// unmuted, and allowing background apps to continue playing sound when all videos rendered by +/// Google Mobile Ads SDK are muted or have stopped playing. +@property(nonatomic, assign) BOOL audioSessionIsApplicationManaged; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h b/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h new file mode 100644 index 0000000..897431a --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h @@ -0,0 +1,39 @@ +// +// GADAudioVideoManagerDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +@class GADAudioVideoManager; + +GAD_ASSUME_NONNULL_BEGIN + +@protocol GADAudioVideoManagerDelegate + +@optional + +/// Tells the delegate that the Google Mobile Ads SDK will start playing a video. This method isn't +/// called if another video rendered by Google Mobile Ads SDK is already playing. +- (void)audioVideoManagerWillPlayVideo:(GADAudioVideoManager *)audioVideoManager; + +/// Tells the delegate that the Google Mobile Ads SDK has paused/stopped all video playback. +- (void)audioVideoManagerDidPauseAllVideo:(GADAudioVideoManager *)audioVideoManager; + +/// Tells the delegate that at least one video rendered by the Google Mobile Ads SDK will play +/// sound. Your app should stop playing sound when this method is called. +- (void)audioVideoManagerWillPlayAudio:(GADAudioVideoManager *)audioVideoManager; + +/// Tells the delegate that all the video rendered by the Google Mobile Ads SDK has stopped playing +/// sound. Your app can now resume any music playback or produce any kind of sound. Note that this +/// message doesn't mean that all the video has stopped playing, just audio, so you shouldn't +/// deactivate AVAudioSession's instance. Doing so can lead to unexpected video playback behavior. +/// You may deactivate AVAudioSession only when all rendered video ads are paused or have finished +/// playing, and 'audioVideoDidPauseAllVideo:' is called. +- (void)audioVideoManagerDidStopPlayingAudio:(GADAudioVideoManager *)audioVideoManager; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h b/GoogleMobileAds.framework/Headers/GADBannerView.h similarity index 69% rename from GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h rename to GoogleMobileAds.framework/Headers/GADBannerView.h index 0059298..7a8dc29 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h +++ b/GoogleMobileAds.framework/Headers/GADBannerView.h @@ -8,42 +8,38 @@ #import #import +#import #import #import #import #import #import -#ifndef IBInspectable -#define IBInspectable -#endif +GAD_ASSUME_NONNULL_BEGIN /// The view that displays banner ads. A minimum implementation to get an ad from within a /// UIViewController class is: /// -/// \code +///
 ///   // Create and setup the ad view, specifying the size and origin at {0, 0}.
 ///   GADBannerView *adView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
 ///   adView.rootViewController = self;
 ///   adView.adUnitID = @"ID created when registering your app";
-///
 ///   // Place the ad view onto the screen.
 ///   [self.view addSubview:adView];
-///
 ///   // Request an ad without any additional targeting information.
 ///   [adView loadRequest:[GADRequest request]];
-///   \endcode
-///
+///   
@interface GADBannerView : UIView #pragma mark Initialization -/// Initializes a GADBannerView and sets it to the specified size, and specifies its placement -/// within its superview bounds. Returns nil if |adSize| is an invalid ad size. +/// Initializes and returns a banner view with the specified ad size and origin relative to the +/// banner's superview. - (instancetype)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin; -/// Initializes a GADBannerView and sets it to the specified size, and specifies its placement at -/// the top left of its superview. Returns nil if |adSize| is an invalid ad size. +/// Initializes and returns a banner view with the specified ad size placed at its superview's +/// origin. - (instancetype)initWithAdSize:(GADAdSize)adSize; #pragma mark Pre-Request @@ -53,12 +49,11 @@ /// important for targeting and statistics. /// /// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" -@property(nonatomic, copy) IBInspectable NSString *adUnitID; +@property(nonatomic, copy, GAD_NULLABLE) IBInspectable NSString *adUnitID; /// Required reference to the current root view controller. For example the root view controller in -/// tab-based application would be the UITabViewController. Remember to nil or update this property -/// before deallocating the view controller. -@property(nonatomic, weak) IBOutlet UIViewController *rootViewController; +/// tab-based application would be the UITabViewController. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIViewController *rootViewController; /// Required to set this banner view to a proper size. Never create your own GADAdSize directly. Use /// one of the predefined standard ad sizes (such as kGADAdSizeBanner), or create one using the @@ -68,19 +63,16 @@ @property(nonatomic, assign) GADAdSize adSize; /// Optional delegate object that receives state change notifications from this GADBannerView. -/// Typically this is a UIViewController. Remember to nil this property before deallocating the -/// delegate. -@property(nonatomic, weak) IBOutlet id delegate; +/// Typically this is a UIViewController. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id delegate; -/// Optional delegate object that receives in-app purchase notifications from this ad. Required for -/// the custom in-app purchase flow, but ignored when using the default in-app purchase flow. -/// Remember to nil this property before deallocating the delegate. -@property(nonatomic, weak) IBOutlet id inAppPurchaseDelegate; +/// Optional delegate that is notified when creatives cause the banner to change size. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id adSizeDelegate; #pragma mark Making an Ad Request /// Makes an ad request. The request object supplies targeting information. -- (void)loadRequest:(GADRequest *)request; +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; /// A Boolean value that determines whether autoloading of ads in the receiver is enabled. If /// enabled, you do not need to call the loadRequest: method to load ads. @@ -90,9 +82,9 @@ /// The ad network class name that fetched the current ad. Returns nil while the latest ad request /// is in progress or if the latest ad request failed. For both standard and mediated Google AdMob -/// ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom -/// events, this method returns @"GADMAdapterCustomEvents". -@property(nonatomic, readonly, weak) NSString *adNetworkClassName; +/// ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom +/// events, this property returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; #pragma mark Deprecated @@ -100,10 +92,16 @@ /// as specified on server. This property is set to NO after each loadRequest: method. @property(nonatomic, readonly, assign) BOOL hasAutoRefreshed GAD_DEPRECATED_ATTRIBUTE; +/// Deprecated delegate. GADInAppPurchase has been deprecated. +@property(nonatomic, weak, GAD_NULLABLE) + IBOutlet id inAppPurchaseDelegate GAD_DEPRECATED_ATTRIBUTE; + /// The mediated ad network's underlying ad view. You may use this property to read the ad's actual /// size and adjust this banner view's frame origin. However, modifying the banner view's frame size /// triggers the Mobile Ads SDK to request a new ad. Only update the banner view's frame origin. -@property(nonatomic, readonly, weak) +@property(nonatomic, readonly, weak, GAD_NULLABLE) UIView *mediatedAdView GAD_DEPRECATED_MSG_ATTRIBUTE("Use adNetworkClassName."); @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h b/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h similarity index 92% rename from GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h rename to GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h index bd377bb..991fc32 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h @@ -7,8 +7,12 @@ #import +#import +#import + @class GADBannerView; -@class GADRequestError; + +GAD_ASSUME_NONNULL_BEGIN /// Delegate methods for receiving GADBannerView state change messages such as ad request status /// and ad click lifecycle. @@ -45,3 +49,5 @@ - (void)adViewWillLeaveApplication:(GADBannerView *)bannerView; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADCorrelator.h b/GoogleMobileAds.framework/Headers/GADCorrelator.h new file mode 100644 index 0000000..909f0f4 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADCorrelator.h @@ -0,0 +1,23 @@ +// +// GADCorrelator.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Represents a correlation between multiple ads. Set an instance of this object on multiple ads to +/// indicate they are being used in a common context. +@interface GADCorrelator : NSObject + +/// Resets the correlator to force a new set of correlated ads. +- (void)reset; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADCorrelatorAdLoaderOptions.h b/GoogleMobileAds.framework/Headers/GADCorrelatorAdLoaderOptions.h new file mode 100644 index 0000000..b10d607 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADCorrelatorAdLoaderOptions.h @@ -0,0 +1,22 @@ +// +// GADCorrelatorAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Ad loader options for adding a correlator to a native ad request. +@interface GADCorrelatorAdLoaderOptions : GADAdLoaderOptions + +/// Correlator object for correlating ads loaded by an ad loader to other ad objects. +@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h b/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h new file mode 100644 index 0000000..53317d9 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h @@ -0,0 +1,40 @@ +// +// GADCustomEventBanner.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The banner custom event protocol. Your banner custom event handler must implement this protocol. +@protocol GADCustomEventBanner + +/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly. +/// +/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The +/// Google Mobile Ads SDK sets this property on instances of your class. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// Called by mediation when your custom event is scheduled to be executed. Report execution results +/// to the delegate. +/// +/// @param adSize The size of the ad as configured in the mediation UI for the mediation placement. +/// @param serverParameter Parameter configured in the mediation UI. +/// @param serverLabel Label configured in the mediation UI. +/// @param request Contains ad request information. +- (void)requestBannerAd:(GADAdSize)adSize + parameter:(NSString *GAD_NULLABLE_TYPE)serverParameter + label:(NSString *GAD_NULLABLE_TYPE)serverLabel + request:(GADCustomEventRequest *)request; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h b/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h similarity index 92% rename from GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h rename to GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h index 271489f..8ec685c 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h @@ -10,6 +10,8 @@ #import +GAD_ASSUME_NONNULL_BEGIN + @protocol GADCustomEventBanner; /// Call back to this delegate in your custom event. You must call customEventBanner:didReceiveAd: @@ -25,7 +27,8 @@ /// Your Custom Event object must call this when it fails to receive or create the ad view. Pass /// along any error object sent from the ad network's SDK, or an NSError describing the error. Pass /// nil if not available. -- (void)customEventBanner:(id)customEvent didFailAd:(NSError *)error; +- (void)customEventBanner:(id)customEvent + didFailAd:(NSError *GAD_NULLABLE_TYPE)error; /// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate /// an action. When the SDK receives this callback, it reports the click back to the mediation @@ -55,8 +58,11 @@ #pragma mark Deprecated +/// Deprecated. Use customEventBannerWasClicked:. - (void)customEventBanner:(id)customEvent clickDidOccurInAd:(UIView *)view GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventBannerWasClicked:."); @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h b/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h similarity index 78% rename from GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h rename to GoogleMobileAds.framework/Headers/GADCustomEventExtras.h index 3ebe81e..a42a35c 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h +++ b/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h @@ -8,6 +8,9 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Create an instance of this class to set additional parameters for each custom event object. The /// additional parameters for a custom event are keyed by the custom event label. These extras are @@ -16,10 +19,10 @@ /// Set additional parameters for the custom event with label |label|. To remove additional /// parameters associated with |label|, pass in nil for |extras|. -- (void)setExtras:(NSDictionary *)extras forLabel:(NSString *)label; +- (void)setExtras:(NSDictionary *GAD_NULLABLE_TYPE)extras forLabel:(NSString *)label; /// Retrieve the extras for |label|. -- (NSDictionary *)extrasForLabel:(NSString *)label; +- (NSDictionary *GAD_NULLABLE_TYPE)extrasForLabel:(NSString *)label; /// Removes all the extras set on this instance. - (void)removeAllExtras; @@ -28,3 +31,5 @@ - (NSDictionary *)allExtras; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h b/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h new file mode 100644 index 0000000..7a05e3b --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h @@ -0,0 +1,43 @@ +// +// GADCustomEventInterstitial.h +// Google Mobile Ads SDK +// +// Copyright 2012 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The interstitial custom event protocol. Your interstitial custom event handler must implement +/// this protocol. +@protocol GADCustomEventInterstitial + +/// Inform |delegate| with the custom event execution results to ensure mediation behaves correctly. +/// +/// In your class, define the -delegate and -setDelegate: methods or use "@synthesize delegate". The +/// Google Mobile Ads SDK sets this property on instances of your class. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// Called by mediation when your custom event is scheduled to be executed. Your implementation +/// should start retrieving the interstitial ad. Report execution results to the delegate. You must +/// wait until -presentFromRootViewController is called before displaying the interstitial ad. +/// +/// @param serverParameter Parameter configured in the mediation UI. +/// @param serverLabel Label configured in the mediation UI. +/// @param request Contains ad request information. +- (void)requestInterstitialAdWithParameter:(NSString *GAD_NULLABLE_TYPE)serverParameter + label:(NSString *GAD_NULLABLE_TYPE)serverLabel + request:(GADCustomEventRequest *)request; + +/// Present the interstitial ad as a modal view using the provided view controller. Called only +/// after your class calls -customEventInterstitialDidReceiveAd: on its custom event delegate. +- (void)presentFromRootViewController:(UIViewController *)rootViewController; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h b/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h similarity index 85% rename from GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h rename to GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h index bb6feba..97219d3 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h @@ -9,10 +9,12 @@ #import +GAD_ASSUME_NONNULL_BEGIN + @protocol GADCustomEventInterstitial; /// Call back to this delegate in your custom event. You must call -/// customEventInterstitial:didReceiveAd: when there is an ad to show, or +/// customEventInterstitialDidReceiveAd: when there is an ad to show, or /// customEventInterstitial:didFailAd: when there is no ad to show. Otherwise, if enough time passed /// (several seconds) after the SDK called the requestInterstitialAdWithParameter: method of your /// custom event, the mediation SDK will consider the request timed out, and move on to the next ad @@ -26,15 +28,15 @@ /// any error object sent from the ad network's SDK, or an NSError describing the error. Pass nil if /// not available. - (void)customEventInterstitial:(id)customEvent - didFailAd:(NSError *)error; + didFailAd:(NSError *GAD_NULLABLE_TYPE)error; /// Your Custom Event object should call this when the user touches or "clicks" the ad to initiate /// an action. When the SDK receives this callback, it reports the click back to the mediation /// server. - (void)customEventInterstitialWasClicked:(id)customEvent; -/// When you call any of the the following methods, the call will be propagated back to the -/// GADInterstitialDelegate that you implemented and passed to GADInterstitial. +// When you call any of the following methods, the call will be propagated back to the +// GADInterstitialDelegate that you implemented and passed to GADInterstitial. /// Your Custom Event should call this when the interstitial is being displayed. - (void)customEventInterstitialWillPresent:(id)customEvent; @@ -49,8 +51,12 @@ - (void)customEventInterstitialWillLeaveApplication:(id)customEvent; #pragma mark Deprecated + +/// Deprecated. Use customEventInterstitialDidReceiveAd:. - (void)customEventInterstitial:(id)customEvent didReceiveAd:(NSObject *)ad GAD_DEPRECATED_MSG_ATTRIBUTE("Use customEventInterstitialDidReceiveAd:."); @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h b/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h new file mode 100644 index 0000000..9a99c7e --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h @@ -0,0 +1,58 @@ +// +// GADCustomEventNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +@protocol GADCustomEventNativeAdDelegate; + +/// Native ad custom event protocol. Your native ad custom event handler class must conform to this +/// protocol. +@protocol GADCustomEventNativeAd + +/// Called when the custom event is scheduled to be executed. +/// +/// @param serverParameter A value configured in the mediation UI for the custom event. +/// @param request Ad targeting information. +/// @param adTypes List of requested native ad types. See GADAdLoaderAdTypes.h for available ad +/// types. +/// @param options Additional options configured by the publisher for requesting a native ad. See +/// GADNativeAdImageAdLoaderOptions.h for available image options. +/// @param rootViewController Publisher-provided view controller. +- (void)requestNativeAdWithParameter:(NSString *)serverParameter + request:(GADCustomEventRequest *)request + adTypes:(NSArray *)adTypes + options:(NSArray *)options + rootViewController:(UIViewController *)rootViewController; + +/// Indicates if the custom event handles user clicks. Return YES if the custom event should handle +/// user clicks. In this case, the Google Mobile Ads SDK doesn't track user clicks and the custom +/// event must notify the Google Mobile Ads SDK of clicks using +/// +[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. Return NO if the +/// custom event doesn't handles user clicks. In this case, the Google Mobile Ads SDK tracks user +/// clicks itself and the custom event is notified of user clicks via -[GADMediatedNativeAdDelegate +/// mediatedNativeAd:didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates if the custom event handles user impressions tracking. If this method returns YES, the +/// Google Mobile Ads SDK will not track user impressions and the custom event must notify the +/// Google Mobile Ads SDK of impressions using +[GADMediatedNativeAdNotificationSource +/// mediatedNativeAdDidRecordImpression:]. If this method returns NO, +/// the Google Mobile Ads SDK tracks user impressions and notifies the custom event of impressions +/// using -[GADMediatedNativeAdDelegate mediatedNativeAdDidRecordImpression:]. +- (BOOL)handlesUserImpressions; + +/// Delegate object used for receiving custom native ad load request progress. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h b/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h new file mode 100644 index 0000000..99cfcae --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h @@ -0,0 +1,31 @@ +// +// GADCustomEventNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The delegate of the GADCustomEventNativeAd object must adopt the GADCustomEventNativeAdDelegate +/// protocol. Methods in this protocol are used for native ad's custom event communication with the +/// Google Mobile Ads SDK. +@protocol GADCustomEventNativeAdDelegate + +/// Tells the delegate that the custom event ad request succeeded and loaded a native ad. +- (void)customEventNativeAd:(id)customEventNativeAd + didReceiveMediatedNativeAd:(id)mediatedNativeAd; + +/// Tells the delegate that the custom event ad request failed. +- (void)customEventNativeAd:(id)customEventNativeAd + didFailToLoadWithError:(NSError *)error; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h b/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h new file mode 100644 index 0000000..5a6041e --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h @@ -0,0 +1,19 @@ +// +// GADCustomEventParameters.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Key for getting the server parameter configured in AdMob when mediating to a custom event +/// adapter. +/// Example: NSString *serverParameter = connector.credentials[GADCustomEventParametersServer]. +GAD_EXTERN NSString *const GADCustomEventParametersServer; + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h b/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h similarity index 55% rename from GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h rename to GoogleMobileAds.framework/Headers/GADCustomEventRequest.h index 75fe69b..cf48be3 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h +++ b/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h @@ -8,40 +8,52 @@ #import #import +#import @class GADCustomEventExtras; +GAD_ASSUME_NONNULL_BEGIN + +/// Specifies optional ad request targeting parameters that are provided by the publisher and are +/// forwarded to custom events for purposes of populating an ad request to a 3rd party ad network. @interface GADCustomEventRequest : NSObject -/// The end user's gender set in GADRequest. If not specified, returns kGADGenderUnknown. +/// User's gender set in GADRequest. If not specified, returns kGADGenderUnknown. @property(nonatomic, readonly, assign) GADGender userGender; -/// The end user's birthday set in GADRequest. If not specified, returns nil. -@property(nonatomic, readonly, copy) NSDate *userBirthday; +/// User's birthday set in GADRequest. If not specified, returns nil. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDate *userBirthday; -/// The end user's latitude, longitude, and accuracy, set in GADRequest. If not specified, -/// userHasLocation returns NO, and userLatitude, userLongitude and userLocationAccuracyInMeters -/// will all return 0. +/// If the user's latitude, longitude, and accuracy are not specified, userHasLocation returns NO, +/// and userLatitude, userLongitude, and userLocationAccuracyInMeters return 0. @property(nonatomic, readonly, assign) BOOL userHasLocation; + +/// User's latitude set in GADRequest. @property(nonatomic, readonly, assign) CGFloat userLatitude; + +/// User's longitude set in GADRequest. @property(nonatomic, readonly, assign) CGFloat userLongitude; + +/// The accuracy, in meters, of the user's location data. @property(nonatomic, readonly, assign) CGFloat userLocationAccuracyInMeters; /// Description of the user's location, in free form text, set in GADRequest. If not available, /// returns nil. This may be set even if userHasLocation is NO. -@property(nonatomic, readonly, copy) NSString *userLocationDescription; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *userLocationDescription; /// Keywords set in GADRequest. Returns nil if no keywords are set. -@property(nonatomic, readonly, copy) NSArray *userKeywords; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSArray *userKeywords; /// The additional parameters set by the application. This property allows you to pass additional /// information from your application to your Custom Event object. To do so, create an instance of /// GADCustomEventExtras to pass to GADRequest -registerAdNetworkExtras:. The instance should have /// an NSDictionary set for a particular custom event label. That NSDictionary becomes the /// additionalParameters here. -@property(nonatomic, readonly, copy) NSDictionary *additionalParameters; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDictionary *additionalParameters; /// Indicates if the testing property has been set in GADRequest. @property(nonatomic, readonly, assign) BOOL isTesting; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h b/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h new file mode 100644 index 0000000..acc98dc --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h @@ -0,0 +1,36 @@ +// +// GADDebugOptionsViewController.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +#import + +@class GADDebugOptionsViewController; + +GAD_ASSUME_NONNULL_BEGIN + +/// Delegate for the GADDebugOptionsViewController. +@protocol GADDebugOptionsViewControllerDelegate +/// Called when the debug options flow is finished. +- (void)debugOptionsViewControllerDidDismiss:(GADDebugOptionsViewController *)controller; +@end + +/// Displays debug options to the user. +@interface GADDebugOptionsViewController : UIViewController + +/// Creates and returns a GADDebugOptionsViewController object initialized with the ad unit ID. +/// @param adUnitID An ad unit ID for the DFP account that is being configured with debug options. ++ (instancetype)debugOptionsViewControllerWithAdUnitID:(NSString *)adUnitID; + +/// Delegate for the debug options view controller. +@property(nonatomic, weak, GAD_NULLABLE) + IBOutlet id delegate; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h b/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h new file mode 100644 index 0000000..4fefe66 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h @@ -0,0 +1,165 @@ +// +// GADDynamicHeightSearchRequest.h +// GoogleMobileAds +// +// Copyright © 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Use to configure Custom Search Ad (CSA) ad requests. A dynamic height search banner can contain +/// multiple ads and the height is set dynamically based on the ad contents. Please cross-reference +/// the property sections and properties with the official reference document: +/// https://developers.google.com/custom-search-ads/docs/reference +@interface GADDynamicHeightSearchRequest : GADRequest + +#pragma mark - Page Level Parameters + +#pragma mark Required + +/// The CSA "query" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *query; + +/// The CSA "adPage" parameter. +@property(nonatomic, assign) NSInteger adPage; + +#pragma mark Configuration Settings + +/// Indicates if the CSA "adTest" parameter is enabled. +@property(nonatomic, assign) BOOL adTestEnabled; + +/// The CSA "channel" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *channel; + +/// The CSA "hl" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *hostLanguage; + +#pragma mark Layout and Styling + +/// The CSA "colorLocation" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *locationExtensionTextColor; + +/// The CSA "fontSizeLocation" parameter. +@property(nonatomic, assign) CGFloat locationExtensionFontSize; + +#pragma mark Ad Extensions + +/// Indicates if the CSA "clickToCall" parameter is enabled. +@property(nonatomic, assign) BOOL clickToCallExtensionEnabled; + +/// Indicates if the CSA "location" parameter is enabled. +@property(nonatomic, assign) BOOL locationExtensionEnabled; + +/// Indicates if the CSA "plusOnes" parameter is enabled. +@property(nonatomic, assign) BOOL plusOnesExtensionEnabled; + +/// Indicates if the CSA "sellerRatings" parameter is enabled. +@property(nonatomic, assign) BOOL sellerRatingsExtensionEnabled; + +/// Indicates if the CSA "siteLinks" parameter is enabled. +@property(nonatomic, assign) BOOL siteLinksExtensionEnabled; + +#pragma mark - Unit Level Parameters + +#pragma mark Required + +/// The CSA "width" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *CSSWidth; + +/// Configuration Settings + +/// The CSA "number" parameter. +@property(nonatomic, assign) NSInteger numberOfAds; + +#pragma mark Font + +/// The CSA "fontFamily" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *fontFamily; + +/// The CSA "fontFamilyAttribution" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *attributionFontFamily; + +/// The CSA "fontSizeAnnotation" parameter. +@property(nonatomic, assign) CGFloat annotationFontSize; + +/// The CSA "fontSizeAttribution" parameter. +@property(nonatomic, assign) CGFloat attributionFontSize; + +/// The CSA "fontSizeDescription" parameter. +@property(nonatomic, assign) CGFloat descriptionFontSize; + +/// The CSA "fontSizeDomainLink" parameter. +@property(nonatomic, assign) CGFloat domainLinkFontSize; + +/// The CSA "fontSizeTitle" parameter. +@property(nonatomic, assign) CGFloat titleFontSize; + +#pragma mark Color + +/// The CSA "colorAdBorder" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *adBorderColor; + +/// The CSA "colorAdSeparator" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *adSeparatorColor; + +/// The CSA "colorAnnotation" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *annotationTextColor; + +/// The CSA "colorAttribution" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *attributionTextColor; + +/// The CSA "colorBackground" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *backgroundColor; + +/// The CSA "colorBorder" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *borderColor; + +/// The CSA "colorDomainLink" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *domainLinkColor; + +/// The CSA "colorText" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *textColor; + +/// The CSA "colorTitleLink" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *titleLinkColor; + +#pragma mark General Formatting + +/// The CSA "adBorderSelections" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *adBorderCSSSelections; + +/// The CSA "adjustableLineHeight" parameter. +@property(nonatomic, assign) CGFloat adjustableLineHeight; + +/// The CSA "attributionSpacingBelow" parameter. +@property(nonatomic, assign) CGFloat attributionBottomSpacing; + +/// The CSA "borderSelections" parameter. +@property(nonatomic, copy, GAD_NULLABLE) NSString *borderCSSSelections; + +/// Indicates if the CSA "noTitleUnderline" parameter is enabled. +@property(nonatomic, assign) BOOL titleUnderlineHidden; + +/// Indicates if the CSA "titleBold" parameter is enabled. +@property(nonatomic, assign) BOOL boldTitleEnabled; + +/// The CSA "verticalSpacing" parameter. +@property(nonatomic, assign) CGFloat verticalSpacing; + +#pragma mark Ad Extensions + +/// Indicates if the CSA "detailedAttribution" parameter is enabled. +@property(nonatomic, assign) BOOL detailedAttributionExtensionEnabled; + +/// Indicates if the CSA "longerHeadlines" parameter is enabled. +@property(nonatomic, assign) BOOL longerHeadlinesExtensionEnabled; + +/// Sets an advanced option value for a specified key. The value must be an NSString or NSNumber. +- (void)setAdvancedOptionValue:(id)value forKey:(NSString *)key; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h b/GoogleMobileAds.framework/Headers/GADExtras.h similarity index 57% rename from GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h rename to GoogleMobileAds.framework/Headers/GADExtras.h index 80a354a..3ca160f 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h +++ b/GoogleMobileAds.framework/Headers/GADExtras.h @@ -8,10 +8,16 @@ #import #import +#import +GAD_ASSUME_NONNULL_BEGIN + +/// Ad network extras sent to Google networks. @interface GADExtras : NSObject /// Additional parameters to be sent to Google networks. -@property(nonatomic, copy) NSDictionary *additionalParameters; +@property(nonatomic, copy, GAD_NULLABLE) NSDictionary *additionalParameters; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h b/GoogleMobileAds.framework/Headers/GADInAppPurchase.h similarity index 95% rename from GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h rename to GoogleMobileAds.framework/Headers/GADInAppPurchase.h index bd8d922..979c307 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h +++ b/GoogleMobileAds.framework/Headers/GADInAppPurchase.h @@ -8,6 +8,10 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN + @protocol GADDefaultInAppPurchaseDelegate; #pragma mark - Default Purchase Flow @@ -17,6 +21,8 @@ /// Instances of this class are created and passed to your in-app purchase delegate after the user /// has successfully paid for a product. Your code must correctly deliver the product to the user /// and then call the didCompletePurchase method to finish the transaction. + +GAD_DEPRECATED_ATTRIBUTE @interface GADDefaultInAppPurchase : NSObject /// Enables the default consumable product in-app purchase flow handled by the Google Mobile Ads @@ -52,6 +58,7 @@ #pragma mark - Custom Purchase Flow /// Enum of the different statuses resulting from processing a purchase. +GAD_DEPRECATED_ATTRIBUTE typedef NS_ENUM(NSInteger, GADInAppPurchaseStatus) { kGADInAppPurchaseStatusError = 0, ///< Error occured while processing the purchase. kGADInAppPurchaseStatusSuccessful = 1, ///< Purchase was completed successfully. @@ -64,6 +71,7 @@ typedef NS_ENUM(NSInteger, GADInAppPurchaseStatus) { /// Instances of this class are created and passed to your GADInAppPurchaseDelegate object when /// users click a buy button. It is important to report the result of the purchase back to the SDK /// in order to track metrics about the transaction. +GAD_DEPRECATED_ATTRIBUTE @interface GADInAppPurchase : NSObject /// The in-app purchase product ID. @@ -78,3 +86,5 @@ typedef NS_ENUM(NSInteger, GADInAppPurchaseStatus) { - (void)reportPurchaseStatus:(GADInAppPurchaseStatus)purchaseStatus; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h b/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h similarity index 91% rename from GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h rename to GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h index 6dee244..b7e09a7 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h @@ -7,13 +7,18 @@ #import +#import + @class GADDefaultInAppPurchase; @class GADInAppPurchase; +GAD_ASSUME_NONNULL_BEGIN + #pragma mark - Default Purchase Flow /// In-app purchase delegate protocol for default purchase handling. The delegate must deliver /// the purchased item then call the GADDefaultInAppPurchase object's finishTransaction method. +GAD_DEPRECATED_ATTRIBUTE @protocol GADDefaultInAppPurchaseDelegate /// Called when the user successfully paid for a purchase. You must first deliver the purchased @@ -33,6 +38,7 @@ /// In-app purchase delegate protocol for custom purchase handling. The delegate must handle the /// product purchase flow then call the GADInAppPurchase object's reportPurchaseStatus: method. +GAD_DEPRECATED_ATTRIBUTE @protocol GADInAppPurchaseDelegate /// Called when the user clicks on the buy button of an in-app purchase ad. After the receiver @@ -40,3 +46,5 @@ - (void)didReceiveInAppPurchase:(GADInAppPurchase *)purchase; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h b/GoogleMobileAds.framework/Headers/GADInterstitial.h similarity index 79% rename from GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h rename to GoogleMobileAds.framework/Headers/GADInterstitial.h index 7e17627..c0d0e02 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h +++ b/GoogleMobileAds.framework/Headers/GADInterstitial.h @@ -13,6 +13,8 @@ #import #import +GAD_ASSUME_NONNULL_BEGIN + /// An interstitial ad. This is a full-screen advertisement shown at natural transition points in /// your application such as between game levels or news stories. @interface GADInterstitial : NSObject @@ -27,16 +29,10 @@ #pragma mark Pre-Request /// Required value passed in with initWithAdUnitID:. -@property(nonatomic, readonly, copy) NSString *adUnitID; +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adUnitID; /// Optional delegate object that receives state change notifications from this GADInterstitalAd. -/// Remember to nil this property before deallocating the delegate. -@property(nonatomic, weak) id delegate; - -/// Optional delegate object that receives in-app purchase notifications from this ad. Required for -/// the custom in-app purchase flow, but ignored when using the default in-app purchase flow. -/// Remember to nil this property before deallocating the delegate. -@property(nonatomic, weak) id inAppPurchaseDelegate; +@property(nonatomic, weak, GAD_NULLABLE) id delegate; #pragma mark Making an Ad Request @@ -46,7 +42,7 @@ /// This is best to do several seconds before the interstitial is needed to preload its content. /// Then when transitioning between view controllers show the interstital with /// presentFromViewController. -- (void)loadRequest:(GADRequest *)request; +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; #pragma mark Post-Request @@ -60,9 +56,9 @@ /// Returns the ad network class name that fetched the current ad. Returns nil while the latest ad /// request is in progress or if the latest ad request failed. For both standard and mediated Google -/// AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation -/// custom events, this method returns @"GADMAdapterCustomEvents". -@property(nonatomic, readonly, copy) NSString *adNetworkClassName; +/// AdMob ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation +/// custom events, this property returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; /// Presents the interstitial ad which takes over the entire screen until the user dismisses it. /// This has no effect unless isReady returns YES and/or the delegate's interstitialDidReceiveAd: @@ -76,11 +72,17 @@ #pragma mark Deprecated +/// Deprecated delegate. GADInAppPurchase has been deprecated. +@property(nonatomic, weak, GAD_NULLABLE) + id inAppPurchaseDelegate GAD_DEPRECATED_ATTRIBUTE; + /// Deprecated intializer. Use initWithAdUnitID: instead. - (instancetype)init GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID:."); /// Deprecated setter, use initWithAdUnitID: instead. -- (void)setAdUnitID:(NSString *)adUnitID +- (void)setAdUnitID:(NSString *GAD_NULLABLE_TYPE)adUnitID GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithAdUnitID: instead of setting the ad unit ID."); @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h b/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h similarity index 88% rename from GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h rename to GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h index fe436aa..4fbff88 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h @@ -7,8 +7,12 @@ #import +#import +#import + @class GADInterstitial; -@class GADRequestError; + +GAD_ASSUME_NONNULL_BEGIN /// Delegate for receiving state change messages from a GADInterstitial such as interstitial ad /// requests succeeding/failing. @@ -34,6 +38,9 @@ /// Store from a link on the interstitial). - (void)interstitialWillPresentScreen:(GADInterstitial *)ad; +/// Called when |ad| fails to present. +- (void)interstitialDidFailToPresentScreen:(GADInterstitial *)ad; + /// Called before the interstitial is to be animated off the screen. - (void)interstitialWillDismissScreen:(GADInterstitial *)ad; @@ -47,3 +54,5 @@ - (void)interstitialWillLeaveApplication:(GADInterstitial *)ad; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADMediaView.h b/GoogleMobileAds.framework/Headers/GADMediaView.h new file mode 100644 index 0000000..11f7d10 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADMediaView.h @@ -0,0 +1,29 @@ +// +// GADMediaView.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Displays native ad media assets. +/// +/// To display media assets in GADNativeAppInstallAdView instances, add a GADMediaView subview and +/// assign the native ad view's mediaView property. +/// +/// If the native ad doesn't contain a video and image loading is enabled, the GADMediaView displays +/// the native ad's |images| asset's first image. +/// +/// If the native ad doesn't contain a video and image loading is disabled, the GADMediaView object +/// is empty. +@interface GADMediaView : UIView + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADMobileAds.h b/GoogleMobileAds.framework/Headers/GADMobileAds.h new file mode 100644 index 0000000..80e29e5 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADMobileAds.h @@ -0,0 +1,59 @@ +// +// GADMobileAds.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Google Mobile Ads SDK settings. +@interface GADMobileAds : NSObject + +/// Returns the shared GADMobileAds instance. ++ (GADMobileAds *)sharedInstance; + +/// Configures the SDK using the settings associated with the given application ID. ++ (void)configureWithApplicationID:(NSString *)applicationID; + +/// Disables automated in app purchase (IAP) reporting. Must be called before any IAP transaction is +/// initiated. IAP reporting is used to track IAP ad conversions. Do not disable reporting if you +/// use IAP ads. ++ (void)disableAutomatedInAppPurchaseReporting; + +/// Disables automated SDK crash reporting. If not called, the SDK records the original exception +/// handler if available and registers a new exception handler. The new exception handler only +/// reports SDK related exceptions and calls the recorded original exception handler. ++ (void)disableSDKCrashReporting; + +/// The application's audio volume. Affects audio volumes of all ads relative to other audio output. +/// Valid ad volume values range from 0.0 (silent) to 1.0 (current device volume). Use this method +/// only if your application has its own volume controls (e.g., custom music or sound effect +/// volumes). Defaults to 1.0. +@property(nonatomic, assign) float applicationVolume; + +/// Indicates if the application's audio is muted. Affects initial mute state for all ads. Use this +/// method only if your application has its own volume controls (e.g., custom music or sound effect +/// muting). Defaults to NO. +@property(nonatomic, assign) BOOL applicationMuted; + +/// Manages the Google Mobile Ads SDK's audio and video settings. +@property(nonatomic, readonly, strong) GADAudioVideoManager *audioVideoManager; + +/// Returns YES if the current SDK version is at least |major|.|minor|.|patch|. This method can be +/// used by libraries that depend on a specific minimum version of the Google Mobile Ads SDK to warn +/// developers if they have an incompatible version. +/// +/// Available in Google Mobile Ads SDK 7.10 and onwards. Before calling this method check if the +/// GADMobileAds's shared instance responds to this method. Calling this method on a Google Mobile +/// Ads SDK lower than 7.10 can crash the app. +- (BOOL)isSDKVersionAtLeastMajor:(NSInteger)major minor:(NSInteger)minor patch:(NSInteger)patch; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h b/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h new file mode 100644 index 0000000..81b1705 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h @@ -0,0 +1,27 @@ +// +// GADMultipleAdsAdLoaderOptions.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Ad loader options for requesting multiple ads. Requesting multiple ads in a single request is +/// currently only available for native app install ads and native content ads. +@interface GADMultipleAdsAdLoaderOptions : GADAdLoaderOptions + +/// Number of ads the GADAdLoader should attempt to return for the request. By default, numberOfAds +/// is one. Requests are invalid and will fail if numberOfAds is less than one. If numberOfAds +/// exceeds the maximum limit (5), only the maximum number of ads are requested. +/// +/// The ad loader makes at least one and up to numberOfAds calls to the "ad received" and +/// -didFailToReceiveAdWithError: methods found in GADAdLoaderDelegate and its extensions, followed +/// by a single call to -adLoaderDidFinishLoading: once loading is finished. +@property(nonatomic) NSInteger numberOfAds; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeAd.h b/GoogleMobileAds.framework/Headers/GADNativeAd.h new file mode 100644 index 0000000..c454404 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeAd.h @@ -0,0 +1,36 @@ +// +// GADNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +@protocol GADNativeAdDelegate; + +/// Native ad base class. All native ad types are subclasses of this class. +@interface GADNativeAd : NSObject + +/// Optional delegate to receive state change notifications. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// Root view controller for handling ad actions. +@property(nonatomic, weak, GAD_NULLABLE) UIViewController *rootViewController; + +/// Dictionary of assets which aren't processed by the receiver. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDictionary *extraAssets; + +/// The ad network class name that fetched the current ad. For both standard and mediated Google +/// AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation +/// custom events, this method returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h b/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h similarity index 77% rename from GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h rename to GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h index fa39d85..e1b3ba3 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h @@ -7,13 +7,27 @@ #import +#import + @class GADNativeAd; +GAD_ASSUME_NONNULL_BEGIN + /// Identifies native ad assets. @protocol GADNativeAdDelegate @optional +#pragma mark Ad Lifecycle Events + +/// Called when an impression is recorded for an ad. Only called for Google ads and is not supported +/// for mediation ads. +- (void)nativeAdDidRecordImpression:(GADNativeAd *)nativeAd; + +/// Called when a click is recorded for an ad. Only called for Google ads and is not supported for +/// mediation ads. +- (void)nativeAdDidRecordClick:(GADNativeAd *)nativeAd; + #pragma mark Click-Time Lifecycle Notifications /// Called just before presenting the user a full screen view, such as a browser, in response to @@ -39,3 +53,5 @@ - (void)nativeAdWillLeaveApplication:(GADNativeAd *)nativeAd; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h b/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h new file mode 100644 index 0000000..971b714 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h @@ -0,0 +1,24 @@ +// +// GADNativeAdImage+Mediation.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Provides additional GADNativeAdImage initializers. +@interface GADNativeAdImage (MediationAdditions) + +/// Initializes and returns a native ad image object with the provided image. +- (instancetype)initWithImage:(UIImage *)image; + +/// Initializes and returns a native ad image object with the provided image URL and image scale. +- (instancetype)initWithURL:(NSURL *)URL scale:(CGFloat)scale; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h b/GoogleMobileAds.framework/Headers/GADNativeAdImage.h similarity index 64% rename from GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h rename to GoogleMobileAds.framework/Headers/GADNativeAdImage.h index 58da290..df4b486 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h +++ b/GoogleMobileAds.framework/Headers/GADNativeAdImage.h @@ -8,16 +8,22 @@ #import #import +#import + +GAD_ASSUME_NONNULL_BEGIN + /// Native ad image. @interface GADNativeAdImage : NSObject /// The image. If image autoloading is disabled, this property will be nil. -@property(nonatomic, readonly, strong) UIImage *image; +@property(nonatomic, readonly, strong, GAD_NULLABLE) UIImage *image; /// The image's URL. -@property(nonatomic, readonly, strong) NSURL *imageURL; +@property(nonatomic, readonly, copy) NSURL *imageURL; /// The image's scale. @property(nonatomic, readonly, assign) CGFloat scale; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h b/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h similarity index 70% rename from GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h rename to GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h index c847e73..4e4d70b 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h +++ b/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h @@ -6,14 +6,18 @@ // #import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Native ad image orientation preference. typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) { - GADNativeAdImageAdLoaderOptionsOrientationAny, ///< No orientation preference. - GADNativeAdImageAdLoaderOptionsOrientationPortrait, ///< Prefer portrait images. - GADNativeAdImageAdLoaderOptionsOrientationLandscape ///< Prefer landscape images. + GADNativeAdImageAdLoaderOptionsOrientationAny = 1, ///< No orientation preference. + GADNativeAdImageAdLoaderOptionsOrientationPortrait = 2, ///< Prefer portrait images. + GADNativeAdImageAdLoaderOptionsOrientationLandscape = 3 ///< Prefer landscape images. }; +/// Ad loader options for native ad image settings. @interface GADNativeAdImageAdLoaderOptions : GADAdLoaderOptions /// Indicates if image asset content should be loaded by the SDK. If set to YES, the SDK will not @@ -29,3 +33,5 @@ typedef NS_ENUM(NSInteger, GADNativeAdImageAdLoaderOptionsOrientation) { @property(nonatomic, assign) GADNativeAdImageAdLoaderOptionsOrientation preferredImageOrientation; @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h b/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h new file mode 100644 index 0000000..cd22062 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h @@ -0,0 +1,29 @@ +// +// GADNativeAdViewAdOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Position of the AdChoices icon in the containing ad. +typedef NS_ENUM(NSInteger, GADAdChoicesPosition) { + GADAdChoicesPositionTopRightCorner, ///< Top right corner. + GADAdChoicesPositionTopLeftCorner, ///< Top left corner. + GADAdChoicesPositionBottomRightCorner, ///< Bottom right corner. + GADAdChoicesPositionBottomLeftCorner ///< Bottom Left Corner. +}; + +/// Ad loader options for configuring the view of native ads. +@interface GADNativeAdViewAdOptions : GADAdLoaderOptions + +/// Indicates preferred location of AdChoices icon. Default is GADAdChoicesPositionTopRightCorner. +@property(nonatomic, assign) GADAdChoicesPosition preferredAdChoicesPosition; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeAppInstallAd.h b/GoogleMobileAds.framework/Headers/GADNativeAppInstallAd.h new file mode 100644 index 0000000..89cfbd9 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeAppInstallAd.h @@ -0,0 +1,118 @@ +// +// GADNativeAppInstallAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Native app install ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeNativeAppInstall (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in +/// GADAdLoader's initializer method. If you request this ad type, your delegate must conform to the +/// GADNativeAppInstallAdLoaderDelegate protocol. +@interface GADNativeAppInstallAd : GADNativeAd + +#pragma mark - Must be displayed + +/// App title. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *headline; +/// Text that encourages user to take some action with the ad. For example "Install". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *callToAction; +/// Application icon. +@property(nonatomic, readonly, strong, GAD_NULLABLE) GADNativeAdImage *icon; + +#pragma mark - Recommended to display + +/// App description. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *body; +/// The app store name. For example, "App Store". +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *store; +/// String representation of the app's price. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *price; +/// Array of GADNativeAdImage objects related to the advertised application. +@property(nonatomic, readonly, strong, GAD_NULLABLE) NSArray *images; +/// App store rating (0 to 5). +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDecimalNumber *starRating; +/// Video controller for controlling video playback in GADNativeAppInstallAdView's mediaView. +@property(nonatomic, strong, readonly) GADVideoController *videoController; + +/// Registers ad view and asset views with this native ad. +/// @param assetViews Dictionary of asset views keyed by asset IDs. +- (void)registerAdView:(UIView *)adView + assetViews:(NSDictionary *)assetViews + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -registerAdView:clickableAssetViews:nonclickableAssetViews:"); + +/// Registers ad view, clickable asset views, and nonclickable asset views with this native ad. +/// Media view shouldn't be registered as clickable. +/// @param clickableAssetViews Dictionary of asset views that are clickable, keyed by asset IDs. +/// @param nonclickableAssetViews Dictionary of asset views that are not clickable, keyed by asset +/// IDs. +- (void)registerAdView:(UIView *)adView + clickableAssetViews:(NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (NSDictionary *)nonclickableAssetViews; + +/// Unregisters ad view from this native ad. The corresponding asset views will also be +/// unregistered. +- (void)unregisterAdView; + +@end + +#pragma mark - Protocol and constants + +/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeAppInstallAd +/// ads. +@protocol GADNativeAppInstallAdLoaderDelegate +/// Called when a native app install ad is received. +- (void)adLoader:(GADAdLoader *)adLoader + didReceiveNativeAppInstallAd:(GADNativeAppInstallAd *)nativeAppInstallAd; +@end + +#pragma mark - Native App Install Ad View + +/// Base class for app install ad views. Your app install ad view must be a subclass of this class +/// and must call superclass methods for all overriden methods. +@interface GADNativeAppInstallAdView : UIView + +/// This property must point to the native app install ad object rendered by this ad view. +@property(nonatomic, strong, GAD_NULLABLE) GADNativeAppInstallAd *nativeAppInstallAd; + +/// Weak reference to your ad view's headline asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *headlineView; +/// Weak reference to your ad view's call to action asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *callToActionView; +/// Weak reference to your ad view's icon asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *iconView; +/// Weak reference to your ad view's body asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *bodyView; +/// Weak reference to your ad view's store asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *storeView; +/// Weak reference to your ad view's price asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *priceView; +/// Weak reference to your ad view's image asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *imageView; +/// Weak reference to your ad view's star rating asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *starRatingView; +/// Weak reference to your ad view's media asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADMediaView *mediaView; +/// Weak reference to your ad view's AdChoices view. Must set adChoicesView before setting +/// nativeAppInstallAd, otherwise AdChoices will be rendered in the publisher's +/// preferredAdChoicesPosition as defined in GADNativeAdViewAdOptions. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADAdChoicesView *adChoicesView; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeAppInstallAdAssetIDs.h b/GoogleMobileAds.framework/Headers/GADNativeAppInstallAdAssetIDs.h new file mode 100644 index 0000000..710f491 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeAppInstallAdAssetIDs.h @@ -0,0 +1,30 @@ +// +// GADNativeAppInstallAdAssetIDs.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +typedef NSString *GADNativeAppInstallAssetID GAD_STRING_ENUM; + +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallHeadlineAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallCallToActionAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallIconAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallBodyAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallStoreAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallPriceAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallImageAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallStarRatingAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAttributionIconAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAttributionTextAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallMediaViewAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAdChoicesViewAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallBackgroundAsset; + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeContentAd.h b/GoogleMobileAds.framework/Headers/GADNativeContentAd.h new file mode 100644 index 0000000..512846c --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeContentAd.h @@ -0,0 +1,111 @@ +// +// GADNativeContentAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +#pragma mark - Native Content Ad Assets + +/// Native content ad. To request this ad type, you need to pass kGADAdLoaderAdTypeNativeContent +/// (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If +/// you request this ad type, your delegate must conform to the GADNativeContentAdLoaderDelegate +/// protocol. +@interface GADNativeContentAd : GADNativeAd + +#pragma mark - Must be displayed + +/// Primary text headline. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *headline; +/// Secondary text. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *body; + +#pragma mark - Recommended to display + +/// Large images. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSArray *images; +/// Small logo image. +@property(nonatomic, readonly, strong, GAD_NULLABLE) GADNativeAdImage *logo; +/// Text that encourages user to take some action with the ad. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *callToAction; +/// Identifies the advertiser. For example, the advertiser’s name or visible URL. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *advertiser; +/// Video controller for controlling video playback in GADNativeContentAdView's mediaView. +@property(nonatomic, strong, readonly) GADVideoController *videoController; + +/// Registers ad view and asset views created with this native ad. +/// @param assetViews Dictionary of asset views keyed by asset IDs. +- (void)registerAdView:(UIView *)adView + assetViews:(NSDictionary *)assetViews + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -registerAdView:clickableAssetViews:nonclickableAssetViews:"); + +/// Registers ad view, clickable asset views, and nonclickable asset views with this native ad. +/// Media view shouldn't be registered as clickable. +/// @param clickableAssetViews Dictionary of asset views that are clickable, keyed by asset IDs. +/// @param nonclickableAssetViews Dictionary of asset views that are not clickable, keyed by asset +/// IDs. +- (void)registerAdView:(UIView *)adView + clickableAssetViews:(NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (NSDictionary *)nonclickableAssetViews; + +/// Unregisters ad view from this native ad. The corresponding asset views will also be +/// unregistered. +- (void)unregisterAdView; + +@end + +#pragma mark - Protocol and constants + +/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeContentAd ads. +@protocol GADNativeContentAdLoaderDelegate +/// Called when native content is received. +- (void)adLoader:(GADAdLoader *)adLoader + didReceiveNativeContentAd:(GADNativeContentAd *)nativeContentAd; +@end + +#pragma mark - Native Content Ad View + +/// Base class for content ad views. Your content ad view must be a subclass of this class and must +/// call superclass methods for all overriden methods. +@interface GADNativeContentAdView : UIView + +/// This property must point to the native content ad object rendered by this ad view. +@property(nonatomic, strong, GAD_NULLABLE) GADNativeContentAd *nativeContentAd; + +/// Weak reference to your ad view's headline asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *headlineView; +/// Weak reference to your ad view's body asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *bodyView; +/// Weak reference to your ad view's image asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *imageView; +/// Weak reference to your ad view's logo asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *logoView; +/// Weak reference to your ad view's call to action asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *callToActionView; +/// Weak reference to your ad view's advertiser asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIView *advertiserView; +/// Weak reference to your ad view's media asset view. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADMediaView *mediaView; +/// Weak reference to your ad view's AdChoices view. Must set adChoicesView before setting +/// nativeContentAd, otherwise AdChoices will be rendered in the publisher's +/// preferredAdChoicesPosition as defined in GADNativeAdViewAdOptions. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet GADAdChoicesView *adChoicesView; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeContentAdAssetIDs.h b/GoogleMobileAds.framework/Headers/GADNativeContentAdAssetIDs.h new file mode 100644 index 0000000..78ba54e --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeContentAdAssetIDs.h @@ -0,0 +1,28 @@ +// +// GADNativeContentAdAssetIDs.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +typedef NSString *GADNativeContentAdAssetID GAD_STRING_ENUM; + +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentHeadlineAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentBodyAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentCallToActionAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAdvertiserAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentImageAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentLogoAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAttributionIconAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAttributionTextAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentMediaViewAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAdChoicesViewAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentBackgroundAsset; + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h b/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h new file mode 100644 index 0000000..2fb3962 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h @@ -0,0 +1,94 @@ +// +// GADNativeCustomTemplateAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Native ad custom click handler block. |assetID| is the ID of asset that has received a click. +typedef void (^GADNativeAdCustomClickHandler)(NSString *assetID); + +/// Asset key for the GADMediaView asset view. +GAD_EXTERN NSString *const GADNativeCustomTemplateAdMediaViewKey; + +/// Native custom template ad. To request this ad type, you need to pass +/// kGADAdLoaderAdTypeNativeCustomTemplate (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in +/// GADAdLoader's initializer method. If you request this ad type, your delegate must conform to the +/// GADNativeCustomTemplateAdLoaderDelegate protocol. +@interface GADNativeCustomTemplateAd : GADNativeAd + +/// The ad's custom template ID. +@property(nonatomic, readonly) NSString *templateID; + +/// Array of available asset keys. +@property(nonatomic, readonly) NSArray *availableAssetKeys; + +/// Returns video controller for controlling receiver's video. +@property(nonatomic, readonly, strong) GADVideoController *videoController; + +/// Returns media view for rendering video loaded by the receiver. Returns nil if receiver doesn't +/// has a video. +@property(nonatomic, readonly, strong, GAD_NULLABLE) GADMediaView *mediaView; + +/// Custom click handler. Set this property only if this template ad is configured with a custom +/// click action, otherwise set it to nil. If this property is set to a non-nil value, the ad's +/// built-in click actions are ignored and |customClickHandler| is executed when a click on the +/// asset is received. +@property(atomic, copy, GAD_NULLABLE) GADNativeAdCustomClickHandler customClickHandler; + +/// Returns the native ad image corresponding to the specified key or nil if the image is not +/// available. +- (GADNativeAdImage *GAD_NULLABLE_TYPE)imageForKey:(NSString *)key; + +/// Returns the string corresponding to the specified key or nil if the string is not available. +- (NSString *GAD_NULLABLE_TYPE)stringForKey:(NSString *)key; + +/// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user +/// interacted with. If this ad is configured with a custom click action, ensure the receiver's +/// customClickHandler property is set before calling this method. +- (void)performClickOnAssetWithKey:(NSString *)assetKey; + +/// Call when the ad is displayed on screen to the user. Can be called multiple times. Only the +/// first impression is recorded. +- (void)recordImpression; + +/// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user +/// interacted with. Provide |customClickHandler| only if this template is configured with a custom +/// click action, otherwise pass in nil. If a block is provided, the ad's built-in click actions are +/// ignored and |customClickHandler| is executed after recording the click. +/// +/// This method is deprecated. See performClickOnAssetWithKey: API. +- (void)performClickOnAssetWithKey:(NSString *)assetKey + customClickHandler:(dispatch_block_t GAD_NULLABLE_TYPE)customClickHandler + GAD_DEPRECATED_MSG_ATTRIBUTE("Use performClickOnAssetWithKey:."); + +@end + +#pragma mark - Loading Protocol + +/// The delegate of a GADAdLoader object implements this protocol to receive +/// GADNativeCustomTemplateAd ads. +@protocol GADNativeCustomTemplateAdLoaderDelegate + +/// Called when requesting an ad. Asks the delegate for an array of custom template ID strings. +- (NSArray *)nativeCustomTemplateIDsForAdLoader:(GADAdLoader *)adLoader; + +/// Tells the delegate that a native custom template ad was received. +- (void)adLoader:(GADAdLoader *)adLoader + didReceiveNativeCustomTemplateAd:(GADNativeCustomTemplateAd *)nativeCustomTemplateAd; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h b/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h new file mode 100644 index 0000000..2eeb67c --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h @@ -0,0 +1,96 @@ +// +// GADNativeExpressAdView.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The view that displays native ads. A minimum implementation to get an ad from within a +/// UIViewController class is: +/// +///
+///   // Create and setup the ad view, specifying the size and origin at {0, 0}.
+///   GADNativeExpressAdView *adView =
+///       [[GADNativeExpressAdView alloc] initWithAdSize:kGADAdSizeBanner];
+///   adView.rootViewController = self;
+///   adView.adUnitID = @"ID created when registering your app";
+///   // Place the ad view onto the screen.
+///   [self.view addSubview:adView];
+///   // Request an ad without any additional targeting information.
+///   [adView loadRequest:[GADRequest request]];
+///   
+@interface GADNativeExpressAdView : UIView + +#pragma mark - Initialization + +/// Returns an initialized GADNativeExpressAdView instance set to |adSize| and positioned at +/// |origin| relative to its superview bounds. Returns nil if |adSize| is an invalid ad size. +- (instancetype GAD_NULLABLE_TYPE)initWithAdSize:(GADAdSize)adSize origin:(CGPoint)origin; + +/// Returns an initialized GADNativeExpressAdView instance set to |adSize| and positioned at the top +/// left of its superview. Returns nil if |adSize| is an invalid ad size. +- (instancetype GAD_NULLABLE_TYPE)initWithAdSize:(GADAdSize)adSize; + +/// Video controller for controlling video rendered by this native express ad view. +@property(nonatomic, strong, readonly) GADVideoController *videoController; + +#pragma mark - Pre-Request + +/// Required value created on the AdMob website. Create a new ad unit for every unique placement of +/// an ad in your application. Set this to the ID assigned for this placement. Ad units are +/// important for targeting and statistics. +/// +/// Example AdMob ad unit ID: @"ca-app-pub-0123456789012345/0123456789" +@property(nonatomic, copy, GAD_NULLABLE) IBInspectable NSString *adUnitID; + +/// Required reference to the current root view controller. For example, the root view controller in +/// a tab-based application would be the UITabViewController. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet UIViewController *rootViewController; + +/// Required to set this native ad view to a proper size. Never create your own GADAdSize directly. +/// Use one of the predefined standard ad sizes (such as kGADAdSizeBanner), or create one using the +/// GADAdSizeFromCGSize method. If you are not using mediation, changing the adSize after an ad has +/// been shown will cause a new request (for an ad of the new size) to be sent. If you are using +/// mediation, then a new request may not be sent. +@property(nonatomic, assign) GADAdSize adSize; + +/// Optional delegate object that receives state change notifications from this +/// GADNativeExpressAdView. Typically this is a UIViewController. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id delegate; + +/// A Boolean value that determines whether autoloading of ads in the receiver is enabled. If +/// enabled, you do not need to call the loadRequest: method to load ads. +@property(nonatomic, assign, getter=isAutoloadEnabled) IBInspectable BOOL autoloadEnabled; + +/// Sets options that configure ad loading. +/// +/// @param adOptions An array of GADAdLoaderOptions objects. The array is deep copied and option +/// objects cannot be modified after calling this method. +- (void)setAdOptions:(NSArray *)adOptions; + +#pragma mark - Making an Ad Request + +/// Makes an ad request. The request object supplies targeting information. +- (void)loadRequest:(GADRequest *GAD_NULLABLE_TYPE)request; + +#pragma mark - Mediation + +/// The name of the ad network adapter class that fetched the current ad. Returns nil while the +/// latest ad request is in progress or if the latest ad request failed. For both standard and +/// mediated Google AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via +/// mediation custom events, this method returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, weak, GAD_NULLABLE) NSString *adNetworkClassName; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h b/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h new file mode 100644 index 0000000..96046e2 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h @@ -0,0 +1,54 @@ +// +// GADNativeExpressAdViewDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +@class GADNativeExpressAdView; + +GAD_ASSUME_NONNULL_BEGIN + +/// Delegate methods for receiving GADNativeExpressAdView state change messages such as ad request +/// status and ad click lifecycle. +@protocol GADNativeExpressAdViewDelegate + +@optional + +#pragma mark Ad Request Lifecycle Notifications + +/// Tells the delegate that the native express ad view successfully received an ad. The delegate may +/// want to add the native express ad view to the view hierarchy if it hasn't been added yet. +- (void)nativeExpressAdViewDidReceiveAd:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that an ad request failed. The failure is normally due to network +/// connectivity or ad availablility (i.e., no fill). +- (void)nativeExpressAdView:(GADNativeExpressAdView *)nativeExpressAdView + didFailToReceiveAdWithError:(GADRequestError *)error; + +#pragma mark Click-Time Lifecycle Notifications + +/// Tells the delegate that a full screen view will be presented in response to the user clicking on +/// an ad. The delegate may want to pause animations and time sensitive interactions. +- (void)nativeExpressAdViewWillPresentScreen:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the full screen view will be dismissed. +- (void)nativeExpressAdViewWillDismissScreen:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the full screen view has been dismissed. The delegate should restart +/// anything paused while handling adViewWillPresentScreen:. +- (void)nativeExpressAdViewDidDismissScreen:(GADNativeExpressAdView *)nativeExpressAdView; + +/// Tells the delegate that the user click will open another app, backgrounding the current +/// application. The standard UIApplicationDelegate methods, like applicationDidEnterBackground:, +/// are called immediately before this method is called. +- (void)nativeExpressAdViewWillLeaveApplication:(GADNativeExpressAdView *)nativeExpressAdView; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h b/GoogleMobileAds.framework/Headers/GADRequest.h similarity index 88% rename from GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h rename to GoogleMobileAds.framework/Headers/GADRequest.h index d301737..422ba55 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h +++ b/GoogleMobileAds.framework/Headers/GADRequest.h @@ -8,13 +8,14 @@ #import #import +#import #import +GAD_ASSUME_NONNULL_BEGIN + /// Add this constant to the testDevices property's array to receive test ads on the simulator. GAD_EXTERN const id kGADSimulatorID; -@protocol GADAdNetworkExtras; - /// Genders to help deliver more relevant ads. typedef NS_ENUM(NSInteger, GADGender) { kGADGenderUnknown, ///< Unknown gender. @@ -39,7 +40,7 @@ typedef NS_ENUM(NSInteger, GADGender) { - (void)registerAdNetworkExtras:(id)extras; /// Returns the network extras defined for an ad network. -- (id)adNetworkExtrasFor:(Class)aClass; +- (id GAD_NULLABLE_TYPE)adNetworkExtrasFor:(Class)aClass; /// Removes the extras for an ad network. |aClass| is the class which represents that network's /// extras type. @@ -53,7 +54,7 @@ typedef NS_ENUM(NSInteger, GADGender) { #pragma mark Testing /// Test ads will be returned for devices with device IDs specified in this array. -@property(nonatomic, copy) NSArray *testDevices; +@property(nonatomic, copy, GAD_NULLABLE) NSArray *testDevices; #pragma mark User Information @@ -61,7 +62,7 @@ typedef NS_ENUM(NSInteger, GADGender) { @property(nonatomic, assign) GADGender gender; /// Provide the user's birthday to increase ad relevancy. -@property(nonatomic, copy) NSDate *birthday; +@property(nonatomic, copy, GAD_NULLABLE) NSDate *birthday; /// The user's current location may be used to deliver more relevant ads. However do not use Core /// Location just for advertising, make sure it is used for more beneficial reasons as well. It is @@ -93,21 +94,21 @@ typedef NS_ENUM(NSInteger, GADGender) { /// Array of keyword strings. Keywords are words or phrases describing the current user activity /// such as @"Sports Scores" or @"Football". Set this property to nil to clear the keywords. -@property(nonatomic, copy) NSArray *keywords; +@property(nonatomic, copy, GAD_NULLABLE) NSArray *keywords; /// URL string for a webpage whose content matches the app content. This webpage content is used for /// targeting purposes. -@property(nonatomic, copy) NSString *contentURL; +@property(nonatomic, copy, GAD_NULLABLE) NSString *contentURL; -#pragma mark - Request Agent Information +#pragma mark Request Agent Information /// String that identifies the ad request's origin. Third party libraries that reference the Mobile /// Ads SDK should set this property to denote the platform from which the ad request originated. /// For example, a third party ad network called "CoolAds network" that is mediating requests to the /// Mobile Ads SDK should set this property as "CoolAds". -@property(nonatomic, copy) NSString *requestAgent; +@property(nonatomic, copy, GAD_NULLABLE) NSString *requestAgent; -#pragma mark - Deprecated Methods +#pragma mark Deprecated Methods /// Provide the user's birthday to increase ad relevancy. - (void)setBirthdayWithMonth:(NSInteger)month @@ -118,7 +119,9 @@ typedef NS_ENUM(NSInteger, GADGender) { /// When Core Location isn't available but the user's location is known supplying it here may /// deliver more relevant ads. It can be any free-form text such as @"Champs-Elysees Paris" or /// @"94041 US". -- (void)setLocationWithDescription:(NSString *)locationDescription +- (void)setLocationWithDescription:(NSString *GAD_NULLABLE_TYPE)locationDescription GAD_DEPRECATED_MSG_ATTRIBUTE(" use setLocationWithLatitude:longitude:accuracy:."); @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h b/GoogleMobileAds.framework/Headers/GADRequestError.h similarity index 97% rename from GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h rename to GoogleMobileAds.framework/Headers/GADRequestError.h index 31175e4..b38dcbe 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h +++ b/GoogleMobileAds.framework/Headers/GADRequestError.h @@ -11,6 +11,8 @@ @class GADRequest; +GAD_ASSUME_NONNULL_BEGIN + /// Google AdMob Ads error domain. GAD_EXTERN NSString *const kGADErrorDomain; @@ -64,3 +66,5 @@ typedef NS_ENUM(NSInteger, GADErrorCode) { /// Represents the error generated due to invalid request parameters. @interface GADRequestError : NSError @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h b/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h new file mode 100644 index 0000000..6a27aa5 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h @@ -0,0 +1,52 @@ +// +// GADRewardBasedVideoAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import + +@protocol GADRewardBasedVideoAdDelegate; + +GAD_ASSUME_NONNULL_BEGIN + +/// The GADRewardBasedVideoAd class is used for requesting and presenting a reward based video ad. +/// This class isn't thread safe. +@interface GADRewardBasedVideoAd : NSObject + +/// Delegate for receiving video notifications. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// Indicates if the receiver is ready to be presented full screen. +@property(nonatomic, readonly, getter=isReady) BOOL ready; + +/// The ad network class name that fetched the current ad. Returns nil while the latest ad request +/// is in progress or if the latest ad request failed. For both standard and mediated Google AdMob +/// ads, this property returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation custom +/// events, this property returns the mediated custom event adapter. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; + +/// A unique identifier used to identify the user when making server-to-server reward callbacks. +/// This value is used at both request time and during ad display. New values must only be set +/// before ad requests. +@property(nonatomic, copy, GAD_NULLABLE) NSString *userIdentifier; + +/// Returns the shared GADRewardBasedVideoAd instance. ++ (GADRewardBasedVideoAd *)sharedInstance; + +/// Initiates the request to fetch the reward based video ad. The |request| object supplies ad +/// targeting information and must not be nil. The adUnitID is the ad unit id used for fetching an +/// ad and must not be nil. +- (void)loadRequest:(GADRequest *)request withAdUnitID:(NSString *)adUnitID; + +/// Presents the reward based video ad with the provided view controller. +- (void)presentFromRootViewController:(UIViewController *)viewController; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h b/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h similarity index 68% rename from GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h rename to GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h index eb0f9d1..f81dd59 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h +++ b/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h @@ -8,34 +8,42 @@ #import #import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN /// Delegate for receiving state change messages from a GADRewardBasedVideoAd such as ad requests /// succeeding/failing. @protocol GADRewardBasedVideoAdDelegate +@required + +/// Tells the delegate that the reward based video ad has rewarded the user. +- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd + didRewardUserWithReward:(GADAdReward *)reward; + @optional -/// Tells the delegate that the reward based video ad has been received. +/// Tells the delegate that the reward based video ad failed to load. +- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd + didFailToLoadWithError:(NSError *)error; + +/// Tells the delegate that a reward based video ad was received. - (void)rewardBasedVideoAdDidReceiveAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad is opened. +/// Tells the delegate that the reward based video ad opened. - (void)rewardBasedVideoAdDidOpen:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad has started playing. +/// Tells the delegate that the reward based video ad started playing. - (void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad is closed. +/// Tells the delegate that the reward based video ad closed. - (void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd *)rewardBasedVideoAd; /// Tells the delegate that the reward based video ad will leave the application. - (void)rewardBasedVideoAdWillLeaveApplication:(GADRewardBasedVideoAd *)rewardBasedVideoAd; -/// Tells the delegate that the reward based video ad has rewarded the user. -- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd - didRewardUserWithReward:(GADAdReward *)reward; - -/// Tells the delegate that the reward based video ad has failed to load. -- (void)rewardBasedVideoAd:(GADRewardBasedVideoAd *)rewardBasedVideoAd - didFailToLoadwithError:(NSError *)error; - @end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADSearchBannerView.h b/GoogleMobileAds.framework/Headers/GADSearchBannerView.h new file mode 100644 index 0000000..590b277 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADSearchBannerView.h @@ -0,0 +1,27 @@ +// +// GADSearchBannerView.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// A view that displays search ads. +/// To show search ads: +/// 1) Create a GADSearchBannerView and add it to your view controller's view hierarchy. +/// 2) Create a GADSearchRequest ad request object to hold the search query and other search data. +/// 3) Call GADSearchBannerView's -loadRequest: method with the GADSearchRequest object. +@interface GADSearchBannerView : GADBannerView + +/// If the banner view is initialized with kGADAdSizeFluid and the corresponding request is created +/// with dynamic height parameters, this delegate will be called when the ad size changes. +@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id adSizeDelegate; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADSearchRequest.h b/GoogleMobileAds.framework/Headers/GADSearchRequest.h new file mode 100644 index 0000000..34fb68b --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADSearchRequest.h @@ -0,0 +1,77 @@ +// +// GADSearchRequest.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Search ad border types. +typedef NS_ENUM(NSUInteger, GADSearchBorderType) { + kGADSearchBorderTypeNone, ///< No border. + kGADSearchBorderTypeDashed, ///< Dashed line border. + kGADSearchBorderTypeDotted, ///< Dotted line border. + kGADSearchBorderTypeSolid ///< Solid line border. +}; + +/// Search ad call button color types. +typedef NS_ENUM(NSUInteger, GADSearchCallButtonColor) { + kGADSearchCallButtonLight, ///< Light button color. + kGADSearchCallButtonMedium, ///< Medium button color. + kGADSearchCallButtonDark ///< Dark button color. +}; + +/// Specifies parameters for search ads. +@interface GADSearchRequest : GADRequest + +/// The search ad query. +@property(nonatomic, copy, GAD_NULLABLE) NSString *query; +/// The search ad background color. +@property(nonatomic, readonly, copy, GAD_NULLABLE) UIColor *backgroundColor; +/// The search ad gradient "from" color. +@property(nonatomic, readonly, copy, GAD_NULLABLE) UIColor *gradientFrom; +/// The search ad gradient "to" color. +@property(nonatomic, readonly, copy, GAD_NULLABLE) UIColor *gradientTo; +/// The search ad header color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *headerColor; +/// The search ad description text color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *descriptionTextColor; +/// The search ad anchor text color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *anchorTextColor; +/// The search ad text font family. +@property(nonatomic, copy, GAD_NULLABLE) NSString *fontFamily; +/// The search ad header text size. +@property(nonatomic, assign) NSUInteger headerTextSize; +/// The search ad border color. +@property(nonatomic, copy, GAD_NULLABLE) UIColor *borderColor; +/// The search ad border type. +@property(nonatomic, assign) GADSearchBorderType borderType; +/// The search ad border thickness. +@property(nonatomic, assign) NSUInteger borderThickness; +/// The search ad custom channels. +@property(nonatomic, copy, GAD_NULLABLE) NSString *customChannels; +/// The search ad call button color. +@property(nonatomic, assign) GADSearchCallButtonColor callButtonColor; + +/// A solid background color for rendering the ad. The background of the ad +/// can either be a solid color, or a gradient, which can be specified through +/// setBackgroundGradientFrom:toColor: method. If both solid and gradient +/// background is requested, only the latter is considered. +- (void)setBackgroundSolid:(UIColor *)color; + +/// A linear gradient background color for rendering the ad. The background of +/// the ad can either be a linear gradient, or a solid color, which can be +/// specified through setBackgroundSolid method. If both solid and gradient +/// background is requested, only the latter is considered. +- (void)setBackgroundGradientFrom:(UIColor *)from toColor:(UIColor *)toColor; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADVideoController.h b/GoogleMobileAds.framework/Headers/GADVideoController.h new file mode 100644 index 0000000..53fa5b9 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADVideoController.h @@ -0,0 +1,49 @@ +// +// GADVideoController.h +// Google Mobile Ads SDK +// +// Copyright (c) 2016 Google Inc. All rights reserved. +// + +#import +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +@protocol GADVideoControllerDelegate; + +/// The video controller class provides a way to get the video metadata and also manages video +/// content of the ad rendered by the Google Mobile Ads SDK. You don't need to create an instance of +/// this class. When the ad rendered by the Google Mobile Ads SDK loads video content, you may be +/// able to get an instance of this class from the rendered ad object. Currently only native express +/// ad view class exposes video controller. +@interface GADVideoController : NSObject + +/// Delegate for receiving video notifications. +@property(nonatomic, weak, GAD_NULLABLE) id delegate; + +/// Mute or unmute video. Set to YES to mute the video. Set to NO to allow the video to play sound. +- (void)setMute:(BOOL)mute; + +/// Play the video. Doesn't do anything if the video is already playing. +- (void)play; + +/// Pause the video. Doesn't do anything if the video is already paused. +- (void)pause; + +/// Returns a Boolean indicating if the receiver has video content. +- (BOOL)hasVideoContent; + +/// Returns the video's aspect ratio (width/height) or 0 if no video is present. +- (double)aspectRatio; + +/// Indicates if video custom controls (i.e. play/pause/mute/unmute) are enabled. +- (BOOL)customControlsEnabled; + +/// Indicates if video click to expand behavior is enabled. +- (BOOL)clickToExpandEnabled; +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h b/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h new file mode 100644 index 0000000..4b6fff9 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h @@ -0,0 +1,37 @@ +// +// GADVideoControllerDelegate.h +// Google Mobile Ads SDK +// +// Copyright (c) 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// The GADVideoControllerDelegate protocol defines methods that are called by the video controller +/// object in response to the video events that occured throught the lifetime of the video rendered +/// by an ad. +@protocol GADVideoControllerDelegate + +@optional + +/// Tells the delegate that the video controller has began or resumed playing a video. +- (void)videoControllerDidPlayVideo:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller has paused video. +- (void)videoControllerDidPauseVideo:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller's video playback has ended. +- (void)videoControllerDidEndVideoPlayback:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller has muted video. +- (void)videoControllerDidMuteVideo:(GADVideoController *)videoController; + +/// Tells the delegate that the video controller has unmuted video. +- (void)videoControllerDidUnmuteVideo:(GADVideoController *)videoController; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/GADVideoOptions.h b/GoogleMobileAds.framework/Headers/GADVideoOptions.h new file mode 100644 index 0000000..26bb7ca --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GADVideoOptions.h @@ -0,0 +1,27 @@ +// +// GADVideoOptions.h +// Google Mobile Ads SDK +// +// Copyright 2016 Google Inc. All rights reserved. +// + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Video ad options. +@interface GADVideoOptions : GADAdLoaderOptions + +/// Indicates if videos should start muted. By default this property value is YES. +@property(nonatomic, assign) BOOL startMuted; + +/// Indicates if the requested video should have custom controls enabled for play/pause/mute/unmute. +@property(nonatomic, assign) BOOL customControlsRequested; + +/// Indicates whether the requested video should have the click to expand behavior. +@property(nonatomic, assign) BOOL clickToExpandRequested; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h b/GoogleMobileAds.framework/Headers/GoogleMobileAds.h similarity index 52% rename from GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h rename to GoogleMobileAds.framework/Headers/GoogleMobileAds.h index d36ac01..9831a43 100644 --- a/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h +++ b/GoogleMobileAds.framework/Headers/GoogleMobileAds.h @@ -11,25 +11,42 @@ #error The Google Mobile Ads SDK requires a deployment target of iOS 6.0 or later. #endif -//! Project version string for GoogleMobileAds. +#if defined(__ARM_ARCH_7S__) && __ARM_ARCH_7S__ +#error The Google Mobile Ads SDK doesn't support linking with armv7s. Remove armv7s from "ARCHS" (Architectures) in your Build Settings. +#endif + +/// Project version string for GoogleMobileAds. FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; +// Header files. #import #import #import +#import +#import #import #import +#import +#import +#import #import #import #import #import #import +#import #import +#import +#import #import #import +#import +#import +#import #import +#import #import #import #import @@ -42,25 +59,47 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import +#import #import #import #import +#import #import +#import #import +#import #import +#import #import +#import #import #import #import #import #import +#import +#import +#import #import +#import #import #import #import #import #import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h b/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h new file mode 100644 index 0000000..4ba6e6e --- /dev/null +++ b/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h @@ -0,0 +1,62 @@ +// +// GoogleMobileAdsDefines.h +// Google Mobile Ads SDK +// +// Copyright (c) 2015 Google Inc. All rights reserved. +// + +#import + +#if defined(__cplusplus) +#define GAD_EXTERN extern "C" __attribute__((visibility("default"))) +#else +#define GAD_EXTERN extern __attribute__((visibility("default"))) +#endif // defined(__cplusplus) + +#if defined(__has_feature) && defined(__has_attribute) +#if __has_feature(attribute_deprecated_with_message) +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) +#elif __has_attribute(deprecated) +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) +#else +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) +#endif // __has_feature(attribute_deprecated_with_message) +#if __has_attribute(deprecated) +#define GAD_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#else +#define GAD_DEPRECATED_ATTRIBUTE +#endif // __has_attribute(deprecated) +#else +#define GAD_DEPRECATED_ATTRIBUTE +#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) +#endif // defined(__has_feature) && defined(__has_attribute) + +#ifndef IBInspectable +#define IBInspectable +#endif + +#if __has_feature(nullability) // Available starting in Xcode 6.3. +#define GAD_NULLABLE_TYPE __nullable +#define GAD_NONNULL_TYPE __nonnull +#define GAD_NULLABLE nullable +#define GAD_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN +#define GAD_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END +#else +#define GAD_NULLABLE_TYPE +#define GAD_NONNULL_TYPE +#define GAD_NULLABLE +#define GAD_ASSUME_NONNULL_BEGIN +#define GAD_ASSUME_NONNULL_END +#endif // __has_feature(nullability) + +#if __has_attribute(objc_boxable) // Available starting in Xcode 7.3. +#define GAD_BOXABLE __attribute__((objc_boxable)) +#else +#define GAD_BOXABLE +#endif // __has_attribute(objc_boxable) + +#if defined(NS_STRING_ENUM) // Available starting in Xcode 8.0. +#define GAD_STRING_ENUM NS_STRING_ENUM +#else +#define GAD_STRING_ENUM +#endif diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h b/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h new file mode 100644 index 0000000..f5ee207 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h @@ -0,0 +1,104 @@ +// +// GADMAdNetworkAdapterProtocol.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import + +#import "GADMAdNetworkConnectorProtocol.h" +#import "GADMEnums.h" + +/// Subclasses should prefix their name with "GADMAdapter" example: GADMAdapterGoogleAdMobAds +#define kGADMAdapterClassNamePrefix @"GADMAdapter" + +@protocol GADMAdNetworkConnector; + +/// Ad network adapter protocol. +@protocol GADMAdNetworkAdapter + +/// Returns a version string for the adapter. It can be any string that uniquely identifies the +/// version of your adapter. For example, "1.0", or simply a date such as "20110915". ++ (NSString *)adapterVersion; + +/// The extras class that is used to specify additional parameters for a request to this ad network. +/// Returns Nil if the network does not have extra settings for publishers to send. ++ (Class)networkExtrasClass; + +/// Designated initializer. Implementing classes can and should keep the connector in an instance +/// variable. However you must never retain the connector, as doing so will create a circular +/// reference and cause memory leaks. +- (instancetype)initWithGADMAdNetworkConnector:(id)connector; + +/// Asks the adapter to initiate a banner ad request. The adapter does not need to return anything. +/// The assumption is that the adapter will start an asynchronous ad fetch over the network. Your +/// adapter may act as a delegate to your SDK to listen to callbacks. If your SDK does not support +/// the given ad size, or does not support banner ads, call back to the adapter:didFailAd: method of +/// the connector. +- (void)getBannerWithSize:(GADAdSize)adSize; + +/// Asks the adapter to initiate an interstitial ad request. The adapter does not need to return +/// anything. The assumption is that the adapter will start an asynchronous ad fetch over the +/// network. Your adapter may act as a delegate to your SDK to listen to callbacks. If your SDK does +/// not support interstitials, call back to the adapter:didFailInterstitial: method of the +/// connector. +- (void)getInterstitial; + +/// When called, the adapter must remove itself as a delegate or notification observer from the +/// underlying ad network SDK. You should also call this method in your adapter dealloc, so when +/// your adapter goes away, your SDK will not call a freed object. This function should be +/// idempotent and should not crash regardless of when or how many times the method is called. +- (void)stopBeingDelegate; + +/// Some ad transition types may cause issues with particular Ad SDKs. The adapter may decide +/// whether the given animation type is OK. Defaults to YES. +- (BOOL)isBannerAnimationOK:(GADMBannerAnimationType)animType; + +/// Present an interstitial using the supplied UIViewController, by calling +/// presentViewController:animated:completion:. +/// +/// Your interstitial should not immediately present itself when it is received. Instead, you should +/// wait until this method is called on your adapter to present the interstitial. +/// +/// Make sure to call adapterWillPresentInterstitial: on the connector when the interstitial is +/// about to be presented, and adapterWillDismissInterstitial: and adapterDidDismissInterstitial: +/// when the interstitial is being dismissed. +- (void)presentInterstitialFromRootViewController:(UIViewController *)rootViewController; + +@optional + +/// Starts request for a native ad. |adTypes| contains the list of native ad types requested. See +/// GADAdLoaderAdTypes.h for available ad types. |options| are any additional options configured by +/// the publisher for requesting a native ad. See GADNativeAdImageAdLoaderOptions.h for available +/// image options. When this method is called the receiver may start native ad request +/// asynchronously. On completion the receiver should notify the Google Mobile Ads SDK with a native +/// ad object using the receiver's connector method +/// adapter:didReceiveNativeAdDataSource:mediationDelegate or adapter:didFailAd: if the ad request +/// encountered an error. +- (void)getNativeAdWithAdTypes:(NSArray *)adTypes options:(NSArray *)options; + +/// Indicates if the adapter handles user clicks. If this method returns YES, the adapter must +/// handle user clicks and notify the Google Mobile Ads SDK of clicks using +/// +[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. If this method returns +/// NO, the Google Mobile Ads SDK handles user clicks and notifies the adapter of clicks using +/// -[GADMediatedNativeAdDelegate +/// mediatedNativeAd:didRecordClickOnAssetWithName:view:viewController:]. +- (BOOL)handlesUserClicks; + +/// Indicates if the adapter handles user impressions tracking. If this method returns YES, the +/// Google Mobile Ads SDK will not track user impressions and the adapter must notify the +/// Google Mobile Ads SDK of impressions using +[GADMediatedNativeAdNotificationSource +/// mediatedNativeAdDidRecordImpression:]. If this method returns NO, +/// the Google Mobile Ads SDK tracks user impressions and notifies the adapter of impressions +/// using -[GADMediatedNativeAdDelegate mediatedNativeAdDidRecordImpression:]. +- (BOOL)handlesUserImpressions; + +/// If your ad network handles multiple ad sizes for the same banner ad, implement this method to +/// know when the user changes the banner size. This is typically changing from +/// kGADAdSizeSmartBannerPortrait to kGADAdSizeSmartBannerLandscape, or vice versa. If this method +/// is not implemented, every time the user changes the ad size, a new ad will be requested with the +/// new size by calling your getBannerWithSize: method. +- (void)changeAdSizeTo:(GADAdSize)adSize; + +@end diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h b/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h new file mode 100644 index 0000000..59c3f53 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h @@ -0,0 +1,93 @@ +// +// GADMAdNetworkConnectorProtocol.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import +#import + +#import "GADMediationAdRequest.h" + +@protocol GADMAdNetworkAdapter; + +/// Ad network adapters interact with the mediation SDK using an object that implements the +/// GADMAdNetworkConnector protocol. The connector object can be used to obtain necessary +/// information for ad requests, and to call back to the mediation SDK on ad request returns and +/// user interactions. +@protocol GADMAdNetworkConnector + +/// When you need to show a landing page or any other modal view, such as when a user clicks or when +/// your Ads SDK needs to show an interstitial, use this method to obtain a UIViewController that +/// you can use to show your modal view. Call the -presentViewController:animated:completion: method +/// of the returned UIViewController . +- (UIViewController *)viewControllerForPresentingModalView; + +/// Returns the preferred ad volume as a fraction of system volume (0.0 to 1.0). +- (float)adVolume; + +/// Returns whether the ad should be muted. +- (BOOL)adMuted; + +#pragma mark - Adapter Callbacks + +/// Tells the connector that the adapter failed to receive an ad. +- (void)adapter:(id)adapter didFailAd:(NSError *)error; + +/// Tells the connector that the adapter received a banner ad. +- (void)adapter:(id)adapter didReceiveAdView:(UIView *)view; + +/// Tells the connector that the adapter received an interstitial. +- (void)adapterDidReceiveInterstitial:(id)adapter; + +/// Tells the connector that the adapter has received a mediated native ad. |mediatedNativeAd| is +/// used by the Google Mobile Ads SDK for constructing a native ad object. +- (void)adapter:(id)adapter + didReceiveMediatedNativeAd:(id)mediatedNativeAd; + +#pragma mark Ad events + +// Adapter should call as many of these as possible, during the lifecycle of the loaded banner or +// interstitial ad. + +/// Tells the connector that the adapter recorded a user click. +- (void)adapterDidGetAdClick:(id)adapter; +/// Tells the connector that the adapter will leave the application because of a user action. +- (void)adapterWillLeaveApplication:(id)adapter; + +// Adapter should call as many of these as possible, during the lifecycle of the loaded banner ad. + +/// Tells the connector that the adapter will present a full screen modal. +- (void)adapterWillPresentFullScreenModal:(id)adapter; +/// Tells the connector that the adapter will dismiss a full screen modal. +- (void)adapterWillDismissFullScreenModal:(id)adapter; +/// Tells the connector that the adapter dismissed a full screen modal. +- (void)adapterDidDismissFullScreenModal:(id)adapter; + +// Adapter should call these methods during the lifecycle of the loaded interstitial ad. + +/// Tells the connector that the adapter will present an interstitial. +- (void)adapterWillPresentInterstitial:(id)adapter; +/// Tells the connector that the adapter will dismiss an interstitial. +- (void)adapterWillDismissInterstitial:(id)adapter; +/// Tells the connector that the adapter did dismiss an interstitial. +- (void)adapterDidDismissInterstitial:(id)adapter; + +#pragma mark Deprecated + +/// Deprecated. Use -adapterDidReceiveInterstitial:. +- (void)adapter:(id)adapter + didReceiveInterstitial:(NSObject *)interstitial + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapterDidReceiveInterstitial:."); + +/// Deprecated. Use -adapterDidGetAdClick:. +- (void)adapter:(id)adapter + clickDidOccurInBanner:(UIView *)view + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapterDidGetAdClick:."); + +/// Deprecated. Use -adapter:didFailAd:. +- (void)adapter:(id)adapter + didFailInterstitial:(NSError *)error GAD_DEPRECATED_MSG_ATTRIBUTE("Use -adapter:didFailAd:"); + +@end diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h b/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h new file mode 100644 index 0000000..1802598 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h @@ -0,0 +1,21 @@ +// +// GADMEnums.h +// Google Mobile Ads SDK +// +// Copyright 2011 Google. All rights reserved. +// + +#import + +/// These are the types of animation we employ for transitions between two mediated ads. +typedef NS_ENUM(NSInteger, GADMBannerAnimationType) { + kGADMBannerAnimationTypeNone = 0, ///< No animation. + kGADMBannerAnimationTypeFlipFromLeft = 1, ///< Flip from left. + kGADMBannerAnimationTypeFlipFromRight = 2, ///< Flip from right. + kGADMBannerAnimationTypeCurlUp = 3, ///< Curl up. + kGADMBannerAnimationTypeCurlDown = 4, ///< Curl down. + kGADMBannerAnimationTypeSlideFromLeft = 5, ///< Slide from left. + kGADMBannerAnimationTypeSlideFromRight = 6, ///< Slide from right. + kGADMBannerAnimationTypeFadeIn = 7, ///< Fade in. + kGADMBannerAnimationTypeRandom = 8, ///< Random animation. +}; diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h b/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h new file mode 100644 index 0000000..6eb05f1 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h @@ -0,0 +1,67 @@ +// +// GADMRewardBasedVideoAdNetworkAdapter.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import + +@protocol GADMRewardBasedVideoAdNetworkConnector; + +/// Your adapter must conform to this protocol to provide reward based video ads. +@protocol GADMRewardBasedVideoAdNetworkAdapter + +/// Returns a version string for the adapter. It can be any string that uniquely identifies the +/// version of your adapter. For example, "1.0", or simply a date such as "20110915". ++ (NSString *)adapterVersion; + +/// The extras class that is used to specify additional parameters for a request to this ad network. +/// Returns Nil if the network does not have extra settings for publishers to send. ++ (Class)networkExtrasClass; + +/// Returns an initialized instance of the adapter when mediation ad requests come in. The adapter +/// must only maintain a weak reference to the provided connector. +- (instancetype)initWithRewardBasedVideoAdNetworkConnector: + (id)connector; + +/// Tells the adapter to set up reward based video ads. The adapter should notify the Google Mobile +/// Ads SDK whether set up has succeeded or failed using callbacks provided in the connector. When +/// set up fails, the Google Mobile Ads SDK may try to set up the adapter again. +- (void)setUp; + +/// Tells the adapter to request a reward based video ad. This method is called after the adapter +/// has been set up. The adapter should notify the Google Mobile Ads SDK if the request succeeds or +/// fails using callbacks provided in the connector. +- (void)requestRewardBasedVideoAd; + +/// Tells the adapter to present the reward based video ad with the provided view controller. This +/// method is only called after the adapter successfully requested an ad. +- (void)presentRewardBasedVideoAdWithRootViewController:(UIViewController *)viewController; + +/// Tells the adapter to remove itself as a delegate or notification observer from the underlying ad +/// network SDK. +- (void)stopBeingDelegate; + +@optional + +/// Adapters that want to be initialized as early as possible should implement this method to +/// opt-into initialization when the publisher initializes the Google Mobile Ads SDK. If not +/// implemented, initWithRewardBasedVideoAdNetworkConnector: gets called the first time the +/// publisher loads a rewarded video ad. +- (instancetype)initWithRewardBasedVideoAdNetworkConnector: + (id)connector + credentials:(NSArray *)credentials; + +/// Returns an initialized instance of the adapter. The adapter must only maintain a weak reference +/// to the provided connector. +- (instancetype)initWithGADMAdNetworkConnector:(id)connector + GAD_DEPRECATED_MSG_ATTRIBUTE("Use initWithRewardBasedVideoAdNetworkConnector:."); + +/// Tells the adapter to set up reward based video ads with the provided user ID. The adapter should +/// notify the Google Mobile Ads SDK whether set up has succeeded or failed using callbacks provided +/// in the connector. When set up fails, the Google Mobile Ads SDK may try to set up the adapter +/// again. +- (void)setUpWithUserID:(NSString *)userID GAD_DEPRECATED_MSG_ATTRIBUTE("Use setUp."); + +@end diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h b/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h new file mode 100644 index 0000000..82b8d45 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h @@ -0,0 +1,58 @@ +// +// GADMRewardBasedVideoAdNetworkConnector.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import + +@protocol GADMediationAdRequest; +@protocol GADMRewardBasedVideoAdNetworkAdapter; + +/// Reward based video ad network adapters interact with the mediation SDK using an object that +/// conforms to the GADMRewardBasedVideoAdNetworkConnector protocol. The connector object can be +/// used to obtain information for ad requests and to call back to the mediation SDK on ad responses +/// and user interactions. +@protocol GADMRewardBasedVideoAdNetworkConnector + +/// Tells the delegate that the adapter successfully set up a reward based video ad. +- (void)adapterDidSetUpRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that the adapter failed to set up a reward based video ad. +- (void)adapter:(id)rewardBasedVideoAdAdapter + didFailToSetUpRewardBasedVideoAdWithError:(NSError *)error; + +/// Tells the delegate that a reward based video ad was clicked. +- (void)adapterDidGetAdClick:(id)adapter; + +/// Tells the delegate that a reward based video ad has loaded. +- (void)adapterDidReceiveRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that a reward based video ad has opened. +- (void)adapterDidOpenRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that a reward based video ad has started playing. +- (void)adapterDidStartPlayingRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that a reward based video ad has closed. +- (void)adapterDidCloseRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that the adapter has rewarded the user. +- (void)adapter:(id)rewardBasedVideoAd + didRewardUserWithReward:(GADAdReward *)reward; + +/// Tells the delegate that a reward based video ad's action will leave the application. +- (void)adapterWillLeaveApplication: + (id)rewardBasedVideoAdAdapter; + +/// Tells the delegate that a reward based video ad failed to load. +- (void)adapter:(id)rewardBasedVideoAdAdapter + didFailToLoadRewardBasedVideoAdwithError:(NSError *)error; + +@end diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAd.h b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAd.h new file mode 100644 index 0000000..aa070ce --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAd.h @@ -0,0 +1,27 @@ +// +// GADMediatedNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Base protocol for mediated native ads. +@protocol GADMediatedNativeAd + +/// Returns a delegate object that receives state change notifications. +- (nullable id)mediatedNativeAdDelegate; + +/// Returns a dictionary of asset names and object pairs for assets that are not handled by +/// properties of the GADMediatedNativeAd subclass. +- (NSDictionary *GAD_NULLABLE_TYPE)extraAssets; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdDelegate.h b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdDelegate.h new file mode 100644 index 0000000..773f047 --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdDelegate.h @@ -0,0 +1,49 @@ +// +// GADMediatedNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +@protocol GADMediatedNativeAd; + +/// GADMediatedNativeAdDelegate objects handle mediated native ad events. +@protocol GADMediatedNativeAdDelegate + +@optional + +/// Tells the delegate that the mediated native ad has rendered in |view|. viewController should be +/// used to present modal views for the ad. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didRenderInView:(UIView *)view + viewController:(UIViewController *)viewController; + +/// Tells the delegate that the mediated native ad has recorded an impression. This method is called +/// only once per mediated native ad. +- (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; + +/// Tells the delegate that the mediated native ad has recorded a user click on the asset named +/// |assetName|. Full screen actions should be presented from |viewController|. This method is +/// called only if -[GADMAdNetworkAdapter handlesUserClicks] returns NO. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didRecordClickOnAssetWithName:(NSString *)assetName + view:(UIView *)view + viewController:(UIViewController *)viewController; + +/// Tells the delegate that the mediated native ad has untracked |view|. This method is called +/// when the mediatedNativeAd is no longer rendered in the provided view and the delegate should +/// stop tracking the view's impressions and clicks. The method may also be called with a nil view +/// when the view in which the mediated native ad has rendered is deallocated. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didUntrackView:(nullable UIView *)view; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdNotificationSource.h b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdNotificationSource.h new file mode 100644 index 0000000..bace5de --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdNotificationSource.h @@ -0,0 +1,53 @@ +// +// GADMediatedNativeAdNotificationSource.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Used by mediation adapters to notify the Google Mobile Ads SDK about events occurring in the +/// lifecycle of a GADMediatedNativeAd. +@interface GADMediatedNativeAdNotificationSource : NSObject + +/// Called by the adapter when it has registered an impression on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserImpressions] returns YES. ++ (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; + +/// Called by the adapter when it has registered a user click on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserClicks] returns YES. ++ (void)mediatedNativeAdDidRecordClick:(id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen. ++ (void)mediatedNativeAdWillPresentScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter just before the in app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdWillDismissScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter after the in app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdDidDismissScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd causes another app (such as a browser +/// or the App Store) to take input focus. ++ (void)mediatedNativeAdWillLeaveApplication:(id)mediatedNativeAd; + +/// Called by the adapter when native video playback has begun or resumed. ++ (void)mediatedNativeAdDidPlayVideo:(id)mediatedNativeAd; + +/// Called by the adapter when native video playback has paused. ++ (void)mediatedNativeAdDidPauseVideo:(id)mediatedNativeAd; + +/// Called by the adapter when native video playback has ended. ++ (void)mediatedNativeAdDidEndVideoPlayback:(id)mediatedNativeAd; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAppInstallAd.h b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAppInstallAd.h new file mode 100644 index 0000000..4e9df1a --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAppInstallAd.h @@ -0,0 +1,57 @@ +// +// GADMediatedNativeAppInstallAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Provides methods used for constructing native app install ads. The adapter must return an object +/// conforming to this protocol for native app install requests. +@protocol GADMediatedNativeAppInstallAd + +/// App title. +- (NSString *GAD_NULLABLE_TYPE)headline; + +/// Array of GADNativeAdImage objects related to the advertised application. +- (NSArray *GAD_NULLABLE_TYPE)images; + +/// App description. +- (NSString *GAD_NULLABLE_TYPE)body; + +/// Application icon. +- (GADNativeAdImage *GAD_NULLABLE_TYPE)icon; + +/// Text that encourages user to take some action with the ad. For example "Install". +- (NSString *GAD_NULLABLE_TYPE)callToAction; + +/// App store rating (0 to 5). +- (NSDecimalNumber *GAD_NULLABLE_TYPE)starRating; + +/// The app store name. For example, "App Store". +- (NSString *GAD_NULLABLE_TYPE)store; + +/// String representation of the app's price. +- (NSString *GAD_NULLABLE_TYPE)price; + +@optional + +/// AdChoices view. +- (UIView *GAD_NULLABLE_TYPE)adChoicesView; + +/// Media view. +- (UIView *GAD_NULLABLE_TYPE)mediaView; + +/// Returns YES if the ad has video content. +- (BOOL)hasVideoContent; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeContentAd.h b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeContentAd.h new file mode 100644 index 0000000..bd15dbd --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeContentAd.h @@ -0,0 +1,50 @@ +// +// GADMediatedNativeContentAd.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Provides methods used for constructing native content ads. +@protocol GADMediatedNativeContentAd + +/// Primary text headline. +- (NSString *GAD_NULLABLE_TYPE)headline; + +/// Secondary text. +- (NSString *GAD_NULLABLE_TYPE)body; + +/// List of large images. Each object is an instance of GADNativeAdImage. +- (NSArray *GAD_NULLABLE_TYPE)images; + +/// Small logo image. +- (GADNativeAdImage *GAD_NULLABLE_TYPE)logo; + +/// Text that encourages user to take some action with the ad. +- (NSString *GAD_NULLABLE_TYPE)callToAction; + +/// Identifies the advertiser. For example, the advertiser’s name or visible URL. +- (NSString *GAD_NULLABLE_TYPE)advertiser; + +@optional + +/// AdChoices view. +- (UIView *GAD_NULLABLE_TYPE)adChoicesView; + +/// Media view. +- (UIView *GAD_NULLABLE_TYPE)mediaView; + +/// Returns YES if the ad has video content. +- (BOOL)hasVideoContent; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h b/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h new file mode 100644 index 0000000..104ea5a --- /dev/null +++ b/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h @@ -0,0 +1,56 @@ +// +// GADMediationAdRequest.h +// Google Mobile Ads SDK +// +// Copyright 2015 Google. All rights reserved. +// + +#import +#import + +/// Provides information which can be used for making ad requests during mediation. +@protocol GADMediationAdRequest + +/// Publisher ID set by the publisher on the AdMob frontend. +- (NSString *)publisherId; + +/// Mediation configurations set by the publisher on the AdMob frontend. +- (NSDictionary *)credentials; + +/// Returns YES if the publisher is requesting test ads. +- (BOOL)testMode; + +/// The adapter's ad network extras specified in GADRequest. +- (id)networkExtras; + +/// Returns the value of childDirectedTreatment supplied by the publisher. Returns nil if the +/// publisher hasn't specified child directed treatment. Returns @YES if child directed treatment is +/// enabled. +- (NSNumber *)childDirectedTreatment; + +/// The end user's gender set by the publisher in GADRequest. Returns kGADGenderUnknown if it has +/// not been specified. +- (GADGender)userGender; + +/// The end user's birthday set by the publisher. Returns nil if it has not been specified. +- (NSDate *)userBirthday; + +/// Returns YES if the publisher has specified latitude and longitude location. +- (BOOL)userHasLocation; + +/// Returns the user's latitude or 0 if location isn't specified. +- (CGFloat)userLatitude; + +/// Returns the user's longitude or 0 if location isn't specified. +- (CGFloat)userLongitude; + +/// Returns the user's location accuracy or 0 if location isn't specified. +- (CGFloat)userLocationAccuracyInMeters; + +/// Returns user's location description. May return a value even if userHasLocation is NO. +- (NSString *)userLocationDescription; + +/// Keywords describing the user's current activity. Example: @"Sport Scores". +- (NSArray *)userKeywords; + +@end diff --git a/GoogleMobileAds.framework/Modules/module.modulemap b/GoogleMobileAds.framework/Modules/module.modulemap index 8eac697..f155426 100644 --- a/GoogleMobileAds.framework/Modules/module.modulemap +++ b/GoogleMobileAds.framework/Modules/module.modulemap @@ -7,14 +7,109 @@ framework module GoogleMobileAds { link framework "AdSupport" link framework "AudioToolbox" link framework "AVFoundation" + link framework "CFNetwork" link framework "CoreGraphics" link framework "CoreMedia" + link framework "CoreMotion" link framework "CoreTelephony" - link framework "EventKit" - link framework "EventKitUI" + link framework "CoreVideo" link framework "Foundation" + link framework "GLKit" + link framework "JavaScriptCore" + link framework "MediaPlayer" link framework "MessageUI" + link framework "MobileCoreServices" + link framework "OpenGLES" + link framework "QuartzCore" + link framework "SafariServices" + link framework "Security" link framework "StoreKit" link framework "SystemConfiguration" link framework "UIKit" + link framework "WebKit" + + header "GoogleMobileAdsDefines.h" + + header "GADAdNetworkExtras.h" + header "GADAdSize.h" + header "GADAudioVideoManagerDelegate.h" + header "GADAudioVideoManager.h" + header "GADBannerView.h" + header "GADBannerViewDelegate.h" + header "GADCorrelator.h" + header "GADCorrelatorAdLoaderOptions.h" + header "GADDebugOptionsViewController.h" + header "GADExtras.h" + header "GADInAppPurchase.h" + header "GADInAppPurchaseDelegate.h" + header "GADInterstitial.h" + header "GADInterstitialDelegate.h" + header "GADMediaView.h" + header "GADMobileAds.h" + header "GADNativeExpressAdView.h" + header "GADNativeExpressAdViewDelegate.h" + header "GADRequest.h" + header "GADRequestError.h" + header "GADVideoController.h" + header "GADVideoControllerDelegate.h" + header "GADVideoOptions.h" + + header "DFPBannerView.h" + header "DFPBannerViewOptions.h" + header "DFPCustomRenderedAd.h" + header "DFPCustomRenderedBannerViewDelegate.h" + header "DFPCustomRenderedInterstitialDelegate.h" + header "DFPInterstitial.h" + header "DFPRequest.h" + header "GADAdSizeDelegate.h" + header "GADAppEventDelegate.h" + + header "GADAdLoader.h" + header "GADAdLoaderAdTypes.h" + header "GADAdLoaderDelegate.h" + + header "GADAdChoicesView.h" + header "GADNativeAd.h" + header "GADNativeAdDelegate.h" + header "GADNativeAdImage.h" + header "GADNativeAdImage+Mediation.h" + header "GADNativeAppInstallAd.h" + header "GADNativeAppInstallAdAssetIDs.h" + header "GADNativeContentAd.h" + header "GADNativeContentAdAssetIDs.h" + header "GADNativeCustomTemplateAd.h" + + header "GADMultipleAdsAdLoaderOptions.h" + header "GADNativeAdImageAdLoaderOptions.h" + header "GADNativeAdViewAdOptions.h" + + header "GADCustomEventBanner.h" + header "GADCustomEventBannerDelegate.h" + header "GADCustomEventExtras.h" + header "GADCustomEventInterstitial.h" + header "GADCustomEventInterstitialDelegate.h" + header "GADCustomEventNativeAd.h" + header "GADCustomEventNativeAdDelegate.h" + header "GADCustomEventParameters.h" + header "GADCustomEventRequest.h" + + header "GADDynamicHeightSearchRequest.h" + header "GADSearchBannerView.h" + header "GADSearchRequest.h" + + header "GADAdReward.h" + header "GADRewardBasedVideoAd.h" + header "GADRewardBasedVideoAdDelegate.h" + + header "Mediation/GADMAdNetworkAdapterProtocol.h" + header "Mediation/GADMAdNetworkConnectorProtocol.h" + header "Mediation/GADMediatedNativeAd.h" + header "Mediation/GADMediatedNativeAdDelegate.h" + header "Mediation/GADMediatedNativeAdNotificationSource.h" + header "Mediation/GADMediatedNativeAppInstallAd.h" + header "Mediation/GADMediatedNativeContentAd.h" + header "Mediation/GADMediationAdRequest.h" + header "Mediation/GADMEnums.h" + header "Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h" + header "Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h" } diff --git a/GoogleMobileAds.framework/Versions/A/GoogleMobileAds b/GoogleMobileAds.framework/Versions/A/GoogleMobileAds deleted file mode 100644 index e22765a..0000000 Binary files a/GoogleMobileAds.framework/Versions/A/GoogleMobileAds and /dev/null differ diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h b/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h deleted file mode 100644 index 1b1eaeb..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// GADAdLoaderAdTypes.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import - -#import - -// For use with GADAdLoader's creation methods. See the constants' respective headers for each ad -// type's delegate requirements. - -/// Native app install ad type. \see GADNativeAppInstallAd.h. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; - -/// Native content ad type. \see GADNativeContentAd.h. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; - -/// Native custom template ad type. \see GADNativeCustomTemplateAd.h. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h b/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h deleted file mode 100644 index 5fa5ac0..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// GADAdLoaderDelegate.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import - -@class GADAdLoader; -@class GADRequestError; - -@protocol GADAdLoaderDelegate - -/// Called when adLoader fails to load an ad. -- (void)adLoader:(GADAdLoader *)adLoader didFailToReceiveAdWithError:(GADRequestError *)error; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h b/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h deleted file mode 100644 index e0e28c2..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// GADCustomEventBanner.h -// Google Mobile Ads SDK -// -// Copyright 2012 Google Inc. All rights reserved. -// - -#import - -#import -#import -#import - -/// The protocol for a Custom Event of the banner type. Your Custom Event handler object for banners -/// must implement this protocol. The requestBannerAd method will be called when mediation schedules -/// your Custom Event to be executed. -@protocol GADCustomEventBanner - -/// This method is called by mediation when your Custom Event is scheduled to be executed. Results -/// of the execution should be reported back via the delegate. |adSize| is the size of the ad as -/// configured in the mediation UI for the mediation placement. |serverParameter| and |serverLabel| -/// are the parameter and label configured in the mediation UI for the Custom Event. |request| -/// contains information about the ad request, some of those are from GADRequest. -- (void)requestBannerAd:(GADAdSize)adSize - parameter:(NSString *)serverParameter - label:(NSString *)serverLabel - request:(GADCustomEventRequest *)request; - -/// You should call back to the |delegate| with the results of the execution to ensure mediation -/// behaves correctly. The delegate is weakly referenced to prevent memory leaks caused by circular -/// retention. -/// -/// Define the -delegate and -setDelegate: methods in your class. -/// -/// In your class's -dealloc method, remember to nil out the delegate. -@property(nonatomic, weak) id delegate; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h b/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h deleted file mode 100644 index 9e2a860..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// GADCustomEventInterstitial.h -// Google Mobile Ads SDK -// -// Copyright 2012 Google Inc. All rights reserved. -// - -#import - -#import -#import - -/// The protocol for a Custom Event of the interstitial type. Your Custom Event handler object for -/// interstitial must implement this protocol. The requestInterstitialAd method will be called when -/// mediation schedules your Custom Event to be executed. -@protocol GADCustomEventInterstitial - -/// You should call back to the |delegate| with the results of the execution to ensure mediation -/// behaves correctly. The delegate is assigned, not retained, to prevent memory leak caused by -/// circular retention. -/// -/// Define the -delegate and -setDelegate: methods in your class. -/// -/// In your class's -dealloc method, remember to nil out the delegate. -@property(nonatomic, weak) id delegate; - -/// This method is called by mediation when your Custom Event is scheduled to be executed. Your -/// implementation should begin retrieval of the interstitial ad, usually from a backend server, or -/// from an ad network SDK. Results of the execution should be reported back via the delegate. Note -/// that you should wait until -presentFromRootViewController is called before displaying the -/// interstitial ad. Do not automatically display the ad when you receive the ad. Instead, retain -/// the ad and display it when presentFromRootViewController is called. |serverParameter| and -/// |serverLabel| are the parameter and label configured in the AdMob mediation UI for the Custom -/// Event. |request| contains information about the ad request, some of those are from GADRequest. -- (void)requestInterstitialAdWithParameter:(NSString *)serverParameter - label:(NSString *)serverLabel - request:(GADCustomEventRequest *)request; - -/// Present the interstitial ad as a modal view using the provided view controller. This is called -/// only after your Custom Event calls back to the delegate with the message -/// -customEvent:didReceiveAd: . -- (void)presentFromRootViewController:(UIViewController *)rootViewController; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h b/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h deleted file mode 100644 index c8c2875..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// GADMobileAds.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import - -@interface GADMobileAds : NSObject - -/// Disables automated in app purchase (IAP) reporting. Must be called before any IAP transaction is -/// initiated. IAP reporting is used to track IAP ad conversions. Do not disable reporting if you -/// use IAP ads. -+ (void)disableAutomatedInAppPurchaseReporting; - -/// Disables automated SDK crash reporting. If not called, the SDK records the original exception -/// handler if available and registers a new exception handler. The new exception handler only -/// reports SDK related exceptions and calls the recorded original exception handler. -+ (void)disableSDKCrashReporting; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h b/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h deleted file mode 100644 index a858b91..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// GADNativeAd.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import -#import - -@protocol GADNativeAdDelegate; - -/// Native ad base class. All native ad types are subclasses of this class. -@interface GADNativeAd : NSObject - -/// Optional delegate to receive state change notifications. -@property(nonatomic, weak) id delegate; - -/// Root view controller for handling ad actions. -@property(nonatomic, weak) UIViewController *rootViewController; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h b/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h deleted file mode 100644 index 0bec96c..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// GADNativeAppInstallAd.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import -#import - -#import -#import -#import -#import - -// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must -// conform to the GADNativeAppInstallAdRequestDelegate protocol. -// -// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeAppInstall; - -/// Native app install ad. -@interface GADNativeAppInstallAd : GADNativeAd - -#pragma mark - Must be displayed - -/// App title. -@property(nonatomic, readonly, copy) NSString *headline; -/// Text that encourages user to take some action with the ad. For example "Install". -@property(nonatomic, readonly, copy) NSString *callToAction; -/// Application icon. -@property(nonatomic, readonly, strong) GADNativeAdImage *icon; - -#pragma mark - Recommended to display - -/// App description. -@property(nonatomic, readonly, copy) NSString *body; -/// The app store name. For example, "App Store". -@property(nonatomic, readonly, copy) NSString *store; -/// String representation of the app's price. -@property(nonatomic, readonly, copy) NSString *price; -/// Array of GADNativeAdImage objects related to the advertised application. -@property(nonatomic, readonly, strong) NSArray *images; -/// App store rating (0 to 5). -@property(nonatomic, readonly, copy) NSDecimalNumber *starRating; - -@end - -#pragma mark - Protocol and constants - -/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeAppInstallAd -/// ads. -@protocol GADNativeAppInstallAdLoaderDelegate -/// Called when a native app install ad is received. -- (void)adLoader:(GADAdLoader *)adLoader - didReceiveNativeAppInstallAd:(GADNativeAppInstallAd *)nativeAppInstallAd; -@end - -#pragma mark - Native App Install Ad View - -/// Base class for app install ad views. Your app install ad view must be a subclass of this class -/// and must call superclass methods for all overriden methods. -@interface GADNativeAppInstallAdView : UIView - -/// This property must point to the native app install ad object rendered by this ad view. -@property(nonatomic, strong) GADNativeAppInstallAd *nativeAppInstallAd; - -// Weak references to your ad view's asset views. -@property(nonatomic, weak) IBOutlet UIView *headlineView; -@property(nonatomic, weak) IBOutlet UIView *callToActionView; -@property(nonatomic, weak) IBOutlet UIView *iconView; -@property(nonatomic, weak) IBOutlet UIView *bodyView; -@property(nonatomic, weak) IBOutlet UIView *storeView; -@property(nonatomic, weak) IBOutlet UIView *priceView; -@property(nonatomic, weak) IBOutlet UIView *imageView; -@property(nonatomic, weak) IBOutlet UIView *starRatingView; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h b/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h deleted file mode 100644 index 3d14258..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h +++ /dev/null @@ -1,73 +0,0 @@ -// -// GADNativeContentAd.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import -#import - -#import -#import -#import -#import - -#pragma mark - Native Content Ad Assets - -// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must -// conform to the GADNativeContentAdRequestDelegate protocol. -// -// See GADNativeAdImageAdLoaderOptions.h for ad loader image options. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeContent; - -/// Native content ad. -@interface GADNativeContentAd : GADNativeAd - -#pragma mark - Must be displayed - -/// Primary text headline. -@property(nonatomic, readonly, copy) NSString *headline; -/// Secondary text. -@property(nonatomic, readonly, copy) NSString *body; - -#pragma mark - Recommended to display - -/// Large images. -@property(nonatomic, readonly, copy) NSArray *images; -/// Small logo image. -@property(nonatomic, readonly, strong) GADNativeAdImage *logo; -/// Text that encourages user to take some action with the ad. -@property(nonatomic, readonly, copy) NSString *callToAction; -/// Identifies the advertiser. For example, the advertiser’s name or visible URL. -@property(nonatomic, readonly, copy) NSString *advertiser; - -@end - -#pragma mark - Protocol and constants - -/// The delegate of a GADAdLoader object implements this protocol to receive GADNativeContentAd ads. -@protocol GADNativeContentAdLoaderDelegate -/// Called when native content is received. -- (void)adLoader:(GADAdLoader *)adLoader - didReceiveNativeContentAd:(GADNativeContentAd *)nativeContentAd; -@end - -#pragma mark - Native Content Ad View - -/// Base class for content ad views. Your content ad view must be a subclass of this class and must -/// call superclass methods for all overriden methods. -@interface GADNativeContentAdView : UIView - -/// This property must point to the native content ad object rendered by this ad view. -@property(nonatomic, strong) GADNativeContentAd *nativeContentAd; - -// Weak references to your ad view's asset views. -@property(nonatomic, weak) IBOutlet UIView *headlineView; -@property(nonatomic, weak) IBOutlet UIView *bodyView; -@property(nonatomic, weak) IBOutlet UIView *imageView; -@property(nonatomic, weak) IBOutlet UIView *logoView; -@property(nonatomic, weak) IBOutlet UIView *callToActionView; -@property(nonatomic, weak) IBOutlet UIView *advertiserView; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h b/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h deleted file mode 100644 index e832fc2..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// GADNativeCustomTemplateAd.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import -#import - -#import -#import -#import -#import - -// For use with GADAdLoader's creation methods. If you request this ad type, your delegate must -// conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. -GAD_EXTERN NSString *const kGADAdLoaderAdTypeNativeCustomTemplate; - -/// Native custom template ad. -@interface GADNativeCustomTemplateAd : GADNativeAd - -/// The ad's custom template ID. -@property(nonatomic, readonly) NSString *templateID; - -/// Array of available asset keys. -@property(nonatomic, readonly) NSArray *availableAssetKeys; - -/// Returns the native ad image corresponding to the specified key or nil if the image is not -/// available. -- (GADNativeAdImage *)imageForKey:(NSString *)key; - -/// Returns the string corresponding to the specified key or nil if the string is not available. -- (NSString *)stringForKey:(NSString *)key; - -/// Call when the user clicks on the ad. Provide the asset key that best matches the asset the user -/// interacted with. Provide |customClickHandler| only if this template is configured with a custom -/// click action, otherwise pass in nil. If a block is provided, the ad's built-in click actions are -/// ignored and |customClickHandler| is executed after recording the click. -- (void)performClickOnAssetWithKey:(NSString *)assetKey - customClickHandler:(dispatch_block_t)customClickHandler; - -/// Call when the ad is displayed on screen to the user. Can be called multiple times. Only the -/// first impression is recorded. -- (void)recordImpression; - -@end - -#pragma mark - Loading Protocol - -/// The delegate of a GADAdLoader object implements this protocol to receive -/// GADNativeCustomTemplateAd ads. -@protocol GADNativeCustomTemplateAdLoaderDelegate - -/// Called when requesting an ad. Asks the delgate for an array of custom template ID strings. -- (NSArray *)nativeCustomTemplateIDsForAdLoader:(GADAdLoader *)adLoader; - -/// Tells the delegate that a native custom template ad was received. -- (void)adLoader:(GADAdLoader *)adLoader - didReceiveNativeCustomTemplateAd:(GADNativeCustomTemplateAd *)nativeCustomTemplateAd; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h b/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h deleted file mode 100644 index b70cd24..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// GADRewardBasedVideoAd.h -// Google Mobile Ads SDK -// -// Copyright 2015 Google Inc. All rights reserved. -// - -#import -#import - -@class GADRequest; - -@protocol GADRewardBasedVideoAdDelegate; - -@interface GADRewardBasedVideoAd : NSObject - -/// Delegate for receiving video notifications. -@property(nonatomic, weak) id delegate; - -/// Indicates if the receiver is ready to be presented full screen. -@property(nonatomic, readonly, assign, getter=isReady) BOOL ready; - -/// Singleton instance. -+ (GADRewardBasedVideoAd *)sharedInstance; - -/// Initiate the request to fetch the reward based video ad. -- (void)loadRequest:(GADRequest *)request - withAdUnitID:(NSString *)adUnitID - userID:(NSString *)userID; - -/// Present the reward based video ad with provided view controller. -- (void)presentFromRootViewController:(UIViewController *)viewController; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h b/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h deleted file mode 100644 index 363ad24..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADSearchBannerView.h -// Google Mobile Ads SDK -// -// Copyright 2011 Google Inc. All rights reserved. -// - -#import - -// A view that displays search ads. -// To show search ads: -// 1) Create a GADSearchBannerView and add it to your view controller's view hierarchy. -// 2) Create a GADSearchRequest ad request object to hold the search query and other search data. -// 3) Call GADSearchBannerView's -loadRequest: method with the GADSearchRequest object. -@interface GADSearchBannerView : GADBannerView -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h b/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h deleted file mode 100644 index 461852a..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// GADSearchRequest.h -// Google Mobile Ads SDK -// -// Copyright 2011 Google Inc. All rights reserved. -// - -#import -#import - -#import - -/// Search ad border types. -typedef NS_ENUM(NSUInteger, GADSearchBorderType) { - kGADSearchBorderTypeNone, - kGADSearchBorderTypeDashed, - kGADSearchBorderTypeDotted, - kGADSearchBorderTypeSolid -}; - -typedef NS_ENUM(NSUInteger, GADSearchCallButtonColor) { - kGADSearchCallButtonLight, - kGADSearchCallButtonMedium, - kGADSearchCallButtonDark -}; - -// Specifies parameters for search ads. -@interface GADSearchRequest : GADRequest - -@property(nonatomic, copy) NSString *query; -@property(nonatomic, copy, readonly) UIColor *backgroundColor; -@property(nonatomic, copy, readonly) UIColor *gradientFrom; -@property(nonatomic, copy, readonly) UIColor *gradientTo; -@property(nonatomic, copy) UIColor *headerColor; -@property(nonatomic, copy) UIColor *descriptionTextColor; -@property(nonatomic, copy) UIColor *anchorTextColor; -@property(nonatomic, copy) NSString *fontFamily; -@property(nonatomic, assign) NSUInteger headerTextSize; -@property(nonatomic, copy) UIColor *borderColor; -@property(nonatomic, assign) GADSearchBorderType borderType; -@property(nonatomic, assign) NSUInteger borderThickness; -@property(nonatomic, copy) NSString *customChannels; -@property(nonatomic, assign) GADSearchCallButtonColor callButtonColor; - -// A solid background color for rendering the ad. The background of the ad -// can either be a solid color, or a gradient, which can be specified through -// setBackgroundGradientFrom:toColor: method. If both solid and gradient -// background is requested, only the latter is considered. -- (void)setBackgroundSolid:(UIColor *)color; - -// A linear gradient background color for rendering the ad. The background of -// the ad can either be a linear gradient, or a solid color, which can be -// specified through setBackgroundSolid method. If both solid and gradient -// background is requested, only the latter is considered. -- (void)setBackgroundGradientFrom:(UIColor *)from toColor:(UIColor *)toColor; - -@end diff --git a/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h b/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h deleted file mode 100644 index ad036c9..0000000 --- a/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// GoogleMobileAdsDefines.h -// Google Mobile Ads SDK -// -// Copyright (c) 2015 Google Inc. All rights reserved. -// - -#if defined(__cplusplus) -#define GAD_EXTERN extern "C" __attribute__((visibility("default"))) -#else -#define GAD_EXTERN extern __attribute__((visibility("default"))) -#endif // defined(__cplusplus) - -#if defined(__has_feature) && defined(__has_attribute) -#if __has_feature(attribute_GAD_DEPRECATED_with_message) -#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) -#elif __has_attribute(deprecated) -#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) -#else -#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) -#endif // __has_feature(attribute_GAD_DEPRECATED_with_message) -#if __has_attribute(deprecated) -#define GAD_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#else -#define GAD_DEPRECATED_ATTRIBUTE -#endif // __has_attribute(deprecated) -#else -#define GAD_DEPRECATED_ATTRIBUTE -#define GAD_DEPRECATED_MSG_ATTRIBUTE(s) -#endif // defined(__has_feature) && defined(__has_attribute) diff --git a/GoogleMobileAds.framework/Versions/Current b/GoogleMobileAds.framework/Versions/Current deleted file mode 120000 index 8c7e5a6..0000000 --- a/GoogleMobileAds.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file diff --git a/Launch Screen.storyboard b/Launch Screen.storyboard new file mode 100644 index 0000000..b74d8e0 --- /dev/null +++ b/Launch Screen.storyboard @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaunchScreen.storyboard b/LaunchScreen.storyboard new file mode 100755 index 0000000..1784f75 --- /dev/null +++ b/LaunchScreen.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Librelio.xcodeproj/project.pbxproj b/Librelio.xcodeproj/project.pbxproj index 7d87583..f9cd0b7 100644 --- a/Librelio.xcodeproj/project.pbxproj +++ b/Librelio.xcodeproj/project.pbxproj @@ -542,7 +542,7 @@ 14DB139D164C52C4001FE76B /* Magazines.plist in Resources */ = {isa = PBXBuildFile; fileRef = 14DB137D164C52C4001FE76B /* Magazines.plist */; }; 14DB139E164C52C4001FE76B /* Magazines_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 14DB137E164C52C4001FE76B /* Magazines_background.png */; }; 14DB139F164C52C4001FE76B /* Tabs.plist in Resources */ = {isa = PBXBuildFile; fileRef = 14DB137F164C52C4001FE76B /* Tabs.plist */; }; - 14DB13A0164C52C4001FE76B /* wind-generic.png in Resources */ = {isa = PBXBuildFile; fileRef = 14DB1380164C52C4001FE76B /* wind-generic.png */; }; + 14DB13A0164C52C4001FE76B /* generic.png in Resources */ = {isa = PBXBuildFile; fileRef = 14DB1380164C52C4001FE76B /* generic.png */; }; 14DB13A1164C52C4001FE76B /* wind_355.png in Resources */ = {isa = PBXBuildFile; fileRef = 14DB1381164C52C4001FE76B /* wind_355.png */; }; 14E42D4A183BC5590062825A /* WAZippedHtmlParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 14E42D48183BC5590062825A /* WAZippedHtmlParser.m */; }; 14E42D4B183BC5590062825A /* WAZippedHtmlParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 14E42D48183BC5590062825A /* WAZippedHtmlParser.m */; }; @@ -722,7 +722,7 @@ 148F208B1910CE7B008D44D6 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = ""; }; 1490866B17E332A200943DD2 /* rss.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = rss.png; path = Resources/rss.png; sourceTree = ""; }; 1490866C17E332A200943DD2 /* rss@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "rss@2x.png"; path = "Resources/rss@2x.png"; sourceTree = ""; }; - 1490873517E375D700943DD2 /* ScriptTempProductName.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScriptTempProductName.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1490873517E375D700943DD2 /* LibrelioApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LibrelioApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1490873717E37BE100943DD2 /* Application.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Application.plist; sourceTree = ""; }; 1490873C17E43B3B00943DD2 /* path.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = path.txt; sourceTree = ""; }; 1491964D1328A31C00DD54B1 /* WAModuleProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAModuleProtocol.h; sourceTree = ""; }; @@ -804,7 +804,7 @@ 14D46E381354A52000B388A8 /* HTMLTemplate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = HTMLTemplate.html; sourceTree = ""; }; 14D8296A19A2098E0059F3E0 /* WAURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAURLProtocol.h; sourceTree = ""; }; 14D8296B19A2098E0059F3E0 /* WAURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WAURLProtocol.m; sourceTree = ""; }; - 14DB1215164BEDC4001FE76B /* Wind.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wind.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 14DB1215164BEDC4001FE76B /* .app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = .app; sourceTree = BUILT_PRODUCTS_DIR; }; 14DB136E164C52C4001FE76B /* Application.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Application.plist; sourceTree = ""; }; 14DB136F164C52C4001FE76B /* Application_.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Application_.plist; sourceTree = ""; }; 14DB1370164C52C4001FE76B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; @@ -823,7 +823,7 @@ 14DB137D164C52C4001FE76B /* Magazines.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Magazines.plist; sourceTree = ""; }; 14DB137E164C52C4001FE76B /* Magazines_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Magazines_background.png; sourceTree = ""; }; 14DB137F164C52C4001FE76B /* Tabs.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Tabs.plist; sourceTree = ""; }; - 14DB1380164C52C4001FE76B /* wind-generic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "wind-generic.png"; sourceTree = ""; }; + 14DB1380164C52C4001FE76B /* generic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = generic.png; sourceTree = ""; }; 14DB1381164C52C4001FE76B /* wind_355.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wind_355.png; sourceTree = ""; }; 14DD776B14A4F937004E06E5 /* WAMissingResourcesDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAMissingResourcesDownloader.h; sourceTree = ""; }; 14DD776C14A4F938004E06E5 /* WAMissingResourcesDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WAMissingResourcesDownloader.m; sourceTree = ""; }; @@ -1600,7 +1600,7 @@ 14DB137D164C52C4001FE76B /* Magazines.plist */, 14DB137E164C52C4001FE76B /* Magazines_background.png */, 14DB137F164C52C4001FE76B /* Tabs.plist */, - 14DB1380164C52C4001FE76B /* wind-generic.png */, + 14DB1380164C52C4001FE76B /* generic.png */, 14DB1381164C52C4001FE76B /* wind_355.png */, ); name = WindTarget; @@ -1667,8 +1667,8 @@ 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 14DB1215164BEDC4001FE76B /* Wind.app */, - 1490873517E375D700943DD2 /* ScriptTempProductName.app */, + 14DB1215164BEDC4001FE76B /* .app */, + 1490873517E375D700943DD2 /* LibrelioApp.app */, 142EBBBA1A2B018C00BBDD97 /* Reader.app */, ); name = Products; @@ -1778,7 +1778,7 @@ ); name = Script; productName = TabBarExTwo; - productReference = 1490873517E375D700943DD2 /* ScriptTempProductName.app */; + productReference = 1490873517E375D700943DD2 /* LibrelioApp.app */; productType = "com.apple.product-type.application"; }; 14DB1158164BEDC3001FE76B /* Wind */ = { @@ -1795,7 +1795,7 @@ ); name = Wind; productName = TabBarExTwo; - productReference = 14DB1215164BEDC4001FE76B /* Wind.app */; + productReference = 14DB1215164BEDC4001FE76B /* .app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -1808,7 +1808,7 @@ ORGANIZATIONNAME = "WidgetAvenue - Librelio"; TargetAttributes = { 1490867817E375D700943DD2 = { - DevelopmentTeam = 59A26UF37H; + DevelopmentTeam = 57YKSCS4YS; }; 14DB1158164BEDC3001FE76B = { DevelopmentTeam = 2WU7L85G5E; @@ -2029,7 +2029,7 @@ 14DB139D164C52C4001FE76B /* Magazines.plist in Resources */, 14DB139E164C52C4001FE76B /* Magazines_background.png in Resources */, 14DB139F164C52C4001FE76B /* Tabs.plist in Resources */, - 14DB13A0164C52C4001FE76B /* wind-generic.png in Resources */, + 14DB13A0164C52C4001FE76B /* generic.png in Resources */, 14DB13A1164C52C4001FE76B /* wind_355.png in Resources */, 144B2C5818229DE200CDD200 /* documents.png in Resources */, 144B2C5B18229DE200CDD200 /* documents@2x.png in Resources */, @@ -2548,7 +2548,7 @@ "-all_load", "-ObjC", ); - PRODUCT_NAME = ScriptTempProductName; + PRODUCT_NAME = LibrelioApp; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2590,7 +2590,7 @@ "-all_load", "-ObjC", ); - PRODUCT_NAME = ScriptTempProductName; + PRODUCT_NAME = LibrelioApp; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2630,7 +2630,7 @@ "-all_load", "-ObjC", ); - PRODUCT_NAME = ScriptTempProductName; + PRODUCT_NAME = LibrelioApp; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; @@ -2687,7 +2687,7 @@ "-all_load", "-ObjC", ); - PRODUCT_NAME = Wind; + PRODUCT_NAME = ""; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2728,7 +2728,7 @@ "-all_load", "-ObjC", ); - PRODUCT_NAME = Wind; + PRODUCT_NAME = ""; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2767,7 +2767,7 @@ "-all_load", "-ObjC", ); - PRODUCT_NAME = Wind; + PRODUCT_NAME = ""; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 433d560..acf73dc 100644 --- a/Resources/en.lproj/Localizable.strings +++ b/Resources/en.lproj/Localizable.strings @@ -5,3 +5,4 @@ "iOS 6 required"="Sorry, iOS 6 is required for this operation"; "Free sample"=" Preview"; " (Sample)"=" (Preview)"; +"Subscription"="Subscription"; diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 18e93a0..b5670e2 100644 --- a/Resources/fr.lproj/Localizable.strings +++ b/Resources/fr.lproj/Localizable.strings @@ -35,11 +35,11 @@ "Share on Facebook"="Partager sur Facebook"; "Share on Twitter"="Partager sur Twitter"; "Subscriber Code"=" Code abonné"; -"Subscription"=" Abonnement"; +"Subscription"="Abonnement"; "The order failed"=" La commande a échoué"; "Too Many Devices"="Ce numéro a été téléchargé sur un nombre trop important d'appareils. Merci de contacter license@librelio.com pour plus d'infos"; "Try again"=" Réessayer"; -"Username"="Code client"; +"Username"="Nom d'utilisateur"; "week"="semaine"; "What do you want to buy?"=" Que souhaitez-vous acheter?"; "year"="an"; diff --git a/ScriptTarget/Info.plist b/ScriptTarget/Info.plist new file mode 100644 index 0000000..0841cf6 --- /dev/null +++ b/ScriptTarget/Info.plist @@ -0,0 +1,104 @@ + + + + + CFBundleDevelopmentRegion + fr_FR + CFBundleDisplayName + BigBike + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFiles + + Icon.png + Icon-72.png + Icon@2x.png + Icon-72@2x.png + + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + Icon.png + Icon-72.png + Icon@2x.png + Icon-72@2x.png + Icon-60@2x.png + Icon-76.png + Icon-76@2x.png + + + UINewsstandIcon + + CFBundleIconFiles + + generic.png + + UINewsstandBindingEdge + UINewsstandBindingEdgeLeft + UINewsstandBindingType + UINewsstandBindingTypeMagazine + + + CFBundleIdentifier + com.niveales.bigbike + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + BigBike + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.3.9 + CFBundleSignature + ???? + CFBundleVersion + 337 + LSRequiresIPhoneOS + + NSMainNibFile + + NSMainNibFile~ipad + + UIBackgroundModes + + newsstand-content + + UINewsstandApp + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + EULAUrl + http://www.bigbike-magazine.com/edition-numerique + NSCalendarsUsageDescription + The application use the calendar to help with the publication date + EULAStr + Abonnez-vous à Big Bike : +- Formules d'abonnements auto-renouvelé : +1 an pour 21,99 € + +- Le paiement sera directement prélevé sur votre compte iTunes après la confirmation d'achat. +- Votre abonnement sera renouvelé automatiquement à la fin de la période par prélèvement sur votre compte iTunes, 24 heures avant la fin de la période en cours, et le prix du renouvellement sera indiqué. +- Les abonnements auto-renouvelés peuvent être gérés par l'utilisateur et le renouvellement automatique peut être désactivé en accédant aux paramètres de compte après l'achat et au plus tard 24h avant la fin de votre abonnement. +- Il n'est pas possible d'annuler un abonnement pendant sa période de validité. +- Toute partie inutilisée d'une période d'essai gratuite, si elle est offerte, sera abandonnée lorsque l'utilisateur achètera un abonnement à cette publication. + UIRequiresFullScreen + + + diff --git a/ScriptTarget/script.sh b/ScriptTarget/script.sh index e656191..de2ac2d 100644 --- a/ScriptTarget/script.sh +++ b/ScriptTarget/script.sh @@ -9,6 +9,9 @@ PATH_TO_SOURCE=$(<"${SRCROOT}/ScriptTarget/path.txt") echo "$PATH_TO_SOURCE" cd "$PATH_TO_SOURCE" +#Copy Application.plist +cp -f Application.plist "${SRCROOT}/ScriptTarget/Application.plist" + #Compile xibs for f in $(find "./" -type f -name "*.xib") do diff --git a/Wind/Application.plist b/Wind/Application.plist index 262d7e8..5dff171 100644 --- a/Wind/Application.plist +++ b/Wind/Application.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion fr_FR CFBundleDisplayName - ${PRODUCT_NAME} + Wind CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIcons @@ -27,7 +27,7 @@ CFBundleIconFiles - wind-generic.png + generic.png UINewsstandBindingEdge UINewsstandBindingEdgeLeft @@ -40,7 +40,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + Wind CFBundlePackageType APPL CFBundleShortVersionString @@ -70,9 +70,10 @@ UIViewControllerBasedStatusBarAppearance - NSAppTransportSecurity - - NSAllowsArbitraryLoads - + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + diff --git a/Wind/wind-generic.png b/Wind/generic.png similarity index 100% rename from Wind/wind-generic.png rename to Wind/generic.png diff --git a/main.m b/main.m index ac3ae4a..f5389ec 100644 --- a/main.m +++ b/main.m @@ -8,4 +8,4 @@ int main(int argc, char *argv[]) { int retVal = UIApplicationMain(argc, argv,@"UIApplication",@"WAAppDelegate");//We are not using a Xib [pool release]; return retVal; -} +}