Skip to content

Commit

Permalink
chore(GiniBankSDK): Add code for testing purposes
Browse files Browse the repository at this point in the history
PIA-2548
  • Loading branch information
ValentinaIancu-Gini committed Aug 30, 2023
1 parent 41cad3c commit 2b5e570
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,20 @@ public func giniCaptureBundle() -> Bundle {
- returns: Image if found with name.
*/
public func UIImageNamedPreferred(named name: String) -> UIImage? {
if let mainBundleImage = UIImage(named: name, in: Bundle.main, compatibleWith: nil) {
return mainBundleImage
}
if let customBundle = GiniConfiguration.shared.customResourceBundle,
let customBundleImage = UIImage(named: name, in: customBundle, compatibleWith: nil) {
return customBundleImage
// if let mainBundleImage = UIImage(named: name, in: Bundle.main, compatibleWith: nil) {
// return mainBundleImage
// }
print("DEBUG - image name = ", name)
if let customBundle = GiniConfiguration.shared.customResourceBundle {
print("DEBUG - customResourceBundle =", customBundle)
if let customBundleImage = UIImage(named: name, in: customBundle, compatibleWith: nil) {
return customBundleImage
} else {
return UIImage(named: name, in: giniCaptureBundle(), compatibleWith: nil)
}
}

return UIImage(named: name, in: giniCaptureBundle(), compatibleWith: nil)
return nil
// return UIImage(named: name, in: giniCaptureBundle(), compatibleWith: nil)
}

/**
Expand Down

0 comments on commit 2b5e570

Please sign in to comment.