Skip to content

Commit

Permalink
Updated Bundle extension to be simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSabintsev committed Dec 21, 2020
1 parent 2fa31da commit 2f80f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Siren.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
# Version
s.version = "5.7.0"
s.version = "5.7.1"
s.swift_version = "5.3"

# Meta
Expand Down
7 changes: 3 additions & 4 deletions Sources/Extensions/BundleExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,10 @@ private extension Bundle {
/// - Returns: The bundle's path or `nil`.
final class func sirenBundlePath() -> String? {
#if SWIFT_PACKAGE
let resourceBundle = Bundle.module
return resourceBundle.path(forResource: "\(Siren.self)", ofType: Constants.bundleExtension)
#endif

return Bundle.module.path(forResource: "\(Siren.self)", ofType: Constants.bundleExtension)
#else
return Bundle(for: Siren.self).path(forResource: "\(Siren.self)", ofType: Constants.bundleExtension)
#endif
}

/// The path for a particular language localizationin Siren's localization `Bundle`.
Expand Down

0 comments on commit 2f80f8d

Please sign in to comment.