diff --git a/AppBox.xcodeproj/project.pbxproj b/AppBox.xcodeproj/project.pbxproj index ce0a7a2a..0521560e 100644 --- a/AppBox.xcodeproj/project.pbxproj +++ b/AppBox.xcodeproj/project.pbxproj @@ -1696,7 +1696,7 @@ LD_DYLIB_INSTALL_NAME = ""; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.9.5; PRODUCT_BUNDLE_IDENTIFIER = com.developerinsider.AppBox; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)"; @@ -1740,7 +1740,7 @@ LD_DYLIB_INSTALL_NAME = ""; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.11; - MARKETING_VERSION = 2.9.1; + MARKETING_VERSION = 2.9.5; PRODUCT_BUNDLE_IDENTIFIER = com.developerinsider.AppBox; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)"; diff --git a/AppBox.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/AppBox.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..f9b0d7c5 --- /dev/null +++ b/AppBox.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/AppBox/AppDelegate.m b/AppBox/AppDelegate.m index 3ad4bca0..a59cc258 100644 --- a/AppBox/AppDelegate.m +++ b/AppBox/AppDelegate.m @@ -19,8 +19,8 @@ - (void)awakeFromNib{ //Init AppCenter [[NSUserDefaults standardUserDefaults] registerDefaults: @{ @"NSApplicationCrashOnExceptions": @YES }]; NSString *appCenter = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"AppCenter"]; - [MSAppCenter start:appCenter withServices: @[[MSAnalytics class], [MSCrashes class]]]; - [MSCrashes notifyWithUserConfirmation: MSUserConfirmationAlways]; + [MSACAppCenter start:appCenter withServices: @[[MSACAnalytics class], [MSACCrashes class]]]; + [MSACCrashes notifyWithUserConfirmation: MSACUserConfirmationAlways]; } - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { diff --git a/AppBox/Common/Constants.h b/AppBox/Common/Constants.h index 3ed5bc5d..f08a20cf 100644 --- a/AppBox/Common/Constants.h +++ b/AppBox/Common/Constants.h @@ -12,6 +12,7 @@ //Base URL's #define abGitHubReleaseBaseURL @"https://github.com/vineetchoudhary/AppBox-iOSAppsWirelessInstallation/releases/tag/" #define abDropBoxAppBaseURL @"https://www.dropbox.com/home/Apps/AppBox%20-%20Build%2C%20Test%20and%20Distribute%20iOS%20Apps" +#define abDropBoxDirectDownload @"https://dl.dropboxusercontent.com" //Other URL's #define abDefaultLatestDownloadURL @"https://getappbox.com/download" diff --git a/AppBox/Common/EventTracker/EventTracker.h b/AppBox/Common/EventTracker/EventTracker.h index 300c5d1f..8edc59a6 100644 --- a/AppBox/Common/EventTracker/EventTracker.h +++ b/AppBox/Common/EventTracker/EventTracker.h @@ -50,6 +50,6 @@ typedef enum : NSUInteger { +(void)logEventWithType:(LogEventTypes)eventType; +(void)logExceptionEvent:(NSException *)exception; +(void)logEventSettingWithType:(LogEventSettingTypes)eventType andSettings:(NSDictionary *)currentSetting; -+(void)logEventWithName:(NSString *)eventName customAttributes:(NSDictionary *)attributes flags:(MSFlags)flags; ++(void)logEventWithName:(NSString *)eventName customAttributes:(NSDictionary *)attributes flags:(MSACFlags)flags; @end diff --git a/AppBox/Common/EventTracker/EventTracker.m b/AppBox/Common/EventTracker/EventTracker.m index 28887310..f4f5b5a4 100644 --- a/AppBox/Common/EventTracker/EventTracker.m +++ b/AppBox/Common/EventTracker/EventTracker.m @@ -11,111 +11,111 @@ @implementation EventTracker +(void)logScreen:(NSString *)name{ - [MSAnalytics trackEvent:[NSString stringWithFormat:@"Screen-%@", name]]; + [MSACAnalytics trackEvent:[NSString stringWithFormat:@"Screen-%@", name]]; } -+(void)logEventWithName:(NSString *)eventName customAttributes:(NSDictionary *)attributes flags:(MSFlags)flags { - [MSAnalytics trackEvent:eventName withProperties:attributes flags:flags]; ++(void)logEventWithName:(NSString *)eventName customAttributes:(NSDictionary *)attributes flags:(MSACFlags)flags { + [MSACAnalytics trackEvent:eventName withProperties:attributes flags:flags]; } +(void)logEventWithType:(LogEventTypes)eventType{ switch (eventType) { case LogEventTypeCopyToClipboard:{ NSString *name = @"Copy to Clipboard"; - [EventTracker logEventWithName:name customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:name customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeCopyToClipboardFromDashboard:{ NSString *name = @"Copy to Clipboard from Dashboard"; - [EventTracker logEventWithName:name customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:name customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeUpdateExternalLink:{ - [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Update"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Update"} flags:MSACFlagsDefault]; }break; case LogEventTypeUploadWithCustomBDFolderName:{ - [EventTracker logEventWithName:@"DB Folder Name" customAttributes:@{@"Custom Name":@"YES"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"DB Folder Name" customAttributes:@{@"Custom Name":@"YES"} flags:MSACFlagsDefault]; }break; case LogEventTypeUploadWithDefaultDBFolderName:{ - [EventTracker logEventWithName:@"DB Folder Name" customAttributes:@{@"Custom Name":@"NO"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"DB Folder Name" customAttributes:@{@"Custom Name":@"NO"} flags:MSACFlagsDefault]; }break; case LogEventTypeShortURLFailedInFirstRequest:{ - [EventTracker logEventWithName:@"Short URL Failed" customAttributes:@{@"Request No":@"1"} flags:MSFlagsNormal]; + [EventTracker logEventWithName:@"Short URL Failed" customAttributes:@{@"Request No":@"1"} flags:MSACFlagsNormal]; }break; case LogEventTypeShortURLFailedInSecondRequest:{ - [EventTracker logEventWithName:@"Short URL Failed" customAttributes:@{@"Request No":@"2"} flags:MSFlagsCritical]; + [EventTracker logEventWithName:@"Short URL Failed" customAttributes:@{@"Request No":@"2"} flags:MSACFlagsCritical]; }break; case LogEventTypeShortURLSuccessInFirstRequest:{ - [EventTracker logEventWithName:@"Short URL Success" customAttributes:@{@"Request No":@"1"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Short URL Success" customAttributes:@{@"Request No":@"1"} flags:MSACFlagsDefault]; }break; case LogEventTypeShortURLSuccessInSecondRequest:{ - [EventTracker logEventWithName:@"Short URL Success" customAttributes:@{@"Request No":@"2"} flags:MSFlagsCritical]; + [EventTracker logEventWithName:@"Short URL Success" customAttributes:@{@"Request No":@"2"} flags:MSACFlagsCritical]; }break; case LogEventTypeShortURLElseBlockExecuted: { - [EventTracker logEventWithName:@"Short URL Else Block Executed" customAttributes:@{@"Request No":@"1"} flags:MSFlagsCritical]; + [EventTracker logEventWithName:@"Short URL Else Block Executed" customAttributes:@{@"Request No":@"1"} flags:MSACFlagsCritical]; }break; case LogEventTypeExternalLinkHelp:{ - [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Help"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Help"} flags:MSACFlagsDefault]; }break; case LogEventTypeExternalLinkTwitter:{ - [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Twitter"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Twitter"} flags:MSACFlagsDefault]; }break; case LogEventTypeExternalLinkReleaseNote:{ - [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Release Notes"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Release Notes"} flags:MSACFlagsDefault]; }break; case LogEventTypeExternalLinkLicense:{ - [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"License"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"License"} flags:MSACFlagsDefault]; }break; case LogEventTypeAuthDropbox:{ - [EventTracker logEventWithName:@"Authenticating Dropbox Start" customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Authenticating Dropbox Start" customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeExitWithoutAuth:{ - [EventTracker logEventWithName:@"AppBox terminated before Dropbox LoggedIN :(" customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"AppBox terminated before Dropbox LoggedIN :(" customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeAuthDropboxSuccess: { - [EventTracker logEventWithName:@"Authenticating Dropbox Success" customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Authenticating Dropbox Success" customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeAuthDropboxError: { - [EventTracker logEventWithName:@"Authenticating Dropbox Error" customAttributes:nil flags:MSFlagsCritical]; + [EventTracker logEventWithName:@"Authenticating Dropbox Error" customAttributes:nil flags:MSACFlagsCritical]; }break; case LogEventTypeAuthDropboxCanceled: { - [EventTracker logEventWithName:@"Authenticating Dropbox Canceled" customAttributes:nil flags:MSFlagsNormal]; + [EventTracker logEventWithName:@"Authenticating Dropbox Canceled" customAttributes:nil flags:MSACFlagsNormal]; }break; case LogEventTypeExternalLinkKeepSameLink:{ - [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Keep Same Link"} flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"External Links" customAttributes:@{@"Title":@"Keep Same Link"} flags:MSACFlagsDefault]; }break; case LogEventTypeDeleteBuild:{ - [EventTracker logEventWithName:@"Build Deleted" customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Build Deleted" customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeOpenInFinder:{ - [EventTracker logEventWithName:@"Open In Finder" customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Open In Finder" customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeOpenInDropbox:{ - [EventTracker logEventWithName:@"Open In Dropbox" customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Open In Dropbox" customAttributes:nil flags:MSACFlagsDefault]; }break; case LogEventTypeOpenDashboardFromShowLink:{ - [EventTracker logEventWithName:@"Dashboard open from Show Link" customAttributes:nil flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Dashboard open from Show Link" customAttributes:nil flags:MSACFlagsDefault]; }break; @@ -127,15 +127,15 @@ +(void)logEventWithType:(LogEventTypes)eventType{ +(void)logEventSettingWithType:(LogEventSettingTypes)eventType andSettings:(NSDictionary *)currentSetting{ switch (eventType) { case LogEventSettingTypeUploadIPA:{ - [EventTracker logEventWithName:@"Upload IPA" customAttributes:currentSetting flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Upload IPA" customAttributes:currentSetting flags:MSACFlagsDefault]; }break; case LogEventSettingTypeArchiveAndUpload: { - [EventTracker logEventWithName:@"Archive and Upload IPA" customAttributes:currentSetting flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"Archive and Upload IPA" customAttributes:currentSetting flags:MSACFlagsDefault]; }break; case LogEventSettingTypeUploadIPASuccess: { - [EventTracker logEventWithName:@"IPA Uploaded Success" customAttributes:currentSetting flags:MSFlagsDefault]; + [EventTracker logEventWithName:@"IPA Uploaded Success" customAttributes:currentSetting flags:MSACFlagsDefault]; }break; default: @@ -147,7 +147,7 @@ +(void)logExceptionEvent:(NSException *)exception { [EventTracker logEventWithName:@"Exception" customAttributes:@{ @"debug description": exception.debugDescription, @"stack": exception.callStackSymbols } - flags:MSFlagsCritical]; + flags:MSACFlagsCritical]; } +(void)logAppBoxVersion { @@ -156,6 +156,6 @@ +(void)logAppBoxVersion { customAttributes:@{ @"Version": dbManager.version, @"Name": dbManager.appName, @"Identifier": dbManager.bundleId } - flags:MSFlagsDefault]; + flags:MSACFlagsDefault]; } @end diff --git a/AppBox/Common/UploadManager/UploadManager.m b/AppBox/Common/UploadManager/UploadManager.m index f920bb98..08bb9438 100644 --- a/AppBox/Common/UploadManager/UploadManager.m +++ b/AppBox/Common/UploadManager/UploadManager.m @@ -482,7 +482,7 @@ -(void)dbUploadLargeFile:(NSString *)file to:(NSString *)path mode:(DBFILESWrite nextChunkToUpload = [fileHandle readDataOfLength:chunkSize]; fileCommitInfo = [[DBFILESCommitInfo alloc] initWithPath:path mode:mode autorename:@NO clientModified:nil mute:@NO propertyGroups:nil strictConflict:@NO]; - [[[[DBClientsManager authorizedClient].filesRoutes uploadSessionStartData:nextChunkToUpload] setResponseBlock:^(DBFILESUploadSessionStartResult * _Nullable result, DBNilObject * _Nullable routeError, DBRequestError * _Nullable networkError) { + [[[[DBClientsManager authorizedClient].filesRoutes uploadSessionStartData:nextChunkToUpload] setResponseBlock:^(DBFILESUploadSessionStartResult * _Nullable result, DBFILESUploadSessionStartError * _Nullable routeError, DBRequestError * _Nullable networkError) { if (result) { sessionId = result.sessionId; offset += nextChunkToUpload.length; @@ -651,7 +651,9 @@ -(void)handleSharedURLResult:(NSString *)url{ if (self.dbFileType == DBFileTypeIPA) { NSString *shareableLink = url; if(!self.project.distributeOverLocalNetwork){ - shareableLink = [url stringByReplacingCharactersInRange:NSMakeRange(url.length-1, 1) withString:@"1"]; + shareableLink = [shareableLink stringByReplacingOccurrencesOfString:@"https://www.dropbox.com" withString:abDropBoxDirectDownload]; + shareableLink = [shareableLink stringByReplacingOccurrencesOfString:@"https://dropbox.com" withString:abDropBoxDirectDownload]; + shareableLink = [shareableLink substringToIndex:shareableLink.length-5]; } self.project.ipaFileDBShareableURL = [NSURL URLWithString:shareableLink]; [self.project createManifestWithIPAURL:self.project.ipaFileDBShareableURL completion:^(NSURL *manifestURL) { diff --git a/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.h b/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.h index 5bcade83..1bb6303b 100644 --- a/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.h +++ b/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.h @@ -15,6 +15,8 @@ IBOutlet NSTextField *textFieldHint; IBOutlet NSTextField *textFieldAppLink; IBOutlet NSButton *buttonCopyToClipboard; + __weak IBOutlet NSLayoutConstraint *linkHeightConstraint; + __weak IBOutlet NSLayoutConstraint *linkHintHeightConstraint; } @property(nonatomic, strong) XCProject *project; diff --git a/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.m b/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.m index 1b861134..e925b8d6 100644 --- a/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.m +++ b/AppBox/ViewController/ShowLinkViewController/ShowLinkViewController.m @@ -21,7 +21,15 @@ - (void)viewDidLoad { [super viewDidLoad]; [EventTracker logScreen:@"AppBox ShareLink"]; [textFieldAppLink setStringValue: self.project.appShortShareableURL.stringValue]; - [textFieldHint setStringValue: ([self.project.appShortShareableURL isEqualTo:self.project.appLongShareableURL]) ? LongURLUserHint : ShortURLUserHint]; + if ([self.project.appShortShareableURL isEqualTo:self.project.appLongShareableURL]) { + [textFieldHint setStringValue:LongURLUserHint]; + [linkHeightConstraint setConstant:70]; + [linkHintHeightConstraint setConstant:40]; + } else { + [textFieldHint setStringValue:ShortURLUserHint]; + [linkHeightConstraint setConstant:30]; + [linkHintHeightConstraint setConstant:20]; + } //Save Project Details [Project addProjectWithXCProject:self.project andSaveDetails:SaveUploadDetails]; diff --git a/AppBox/ViewController/Storyboard/Main.storyboard b/AppBox/ViewController/Storyboard/Main.storyboard index be35048f..f78d88d9 100644 --- a/AppBox/ViewController/Storyboard/Main.storyboard +++ b/AppBox/ViewController/Storyboard/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -245,20 +245,20 @@ - + - + - + - + @@ -295,7 +295,7 @@ - + @@ -309,7 +309,7 @@ - + @@ -317,7 +317,7 @@ - + @@ -332,10 +332,10 @@ - + - + @@ -663,11 +663,11 @@ DQ - + - + @@ -675,7 +675,7 @@ DQ - + @@ -709,7 +709,7 @@ Gw - + @@ -723,7 +723,7 @@ Gw - + @@ -734,7 +734,7 @@ Gw - + @@ -742,10 +742,10 @@ Gw - + - + @@ -753,7 +753,7 @@ Gw - + @@ -761,7 +761,7 @@ Gw - + @@ -769,7 +769,7 @@ Gw - + @@ -777,7 +777,7 @@ Gw - + @@ -785,7 +785,7 @@ Gw - + @@ -963,11 +963,11 @@ Gw - + - + @@ -978,7 +978,7 @@ Gw - + @@ -992,7 +992,7 @@ Gw - + @@ -1003,7 +1003,7 @@ Gw - + @@ -1011,7 +1011,7 @@ Gw - + @@ -1025,7 +1025,7 @@ Gw - + - + @@ -1062,7 +1062,7 @@ DQ - + @@ -1896,7 +1888,7 @@ Gw - + + + + @@ -2004,7 +2002,7 @@ Gw