Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

viewDidLoad中调用[self testAPI]; 代码运行奔溃了 #2

Open
XIAODINGPA opened this issue Jan 30, 2018 · 0 comments
Open

viewDidLoad中调用[self testAPI]; 代码运行奔溃了 #2

XIAODINGPA opened this issue Jan 30, 2018 · 0 comments

Comments

@XIAODINGPA
Copy link

  • (void)viewDidLoad {
    [super viewDidLoad];
    // setupLogger
    [HLNetworkLogger setupConfig:^(HLNetworkLoggerConfig * _Nonnull config) {
    config.enableLocalLog = YES;
    config.logAutoSaveCount = 5;
    config.loggerType = HLNetworkLoggerTypePlist;
    }];
    [HLNetworkLogger setDelegate:self];
    [HLNetworkLogger startLogging];

    // setupNetwork
    [HLNetworkManager setupConfig:^(HLNetworkConfig * _Nonnull config) {
    config.request.baseURL = @"https://httpbin.org";
    config.policy.isBackgroundSession = NO;
    config.request.apiVersion = nil;
    // config.request.retryCount = 4;
    }];
    [HLNetworkManager registerResponseObserver:self];

// [self testTask];
[self testAPI];
//
// [self testButton];
// [self testHome];
}

Main Thread Checker: UI API called on a background thread: -[UIApplication setNetworkActivityIndicatorVisible:]
PID: 30646, TID: 274588, Thread name: (none), Queue name: com.qkhl.wangshiyu13.networking.callback.queue, QoS: 0
Backtrace:
4 HLNetworking 0x000000010c6bb245 -[HLNetworkManager send:atSemaphore:atGroup:] + 661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant