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

Bug : Missing images after update to v20.0.0 (Cocoapods install) #1655

Closed
the0neyouseek opened this issue Sep 25, 2020 · 5 comments
Closed
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@the0neyouseek
Copy link

Summary

After updating the sdk to the latest version on my project I found that there are no longer any images displayed.

Main View STPPaymentOptionsViewController Adding a new Payment Option
Screenshot 1 Screenshot 2

Code to reproduce

Here's the code used to display the view controller :

let customerContext = STPCustomerContext.init(keyProvider: StripeKeyProvider.shared)
let paymentMethodsViewController = STPPaymentOptionsViewController(
	configuration: STPPaymentConfiguration.shared(),
	theme: .custom,
	customerContext: customerContext,
	delegate: self
)
self.navigationController?.pushViewController(paymentMethodsViewController, animated: true)

iOS version

Tested on iOS 13-14

Installation method

Cocoapods

pod 'Stripe'

SDK version

Latest (v20.0.0)

@davidme-stripe
Copy link
Contributor

Hey @the0neyouseek! I haven't seen this before, but we did move to Asset Catalogs in Stripe 20.0.0, so it's possible that we missed something.

To help debug, could you provide some additional info? Sorry for the trouble!

  • Which version of Cocoapods are you using? pod --version
  • Did you run Product -> Clean Build Folder in Xcode?
  • In the Pods project, is the Stripe-Stripe bundle target being built, and does the Build Phases -> Copy Bundle Resources step contain Stripe.xcassets?
  • In your compiled .app, does Frameworks/Stripe.framework/Stripe.bundle exist? Does a Stripe.bundle appear anywhere in the .app bundle?

@davidme-stripe davidme-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Sep 28, 2020
@the0neyouseek
Copy link
Author

the0neyouseek commented Sep 29, 2020

Hi @davidme-stripe!
Thanks for the tips 😉 I deleted my pods folder, did a clean install and cleaned the build folder and it did the trick !

Edit: Weirdly, it worked on simulator and not on a real device.

  • The Stripe target has Stripe.bundle …in ../build/Debug-iphoneos/Stripe in Copy Bundle Resources
  • And the Stripe-Stripe bundle has Stripe.xcassets … Stripe/Stripe/Resources/Images in Copy Bundle Resources
  • Adding the Stripe.xcassets directly in the Stripe target Copy Bundle Resources fixed it

@davidme-stripe
Copy link
Contributor

Thanks for the follow-up! I tested it on a real device (without moving the Stripe.xcassets from the Stripe-Stripe bundle to the Stripe target), and I'm seeing images. I wonder if something else was cached that only impacted device builds. I'll try a few other scenarios of upgrading from 19.x to reproduce this.

@the0neyouseek
Copy link
Author

I'm on Xcode 12 targeting for iOS 12 min. if that helps

@davidme-stripe
Copy link
Contributor

Hi! I think we've fixed this in version 21.2.0, please give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

2 participants