gpt4 book ai didi

ios - Braintree iOS SDK 说没有已知的类方法

转载 作者:行者123 更新时间:2023-11-28 18:58:02 24 4
gpt4 key购买 nike

我遇到了这个错误。有人吗?

-(void)clientToken{

NSURL *clientTokenURL = [NSURL URLWithString:@"http://tectutiveclients.com/projects/carboss/api/getToken"];

NSMutableURLRequest *clientTokenRequest = [NSMutableURLRequest requestWithURL:clientTokenURL];

[clientTokenRequest setValue:@"text/plain" forHTTPHeaderField:@"Accept"];

[NSURLConnection
sendAsynchronousRequest:clientTokenRequest
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
// TODO: Handle errors in [(NSHTTPURLResponse *)response statusCode] and connectionError
clientToken = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];

// Initialize `Braintree` once per checkout session


[Braintree setupWithClientToken:clientToken
completion:^(Braintree *braintree, NSError *error) {
UIViewController *dropin = [braintree dropInViewControllerWithDelegate:self];
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:dropin]
animated:YES
completion:nil];

// No known class method for selector setupwithClientToken Error

}];


UIViewController *dropin = [self.braintree dropInViewControllerWithDelegate:self];
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:dropin]
animated:YES
completion:nil];
}];
}

最佳答案

我在布伦特里工作。如果还有问题请get in touch with our support team .

这是文档中的错误。相反,请使用 braintreeWithClientToken:

例子:

NSString *clientToken = [[NSString alloc] initWithData:data 
encoding:NSUTF8StringEncoding];

// Initialize `Braintree` once per checkout session
self.braintree = [Braintree braintreeWithClientToken:clientToken];

感谢您指出这一点!文档将很快更新。

关于ios - Braintree iOS SDK 说没有已知的类方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29917000/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com