capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
https://capacitor-community-stripe.netlify.app/
MIT License
196 stars 77 forks source link

Pods.xcodeproj - signing settings get reset for Stripe, Stripe3DS2, StripeCore, StripeUICore #211

Closed patrickchoi closed 2 years ago

patrickchoi commented 2 years ago

Platform

Describe the bug Every time the build command is invoked, the Pods.xcodeproj gets regenerated and all the signing gets wiped out. I'm not sure if I left something out of the initial setup or if this is some kind of Capacitor config, but would appreciate any help.

Currently we have to open the Pods.xcodeproj and manually set the code signing and it's accumulating non-trivial amount of developer time.

To Reproduce Steps to reproduce the behavior:

  1. In project folder run any one of these commands, which run the xcodebuild command
npx cap run ios
ionic cap build ios
ionic build --prod
  1. Open App.xcodeproj and navigate to Pods

2022-09-15 at 2 51 PM

All the signing previously set has been wiped out

2022-09-15 at 11 54 AM

Expected behavior If set once, it shouldn't disappear?

davidofwatkins commented 2 years ago

I think this is related to a bug with Cocoapods and Xcode 14. I was having the same problem but was able to fix it by adding the workaround mentioned in https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1149585364 to ios/App/Podfile.

patrickchoi commented 2 years ago

That did it! This is the snippet I used in the Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
      target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end