Skip to content

Commit

Permalink
Fix specification of asset path
Browse files Browse the repository at this point in the history
  • Loading branch information
zrn-ns committed Jan 19, 2021
1 parent f7a5635 commit 8e867f5
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ public class DKImagePickerControllerResource: NSObject {
private extension Bundle {

class func imagePickerControllerBundle() -> Bundle {
let assetPath = Bundle(for: DKImagePickerControllerResource.self).resourcePath!
return Bundle(path: (assetPath as NSString).appendingPathComponent("DKImagePickerController.bundle"))!
#if SWIFT_PACKAGE
return Bundle.module
#else
let assetPath = Bundle(for: DKImagePickerControllerResource.self).resourcePath!
return Bundle(path: (assetPath as NSString).appendingPathComponent("DKImagePickerController.bundle"))!
#endif
}

}

0 comments on commit 8e867f5

Please sign in to comment.