We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// MARK: - Functions
/// Get the path for a PathType. /// /// - Parameter path: Path type. /// - Returns: Returns the path type String. public func pathFor(_ path: PathType) -> String? { var pathString: String? switch path { case .mainBundle: pathString = self.mainBundlePath() ... } return pathString }
self.mainBundlePath() always return nil
I recommend to switch
/// Get Main Bundle path for a filename. /// /// - Parameter file: Filename /// - Returns: Returns the path as a String. public func mainBundlePath(file: String = "") -> String? { return file.isEmpty ? Bundle.main.bundlePath : Bundle.main.path(forResource: file.deletingPathExtension, ofType: file.pathExtension) }
The text was updated successfully, but these errors were encountered:
7ea8f51
Thanks! I've changed it 👍
Sorry, something went wrong.
No branches or pull requests
// MARK: - Functions
self.mainBundlePath() always return nil
I recommend to switch
/// Get Main Bundle path for a filename.
///
/// - Parameter file: Filename
/// - Returns: Returns the path as a String.
public func mainBundlePath(file: String = "") -> String? {
return file.isEmpty ? Bundle.main.bundlePath : Bundle.main.path(forResource: file.deletingPathExtension, ofType: file.pathExtension)
}
The text was updated successfully, but these errors were encountered: