This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Add storyboards and xibs to the resource_bundle #72
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 #67, as part of converting to a static framework, I moved images and assets to
WordPressAuthenticatorResources.bundle..storyboardand.xibfiles remained in the main bundle.This mostly worked fine for WordPress-iOS, but has proved to be problematic in some cases there and in all cases for WooCommerce-iOS. Image references in storyboards were not resoving, with errors like this:
Fixes #38.
The solution I have implemented is as follows:
.xiband.storyboardfiles into theresource_bundle. This means images will be loaded from the same bundle and it will find them correctly.WordPressAuthenticatorResources.bundletoWordPressAuthenticator.bundle. This is a surprising quirk of CocoaPods to ensure they are all in the same target. More info here.To test: