-
Notifications
You must be signed in to change notification settings - Fork 13
Unable to add dependency on Stripe
#162
Comments
Sorry for the delay in my response. I think that you are running into the issue where the repository name does not match the package name. The Stripe If you add the spm_repositories(
name = "swift_pkgs",
dependencies = [
spm_pkg(
"https://github.com/stripe/stripe-ios.git",
name = "Stripe",
exact_version = "22.6.0",
products = ["Stripe"], # https://github.com/stripe/stripe-ios/blob/f5b0b5973aaa7ce6a2865e56f5942637cfef53f7/Package.swift#L11-L14
),
],
) That seems to address the fetch issue. Unfortunately, I am seeing a compilation issue with the Stripe package. I'll poke at it for a minute to glean some information. |
I cloned stripe/strip-ios and ran ❯ swift build
Building for debugging...
In file included from /Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/UIColor+ThirteenSupport.m:9:
/Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/UIColor+ThirteenSupport.h:9:9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from /Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/STDSTextFieldCustomization.m:9:
'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from /Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/UIViewController+Stripe3DS2.m:9:
: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from /Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/STDSTransaction.m:9:
/Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/include/STDSTransaction.h:10:9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from /Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/UIColor+DefaultColors.m:9:
/Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/UIColor+DefaultColors.h:9:9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from /Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/STDSThreeDS2Service.m:18:
In file included from /Users/chuck/code/stripe/stripe-ios/Stripe3DS2/Stripe3DS2/STDSDirectoryServerCertificate.h:13:
9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
1 error generated.
1 error generated.
[461/539] Compiling Stripe3DS2 UIColor+ThirteenSupport.m Does building the Stripe package work for you? |
Huh, I get very similar errors.
I wonder in what way I'm hodling it wrong... Let's ask stripe/stripe-ios#1983 |
Looking at the response from the stripe team, I think the issue is in rules_spm. I modified my import following your instructions but now I get the following output:
Note that I include the platform
Do you have any theories @cgrindel ? |
Were you able to clone their repo and run |
not sure it helps @achew22 - but uikit is specifically used on ios. appkit is for macos. https://stackoverflow.com/questions/68676690/macos-uikit-uikit-h-not-found |
UPDATE - I see someone is using bazel + stripe here |
I'm unable to add a dependency on Stripe. I believe this is a reasonable way of loading it in (happy to be told I'm wrong on that front).
WORKSPACE
:BUILD
:main.swift
:Even when I try to do something relatively simple like query
#swift_pkgs
, not even running the binary, I get the following output:And
bazel run //:simple
has a similar error:I think there is a good chance that I'm holding it wrong, but I can't understand what I'm doing wrong here. Happy to provide any additional debug information you might want.
The text was updated successfully, but these errors were encountered: