Marino Faggiana 8 жил өмнө
parent
commit
3e43f787f4

+ 3 - 0
iOSClient/AppDelegate.h

@@ -57,6 +57,7 @@
 @property (nonatomic, strong) NSString *activeUser;
 @property (nonatomic, strong) NSString *activePassword;
 @property (nonatomic, strong) NSString *directoryUser;
+@property (nonatomic, strong) NSString *activeEmail;
 
 // next version ... ? ...
 @property double currentLatitude;
@@ -168,5 +169,7 @@
 
 - (BOOL)createFolderSubFolderAutomaticUploadFolderPhotos:(NSString *)folderPhotos useSubFolder:(BOOL)useSubFolder assets:(NSArray *)assets selector:(NSString *)selector;
 
+- (void)logUserCrashlytics;
+
 @end
 

+ 18 - 0
iOSClient/AppDelegate.m

@@ -1568,6 +1568,24 @@
     return YES;
 }
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Crashlytics =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)logUserCrashlytics
+{
+    TableAccount *tableAccount = [CCCoreData getActiveAccount];
+    
+    if (tableAccount) {
+        
+        if (tableAccount.account && tableAccount.account.length > 0)
+            [CrashlyticsKit setUserName:tableAccount.account];
+        
+        if (tableAccount.email && tableAccount.email.length > 0)
+            [CrashlyticsKit setUserEmail:tableAccount.email];
+    }
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== UPGRADE =====
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 1
iOSClient/Brand/Picker.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17.2</string>
 	<key>CFBundleVersion</key>
-	<string>00002</string>
+	<string>00003</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionAttributes</key>

+ 1 - 1
iOSClient/Brand/PickerFileProvider.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17.2</string>
 	<key>CFBundleVersion</key>
-	<string>00002</string>
+	<string>00003</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionFileProviderDocumentGroup</key>

+ 1 - 1
iOSClient/Brand/Share.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17.2</string>
 	<key>CFBundleVersion</key>
-	<string>00002</string>
+	<string>00003</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -69,7 +69,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>00002</string>
+	<string>00003</string>
 	<key>Fabric</key>
 	<dict>
 		<key>APIKey</key>

+ 1 - 2
iOSClient/CCStandardImages.h

@@ -40,8 +40,7 @@
 #define image_bkfull                            @"bkfull"
 #define image_bkempty                           @"bkempty"
 
-#define image_buttonBlu                         @"buttonBlu"
-#define image_buttonWhite                       @"buttonWhite"
+#define image_button                            @"button"
 
 #define image_checked                           @"checked"
 

+ 0 - 0
iOSClient/Images.xcassets/buttonWhite.imageset/Contents.json → iOSClient/Images.xcassets/button.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/buttonWhite.imageset/buttonWhite.png → iOSClient/Images.xcassets/button.imageset/buttonWhite.png


+ 0 - 21
iOSClient/Images.xcassets/buttonBlu.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "buttonBlu.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/buttonBlu.imageset/buttonBlu.png


+ 2 - 2
iOSClient/Main/CCDetail.m

@@ -535,7 +535,7 @@
                         
                     } else {
                         
-                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_buttonWhite] colorText:[UIColor lightGrayColor]]]];
+                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_button] colorText:[UIColor lightGrayColor]]]];
                     }
                 }
             }
@@ -564,7 +564,7 @@
                         
                     } else {
                         
-                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_buttonWhite] colorText:[UIColor lightGrayColor]]]];
+                        [self.photos replaceObjectAtIndex:index withObject:[MWPhoto photoWithImage:[CCUtility drawText:[NSLocalizedString(@"_loading_", nil) stringByAppendingString:@"..."] inImage:[UIImage imageNamed:image_button] colorText:[UIColor lightGrayColor]]]];
                     }
                 }
             }

+ 3 - 0
iOSClient/Main/CCMain.m

@@ -397,6 +397,9 @@
         // Initializations
         [app applicationInitialized];
         
+        // User Crashlytics
+        [app logUserCrashlytics];
+        
     } else {
         
         // reload datasource

+ 4 - 2
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -254,7 +254,7 @@
 
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
 {
-    return [UIImage imageNamed:image_photosNoRecord];
+    return [CCGraphics changeThemingColorImage:[UIImage imageNamed:image_photosNoRecord] color:[NCBrandColor sharedInstance].brand];
 }
 
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
@@ -287,7 +287,9 @@
 {
     if ([CCCoreData getCameraUploadActiveAccount:app.activeAccount] == NO) {
     
-        return [CCUtility drawText:NSLocalizedString(@"_activate_camera_upload_", nil) inImage:[UIImage imageNamed:image_buttonBlu] colorText:[UIColor whiteColor]];        
+        UIImage *buttonImage = [CCGraphics changeThemingColorImage:[UIImage imageNamed:image_button] color:[NCBrandColor sharedInstance].brand];
+        
+        return [CCUtility drawText:NSLocalizedString(@"_activate_camera_upload_", nil) inImage:buttonImage colorText:[UIColor whiteColor]];
         
     } else return nil;
 }