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 #1693

Open
KashifJavaid opened this issue Jul 18, 2024 · 0 comments
Open

shared is unavailable in application extensions for iOS #1693

KashifJavaid opened this issue Jul 18, 2024 · 0 comments

Comments

@KashifJavaid
Copy link

KashifJavaid commented Jul 18, 2024

I am experiencing an issue when integrating the Stripe SDK into my iOS application, particularly when using the SDK within an application extension. Specifically, the build fails with the following error message:

'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead.

This error is encountered in the STPRedirectContext.swift file at line 105.

Steps to Reproduce:

Add the Stripe SDK to a project that includes an application extension.
Attempt to build the project.
Observe the build failure with the aforementioned error.
Environment:

Stripe SDK Version: 0.37.3
Xcode Version: 15.3
iOS Deployment Target: 13
React Native Version : 0.73.2

Snippet of podfile

target 'TheNotificationService' do
  pod 'Ometria', :modular_headers => true
  pod 'Stripe', :modular_headers => true
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
    end
  end
end

also look at stripe/stripe-ios#2853

Screenshot 2024-07-18 at 10 14 58

Issue Description:

The shared method, which is used in the Stripe SDK, is unavailable for application extensions in iOS. This causes a build failure when attempting to use the SDK within an extension. The error suggests using view controller-based solutions instead, but this adjustment is within the Stripe SDK itself and not within my control as an integrator.

Request:

I kindly request that the Stripe SDK be updated to ensure compatibility with application extensions in iOS by avoiding the use of the shared method or providing an alternative approach that is suitable for use in extensions.

Please let me know if you need any additional information or if there are any workarounds available in the meantime. Your assistance in resolving this issue would be greatly appreciated.

Thank you for your support.

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant