Fixed Xcode-generated header file import #132
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixed the issue where certain developers who were importing our SDK as a framework (over cocoapods default of static library) were facing issues with the Xcode-generated header file.
This was happening mainly for folks using firebase as it instructs developers to add a line to you pod file that in turn updates all the pods to be pulled in as frameworks. On inspection we found this apple doc that suggests using different header import syntax when importing a framework. It doesn't talk about libraries but we think that the syntax when our SDK is pulled in as a library (static or dynamic) is different.
As a fix, we included importing both formats to accommodate users pulling in our SDK as a framework and library by adding a conditional . The solution is similar to what was proposed in #78 but includes support for library import.
Check List
Changelog / Code Overview
Just a simple change but took forever to reproduce internally since our test apps were not using frameworks and importing our SDK as a library.
Test Plan
Related Issues/Tickets
#94
https://github.com/klaviyo/klaviyo-react-native-sdk/pull/78/files
#129