Skip to content

Commit

Permalink
[build/1523371313] Automated build
Browse files Browse the repository at this point in the history
  • Loading branch information
gnithin committed Apr 10, 2018
1 parent 1d691a9 commit 0aef7d0
Show file tree
Hide file tree
Showing 32 changed files with 1,267 additions and 1,200 deletions.
35 changes: 30 additions & 5 deletions Example/MNAdSdk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@
6003F588195388D20070C39A /* Resources */,
F920EC4B4B25AFC7DCDB6312 /* [CP] Embed Pods Frameworks */,
245D6A5296F3FA40E89CE534 /* [CP] Copy Pods Resources */,
AE70CE73207B3687007171F9 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -840,12 +841,9 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-MNAdSdk_Example/Pods-MNAdSdk_Example-resources.sh",
"${PODS_ROOT}/../../MNetAdSdk/ios/MNetAdSdk.framework/Versions/A/Resources/mraid.js",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -867,9 +865,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
AE70CE73207B3687007171F9 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if ! [ -x \"$(command -v clang-format)\" ]; then\necho 'Error: clang-format is not installed. Skipping formatting'\nexit 0\nfi\n\narray=( $(find ../MNetAdSdk \\( -name '*.h' -or -name '*.m' -or -name '*.mm' \\)) )\narray+=( $(find MNAdSdk \\( -name '*.h' -or -name '*.m' -or -name '*.mm' \\)) )\n\n# loop over it\nfor i in ${array[@]}\ndo\nif [ -f \"$i\" ]\nthen\nclang-format -i -style=\"{BasedOnStyle: LLVM, IndentWidth: 4 ,ColumnLimit: 120,AlignAfterOpenBracket : Align,AlignTrailingComments : true,AlignConsecutiveAssignments : true,PointerAlignment : Right,SpaceAfterCStyleCast : true,SpaceBeforeAssignmentOperators : true,SpaceInEmptyParentheses : false,SpacesBeforeTrailingComments : 1,SpacesInCStyleCastParentheses : false,ObjCSpaceAfterProperty : true,ReflowComments : true,SortIncludes : true}\" $i\n\nfi\ndone";
};
D52BEFED19137017DCA7C015 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -885,7 +896,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
DD77678351CA080044C74E43 /* [CP] Copy Pods Resources */ = {
Expand All @@ -910,16 +921,30 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-MNAdSdk_Example/Pods-MNAdSdk_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AFNetworkActivityLogger/AFNetworkActivityLogger.framework",
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
"${BUILT_PRODUCTS_DIR}/Bugsnag/Bugsnag.framework",
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
"${BUILT_PRODUCTS_DIR}/KSCrash/KSCrash.framework",
"${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework",
"${BUILT_PRODUCTS_DIR}/MNALApplink/MNALApplink.framework",
"${BUILT_PRODUCTS_DIR}/MNetAdSdk/MNetAdSdk.framework",
"${BUILT_PRODUCTS_DIR}/MNetJSONModeller/MNetJSONModeller.framework",
"${BUILT_PRODUCTS_DIR}/Toast/Toast.framework",
"${BUILT_PRODUCTS_DIR}/mopub-ios-sdk/MoPub.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworkActivityLogger.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bugsnag.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KSCrash.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MNALApplink.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MNetAdSdk.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MNetJSONModeller.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MoPub.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
Expand Down
10 changes: 0 additions & 10 deletions Example/MNAdSdk.xcworkspace/contents.xcworkspacedata

This file was deleted.

2 changes: 1 addition & 1 deletion Example/MNAdSdk/MNAdSdk-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.11.0</string>
<string>1.12.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
30 changes: 15 additions & 15 deletions Example/MNAdSdk/MNAdSdkURLManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,81 +13,81 @@
#endif

static MNAdSdkURLManager *sInstance = nil;
static NSString *kIsProdKey = @"is_prod";
static NSString *kIsProdKey = @"is_prod";

@implementation MNAdSdkURLManager

+ (MNAdSdkURLManager*)getSharedInstance{
+ (MNAdSdkURLManager *)getSharedInstance {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sInstance = [[[self class] alloc] init];
sInstance = [[[self class] alloc] init];
});
return sInstance;
}

