Use Bundle(for:Type):
let bundle = Bundle(for: type(of: self))
let path = bundle.path(forResource: filename, ofType: type)
or search the bundle by identifier (the frameworks bundle ID):
let bundle = Bundle(identifier: "com.myframework")
Use Bundle(for:Type):
let bundle = Bundle(for: type(of: self))
let path = bundle.path(forResource: filename, ofType: type)
or search the bundle by identifier (the frameworks bundle ID):
let bundle = Bundle(identifier: "com.myframework")