alqindiirsyam 2 年之前
父节点
当前提交
81f582aa00

二进制
appbuilder-ios/DigiXLite/DigiXLite.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 8
appbuilder-ios/DigiXLite/DigiXLite/Source/Extension.swift

@@ -929,10 +929,6 @@ extension UILabel {
 extension Bundle {
 
     public static func resourceBundle(for frameworkClass: AnyClass) -> Bundle {
-        guard let moduleName = String(reflecting: frameworkClass).components(separatedBy: ".").first else {
-            fatalError("Couldn't determine module name from class \(frameworkClass)")
-        }
-        
         let frameworkBundle = Bundle(for: frameworkClass)
         guard let resourceBundleURL = frameworkBundle.url(forResource: "DigiXLite", withExtension: "bundle"),
               let resourceBundle = Bundle(url: resourceBundleURL) else {
@@ -942,10 +938,6 @@ extension Bundle {
     }
     
     public static func resourcesMediaBundle(for frameworkClass: AnyClass) -> Bundle {
-        guard let moduleName = String(reflecting: frameworkClass).components(separatedBy: ".").first else {
-            fatalError("Couldn't determine module name from class \(frameworkClass)")
-        }
-        
         let frameworkBundle = Bundle(for: frameworkClass)
 
         guard let resourceBundleURL = frameworkBundle.url(forResource: "DigiXLiteResources", withExtension: "bundle"),

+ 1 - 1
appbuilder-ios/DigiXLite/DigiXLite/Source/Nexilis.swift

@@ -1492,7 +1492,7 @@ extension UIFont {
     
     class func jbs_registerFont(withFilenameString filenameString: String) {
 
-        guard let pathForResourceString = Bundle.resourcesMediaBundle(for: Nexilis.self).path(forResource: filenameString, ofType: "ttf") else {
+        guard let pathForResourceString = Bundle.resourceBundle(for: Nexilis.self).path(forResource: filenameString, ofType: "ttf") else { //resourcesMediaBundle
             //print(("UIFont+:  Failed to register font - path for resource not found.")
             return
         }

+ 3 - 3
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorGroup.swift

@@ -162,7 +162,7 @@ public class EditorGroup: UIViewController {
         documentPicker = DocumentPicker(presentationController: self, delegate: self)
         
         let fm = FileManager.default
-        let path = Bundle.resourcesMediaBundle(for: Nexilis.self).resourcePath!
+        let path = Bundle.resourceBundle(for: Nexilis.self).resourcePath! //resourcesMediaBundle
         let items = try! fm.contentsOfDirectory(atPath: path)
         
         for item in items {
@@ -2707,7 +2707,7 @@ extension EditorGroup: UICollectionViewDelegate, UICollectionViewDataSource {
             imageSticker.leadingAnchor.constraint(equalTo: cell.contentView.leadingAnchor),
             imageSticker.trailingAnchor.constraint(equalTo: cell.contentView.trailingAnchor)
         ])
-        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
         return cell
     }
     
@@ -3326,7 +3326,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
                 imageSticker.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 15).isActive = true
                 imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                 imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor, constant: -15).isActive = true
-                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                 imageSticker.contentMode = .scaleAspectFit
             }
             else {

+ 3 - 3
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorPersonal.swift

@@ -186,7 +186,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
         documentPicker = DocumentPicker(presentationController: self, delegate: self)
         
         let fm = FileManager.default
-        let path = Bundle.resourcesMediaBundle(for: Nexilis.self).resourcePath!
+        let path = Bundle.resourceBundle(for: Nexilis.self).resourcePath! //resourcesMediaBundle
         let items = try! fm.contentsOfDirectory(atPath: path)
         
         for item in items {
@@ -3905,7 +3905,7 @@ extension EditorPersonal: UICollectionViewDelegate, UICollectionViewDataSource {
             imageSticker.leadingAnchor.constraint(equalTo: cell.contentView.leadingAnchor),
             imageSticker.trailingAnchor.constraint(equalTo: cell.contentView.trailingAnchor)
         ])
-        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
         return cell
     }
     
@@ -4629,7 +4629,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
                 imageSticker.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 15).isActive = true
                 imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                 imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor, constant: -15).isActive = true
-                imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                 imageSticker.contentMode = .scaleAspectFit
             } else if dataMessages[indexPath.row]["message_scope_id"] as! String == "18" {
                 let data = textChat

+ 1 - 1
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Chat/EditorStarMessages.swift

@@ -410,7 +410,7 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
                 imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                 imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor).isActive = true
                 imageSticker.widthAnchor.constraint(equalToConstant: 80).isActive = true
-                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                 imageSticker.contentMode = .scaleAspectFit
             }
             else {

+ 1 - 1
appbuilder-ios/DigiXLite/DigiXLite/Source/View/Control/MessageInfo.swift

@@ -632,7 +632,7 @@ class MessageInfo: UIViewController, UITableViewDelegate, UITableViewDataSource
                     imageSticker.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 15).isActive = true
                     imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                     imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor, constant: -15).isActive = true
-                    imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                    imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                     imageSticker.contentMode = .scaleAspectFit
                 } else if data["message_scope_id"] as! String == "18" {
                     let data = textChat

+ 0 - 8
appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift

@@ -929,10 +929,6 @@ extension UILabel {
 extension Bundle {
 
     public static func resourceBundle(for frameworkClass: AnyClass) -> Bundle {
-        guard let moduleName = String(reflecting: frameworkClass).components(separatedBy: ".").first else {
-            fatalError("Couldn't determine module name from class \(frameworkClass)")
-        }
-        
         let frameworkBundle = Bundle(for: frameworkClass)
         guard let resourceBundleURL = frameworkBundle.url(forResource: "NexilisLite", withExtension: "bundle"),
               let resourceBundle = Bundle(url: resourceBundleURL) else {
@@ -942,10 +938,6 @@ extension Bundle {
     }
     
     public static func resourcesMediaBundle(for frameworkClass: AnyClass) -> Bundle {
-        guard let moduleName = String(reflecting: frameworkClass).components(separatedBy: ".").first else {
-            fatalError("Couldn't determine module name from class \(frameworkClass)")
-        }
-        
         let frameworkBundle = Bundle(for: frameworkClass)
 
         guard let resourceBundleURL = frameworkBundle.url(forResource: "NexilisLiteResources", withExtension: "bundle"),

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -1498,7 +1498,7 @@ extension UIFont {
     
     class func jbs_registerFont(withFilenameString filenameString: String) {
 
-        guard let pathForResourceString = Bundle.resourcesMediaBundle(for: Nexilis.self).path(forResource: filenameString, ofType: "otf") else {
+        guard let pathForResourceString = Bundle.resourceBundle(for: Nexilis.self).path(forResource: filenameString, ofType: "otf") else { //resourcesMediaBundle
             //print("UIFont+:  Failed to register font - path for resource not found.")
             return
         }

+ 3 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift

@@ -162,7 +162,7 @@ public class EditorGroup: UIViewController {
         documentPicker = DocumentPicker(presentationController: self, delegate: self)
         
         let fm = FileManager.default
-        let path = Bundle.resourcesMediaBundle(for: Nexilis.self).resourcePath!
+        let path = Bundle.resourceBundle(for: Nexilis.self).resourcePath! //resourcesMediaBundle
         let items = try! fm.contentsOfDirectory(atPath: path)
         
         for item in items {
@@ -2707,7 +2707,7 @@ extension EditorGroup: UICollectionViewDelegate, UICollectionViewDataSource {
             imageSticker.leadingAnchor.constraint(equalTo: cell.contentView.leadingAnchor),
             imageSticker.trailingAnchor.constraint(equalTo: cell.contentView.trailingAnchor)
         ])
-        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
         return cell
     }
     
@@ -3326,7 +3326,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
                 imageSticker.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 15).isActive = true
                 imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                 imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor, constant: -15).isActive = true
-                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                 imageSticker.contentMode = .scaleAspectFit
             }
             else {

+ 3 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -186,7 +186,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
         documentPicker = DocumentPicker(presentationController: self, delegate: self)
         
         let fm = FileManager.default
-        let path = Bundle.resourcesMediaBundle(for: Nexilis.self).resourcePath!
+        let path = Bundle.resourceBundle(for: Nexilis.self).resourcePath! //resourcesMediaBundle
         let items = try! fm.contentsOfDirectory(atPath: path)
         
         for item in items {
@@ -3905,7 +3905,7 @@ extension EditorPersonal: UICollectionViewDelegate, UICollectionViewDataSource {
             imageSticker.leadingAnchor.constraint(equalTo: cell.contentView.leadingAnchor),
             imageSticker.trailingAnchor.constraint(equalTo: cell.contentView.trailingAnchor)
         ])
-        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+        imageSticker.image = UIImage(named: stickers[indexPath.row], in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
         return cell
     }
     
@@ -4629,7 +4629,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
                 imageSticker.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 15).isActive = true
                 imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                 imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor, constant: -15).isActive = true
-                imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                 imageSticker.contentMode = .scaleAspectFit
             } else if dataMessages[indexPath.row]["message_scope_id"] as! String == "18" {
                 let data = textChat

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift

@@ -410,7 +410,7 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
                 imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                 imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor).isActive = true
                 imageSticker.widthAnchor.constraint(equalToConstant: 80).isActive = true
-                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                imageSticker.image = UIImage(named: (textChat?.components(separatedBy: "/")[1])!, in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                 imageSticker.contentMode = .scaleAspectFit
             }
             else {

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/MessageInfo.swift

@@ -632,7 +632,7 @@ class MessageInfo: UIViewController, UITableViewDelegate, UITableViewDataSource
                     imageSticker.leadingAnchor.constraint(equalTo: containerMessage.leadingAnchor, constant: 15).isActive = true
                     imageSticker.bottomAnchor.constraint(equalTo: messageText.topAnchor, constant: -5).isActive = true
                     imageSticker.trailingAnchor.constraint(equalTo: containerMessage.trailingAnchor, constant: -15).isActive = true
-                    imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourcesMediaBundle(for: Nexilis.self), with: nil)
+                    imageSticker.image = UIImage(named: (textChat.components(separatedBy: "/")[1]), in: Bundle.resourceBundle(for: Nexilis.self), with: nil) //resourcesMediaBundle
                     imageSticker.contentMode = .scaleAspectFit
                 } else if data["message_scope_id"] as! String == "18" {
                     let data = textChat