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

shared is unavailable in application extensions for iOS #2853

Open
RichAppz opened this issue Aug 14, 2023 · 7 comments
Open

shared is unavailable in application extensions for iOS #2853

RichAppz opened this issue Aug 14, 2023 · 7 comments
Labels
kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@RichAppz
Copy link

Summary

Since the 23.13.0 release building has been blocked by an extension issue. There has been a change in the codebase of 23.13.0 that is using UIApplication.shared which is not available to swift extensions.

Screenshot 2023-08-14 at 09 01 02

iOS version

iOS 16.6

Installation method

Cocoapods

SDK version

23.13.0

Other information

Reverting back to 23.12.0 works fine!

@sfriedman-stripe
Copy link
Collaborator

Hi @RichAppz, thank you for writing in about this issue. Could you please help us understand a little bit more about your use case? What kind of extension are you building?

davidme-stripe added a commit that referenced this issue Aug 21, 2023
## Summary
Fix StripeApplePay support in App Extensions.

## Motivation
#2853

## Testing
Added a Cocoapods test to build an iMessage App Extension with the
StripeApplePay SDK.

## Changelog
Updated
@davidme-stripe
Copy link
Contributor

@RichAppz Should be fixed in master: Can you try pointing your Podfile to the master branch? For example:

target 'MyAppExtension' do
  platform :ios, '13.0'
  use_frameworks!
  pod 'StripeApplePay', git: 'https://github.com/stripe/stripe-ios.git', branch: 'master'
  pod 'StripeCore', git: 'https://github.com/stripe/stripe-ios.git', branch: 'master'
end

fionnbarrett-stripe pushed a commit that referenced this issue Aug 22, 2023
## Summary
Fix StripeApplePay support in App Extensions.

## Motivation
#2853

## Testing
Added a Cocoapods test to build an iMessage App Extension with the
StripeApplePay SDK.

## Changelog
Updated
lisaliu-stripe pushed a commit that referenced this issue Aug 22, 2023
## Summary
Fix StripeApplePay support in App Extensions.

## Motivation
#2853

## Testing
Added a Cocoapods test to build an iMessage App Extension with the
StripeApplePay SDK.

## Changelog
Updated
@thaissadami
Copy link

I have the same problem, and it still doesn't work. (23.16.0)

@pascalguizard
Copy link

pascalguizard commented Nov 16, 2023

It still doesn't work for me with xcode 15 and 23.18.2...
But is for STPRedirectContext
Someone have any solution ?

@davidme-stripe
Copy link
Contributor

Thanks for the info! Can you share what you're trying to do in the App Extension? STPRedirectContext won't work in an App Extension, as it needs to be able to launch app-to-app redirects, which are not available in App Extensions.

@pascalguizard
Copy link

I only have Stripe in my pods un use in 1 class in the main app. But this app contains a submodule, a watch app extension and a Today widget extension. Those extensions does not import Stripe.

And when i try to build my app i got this
image

@davidme-stripe
Copy link
Contributor

@pascalguizard Can you check your Podfile to confirm that the Stripe pods are not being included in your watch app or Today widget targets? There may also be an https://guides.cocoapods.org/syntax/podfile.html#inherit_bang entry in one of those targets causing it to build Stripe for application extensions.

If not, it's possible that you're encountering this issue: CocoaPods/CocoaPods#12093

Let me know if that's the case, and we'll keep looking for a solution. Thanks!

@davidme-stripe davidme-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

5 participants