Smartling / ios-context-framework

Captures context from native iOS applications into Smartling TMS
Other
1 stars 1 forks source link

Please allow the path for Smartling.plist to be passed in instead of auto detected #3

Open michaelpetrov opened 8 years ago

michaelpetrov commented 8 years ago

I'm putting this integration within a dynamic .framework that's separate from the main app and need to bundle in Smartling.plist into that bundle. The problem is that you're using +[NSBundle mainBundle] which assumes Smartling.plist is in that bundle. I managed to bypass it with swizzling all calls to -[NSBundle URLForResource:withExtension:] but it's a giant hack that shouldn't be needed.

Alternatively, would it be possible to instead use +[NSBundle bundleForClass:[SMCredentials class]] to get the bundle that linked in your static library instead? That would work for our use case while still returning the main bundle in the default integration.

Thanks!

spenrose commented 8 years ago

There should also just be a way to initialize it with a dictionary.