I'm implementing this git - NSDate-TimeAgo
It has swift extension inside. I have dragged and drop the Bundle that the git supply into my app - NSDateTimeAgo.bundle
In the extension file im trying to get this file path , but it always return nil SWIFT 2.0
func NSDateTimeAgoLocalizedStrings(key: String) -> String {
let resourcePath = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0]
let path = resourcePath.URLByAppendingPathComponent("NSDateTimeAgo.bundle")
let bundle = NSBundle(URL: path)
print(bundle) -> **nil**
return NSLocalizedString(key, tableName: "NSDateTimeAgo", bundle: bundle!, comment: "")
}
Any suggestions?