@@ -48,11 +48,14 @@ -(void)uploadIPAFile:(NSURL *)ipaFileURL{
4848 NSString *ipaPath = [ipaFileURL.resourceSpecifier stringByRemovingPercentEncoding ];
4949 weakify (self);
5050 if ([[NSFileManager defaultManager ] fileExistsAtPath: ipaPath]) {
51- [ABLog log: @" nUploading IPA - %@ " , ipaPath];
51+ [ABLog log: @" Uploading IPA - %@ " , ipaPath];
5252 // Unzip ipa
5353 __block NSString *payloadEntry;
5454 __block NSString *infoPlistPath;
55- [[AppDelegate appDelegate ] addSessionLog: @" Extracting Files..." ];
55+
56+ NSString *tempDir = [NSTemporaryDirectory () stringByAppendingPathComponent: [[NSUUID UUID ] UUIDString ]];
57+
58+ [ABLog log: @" Extracting Files to - %@ " , tempDir];
5659 dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_BACKGROUND , 0 ), ^{
5760 [SSZipArchive unzipFileAtPath: ipaPath toDestination: NSTemporaryDirectory () overwrite: YES password: nil progressHandler: ^(NSString * _Nonnull entry, unz_file_info zipInfo, long entryNumber, long total) {
5861 strongify (self);
@@ -83,7 +86,7 @@ -(void)uploadIPAFile:(NSURL *)ipaFileURL{
8386 NSString *mobileProvisionPath = [payloadEntry stringByAppendingPathComponent: @" embedded.mobileprovision" ].lowercaseString ;
8487 if ([entry.lowercaseString isEqualToString: mobileProvisionPath]){
8588 [ABLog log: @" Found mobileprovision at path = %@ " ,mobileProvisionPath];
86- mobileProvisionPath = [NSTemporaryDirectory () stringByAppendingPathComponent: mobileProvisionPath];
89+ mobileProvisionPath = [tempDir stringByAppendingPathComponent: mobileProvisionPath];
8790 self.project .mobileProvision = [[MobileProvision alloc ] initWithPath: mobileProvisionPath];
8891 }
8992 }
@@ -109,11 +112,11 @@ -(void)uploadIPAFile:(NSURL *)ipaFileURL{
109112
110113 // get info.plist
111114 [ABLog log: @" Final Info.plist path = %@ " ,infoPlistPath];
112- [self .project setIpaInfoPlist: [NSDictionary dictionaryWithContentsOfFile: [NSTemporaryDirectory () stringByAppendingPathComponent: infoPlistPath]]];
115+ [self .project setIpaInfoPlist: [NSDictionary dictionaryWithContentsOfFile: [tempDir stringByAppendingPathComponent: infoPlistPath]]];
113116
114117 // show error if info.plist is nil or invalid
115118 if (![self .project isValidProjectInfoPlist ]) {
116- NSString *log = @" AppBox can't able to find Info.plist in you IPA." ;
119+ NSString *log = @" AppBox was not able to find Info.plist in your IPA." ;
117120 if (self.ciRepoProject ) {
118121 [[AppDelegate appDelegate ] addSessionLog: log];
119122 exit (abExitCodeInfoPlistNotFound);
@@ -149,7 +152,7 @@ -(void)uploadIPAFile:(NSURL *)ipaFileURL{
149152 if (self.ciRepoProject ) {
150153 exit (abExitCodeIPAFileNotFound);
151154 } else {
152- [Common showAlertWithTitle: @" IPA File Missing" andMessage: [NSString stringWithFormat: @" AppBox can't able to find ipa file at %@ ." ,ipaFileURL.absoluteString]];
155+ [Common showAlertWithTitle: @" IPA File Missing" andMessage: [NSString stringWithFormat: @" AppBox was not able to find IPA file at %@ ." ,ipaFileURL.absoluteString]];
153156 }
154157 self.errorBlock (nil , YES );
155158 }
0 commit comments