Fix import of xcassets
to resources bundles in podspec
#66
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.
In WCiOS during the last two years, we encountered a crash, that was happening during the first launch of the app on a new device (a new device, is that device that has never installed the application before). In particular, we encountered this crash woocommerce/woocommerce-ios#2454 that can be easily reproducible following these steps:
Device
menu, and clickErase All content and settings...
.After several investigations, it appears that the problem is caused by the way we import
xcassets
resources into the podspec file of Gridicons.Basically, before we were integrating the
xcassets
like thisusing as bundle name
Gridicons
which create a conflict at runtime. For solving this issue, I modified the bundle for the resources toGridiconsAssets
like this:plus I edited the code where we use the old bundle name. The reason for this conflict is well explained in this post.
After importing this branch in WCiOS, the issue was fixed and I'm no more able to reproduce the crash 🚀