【问题标题】:i am implementing shopify mobile sdk iOS, and while creating a new customer i am getting error "nil URL argument"我正在实施shopify mobile sdk iOS,在创建新客户时出现错误“nil URL argument”
【发布时间】:2016-07-25 13:18:34
【问题描述】:

这是我的代码:

NSArray *credentialItems = @[    
                             [BUYAccountCredentialItem itemWithEmail:self.textFieldCustomerEmail.text],
                             [BUYAccountCredentialItem itemWithPassword:self.textFieldPassword.text],
                             [BUYAccountCredentialItem itemWithFirstName:self.textFieldCustomerName.text]
                             ];
BUYAccountCredentials *credentials = [BUYAccountCredentials credentialsWithItems:credentialItems];
 BUYClient *user = [[BUYClient alloc] initWithShopDomain:@"##############" apiKey:@"#############" appId:@"#########"];       
[user createCustomerWithCredentials:credentials callback:^(BUYCustomer *customer, BUYCustomerToken *token, NSError *error){
        }];

这是错误:

shopify[10128:196747] * 由于未捕获的异常而终止应用程序 'NSInvalidArgumentException',原因:'* -[NSBundle initWithURL:]: 无 URL 参数'

【问题讨论】:

  • 究竟是哪一行导致了这个问题?
  • BUYClient *user = [[BUYClient alloc] initWithShopDomain:@"##############" apiKey:@"########## ###" appId:@"#########"];在调试它不是创建用户。 "用户 BUYClient * nil 0x00000000"
  • 我得到了解决方案.....
  • 我输入了错误的 appId....
  • 您好,很抱歉给您带来不便。我希望您可以使用 Shopify 完成一个项目。我需要你的帮助,你能看看这个stackoverflow.com/questions/40910777/…

标签: objective-c shopify


【解决方案1】:

希望你能找到答案,如果没有,请访问这里...

Login/Signup API implementation in iOS Shopify

您必须在 AppDelegate 中声明 BUYClient 并在 didFinishLaunchingWithOptions 方法中分配 Shop_Domain、Api_Key 和 App-Id。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-12-05
    • 2020-12-04
    • 1970-01-01
    • 1970-01-01
    • 2021-01-15
    • 1970-01-01
    • 2014-10-04
    • 1970-01-01
    相关资源
    最近更新 更多