gpt4 book ai didi

ios - 错误域 = org.restkit.RestKit.ErrorDomain 代码 = -1011 "Expected status code in (200), got 504"- 仅在真实设备中

转载 作者:行者123 更新时间:2023-11-29 05:16:21 27 4
gpt4 key购买 nike

RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:BASE_URL]];

PPPSynchronization *synchObj = [[PPPSynchronization alloc] init];
[synchObj configureRestKitWithManager:manager withSyncType:CUSTOMER_POST_DATA];

class_customer_list_request *requestObj;
NSMutableURLRequest *request = [manager requestWithObject:requestObj method:RKRequestMethodPOST path:PPP_ESM_POST_COMPONENT parameters:postDict];

[request setTimeoutInterval:300];

RKObjectRequestOperation *op = [manager objectRequestOperationWithRequest:request success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
...

}failure:^(RKObjectRequestOperation *operation, NSError *error) {

}];
[manager enqueueObjectRequestOperation:op];

我的代码在 iOS 模拟器 中完美运行,但当我在真实设备上运行时,它无法正常工作。它需要等待 5 分钟才能在模拟器中获得响应,但在设备中它会在 1 分钟后终止。< strong>请给我一个解决方案。

最佳答案

您可以检查设备和计算机的互联网连接吗?

关于ios - 错误域 = org.restkit.RestKit.ErrorDomain 代码 = -1011 "Expected status code in (200), got 504"- 仅在真实设备中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59151522/

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