1
  1. 我的应用程序的某些用户(在特定运营商上,使用 4g)无法加载照片。

  2. 可达性测试也失败了。但是我可以毫无问题地访问我的一些后端 API。

  3. 但是,当我使用 WiFi 测试我的应用程序时,这永远不会发生。

什么可能导致这个问题?

可达性测试代码:

- (IBAction)fbButtonPressed:(id)sender {

    internetReachableFoo = [Reachability reachabilityWithHostname:@"http://www.google.com"];

    // Internet is reachable
    __weak id weakSelf = self;
    internetReachableFoo.reachableBlock = ^(Reachability*reach)
    {
        // Update the UI on the main thread
        dispatch_async(dispatch_get_main_queue(), ^{
            [weakSelf showLoadingIndicators];
            [[User sharedInstance] attemptToLoginToFB];
            [[Mixpanel sharedInstance] track:@"Try to login using FB"];
        });
    };

    // Internet is not reachable
    internetReachableFoo.unreachableBlock = ^(Reachability*reach)
    {
        // Update the UI on the main thread
        dispatch_async(dispatch_get_main_queue(), ^{
            UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Network Unavailable"
                                                            message:@"Try again when you are connected."
                                                           delegate:nil
                                                  cancelButtonTitle:@"OK"
                                                  otherButtonTitles: nil];
            [alertView show];

        });
    };

    [internetReachableFoo startNotifier];
}
4

1 回答 1

1

4G 网络是新的,并且通常使用与相同运营商 3G 网络不同的网络设备,因此这很可能是运营商问题,而不是您的应用程序的问题。如果您只在 4G 而不是 3G 中看到此问题,那么我也会调查其他运营商以查看是否存在问题,如果不存在,那么我将与问题运营商技术支持团队联系 - 如果您可以给他们确切的 URL您正在使用下载照片,那么他们应该能够快速对其进行测试。

如果您的网络有 4G 加密狗(假设您正在使用某种 REST 接口来访问服务器上的功能),您也可以尝试在连接到该运营商的 PC 上使用 REST 客户端进行测试。如果这只是在他们的网络上失败了,他们的技术团队应该能够很快地解决它(您将有效地为他们完成很多艰苦的工作,他们中的大多数人都会欣赏)。

于 2014-04-22T19:33:42.130 回答