- (void)initialSetup{
- (void)initialSetup {
#ifndef IS_FRAMEWORK
[[MNetURL getSharedInstance] setIsDebug:self.isDebug];
#endif
}

- (instancetype)init{
- (instancetype)init {
self = [super init];
if (self) {
_isDebug = [self getIsProdFromUserDefaults] ? NO : YES;
}
return self;
}

- (NSString *)getSdkBaseURL{
- (NSString *)getSdkBaseURL {
#ifndef IS_FRAMEWORK
return [self removeHttpFromString:[[MNetURL getSharedInstance] getBaseUrlDp]];
#else
return @"";
#endif
}

- (NSString *)getSdkPulseBaseURL{
- (NSString *)getSdkPulseBaseURL {
#ifndef IS_FRAMEWORK
return [self removeHttpFromString:[[MNetURL getSharedInstance] getBasePulseUrl]];
#else
return @"";
#endif
}

- (NSString *)getSdkConfigBaseURL{
- (NSString *)getSdkConfigBaseURL {
#ifndef IS_FRAMEWORK
return [self removeHttpFromString:[[MNetURL getSharedInstance] getBaseConfigUrl]];
#else
return @"";
#endif
}

- (NSString *)getSdkResourceBaseURL{
- (NSString *)getSdkResourceBaseURL {
#ifndef IS_FRAMEWORK
return [self removeHttpFromString:[[MNetURL getSharedInstance] getBaseResourceUrl]];
#else
return @"";
#endif
}

- (void)setIsProdUserDefaults:(BOOL)isProd{
- (void)setIsProdUserDefaults:(BOOL)isProd {
#ifndef IS_FRAMEWORK
[[NSUserDefaults standardUserDefaults] setBool:isProd forKey:kIsProdKey];
[[MNetURL getSharedInstance] setIsDebug:!isProd];
self.isDebug = !isProd;
#endif
}

- (BOOL)getIsProdFromUserDefaults{
- (BOOL)getIsProdFromUserDefaults {
return [[NSUserDefaults standardUserDefaults] boolForKey:kIsProdKey];
}

- (NSString *)removeHttpFromString:(NSString *)urlString{
NSURL *url = [NSURL URLWithString:urlString];
NSString *scheme = url.scheme;
- (NSString *)removeHttpFromString:(NSString *)urlString {
NSURL *url = [NSURL URLWithString:urlString];
NSString *scheme = url.scheme;
NSUInteger schemeLength = scheme.length;
return [urlString substringFromIndex:schemeLength+3];
return [urlString substringFromIndex:schemeLength + 3];
}

@end
51 changes: 26 additions & 25 deletions Example/MNAdSdk/MNAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@

#import "MNAppDelegate.h"
@import GoogleMobileAds;
#import "MNAdSdkURLManager.h"
#import "MNDemoConstants.h"
#import <MNetAdSdk/MNet.h>
#import <MNetAdSdk/MNetUser.h>
#import "MNDemoConstants.h"
#import "MNAdSdkURLManager.h"

@implementation MNAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
BOOL isTesting = [[NSUserDefaults standardUserDefaults] boolForKey:@"TESTING"];
if(!isTesting){
MNet *mnetObj = [MNet initWithCustomerId: DEMO_MN_CUSTOMER_ID];
if (!isTesting) {
MNet *mnetObj = [MNet initWithCustomerId:DEMO_MN_CUSTOMER_ID];

// Adding user details
MNetUser *user = [MNetUser new];
[user addGender:MNetGenderFemale];
Expand All @@ -30,7 +29,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[user addName:@"Demo User"];
[user addUserId:@"test-id"];
[mnetObj setUser:user];

//[[MNet getInstance] setIsTest:YES];
}
#ifdef DEBUG
Expand All @@ -40,31 +39,33 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of
// temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application
// and it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers, and
// throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application
// state information to restore your application to its current state in case it is terminated later. If your
// application supports background execution, this method is called instead of applicationWillTerminate: when the
// user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes
// made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application
// was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also
// applicationDidEnterBackground:.
}

@end
50 changes: 25 additions & 25 deletions Example/MNAdSdk/MNDemoConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@

#import <Foundation/Foundation.h>

#define DEMO_MN_CUSTOMER_ID @"<custom_id>"
#define DEMO_MN_MRAID_CUSTOMER_ID @"<custom_id>"
#define DEMO_MN_AD_UNIT_300x250 @"<custom_id>"
#define DEMO_MN_AD_UNIT_300x250_VIDEO @"<custom_id>"
#define DEMO_MN_AD_UNIT_320x50 @"<custom_id>"
#define DEMO_MN_AD_UNIT_450x300 @"<custom_id>"
#define DEMO_MN_AD_UNIT_REWARDED @"<custom_id>"
#define DEMO_MOPUB_AD_UNIT_ID @"<custom_id>"
#define DEMO_DFP_AD_UNIT_ID @"<custom_id>"
#define DEMO_MRAID_AD_UNIT_320x50 @"<custom_id>"

#define DEMO_DFP_MEDIATION_AD_UNIT_ID @"<custom_id>"
#define DEMO_MOPUB_MEDIATION_AD_UNIT_ID @"<custom_id>"
#define DEMO_AD_MOB_MEDIATION_AD_UNIT_ID @"<custom_id>"
#define DEMO_MN_CUSTOMER_ID @"<custom_id>"
#define DEMO_MN_MRAID_CUSTOMER_ID @"<custom_id>"
#define DEMO_MN_AD_UNIT_300x250 @"<custom_id>"
#define DEMO_MN_AD_UNIT_300x250_VIDEO @"<custom_id>"
#define DEMO_MN_AD_UNIT_320x50 @"<custom_id>"
#define DEMO_MN_AD_UNIT_450x300 @"<custom_id>"
#define DEMO_MN_AD_UNIT_REWARDED @"<custom_id>"
#define DEMO_MOPUB_AD_UNIT_ID @"<custom_id>"
#define DEMO_DFP_AD_UNIT_ID @"<custom_id>"
#define DEMO_MRAID_AD_UNIT_320x50 @"<custom_id>"

#define DEMO_DFP_MEDIATION_AD_UNIT_ID @"<custom_id>"
#define DEMO_MOPUB_MEDIATION_AD_UNIT_ID @"<custom_id>"
#define DEMO_AD_MOB_MEDIATION_AD_UNIT_ID @"<custom_id>"
#define DEMO_AD_MOB_REWARDED_VIDEO_MEDIATION_AD_UNIT_ID @"<custom_id>"

#define DEMO_AD_MOB_HB_AD_UNIT_ID @"<custom_id>"
#define DEMO_MOPUB_INTERSTITIAL_HB_AD_UNIT_ID @"<custom_id>"
#define DEMO_DFP_HB_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"
#define DEMO_AD_MOB_HB_AD_UNIT_ID @"<custom_id>"
#define DEMO_MOPUB_INTERSTITIAL_HB_AD_UNIT_ID @"<custom_id>"
#define DEMO_DFP_HB_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"

#define DEMO_DFP_MEDIATION_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"
#define DEMO_MOPUB_MEDIATION_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"
#define DEMO_AD_MOB_MEDIATION_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"
#define DEMO_DFP_MEDIATION_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"
#define DEMO_MOPUB_MEDIATION_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"
#define DEMO_AD_MOB_MEDIATION_INTERSTITIAL_AD_UNIT_ID @"<custom_id>"

#define DEMO_AD_MOB_AD_UNIT_ID @"<custom_id>"
#define DEMO_AD_MOB_AD_UNIT_ID @"<custom_id>"

#define LONGITUDE 72.8561644
#define LATITUDE 19.0176147
#define LATITUDE 19.0176147

// Custom event labels
#define AD_MOB_CUSTOM_EVENT_LABEL @"<custom_id>"
#define DFP_CUSTOM_EVENT_LABEL @"<custom_id>"
#define AD_MOB_CUSTOM_EVENT_LABEL @"<custom_id>"
#define DFP_CUSTOM_EVENT_LABEL @"<custom_id>"

// If has_include contains the import, the pod is not a framework
#if ! __has_include(<MNetAdSdk/MNetURL.h>)
#if !__has_include(<MNetAdSdk/MNetURL.h>)
#define IS_FRAMEWORK 1
#endif

Expand Down
16 changes: 9 additions & 7 deletions Example/MNAdSdk/MNShowAdViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@
// Copyright © 2017 Nithin. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MPAdView.h"
#import "MPInterstitialAdController.h"
#import <MNetAdSdk/MNetAdView.h>
#import <MNetAdSdk/MNetInterstitialAd.h>
#import <MNetAdSdk/MNetRewardedVideo.h>
#import "MPAdView.h"
#import "MPInterstitialAdController.h"
#import <UIKit/UIKit.h>

#define ENUM_VAL(enum) [NSNumber numberWithInt:enum]

@import GoogleMobileAds;

@interface MNShowAdViewController : UIViewController<MPAdViewDelegate, MPInterstitialAdControllerDelegate, MNetAdViewDelegate,GADBannerViewDelegate, GADInterstitialDelegate, MNetVideoDelegate, MNetInterstitialAdDelegate, MNetInterstitialVideoAdDelegate, MNetRewardedVideoDelegate,GADRewardBasedVideoAdDelegate>
@interface MNShowAdViewController
: UIViewController <MPAdViewDelegate, MPInterstitialAdControllerDelegate, MNetAdViewDelegate, GADBannerViewDelegate,
GADInterstitialDelegate, MNetVideoDelegate, MNetInterstitialAdDelegate,
MNetInterstitialVideoAdDelegate, MNetRewardedVideoDelegate, GADRewardBasedVideoAdDelegate>

typedef enum{
typedef enum {
BNR,
BNR_INTR,
MOPUB_HB,
Expand All @@ -41,8 +44,7 @@ typedef enum{
DFP_INSTERSTITIAL_MANUAL_HB,
MRAID_BANNER,
MRAID_INTERSTITIAL,
}AdType;

} AdType;

@property (nonatomic) IBOutlet UIView *adView;
@property (weak, nonatomic) IBOutlet UIView *topBar;
Expand Down
Loading

0 comments on commit 0aef7d0

Please sign in to comment.