Skip to content

Commit 844c70b

Browse files
Merge pull request #15 from vineetchoudhary/development
Fixes for next release
2 parents 583d830 + 632f43b commit 844c70b

11 files changed

Lines changed: 186 additions & 113 deletions

File tree

AppBox.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
E18DCB171DFE729300BD7F11 /* MailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E18DCB161DFE729300BD7F11 /* MailViewController.m */; };
4040
E18DCB1D1DFED95000BD7F11 /* UserData.m in Sources */ = {isa = PBXBuildFile; fileRef = E18DCB1C1DFED95000BD7F11 /* UserData.m */; };
4141
E1A3965D1E040C9E0065FC7F /* NetworkHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = E1A3965C1E040C9E0065FC7F /* NetworkHandler.m */; };
42-
E1A3965E1E04123E0065FC7F /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1C148731E027A6100EE637F /* AFNetworking.framework */; };
4342
E1A3965F1E04123E0065FC7F /* AFNetworking.framework in Copy Files (1 item) */ = {isa = PBXBuildFile; fileRef = E1C148731E027A6100EE637F /* AFNetworking.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
4443
E1C148741E027A6100EE637F /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1C148731E027A6100EE637F /* AFNetworking.framework */; };
4544
E1CFC65E1D7E7FEA005872BE /* Common.m in Sources */ = {isa = PBXBuildFile; fileRef = E1CFC65D1D7E7FEA005872BE /* Common.m */; };
@@ -134,7 +133,6 @@
134133
E16437F91D743D4500CE8B7E /* DropboxOSX.framework in Frameworks */,
135134
E1FB91D91D78055200F8DF46 /* ZipArchive.framework in Frameworks */,
136135
E188EA161D7856D200EBCA52 /* ISO8601.framework in Frameworks */,
137-
E1A3965E1E04123E0065FC7F /* AFNetworking.framework in Frameworks */,
138136
);
139137
runOnlyForDeploymentPostprocessing = 0;
140138
};
@@ -377,7 +375,7 @@
377375
E16437C71D743A4E00CE8B7E /* Project object */ = {
378376
isa = PBXProject;
379377
attributes = {
380-
LastUpgradeCheck = 0730;
378+
LastUpgradeCheck = 0820;
381379
ORGANIZATIONNAME = "Developer Insider";
382380
TargetAttributes = {
383381
E16437CE1D743A4E00CE8B7E = {
@@ -471,8 +469,10 @@
471469
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
472470
CLANG_WARN_EMPTY_BODY = YES;
473471
CLANG_WARN_ENUM_CONVERSION = YES;
472+
CLANG_WARN_INFINITE_RECURSION = YES;
474473
CLANG_WARN_INT_CONVERSION = YES;
475474
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
475+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
476476
CLANG_WARN_UNREACHABLE_CODE = YES;
477477
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
478478
CODE_SIGN_IDENTITY = "-";
@@ -515,8 +515,10 @@
515515
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
516516
CLANG_WARN_EMPTY_BODY = YES;
517517
CLANG_WARN_ENUM_CONVERSION = YES;
518+
CLANG_WARN_INFINITE_RECURSION = YES;
518519
CLANG_WARN_INT_CONVERSION = YES;
519520
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
521+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
520522
CLANG_WARN_UNREACHABLE_CODE = YES;
521523
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
522524
CODE_SIGN_IDENTITY = "-";

AppBox/AppDelegate.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
3333
[Common isNewVersionAvailableCompletion:^(bool available, NSURL *url) {
3434
if (available){
3535
NSAlert *alert = [[NSAlert alloc] init];
36-
[alert setMessageText: @"New Version Available - AppBox"];
36+
[alert setMessageText: @"New Version Available"];
3737
[alert setInformativeText:@"A newer version of the \"AppBox\" is available. Do you want to update it? \n\n\n"];
3838
[alert setAlertStyle:NSInformationalAlertStyle];
39-
[alert setDelegate:self];
4039
[alert addButtonWithTitle:@"YES"];
4140
[alert addButtonWithTitle:@"NO"];
4241
if ([alert runModal] == NSAlertFirstButtonReturn){
@@ -62,7 +61,8 @@ +(AppDelegate *)appDelegate{
6261

6362
-(void)addSessionLog:(NSString *)sessionLog{
6463
[_sessionLog appendFormat: @"\n\n%@ - %@",[NSDate date],sessionLog];
65-
[[NSNotificationCenter defaultCenter] postNotificationName:SessionLogUpdated object:nil];
64+
NSLog(@"%@",sessionLog);
65+
[[NSNotificationCenter defaultCenter] postNotificationName:abSessionLogUpdated object:nil];
6666
}
6767

6868
#pragma mark - Notification Center Delegate

AppBox/Base.lproj/Main.storyboard

Lines changed: 22 additions & 22 deletions
Large diffs are not rendered by default.

AppBox/Common/Common.m

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ + (NSString*)generateUUID {
1515
int result = SecRandomCopyBytes(NULL, 32, data.mutableBytes);
1616
NSAssert(result == 0, @"Error generating random bytes: %d", errno);
1717
NSString *base64EncodedData = [data base64EncodedStringWithOptions:0];
18-
base64EncodedData = [base64EncodedData stringByReplacingOccurrencesOfString:@"/" withString:@""];
18+
base64EncodedData = [base64EncodedData stringByReplacingOccurrencesOfString:@"/" withString:abEmptyString];
1919
return base64EncodedData;
2020
}
2121

@@ -68,14 +68,14 @@ + (void)shutdownSystem{
6868
+ (void)isNewVersionAvailableCompletion:(void (^)(bool available, NSURL *url))completion{
6969
@try {
7070
[[AppDelegate appDelegate] addSessionLog:@"Checking for new version..."];
71-
[NetworkHandler requestWithURL:GitHubLatestRelease withParameters:nil andRequestType:RequestGET andCompletetion:^(id responseObj, NSError *error) {
71+
[NetworkHandler requestWithURL:abGitHubLatestRelease withParameters:nil andRequestType:RequestGET andCompletetion:^(id responseObj, NSError *error) {
7272
if (error == nil &&
7373
[((NSDictionary *)responseObj).allKeys containsObject:@"tag_name"] &&
7474
[((NSDictionary *)responseObj).allKeys containsObject:@"html_url"]){
7575
NSString *tag = [responseObj valueForKey:@"tag_name"];
76-
NSString *newVesion = [[tag componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""];
76+
NSString *newVesion = [[tag componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:abEmptyString];
7777
NSString *versionString = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleShortVersionString"];
78-
NSString *currentVersion = [[versionString componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""];
78+
NSString *currentVersion = [[versionString componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:abEmptyString];
7979
completion(([newVesion compare:currentVersion] == NSOrderedDescending),[NSURL URLWithString:[responseObj valueForKey:@"html_url"]]);
8080
}else{
8181
completion(false, nil);
@@ -104,13 +104,15 @@ + (NSArray *)getAllTeamId{
104104
NSMutableDictionary *certProperties = [[NSMutableDictionary alloc] init];
105105
NSString *certLabel = [obj valueForKey:(NSString *)kSecAttrLabel];
106106
NSArray *certComponent = [certLabel componentsSeparatedByString:@": "];
107-
if (certComponent.count == 2 && [[certComponent firstObject] containsString:@"Distribution"]){
107+
if (certComponent.count == 2 &&
108+
([[[certComponent firstObject] lowercaseString] isEqualToString:abiPhoneDistribution] ||
109+
[[[certComponent firstObject] lowercaseString] isEqualToString:abiPhoneDeveloper])){
108110
NSArray *certDetailsComponent = [[certComponent lastObject] componentsSeparatedByString:@" ("];
109111
if (certDetailsComponent.count == 2){
110-
NSString *teamId = [[certDetailsComponent lastObject] stringByReplacingOccurrencesOfString:@")" withString:@""];
111-
[certProperties setValue:certLabel forKey:@"fullName"];
112-
[certProperties setValue:[certComponent lastObject] forKey:@"teamName"];
113-
[certProperties setObject:teamId forKey:@"teamId"];
112+
NSString *teamId = [[certDetailsComponent lastObject] stringByReplacingOccurrencesOfString:@")" withString:abEmptyString];
113+
[certProperties setValue:certLabel forKey:abFullName];
114+
[certProperties setValue:[certComponent lastObject] forKey:abTeamName];
115+
[certProperties setObject:teamId forKey:abTeamId];
114116
if ([teamId containsString:@" "]){
115117

116118
}
@@ -121,6 +123,9 @@ + (NSArray *)getAllTeamId{
121123
}
122124
}
123125
}];
126+
[plainCertifcates sortUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
127+
return [obj1 valueForKey:abTeamId] > [obj2 valueForKey:abTeamId];
128+
}];
124129
return plainCertifcates;
125130
}
126131

AppBox/Common/Constants.h

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,31 @@
1010
#define Constants_h
1111

1212
//Base URL's
13-
#define MailerBaseURL @"https://tryapp.github.io/mail"
14-
#define GitHubLatestRelease @"https://api.github.com/repos/vineetchoudhary/AppBox-iOSAppsWirelessInstallation/releases/latest"
13+
#define abMailerBaseURL @"https://tryapp.github.io/mail"
14+
#define abGitHubLatestRelease @"https://api.github.com/repos/vineetchoudhary/AppBox-iOSAppsWirelessInstallation/releases/latest"
1515

1616
//dropbox
17-
#define DbRoot kDBRootAppFolder
18-
#define DbAppkey @"86tfx5bu3356fqo"
19-
#define DbScreatkey @"mq4l1damoz8hwrr"
17+
#define abDbRoot kDBRootAppFolder
18+
#define abDbAppkey @"86tfx5bu3356fqo"
19+
#define abDbScreatkey @"mq4l1damoz8hwrr"
2020

2121
//notification
22-
#define SessionLogUpdated @"SessionLogUpdated"
22+
#define abSessionLogUpdated @"SessionLogUpdated"
2323

2424
//messages
25-
#define KeepSameLinkHelpTitle @"What is keep same link for all future upload?"
26-
#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."
25+
#define abKeepSameLinkHelpTitle @"What is keep same link for all future upload?"
26+
#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."
27+
#define abKeepSameLinkReadMoreURL @"https://iosappswirelessinstallation.codeplex.com/wikipage?title=KeepSameLink"
28+
29+
//team id constants
30+
#define abiPhoneDeveloper @"iphone developer"
31+
#define abiPhoneDistribution @"iphone distribution"
32+
#define abFullName @"fullName"
33+
#define abTeamName @"teamName"
34+
#define abTeamId @"teamId"
35+
36+
//others
37+
#define abEmptyString @""
2738

2839

2940
//enums

AppBox/Common/UserData.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ +(void)setIsGmailLoggedIn:(BOOL)isGmailLoggedIn{
2626

2727
+(NSString *)userEmail{
2828
NSString *userEmail = [[NSUserDefaults standardUserDefaults] stringForKey:UserEmail];
29-
return userEmail == nil ? @"" : userEmail;
29+
return userEmail == nil ? abEmptyString : userEmail;
3030
}
3131

3232
+(void)setUserEmail:(NSString *)userEmail{
@@ -36,7 +36,7 @@ +(void)setUserEmail:(NSString *)userEmail{
3636

3737
+(NSString *)userMessage{
3838
NSString *userMessage = [[NSUserDefaults standardUserDefaults] stringForKey:UserMessage];
39-
return userMessage == nil ? @"" : userMessage;
39+
return userMessage == nil ? abEmptyString : userMessage;
4040
}
4141

4242
+(void)setUserMessage:(NSString *)userMessage{

AppBox/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>0.9.3</string>
20+
<string>0.9.5</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>

AppBox/Model/ProjectModel/XCProject.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ -(void)createUDIDAndIsNew:(BOOL)isNew{
1818
}
1919

2020
-(NSString *)buildMailURLStringForEmailId:(NSString *)mailId andMessage:(NSString *)message{
21-
NSMutableString *mailString = [NSMutableString stringWithString:MailerBaseURL];
21+
NSMutableString *mailString = [NSMutableString stringWithString:abMailerBaseURL];
2222
[mailString appendFormat:@"?to=%@",mailId];
2323
[mailString appendFormat:@"&app=%@",self.name];
2424
[mailString appendFormat:@"&ver=%@",self.version];
@@ -103,7 +103,7 @@ - (NSURL *)buildArchivePath{
103103
#pragma mark - Setter
104104

105105
- (void)setName:(NSString *)name{
106-
_name = [name stringByReplacingOccurrencesOfString:@" " withString:@""];
106+
_name = [name stringByReplacingOccurrencesOfString:@" " withString:abEmptyString];
107107
}
108108

109109
- (void)setFullPath:(NSURL *)fullPath{
@@ -115,7 +115,7 @@ - (void)setFullPath:(NSURL *)fullPath{
115115
- (void)setIpaInfoPlist:(NSDictionary *)ipaInfoPlist{
116116
_ipaInfoPlist = ipaInfoPlist;
117117
[self createUDIDAndIsNew:YES];
118-
if (self.name == nil){
118+
if ([ipaInfoPlist valueForKey:@"CFBundleName"] != nil){
119119
[self setName: [ipaInfoPlist valueForKey:@"CFBundleName"]];
120120
}
121121
[self setBuild: [ipaInfoPlist valueForKey:@"CFBundleVersion"]];

AppBox/ViewController/DropboxViewController/DropboxViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ @implementation DropboxViewController
1717
- (void)viewDidLoad {
1818
[super viewDidLoad];
1919
// Do view setup here.
20-
DBSession *session = [[DBSession alloc] initWithAppKey:DbAppkey appSecret:DbScreatkey root:DbRoot];
20+
DBSession *session = [[DBSession alloc] initWithAppKey:abDbAppkey appSecret:abDbScreatkey root:abDbRoot];
2121
[session setDelegate:self];
2222
[DBSession setSharedSession:session];
2323
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(authHelperStateChangedNotification:) name:DBAuthHelperOSXStateChangedNotification object:[DBAuthHelperOSX sharedHelper]];
@@ -29,7 +29,7 @@ - (IBAction)buttonConnectDropboxTapped:(NSButton *)sender {
2929

3030
#pragma mark - DBSession Delegate
3131
- (void)sessionDidReceiveAuthorizationFailure:(DBSession *)session userId:(NSString *)userId{
32-
[Common showAlertWithTitle:@"Authorization Failed" andMessage:@""];
32+
[Common showAlertWithTitle:@"Authorization Failed" andMessage:abEmptyString];
3333
}
3434

3535
- (void)authHelperStateChangedNotification:(NSNotification *)notification {

0 commit comments

Comments
 (0)