From 17fecb21081237d053ae441013355ea6b4fcf831 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 11:23:44 +0530 Subject: [PATCH 01/11] fix alert delegate and constant --- AppBox/AppDelegate.m | 5 ++--- AppBox/Model/ProjectModel/XCProject.m | 2 +- .../DropboxViewController/DropboxViewController.m | 2 +- AppBox/ViewController/LogViewController/LogViewController.m | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/AppBox/AppDelegate.m b/AppBox/AppDelegate.m index 711b2613..a6d5654f 100644 --- a/AppBox/AppDelegate.m +++ b/AppBox/AppDelegate.m @@ -33,10 +33,9 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { [Common isNewVersionAvailableCompletion:^(bool available, NSURL *url) { if (available){ NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText: @"New Version Available - AppBox"]; + [alert setMessageText: @"New Version Available"]; [alert setInformativeText:@"A newer version of the \"AppBox\" is available. Do you want to update it? \n\n\n"]; [alert setAlertStyle:NSInformationalAlertStyle]; - [alert setDelegate:self]; [alert addButtonWithTitle:@"YES"]; [alert addButtonWithTitle:@"NO"]; if ([alert runModal] == NSAlertFirstButtonReturn){ @@ -62,7 +61,7 @@ +(AppDelegate *)appDelegate{ -(void)addSessionLog:(NSString *)sessionLog{ [_sessionLog appendFormat: @"\n\n%@ - %@",[NSDate date],sessionLog]; - [[NSNotificationCenter defaultCenter] postNotificationName:SessionLogUpdated object:nil]; + [[NSNotificationCenter defaultCenter] postNotificationName:abSessionLogUpdated object:nil]; } #pragma mark - Notification Center Delegate diff --git a/AppBox/Model/ProjectModel/XCProject.m b/AppBox/Model/ProjectModel/XCProject.m index 076d2e98..74ab92ef 100644 --- a/AppBox/Model/ProjectModel/XCProject.m +++ b/AppBox/Model/ProjectModel/XCProject.m @@ -18,7 +18,7 @@ -(void)createUDIDAndIsNew:(BOOL)isNew{ } -(NSString *)buildMailURLStringForEmailId:(NSString *)mailId andMessage:(NSString *)message{ - NSMutableString *mailString = [NSMutableString stringWithString:MailerBaseURL]; + NSMutableString *mailString = [NSMutableString stringWithString:abMailerBaseURL]; [mailString appendFormat:@"?to=%@",mailId]; [mailString appendFormat:@"&app=%@",self.name]; [mailString appendFormat:@"&ver=%@",self.version]; diff --git a/AppBox/ViewController/DropboxViewController/DropboxViewController.m b/AppBox/ViewController/DropboxViewController/DropboxViewController.m index 6723cf53..a9bc0d0a 100644 --- a/AppBox/ViewController/DropboxViewController/DropboxViewController.m +++ b/AppBox/ViewController/DropboxViewController/DropboxViewController.m @@ -17,7 +17,7 @@ @implementation DropboxViewController - (void)viewDidLoad { [super viewDidLoad]; // Do view setup here. - DBSession *session = [[DBSession alloc] initWithAppKey:DbAppkey appSecret:DbScreatkey root:DbRoot]; + DBSession *session = [[DBSession alloc] initWithAppKey:abDbAppkey appSecret:abDbScreatkey root:abDbRoot]; [session setDelegate:self]; [DBSession setSharedSession:session]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(authHelperStateChangedNotification:) name:DBAuthHelperOSXStateChangedNotification object:[DBAuthHelperOSX sharedHelper]]; diff --git a/AppBox/ViewController/LogViewController/LogViewController.m b/AppBox/ViewController/LogViewController/LogViewController.m index 01662358..c9e91e19 100644 --- a/AppBox/ViewController/LogViewController/LogViewController.m +++ b/AppBox/ViewController/LogViewController/LogViewController.m @@ -18,7 +18,7 @@ - (void)viewDidLoad { [super viewDidLoad]; // Do view setup here. [self refreshLog]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshLog) name:SessionLogUpdated object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshLog) name:abSessionLogUpdated object:nil]; } -(void)refreshLog{ From a7e8b82c5debf02b87c0933c64990ebc5f539d21 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 11:24:08 +0530 Subject: [PATCH 02/11] Fixed controller frames --- AppBox/Base.lproj/Main.storyboard | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/AppBox/Base.lproj/Main.storyboard b/AppBox/Base.lproj/Main.storyboard index 7a5dabdb..ef0021fd 100644 --- a/AppBox/Base.lproj/Main.storyboard +++ b/AppBox/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - - + + @@ -211,9 +211,9 @@ - + - + @@ -222,7 +222,7 @@ - + @@ -236,7 +236,7 @@ - + @@ -244,7 +244,7 @@ - + @@ -257,7 +257,7 @@ - + @@ -265,7 +265,7 @@ - + @@ -276,7 +276,7 @@ - + @@ -284,7 +284,7 @@ - + @@ -303,7 +303,7 @@ - + @@ -311,7 +311,7 @@ - + @@ -325,12 +325,12 @@ - - + + - + @@ -338,7 +338,7 @@ - + @@ -349,12 +349,12 @@ - + - + @@ -364,11 +364,11 @@ - + - + From 8860317bb2bf35799bf338ef955d90ddc1de0308 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 11:24:59 +0530 Subject: [PATCH 03/11] =?UTF-8?q?add=20prefixes=20=E2=80=9Cab=E2=80=9D(mea?= =?UTF-8?q?ns=20AppBox)=20in=20all=20constant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppBox/Common/Constants.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/AppBox/Common/Constants.h b/AppBox/Common/Constants.h index 997c66f5..6918b6ae 100644 --- a/AppBox/Common/Constants.h +++ b/AppBox/Common/Constants.h @@ -10,20 +10,27 @@ #define Constants_h //Base URL's -#define MailerBaseURL @"https://tryapp.github.io/mail" -#define GitHubLatestRelease @"https://api.github.com/repos/vineetchoudhary/AppBox-iOSAppsWirelessInstallation/releases/latest" +#define abMailerBaseURL @"https://tryapp.github.io/mail" +#define abGitHubLatestRelease @"https://api.github.com/repos/vineetchoudhary/AppBox-iOSAppsWirelessInstallation/releases/latest" //dropbox -#define DbRoot kDBRootAppFolder -#define DbAppkey @"86tfx5bu3356fqo" -#define DbScreatkey @"mq4l1damoz8hwrr" +#define abDbRoot kDBRootAppFolder +#define abDbAppkey @"86tfx5bu3356fqo" +#define abDbScreatkey @"mq4l1damoz8hwrr" //notification -#define SessionLogUpdated @"SessionLogUpdated" +#define abSessionLogUpdated @"SessionLogUpdated" //messages -#define KeepSameLinkHelpTitle @"What is keep same link for all future upload?" -#define KeepSameLinkHelpMessage @"This feature will keep same short url for all future build/ipa uploaded with same bundle identifier, this means old build/ipa url will replaced by new ipa file. You can change the link by changing the Dropbox app folder name below. \n\nWe are working on this feature, Once we fineshed this you will be able to install previous build/ipa also." +#define abKeepSameLinkHelpTitle @"What is keep same link for all future upload?" +#define abKeepSameLinkHelpMessage @"This feature will keep same short url for all future build/ipa uploaded with same bundle identifier, this means old build/ipa url will replaced by new ipa file. You can change the link by changing the Dropbox app folder name below. \n\nWe are working on this feature, Once we fineshed this you will be able to install previous build/ipa also." + +//team id constants +#define abiPhoneDeveloper @"iphone developer" +#define abiPhoneDistribution @"iphone distribution" +#define abFullName @"fullName" +#define abTeamName @"teamName" +#define abTeamId @"teamId" //enums From e183548d801a71683d7e1d5e4c9134885037e340 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 11:28:16 +0530 Subject: [PATCH 04/11] Now getting developer team id also, and update constant --- AppBox/Common/Common.m | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/AppBox/Common/Common.m b/AppBox/Common/Common.m index bdd6ce44..767c3c2f 100644 --- a/AppBox/Common/Common.m +++ b/AppBox/Common/Common.m @@ -68,7 +68,7 @@ + (void)shutdownSystem{ + (void)isNewVersionAvailableCompletion:(void (^)(bool available, NSURL *url))completion{ @try { [[AppDelegate appDelegate] addSessionLog:@"Checking for new version..."]; - [NetworkHandler requestWithURL:GitHubLatestRelease withParameters:nil andRequestType:RequestGET andCompletetion:^(id responseObj, NSError *error) { + [NetworkHandler requestWithURL:abGitHubLatestRelease withParameters:nil andRequestType:RequestGET andCompletetion:^(id responseObj, NSError *error) { if (error == nil && [((NSDictionary *)responseObj).allKeys containsObject:@"tag_name"] && [((NSDictionary *)responseObj).allKeys containsObject:@"html_url"]){ @@ -104,13 +104,15 @@ + (NSArray *)getAllTeamId{ NSMutableDictionary *certProperties = [[NSMutableDictionary alloc] init]; NSString *certLabel = [obj valueForKey:(NSString *)kSecAttrLabel]; NSArray *certComponent = [certLabel componentsSeparatedByString:@": "]; - if (certComponent.count == 2 && [[certComponent firstObject] containsString:@"Distribution"]){ + if (certComponent.count == 2 && + ([[[certComponent firstObject] lowercaseString] isEqualToString:abiPhoneDistribution] || + [[[certComponent firstObject] lowercaseString] isEqualToString:abiPhoneDeveloper])){ NSArray *certDetailsComponent = [[certComponent lastObject] componentsSeparatedByString:@" ("]; if (certDetailsComponent.count == 2){ NSString *teamId = [[certDetailsComponent lastObject] stringByReplacingOccurrencesOfString:@")" withString:@""]; - [certProperties setValue:certLabel forKey:@"fullName"]; - [certProperties setValue:[certComponent lastObject] forKey:@"teamName"]; - [certProperties setObject:teamId forKey:@"teamId"]; + [certProperties setValue:certLabel forKey:abFullName]; + [certProperties setValue:[certComponent lastObject] forKey:abTeamName]; + [certProperties setObject:teamId forKey:abTeamId]; if ([teamId containsString:@" "]){ } @@ -121,6 +123,9 @@ + (NSArray *)getAllTeamId{ } } }]; + [plainCertifcates sortUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { + return [obj1 valueForKey:abTeamId] > [obj2 valueForKey:abTeamId]; + }]; return plainCertifcates; } From 79c0a3ec0c638d666a97a2908b2d5fc4cdccccda Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 11:29:00 +0530 Subject: [PATCH 05/11] Filling teamids in combobox initially and updated constants --- .../HomeViewController/HomeViewController.m | 50 +++++++++++-------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/AppBox/ViewController/HomeViewController/HomeViewController.m b/AppBox/ViewController/HomeViewController/HomeViewController.m index 2e61342c..15065b1f 100644 --- a/AppBox/ViewController/HomeViewController/HomeViewController.m +++ b/AppBox/ViewController/HomeViewController/HomeViewController.m @@ -24,7 +24,9 @@ - (void)viewDidLoad { project = [[XCProject alloc] init]; allTeamIds = [Common getAllTeamId]; - DBSession *session = [[DBSession alloc] initWithAppKey:DbAppkey appSecret:DbScreatkey root:DbRoot]; + + //Init DBSession + DBSession *session = [[DBSession alloc] initWithAppKey:abDbAppkey appSecret:abDbScreatkey root:abDbRoot]; [session setDelegate:self]; [DBSession setSharedSession:session]; @@ -33,9 +35,16 @@ - (void)viewDidLoad { NSAppleEventManager *em = [NSAppleEventManager sharedAppleEventManager]; [em setEventHandler:self andSelector:@selector(getUrl:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; + //setup initial value [pathBuild setURL:[NSURL URLWithString:[@"~/Desktop" stringByExpandingTildeInPath]]]; [project setBuildDirectory: pathBuild.URL]; + //setup team id + [comboTeamId removeAllItems]; + [allTeamIds enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + [comboTeamId addItemWithObjectValue:[obj valueForKey:abFullName]]; + }]; + [self updateViewState]; } @@ -76,7 +85,7 @@ - (IBAction)comboTeamIdValueChanged:(NSComboBox *)sender { NSString *teamId; if (sender.stringValue.length != 10 || [sender.stringValue containsString:@" "]){ NSDictionary *team = [[allTeamIds filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF.fullName LIKE %@",sender.stringValue]] firstObject]; - teamId = [team valueForKey:@"teamId"]; + teamId = [team valueForKey:abTeamId]; [project setTeamId: teamId]; }else{ [project setTeamId: sender.stringValue]; @@ -106,7 +115,7 @@ - (IBAction)buttonUniqueLinkTapped:(NSButton *)sender{ } - (IBAction)buttonSameLinkHelpTapped:(NSButton *)sender { - [Common showAlertWithTitle:KeepSameLinkHelpTitle andMessage:KeepSameLinkHelpMessage]; + [Common showAlertWithTitle:abKeepSameLinkHelpTitle andMessage:abKeepSameLinkHelpMessage]; } @@ -225,7 +234,7 @@ - (void)runTaskWithLaunchPath:(NSString *)launchPath andArgument:(NSArray *)argu if (scriptType == ScriptTypeTeamId){ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [task terminate]; - NSLog(@"Task teeminating!!"); + [[AppDelegate appDelegate] addSessionLog:@"terminating task!!"]; }); } } @@ -237,8 +246,7 @@ - (void)captureStandardOutputWithTask:(NSTask *)task{ [[NSNotificationCenter defaultCenter] addObserverForName:NSFileHandleDataAvailableNotification object:pipe.fileHandleForReading queue:nil usingBlock:^(NSNotification * _Nonnull note) { NSData *outputData = pipe.fileHandleForReading.availableData; NSString *outputString = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding]; - NSLog(@"%@", outputString); - [[AppDelegate appDelegate] addSessionLog:outputString]; + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Task Output - %@\n",outputString]]; dispatch_async(dispatch_get_main_queue(), ^{ //Handle Project Scheme Response @@ -267,18 +275,18 @@ - (void)captureStandardOutputWithTask:(NSTask *)task{ if (devTeam != nil) { project.teamId = [[devTeam componentsSeparatedByString:@" = "] lastObject]; if (project.teamId != nil){ - [comboTeamId removeAllItems]; - [comboTeamId addItemWithObjectValue:project.teamId]; - [comboTeamId selectItemAtIndex:0]; + NSDictionary *team = [[allTeamIds filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF.teamId LIKE %@",project.teamId]] firstObject]; + if (team != nil){ + [comboTeamId selectItemAtIndex:[allTeamIds indexOfObject:team]]; + }else{ + [comboTeamId addItemWithObjectValue:project.teamId]; + [comboTeamId selectItemWithObjectValue:project.teamId]; + } [self showStatus:@"All Done!! Lets build the Rocket!!" andShowProgressBar:NO withProgress:-1]; } } } else if ([outputString.lowercaseString containsString:@"endofteamidscript"] || outputString.lowercaseString.length == 0) { - [comboTeamId removeAllItems]; - [allTeamIds enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - [comboTeamId addItemWithObjectValue:[obj valueForKey:@"fullName"]]; - }]; - [self showStatus:@"Can't able to find Team ID! Please enter manually!" andShowProgressBar:NO withProgress:-1]; + [self showStatus:@"Can't able to find Team ID! Please select/enter manually!" andShowProgressBar:NO withProgress:-1]; } else { [pipe.fileHandleForReading waitForDataInBackgroundAndNotify]; } @@ -392,7 +400,7 @@ -(void)uploadIPAFileWithLocalURL:(NSURL *)ipaURL{ //upload ipa fileType = FileTypeIPA; [self.restClient uploadFile:project.ipaFullPath.lastPathComponent toPath:project.dbDirectory.absoluteString withParentRev:nil fromPath:fromPath]; - NSLog(@"Temporaray folder %@",NSTemporaryDirectory()); + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Temporaray folder %@",NSTemporaryDirectory()]]; } #pragma mark - Updating Unique Link - @@ -422,7 +430,7 @@ -(void)updateUniquLinkDictinory:(NSMutableDictionary *)dictUniqueLink{ - (NSDictionary *)getUniqueJsonDict{ NSError *error; NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfFile:[NSTemporaryDirectory() stringByAppendingPathComponent:FILE_NAME_UNIQUE_JSON]] options:kNilOptions error:&error]; - NSLog(@"%@ : %@",FILE_NAME_UNIQUE_JSON,dictionary); + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"%@ : %@",FILE_NAME_UNIQUE_JSON,dictionary]]; return dictionary; } @@ -457,7 +465,7 @@ - (void)sessionDidReceiveAuthorizationFailure:(DBSession *)session userId:(NSStr #pragma mark →RestClient Delegate - (void)restClient:(DBRestClient*)client loadedMetadata:(DBMetadata*)metadata{ - NSLog(@"Loaded Meta Data %@",metadata); + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Loaded Meta Data %@",metadata]]; if([metadata.path isEqualToString:project.bundleDirectory.absoluteString]){ for (DBMetadata *contentMetaData in [metadata contents]) { if([contentMetaData.filename isEqualToString:FILE_NAME_UNIQUE_JSON]){ @@ -470,11 +478,11 @@ - (void)restClient:(DBRestClient*)client loadedMetadata:(DBMetadata*)metadata{ } - (void)restClient:(DBRestClient*)client metadataUnchangedAtPath:(NSString*)path{ - NSLog(@"Meta unchanged path %@",path); + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Meta unchanged path %@",path]]; } - (void)restClient:(DBRestClient*)client loadMetadataFailedWithError:(NSError*)error{ - NSLog(@"Error while loading metadata %@",error); + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Error while loading metadata %@",error]]; [self handleAfterUniqueJsonMetaDataLoaded]; } @@ -541,7 +549,7 @@ -(void)restClient:(DBRestClient *)restClientLocal loadedSharableLink:(NSString * }else if (fileType == FileTypeManifest){ NSString *shareableLink = [link substringToIndex:link.length-5]; - NSLog(@"manifest link - %@",shareableLink); + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"Manifest Sharable link - %@",shareableLink]]; project.manifestFileSharableURL = [NSURL URLWithString:shareableLink]; if(buttonUniqueLink.state){ [self.restClient loadMetadata:project.bundleDirectory.absoluteString]; @@ -550,7 +558,7 @@ -(void)restClient:(DBRestClient *)restClientLocal loadedSharableLink:(NSString * } }else if (fileType == FileTypeJson){ NSString *shareableLink = [link substringToIndex:link.length-5]; - NSLog(@"Json Sharable link - %@",shareableLink); + [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"APPInfo Sharable link - %@",shareableLink]]; project.uniquelinkShareableURL = [NSURL URLWithString:shareableLink]; NSMutableDictionary *dictUniqueFile = [[self getUniqueJsonDict] mutableCopy]; [dictUniqueFile setObject:shareableLink forKey:UNIQUE_LINK_SHARED]; From 5f6c3dc4e801f0feb0bdd39a02bb1ab4af1d62a0 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 12:04:48 +0530 Subject: [PATCH 06/11] added constant abEmptyString --- AppBox/AppDelegate.m | 1 + AppBox/Common/Common.m | 8 ++++---- AppBox/Common/Constants.h | 3 +++ AppBox/Common/UserData.m | 4 ++-- AppBox/Model/ProjectModel/XCProject.m | 2 +- .../DropboxViewController/DropboxViewController.m | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/AppBox/AppDelegate.m b/AppBox/AppDelegate.m index a6d5654f..083d8667 100644 --- a/AppBox/AppDelegate.m +++ b/AppBox/AppDelegate.m @@ -61,6 +61,7 @@ +(AppDelegate *)appDelegate{ -(void)addSessionLog:(NSString *)sessionLog{ [_sessionLog appendFormat: @"\n\n%@ - %@",[NSDate date],sessionLog]; + NSLog(@"%@",sessionLog); [[NSNotificationCenter defaultCenter] postNotificationName:abSessionLogUpdated object:nil]; } diff --git a/AppBox/Common/Common.m b/AppBox/Common/Common.m index 767c3c2f..9ed4cb73 100644 --- a/AppBox/Common/Common.m +++ b/AppBox/Common/Common.m @@ -15,7 +15,7 @@ + (NSString*)generateUUID { int result = SecRandomCopyBytes(NULL, 32, data.mutableBytes); NSAssert(result == 0, @"Error generating random bytes: %d", errno); NSString *base64EncodedData = [data base64EncodedStringWithOptions:0]; - base64EncodedData = [base64EncodedData stringByReplacingOccurrencesOfString:@"/" withString:@""]; + base64EncodedData = [base64EncodedData stringByReplacingOccurrencesOfString:@"/" withString:abEmptyString]; return base64EncodedData; } @@ -73,9 +73,9 @@ + (void)isNewVersionAvailableCompletion:(void (^)(bool available, NSURL *url))co [((NSDictionary *)responseObj).allKeys containsObject:@"tag_name"] && [((NSDictionary *)responseObj).allKeys containsObject:@"html_url"]){ NSString *tag = [responseObj valueForKey:@"tag_name"]; - NSString *newVesion = [[tag componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""]; + NSString *newVesion = [[tag componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:abEmptyString]; NSString *versionString = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleShortVersionString"]; - NSString *currentVersion = [[versionString componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""]; + NSString *currentVersion = [[versionString componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:abEmptyString]; completion(([newVesion compare:currentVersion] == NSOrderedDescending),[NSURL URLWithString:[responseObj valueForKey:@"html_url"]]); }else{ completion(false, nil); @@ -109,7 +109,7 @@ + (NSArray *)getAllTeamId{ [[[certComponent firstObject] lowercaseString] isEqualToString:abiPhoneDeveloper])){ NSArray *certDetailsComponent = [[certComponent lastObject] componentsSeparatedByString:@" ("]; if (certDetailsComponent.count == 2){ - NSString *teamId = [[certDetailsComponent lastObject] stringByReplacingOccurrencesOfString:@")" withString:@""]; + NSString *teamId = [[certDetailsComponent lastObject] stringByReplacingOccurrencesOfString:@")" withString:abEmptyString]; [certProperties setValue:certLabel forKey:abFullName]; [certProperties setValue:[certComponent lastObject] forKey:abTeamName]; [certProperties setObject:teamId forKey:abTeamId]; diff --git a/AppBox/Common/Constants.h b/AppBox/Common/Constants.h index 6918b6ae..17f7d171 100644 --- a/AppBox/Common/Constants.h +++ b/AppBox/Common/Constants.h @@ -32,6 +32,9 @@ #define abTeamName @"teamName" #define abTeamId @"teamId" +//others +#define abEmptyString @"" + //enums typedef enum : NSUInteger { diff --git a/AppBox/Common/UserData.m b/AppBox/Common/UserData.m index f069130c..f9294bdc 100644 --- a/AppBox/Common/UserData.m +++ b/AppBox/Common/UserData.m @@ -26,7 +26,7 @@ +(void)setIsGmailLoggedIn:(BOOL)isGmailLoggedIn{ +(NSString *)userEmail{ NSString *userEmail = [[NSUserDefaults standardUserDefaults] stringForKey:UserEmail]; - return userEmail == nil ? @"" : userEmail; + return userEmail == nil ? abEmptyString : userEmail; } +(void)setUserEmail:(NSString *)userEmail{ @@ -36,7 +36,7 @@ +(void)setUserEmail:(NSString *)userEmail{ +(NSString *)userMessage{ NSString *userMessage = [[NSUserDefaults standardUserDefaults] stringForKey:UserMessage]; - return userMessage == nil ? @"" : userMessage; + return userMessage == nil ? abEmptyString : userMessage; } +(void)setUserMessage:(NSString *)userMessage{ diff --git a/AppBox/Model/ProjectModel/XCProject.m b/AppBox/Model/ProjectModel/XCProject.m index 74ab92ef..c79ab77a 100644 --- a/AppBox/Model/ProjectModel/XCProject.m +++ b/AppBox/Model/ProjectModel/XCProject.m @@ -103,7 +103,7 @@ - (NSURL *)buildArchivePath{ #pragma mark - Setter - (void)setName:(NSString *)name{ - _name = [name stringByReplacingOccurrencesOfString:@" " withString:@""]; + _name = [name stringByReplacingOccurrencesOfString:@" " withString:abEmptyString]; } - (void)setFullPath:(NSURL *)fullPath{ diff --git a/AppBox/ViewController/DropboxViewController/DropboxViewController.m b/AppBox/ViewController/DropboxViewController/DropboxViewController.m index a9bc0d0a..c7b9c0a2 100644 --- a/AppBox/ViewController/DropboxViewController/DropboxViewController.m +++ b/AppBox/ViewController/DropboxViewController/DropboxViewController.m @@ -29,7 +29,7 @@ - (IBAction)buttonConnectDropboxTapped:(NSButton *)sender { #pragma mark - DBSession Delegate - (void)sessionDidReceiveAuthorizationFailure:(DBSession *)session userId:(NSString *)userId{ - [Common showAlertWithTitle:@"Authorization Failed" andMessage:@""]; + [Common showAlertWithTitle:@"Authorization Failed" andMessage:abEmptyString]; } - (void)authHelperStateChangedNotification:(NSNotification *)notification { From 654355d09ff4ed56aa41d34453af689fe8987fb1 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 12:05:56 +0530 Subject: [PATCH 07/11] Added build upload timestamp and empty string constant --- .../HomeViewController/HomeViewController.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/AppBox/ViewController/HomeViewController/HomeViewController.m b/AppBox/ViewController/HomeViewController/HomeViewController.m index 15065b1f..15cbddeb 100644 --- a/AppBox/ViewController/HomeViewController/HomeViewController.m +++ b/AppBox/ViewController/HomeViewController/HomeViewController.m @@ -106,6 +106,7 @@ - (IBAction)comboBuildTypeValueChanged:(NSComboBox *)sender { - (IBAction)ipaFilePathHandle:(NSPathControl *)sender { if (![project.fullPath isEqual:sender.URL]){ project.ipaFullPath = sender.URL; + [textFieldBundleIdentifier setStringValue:abEmptyString]; [self updateViewState]; } } @@ -390,7 +391,7 @@ -(void)uploadIPAFileWithLocalURL:(NSURL *)ipaURL{ [self getIPAInfoFromLocalURL:project.ipaFullPath]; if(![textFieldBundleIdentifier.stringValue isEqualToString:project.identifer] && textFieldBundleIdentifier.stringValue.length>0){ NSString *bundlePath = [NSString stringWithFormat:@"/%@",textFieldBundleIdentifier.stringValue]; - bundlePath = [bundlePath stringByReplacingOccurrencesOfString:@" " withString:@""]; + bundlePath = [bundlePath stringByReplacingOccurrencesOfString:@" " withString:abEmptyString]; [project setBundleDirectory:[NSURL URLWithString:bundlePath]]; [project upadteDbDirectoryByBundleDirectory]; } @@ -412,7 +413,8 @@ -(void)updateUniquLinkDictinory:(NSMutableDictionary *)dictUniqueLink{ @"version" : project.version, @"build" : project.build, @"identifier" : project.identifer, - @"manifestLink" : project.manifestFileSharableURL.absoluteString + @"manifestLink" : project.manifestFileSharableURL.absoluteString, + @"timestamp" : [NSNumber numberWithDouble:[[NSDate date] timeIntervalSince1970]] }; NSMutableArray *versionHistory = [[dictUniqueLink objectForKey:@"versions"] mutableCopy]; if(!versionHistory){ @@ -648,7 +650,6 @@ -(void)resetBuildOptions{ -(void)showStatus:(NSString *)status andShowProgressBar:(BOOL)showProgressBar withProgress:(double)progress{ [[AppDelegate appDelegate]addSessionLog:[NSString stringWithFormat:@"%@",status]]; - NSLog(@"%@",status); [labelStatus setStringValue:status]; [labelStatus setHidden:!(status != nil && status.length > 0)]; [progressIndicator setHidden:!showProgressBar]; @@ -714,8 +715,8 @@ -(void)enableMailField:(BOOL)enable{ [textFieldMessage setEnabled:enable]; //Get last time valid data - [textFieldEmail setStringValue: enable ? [UserData userEmail] : @""]; - [textFieldMessage setStringValue: enable ? [UserData userMessage] : @""]; + [textFieldEmail setStringValue: enable ? [UserData userEmail] : abEmptyString]; + [textFieldMessage setStringValue: enable ? [UserData userMessage] : abEmptyString]; //Just for confirm changes [self textFieldMailValueChanged:textFieldEmail]; From 92feb74826f546462d1acadfdb4b48767da0286e Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 19:17:35 +0530 Subject: [PATCH 08/11] fixed name issue --- AppBox/Model/ProjectModel/XCProject.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppBox/Model/ProjectModel/XCProject.m b/AppBox/Model/ProjectModel/XCProject.m index c79ab77a..5aac5688 100644 --- a/AppBox/Model/ProjectModel/XCProject.m +++ b/AppBox/Model/ProjectModel/XCProject.m @@ -115,7 +115,7 @@ - (void)setFullPath:(NSURL *)fullPath{ - (void)setIpaInfoPlist:(NSDictionary *)ipaInfoPlist{ _ipaInfoPlist = ipaInfoPlist; [self createUDIDAndIsNew:YES]; - if (self.name == nil){ + if ([ipaInfoPlist valueForKey:@"CFBundleName"] != nil){ [self setName: [ipaInfoPlist valueForKey:@"CFBundleName"]]; } [self setBuild: [ipaInfoPlist valueForKey:@"CFBundleVersion"]]; From 5c5584080c392c48c622f224e6ec01c9b6f7e794 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 19:18:08 +0530 Subject: [PATCH 09/11] Disable enable fields during upload and after upload --- .../HomeViewController/HomeViewController.m | 110 ++++++++++++------ 1 file changed, 76 insertions(+), 34 deletions(-) diff --git a/AppBox/ViewController/HomeViewController/HomeViewController.m b/AppBox/ViewController/HomeViewController/HomeViewController.m index 15cbddeb..b56f3337 100644 --- a/AppBox/ViewController/HomeViewController/HomeViewController.m +++ b/AppBox/ViewController/HomeViewController/HomeViewController.m @@ -53,7 +53,7 @@ - (void)viewWillAppear{ if (![[DBSession sharedSession] isLinked]) { [self performSegueWithIdentifier:@"DropBoxLogin" sender:self]; }else{ - [self viewStateForProgress:YES]; + [self viewStateForProgressFinish:YES]; } } @@ -106,7 +106,6 @@ - (IBAction)comboBuildTypeValueChanged:(NSComboBox *)sender { - (IBAction)ipaFilePathHandle:(NSPathControl *)sender { if (![project.fullPath isEqual:sender.URL]){ project.ipaFullPath = sender.URL; - [textFieldBundleIdentifier setStringValue:abEmptyString]; [self updateViewState]; } } @@ -162,7 +161,7 @@ - (IBAction)actionButtonTapped:(NSButton *)sender { }else if (project.ipaFullPath){ [self uploadIPAFileWithLocalURL:project.ipaFullPath]; } - [self viewStateForProgress:NO]; + [self viewStateForProgressFinish:NO]; }else{ [Common showAlertWithTitle:@"AppBox" andMessage:@"Comming Soon... You can quit and start again :D !!"]; } @@ -283,7 +282,7 @@ - (void)captureStandardOutputWithTask:(NSTask *)task{ [comboTeamId addItemWithObjectValue:project.teamId]; [comboTeamId selectItemWithObjectValue:project.teamId]; } - [self showStatus:@"All Done!! Lets build the Rocket!!" andShowProgressBar:NO withProgress:-1]; + [self showStatus:@"Now please select ipa type (save for). You can view log from File -> View Log." andShowProgressBar:NO withProgress:-1]; } } } else if ([outputString.lowercaseString containsString:@"endofteamidscript"] || outputString.lowercaseString.length == 0) { @@ -291,7 +290,6 @@ - (void)captureStandardOutputWithTask:(NSTask *)task{ } else { [pipe.fileHandleForReading waitForDataInBackgroundAndNotify]; } - [self viewStateForProgress:YES]; } //Handle Build Response @@ -313,8 +311,10 @@ - (void)captureStandardOutputWithTask:(NSTask *)task{ } else if ([outputString.lowercaseString containsString:@"export failed"]){ [self showStatus:@"Export Failed" andShowProgressBar:NO withProgress:-1]; + [self viewStateForProgressFinish:YES]; } else if ([outputString.lowercaseString containsString:@"archive failed"]){ [self showStatus:@"Archive Failed" andShowProgressBar:NO withProgress:-1]; + [self viewStateForProgressFinish:YES]; } else { [pipe.fileHandleForReading waitForDataInBackgroundAndNotify]; } @@ -354,7 +354,7 @@ - (void)getIPAInfoFromLocalURL:(NSURL *)ipaFileURL{ [[AppDelegate appDelegate] addSessionLog:[NSString stringWithFormat:@"%@-%@",[NSNumber numberWithLong:entryNumber], [NSNumber numberWithLong:total]]]; } completionHandler:^(NSString * _Nonnull path, BOOL succeeded, NSError * _Nonnull error) { if (error) { - [self viewStateForProgress:YES]; + [self viewStateForProgressFinish:YES]; [Common showAlertWithTitle:@"AppBox - Error" andMessage:error.localizedDescription]; return; } @@ -362,7 +362,7 @@ - (void)getIPAInfoFromLocalURL:(NSURL *)ipaFileURL{ //get info.plist [project setIpaInfoPlist: [NSDictionary dictionaryWithContentsOfFile:[NSTemporaryDirectory() stringByAppendingPathComponent:infoPlistPath]]]; if (project.ipaInfoPlist == nil) { - [self viewStateForProgress:YES]; + [self viewStateForProgressFinish:YES]; [Common showAlertWithTitle:@"AppBox - Error" andMessage:@"AppBox can't able to find Info.plist in you IPA."]; return; } @@ -388,7 +388,9 @@ -(void)uploadIPAFileWithLocalURL:(NSURL *)ipaURL{ [Common showAlertWithTitle:@"IPA File Missing" andMessage:@"Please select the IPA file and try again."]; return; } - [self getIPAInfoFromLocalURL:project.ipaFullPath]; + if (tabView.tabViewItems.lastObject.tabState == NSSelectedTab){ + [self getIPAInfoFromLocalURL:project.ipaFullPath]; + } if(![textFieldBundleIdentifier.stringValue isEqualToString:project.identifer] && textFieldBundleIdentifier.stringValue.length>0){ NSString *bundlePath = [NSString stringWithFormat:@"/%@",textFieldBundleIdentifier.stringValue]; bundlePath = [bundlePath stringByReplacingOccurrencesOfString:@" " withString:abEmptyString]; @@ -501,7 +503,7 @@ -(void)restClient:(DBRestClient*)client loadFileFailedWithError:(NSError*)error{ //Upload File -(void)restClient:(DBRestClient *)client uploadFileFailedWithError:(NSError *)error{ [Common showAlertWithTitle:@"Error" andMessage:error.localizedDescription]; - [self viewStateForProgress:YES];; + [self viewStateForProgressFinish:YES];; } -(void)restClient:(DBRestClient *)client uploadedFile:(NSString *)destPath from:(NSString *)srcPath metadata:(DBMetadata *)metadata{ @@ -537,7 +539,7 @@ -(void)restClient:(DBRestClient *)client uploadProgress:(CGFloat)progress forFil //Shareable Link -(void)restClient:(DBRestClient *)restClient loadSharableLinkFailedWithError:(NSError *)error{ [Common showAlertWithTitle:@"Error" andMessage:error.localizedDescription]; - [self viewStateForProgress:YES]; + [self viewStateForProgressFinish:YES]; } -(void)restClient:(DBRestClient *)restClientLocal loadedSharableLink:(NSString *)link forFile:(NSString *)path{ @@ -577,7 +579,7 @@ -(void)restClient:(DBRestClient *)restClientLocal loadedSharableLink:(NSString * #pragma mark → Dropbox Helper - (void)authHelperStateChangedNotification:(NSNotification *)notification { if ([[DBSession sharedSession] isLinked]) { - [self viewStateForProgress:YES]; + [self viewStateForProgressFinish:YES]; } } @@ -624,23 +626,58 @@ -(void)createManifestShortSharableUrl{ #pragma mark - Controller Helpers - --(void)viewStateForProgress:(BOOL)finish{ -// [pathBuild setEnabled:finish]; -// [pathIPAFile setEnabled:finish]; -// [pathProject setEnabled:finish]; -// [comboTeamId setEnabled:finish]; -// [comboBuildType setEnabled:finish]; -// [comboBuildScheme setEnabled:finish]; -// [buttonSendMail setEnabled:finish]; -// [buttonUniqueLink setEnabled:finish]; -// [textFieldBundleIdentifier setEnabled:finish]; -// [textFieldEmail setEnabled:finish]; -// [textFieldMessage setEnabled:finish]; -// if (finish){ -// [self updateViewState]; -// }else{ -// [buttonAction setTitle:@"Stop"]; -// } +-(void)viewStateForProgressFinish:(BOOL)finish{ + //reset project + if (finish){ + project = [[XCProject alloc] init]; + [project setBuildDirectory:pathBuild.URL]; + [progressIndicator setHidden:YES]; + [labelStatus setStringValue:abEmptyString]; + } + + //unique link + [buttonUniqueLink setEnabled:finish]; + [buttonUniqueLink setState: finish ? NSOffState : buttonUniqueLink.state]; + [textFieldBundleIdentifier setEnabled:(finish && buttonUniqueLink.state == NSOnState)]; + [textFieldBundleIdentifier setStringValue: finish ? abEmptyString : textFieldBundleIdentifier.stringValue]; + + //build path + [pathBuild setEnabled:finish]; + + //ipa path + [pathIPAFile setEnabled:finish]; + [pathIPAFile setURL: finish ? nil : pathIPAFile.URL]; + + //project path + [pathProject setEnabled:finish]; + [pathProject setURL: finish ? nil : pathProject.URL]; + + //team id combo + [comboTeamId setEnabled:finish]; + if (finish && comboTeamId.indexOfSelectedItem >= 0) [comboTeamId deselectItemAtIndex:comboTeamId.indexOfSelectedItem]; + + //build type combo + [comboBuildType setEnabled:finish]; + if (finish && comboBuildType.indexOfSelectedItem >= 0) [comboBuildType deselectItemAtIndex:comboBuildType.indexOfSelectedItem]; + + //build scheme + [comboBuildScheme setEnabled:finish]; + if (finish){ + if (comboBuildScheme.indexOfSelectedItem >= 0){ + [comboBuildScheme deselectItemAtIndex:comboBuildType.indexOfSelectedItem]; + } + [comboBuildScheme removeAllItems]; + } + + + //send mail + [buttonSendMail setEnabled:finish]; + [buttonShutdownMac setEnabled:(finish && buttonSendMail.state == NSOnState)]; + [textFieldEmail setEnabled:(finish && buttonSendMail.state == NSOnState)]; + [textFieldMessage setEnabled:(finish && buttonSendMail.state == NSOnState)]; + + //action button + [buttonAction setEnabled:finish]; } -(void)resetBuildOptions{ @@ -679,18 +716,20 @@ -(void)updateViewState{ //if ipa selected (project.ipaFullPath != nil && tabView.tabViewItems.lastObject.tabState == NSSelectedTab)); - [buttonAction setEnabled:enable]; + [buttonAction setEnabled:(enable && pathProject.enabled && pathIPAFile.enabled)]; [buttonAction setTitle:(tabView.selectedTabViewItem.label)]; } #pragma mark - MailDelegate - -(void)mailViewLoadedWithWebView:(WebView *)webView{ - + [self showStatus:@"Sending Mail..." andShowProgressBar:yearMask withProgress:-1]; } -(void)mailSentWithWebView:(WebView *)webView{ + [self showStatus:@"Mail Sent." andShowProgressBar:yearMask withProgress:-1]; if (buttonShutdownMac.state == NSOnState){ + [self viewStateForProgressFinish:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [Common shutdownSystem]; }); @@ -700,10 +739,13 @@ -(void)mailSentWithWebView:(WebView *)webView{ } -(void)invalidPerametersWithWebView:(WebView *)webView{ - + [Common showAlertWithTitle:@"AppBox Error" andMessage:@"Can't able to send email right now!!"]; + [self showStatus:@"Can't able to send email." andShowProgressBar:yearMask withProgress:-1]; + [self viewStateForProgressFinish:YES]; } -(void)loginSuccessWithWebView:(WebView *)webView{ + [self showStatus:@"Logged in with your gmail account." andShowProgressBar:yearMask withProgress:-1]; [UserData setIsGmailLoggedIn:YES]; [buttonSendMail setState:NSOnState]; [self enableMailField:YES]; @@ -731,19 +773,19 @@ -(void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabVie #pragma mark - Navigation - -(void)showURL{ - NSString *status = [NSString stringWithFormat:@"App URL - %@",project.appShortShareableURL.absoluteString]; - [self showStatus:status andShowProgressBar:NO withProgress:0]; if (textFieldEmail.stringValue.length > 0 && [Common isValidEmail:textFieldEmail.stringValue]) { [self performSegueWithIdentifier:@"MailView" sender:self]; }else{ [self performSegueWithIdentifier:@"ShowLink" sender:self]; } - [self viewStateForProgress:YES]; } -(void)prepareForSegue:(NSStoryboardSegue *)segue sender:(id)sender{ if ([segue.destinationController isKindOfClass:[ShowLinkViewController class]]) { ((ShowLinkViewController *)segue.destinationController).appLink = project.appShortShareableURL.absoluteString; + NSString *status = [NSString stringWithFormat:@"App URL - %@",project.appShortShareableURL.absoluteString]; + [self showStatus:status andShowProgressBar:NO withProgress:0]; + [self viewStateForProgressFinish:YES]; }else if([segue.destinationController isKindOfClass:[MailViewController class]]){ MailViewController *mailViewController = ((MailViewController *)segue.destinationController); [mailViewController setDelegate:self]; From 33d584a07167902408911c090512a5d49116db51 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 20:07:55 +0530 Subject: [PATCH 10/11] Update constants --- AppBox/Common/Constants.h | 3 ++- .../HomeViewController/HomeViewController.m | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/AppBox/Common/Constants.h b/AppBox/Common/Constants.h index 17f7d171..418d1ab3 100644 --- a/AppBox/Common/Constants.h +++ b/AppBox/Common/Constants.h @@ -23,7 +23,8 @@ //messages #define abKeepSameLinkHelpTitle @"What is keep same link for all future upload?" -#define abKeepSameLinkHelpMessage @"This feature will keep same short url for all future build/ipa uploaded with same bundle identifier, this means old build/ipa url will replaced by new ipa file. You can change the link by changing the Dropbox app folder name below. \n\nWe are working on this feature, Once we fineshed this you will be able to install previous build/ipa also." +#define abKeepSameLinkHelpMessage @"This feature will keep same short url for all future build/ipa uploaded with same bundle identifier, this means old build/ipa url will replaced by new ipa file. You can change the link by changing the Dropbox app folder name below. \n\nIf this option is enable, you can also download the previous build with same url." +#define abKeepSameLinkReadMoreURL @"https://iosappswirelessinstallation.codeplex.com/wikipage?title=KeepSameLink" //team id constants #define abiPhoneDeveloper @"iphone developer" diff --git a/AppBox/ViewController/HomeViewController/HomeViewController.m b/AppBox/ViewController/HomeViewController/HomeViewController.m index b56f3337..076bd2c2 100644 --- a/AppBox/ViewController/HomeViewController/HomeViewController.m +++ b/AppBox/ViewController/HomeViewController/HomeViewController.m @@ -115,7 +115,15 @@ - (IBAction)buttonUniqueLinkTapped:(NSButton *)sender{ } - (IBAction)buttonSameLinkHelpTapped:(NSButton *)sender { - [Common showAlertWithTitle:abKeepSameLinkHelpTitle andMessage:abKeepSameLinkHelpMessage]; + NSAlert *alert = [[NSAlert alloc] init]; + [alert setMessageText: abKeepSameLinkHelpTitle]; + [alert setInformativeText:abKeepSameLinkHelpMessage]; + [alert setAlertStyle:NSInformationalAlertStyle]; + [alert addButtonWithTitle:@"Know More"]; + [alert addButtonWithTitle:@"Ok"]; + if ([alert runModal] == NSAlertFirstButtonReturn){ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:abKeepSameLinkReadMoreURL]]; + } } @@ -723,11 +731,9 @@ -(void)updateViewState{ #pragma mark - MailDelegate - -(void)mailViewLoadedWithWebView:(WebView *)webView{ - [self showStatus:@"Sending Mail..." andShowProgressBar:yearMask withProgress:-1]; } -(void)mailSentWithWebView:(WebView *)webView{ - [self showStatus:@"Mail Sent." andShowProgressBar:yearMask withProgress:-1]; if (buttonShutdownMac.state == NSOnState){ [self viewStateForProgressFinish:YES]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ @@ -740,12 +746,10 @@ -(void)mailSentWithWebView:(WebView *)webView{ -(void)invalidPerametersWithWebView:(WebView *)webView{ [Common showAlertWithTitle:@"AppBox Error" andMessage:@"Can't able to send email right now!!"]; - [self showStatus:@"Can't able to send email." andShowProgressBar:yearMask withProgress:-1]; [self viewStateForProgressFinish:YES]; } -(void)loginSuccessWithWebView:(WebView *)webView{ - [self showStatus:@"Logged in with your gmail account." andShowProgressBar:yearMask withProgress:-1]; [UserData setIsGmailLoggedIn:YES]; [buttonSendMail setState:NSOnState]; [self enableMailField:YES]; From 632f43bcad1b88155b133dd9663507b1a7f627b5 Mon Sep 17 00:00:00 2001 From: Vineet Choudhary Date: Wed, 21 Dec 2016 20:08:16 +0530 Subject: [PATCH 11/11] prepare for release --- AppBox.xcodeproj/project.pbxproj | 8 +++++--- AppBox/Info.plist | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/AppBox.xcodeproj/project.pbxproj b/AppBox.xcodeproj/project.pbxproj index 38776dc5..a11c8c0e 100644 --- a/AppBox.xcodeproj/project.pbxproj +++ b/AppBox.xcodeproj/project.pbxproj @@ -39,7 +39,6 @@ E18DCB171DFE729300BD7F11 /* MailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E18DCB161DFE729300BD7F11 /* MailViewController.m */; }; E18DCB1D1DFED95000BD7F11 /* UserData.m in Sources */ = {isa = PBXBuildFile; fileRef = E18DCB1C1DFED95000BD7F11 /* UserData.m */; }; E1A3965D1E040C9E0065FC7F /* NetworkHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = E1A3965C1E040C9E0065FC7F /* NetworkHandler.m */; }; - E1A3965E1E04123E0065FC7F /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1C148731E027A6100EE637F /* AFNetworking.framework */; }; E1A3965F1E04123E0065FC7F /* AFNetworking.framework in Copy Files (1 item) */ = {isa = PBXBuildFile; fileRef = E1C148731E027A6100EE637F /* AFNetworking.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E1C148741E027A6100EE637F /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1C148731E027A6100EE637F /* AFNetworking.framework */; }; E1CFC65E1D7E7FEA005872BE /* Common.m in Sources */ = {isa = PBXBuildFile; fileRef = E1CFC65D1D7E7FEA005872BE /* Common.m */; }; @@ -134,7 +133,6 @@ E16437F91D743D4500CE8B7E /* DropboxOSX.framework in Frameworks */, E1FB91D91D78055200F8DF46 /* ZipArchive.framework in Frameworks */, E188EA161D7856D200EBCA52 /* ISO8601.framework in Frameworks */, - E1A3965E1E04123E0065FC7F /* AFNetworking.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -377,7 +375,7 @@ E16437C71D743A4E00CE8B7E /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Developer Insider"; TargetAttributes = { E16437CE1D743A4E00CE8B7E = { @@ -471,8 +469,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; @@ -515,8 +515,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; diff --git a/AppBox/Info.plist b/AppBox/Info.plist index cb412c35..401a0d11 100644 --- a/AppBox/Info.plist +++ b/AppBox/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.3 + 0.9.5 CFBundleSignature ???? CFBundleURLTypes