Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Using recommended resource_bundles in podspec to fix static linking #452

Conversation

bartlomiejswierad-vodeno
Copy link
Contributor

@bartlomiejswierad-vodeno bartlomiejswierad-vodeno commented Aug 25, 2023

Proposed changes

Replaced resource with recommended resource_bundles in Frames.podspec.

Types of changes

What types of changes does your code introduce to Frames Ios?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Lint and unit tests pass locally with my changes
  • [not applicable] I have added tests that prove my fix is effective or that my feature works
  • [not applicable] I have added necessary documentation (if appropriate)

Further comments

There's an issue when adding Frames to a project through CocoaPods with :linkage => :static option that creates a compilation error due to a problem with duplicated Assets.car file. There are a few open tickets on this issue in cocoapods repository (for over 4 years) and the only recommended action that actually fixes the problem is to replace usage of resource with resource_bundles.

Ticket 1: CocoaPods/CocoaPods#8122
Ticket 2: CocoaPods/CocoaPods#8431

The second ticket is where we can see that many other repositories migrated to the usage of resource_bundles mentioning this issue. It is also the change suggested by the cocoapods team on the official site in the documentation:

For building the Pod as a static library, we strongly recommend library developers to adopt resource bundles as there can be name collisions using the resources attribute.

Sources:

As tested, this worked for both dynamic and static linkage options.

@okhan-okbay-cko
Copy link
Contributor

hey @bartlomiejswierad-vodeno, thanks for raising this issue and taking the time to create this PR! We'll have a look and get back to you soon!

@ehab-al-cko ehab-al-cko added the Fix label Sep 1, 2023
@ehab-al-cko ehab-al-cko merged commit 71ce7eb into checkout:main Sep 6, 2023
2 checks passed
@bartlomiejswierad-vodeno bartlomiejswierad-vodeno deleted the use_resource_bundles_in_podspec branch September 6, 2023 12:17
okhan-okbay-cko added a commit that referenced this pull request Oct 26, 2023
* Bump version to 4.2.0

* Update sample CocoaPods projects

* Move Checkout.podspec

* Remove Carthage references from README

* Update pods on CI

* Fix the recommended usage in  README

* Rename PaymentViewController

* Fix a failing test

* Add CodeQL GitHub Actions workflow

* Fix Checkout tests

* Bump version to 4.2.1

* Update sample project versions to exact versions

* Add workflow

* Remove PR checks from Bitrise in favour of GitHub Actions

* Add regression tests workflow

* Update snapshots

* PIMOB-XXXX: Using recommended resource_bundles in podspec to fix static linking (#452)

Co-authored-by: Ehab Alsharkawy <102961713+ehab-al-cko@users.noreply.github.com>

* Add checkout logo (#462)

* Remove regression tests from bitrise.yml (#463)

* Add codeowners file (#464)

* PIMOB-2041 Add app store validation (#465)

This allows us to see if we cause any disruptions
by our SDK that will prevent our merchants' builds
to be uploaded to App Store successfully

* Remove bitrise.yml since we now use GitHub Actions (#466)

* Update README.md (#460)

* Update README (#467)

* Add workflows to publish Checkout and Frames pods (#468)

* Add SwiftLint as a blocker pre-check for all the other checks (#469)

SwiftLint comes pre-installed on runner images of GitHub.
SwiftLint will run before all the other checks.
If SwiftLint fails, then all the other checks don't run.
SwiftLint only runs for the new files to avoid a big PR.
It also parses errors and warnings for the new files and shows them on GitHub UI.

* Fix the fixable SwiftLint issues (#471)

* Fix the fixable SwiftLint issues

* Remove --strict flag from SwiftLint step under check-pr workflow

* Produce a line length linter error after 210 characters

* Move some folders around and update README (#473)

Move some folders around and update README

* Add lint edited files script (#475)

* Create deploy-github-pages.yml (#476)

* Create deploy-github-pages.yml

* Rename the workflow

* Add generate-jazzy-docs.yml (#474)

* Add only docs diff (#478)

* Update jazzy docs (#477)

* Remove docs from root folder (#479)

* Update SnapshotTesting framework version (#480)

We needed to define an exact version since they stopped supporting iOS 12
in a minor version release. This broke our CI/CD pipeline.

* Trigger regression and validation workflows via labels (#481)

* Update the PR template (#483)

* Feature/partial readmes (#482)

* Create sub README files

* Set README refs to main branch

* Update jazzy docs (#484)

Co-authored-by: runner <runner@Mac-1695314422631.local>

* Update README (#488)

---------

Co-authored-by: cko-developer-portal[bot] <89167155+cko-developer-portal[bot]@users.noreply.github.com>
Co-authored-by: bartlomiejswierad-vodeno <124176175+bartlomiejswierad-vodeno@users.noreply.github.com>
Co-authored-by: Ehab Alsharkawy <102961713+ehab-al-cko@users.noreply.github.com>
Co-authored-by: runner <runner@Mac-1695314422631.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants