| 
														
															@@ -49,6 +49,13 @@ public let exportVideosDirectory = resourceDirectory + "/ExportVideos/" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public let versionCode = "\(Bundle.main.infoDictionary?["CFBundleVersion"] ?? "1")" 
														 | 
														
														 | 
														
															 public let versionCode = "\(Bundle.main.infoDictionary?["CFBundleVersion"] ?? "1")" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 // 版本号 
														 | 
														
														 | 
														
															 // 版本号 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public let versionName = "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] ?? "1.0.0")" 
														 | 
														
														 | 
														
															 public let versionName = "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] ?? "1.0.0")" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+public let appRunIdentify : String = { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    let dateFmt = DateFormatter() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    dateFmt.dateFormat = "MMddHHmmss" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    return dateFmt.string(from: Date()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+}() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /// 创建目录文件 
														 | 
														
														 | 
														
															 /// 创建目录文件 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 /// - Returns: <#description#> 
														 | 
														
														 | 
														
															 /// - Returns: <#description#> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public func createDirectory(path: String) { 
														 | 
														
														 | 
														
															 public func createDirectory(path: String) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -148,6 +155,13 @@ public func BFLog<T>(_ type: Int = 0, _ file: String = #file, _ line: Int = #lin 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     #endif 
														 | 
														
														 | 
														
															     #endif 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+func writeIntoFile() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    if let documentDirectoryPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        let filePath = documentDirectoryPath + "/\(appRunIdentify)" + "_logfile.txt" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        freopen(filePath.cString(using: .ascii), "a", stderr) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 // MARK: 获取公共参数 
														 | 
														
														 | 
														
															 // MARK: 获取公共参数 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public func commonParams() -> [String: Any] { 
														 | 
														
														 | 
														
															 public func commonParams() -> [String: Any] { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -962,3 +976,23 @@ public func synced(_ lock: Any, closure: () -> Void) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     closure() 
														 | 
														
														 | 
														
															     closure() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     objc_sync_exit(lock) 
														 | 
														
														 | 
														
															     objc_sync_exit(lock) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+/** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 生成随机字符串, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ - parameter length: 生成的字符串的长度 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ - returns: 随机生成的字符串 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+public func getRandomStringOfLength(length: Int) -> String { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    let characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    var ranStr = "" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    for _ in 0..<length { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        let index = Int(arc4random_uniform(UInt32(characters.count))) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        ranStr.append(characters[index]) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    return ranStr 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+     
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 |