Problem in embedding the Peach SDKs into app via sub-frameworks

Modified on Sat, 21 Dec, 2019 at 7:14 AM

The Peach SDK is accessing mobile.connect-resources.bundle using


[[NSBundle mainBundle] pathForResource:@"mobile.connect-resources" ofType:@"bundle" inDirectory:nil]


The problem with using mainBundle is that if the Peach SDK is ever embedded into the App via a sub-framework or cocoa pod or any other target other than the main target this check will fail.


In a particular scenario the bundle was not connected to the mainBundle but rather through another framework target.


This worked with the App until a switch was made to using Frameworks over static libraries for bundling our dependencies.


The reason for this is:


The SDK contains some resources that it looks for in a specific folder when it's not integrated directly but via another framework the resources might be somewhere else. There are ways to work around this, but we have not implemented them right now.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article