NSURLSession returns data as Null on Watch OS2 using Objective-C

前端 未结 2 510
予麋鹿
予麋鹿 2021-01-20 02:26

This works perfectly on iPhone (Simlulator and Device) but on Watch OS2 i get blank data. What might be the issue with this ?

NSURLSession *session = [NSURLS         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-20 02:56

    [self.table setNumberOfRows:[arrurlimg1 count ]withRowType:@"QuoteTableRow"];

    for (NSInteger i = 0; i < self.table.numberOfRows; i++) {
    
        ICBQuoteTableRow* theRow = [self.table rowControllerAtIndex:i];
    
        NSURLSessionConfiguration  *config =[NSURLSessionConfiguration defaultSessionConfiguration];
        NSURLSession *session =[NSURLSession sessionWithConfiguration:config];
    
        NSURLSessionTask *task = [session dataTaskWithURL:url completionHandler:^(NSData * _Nullable data1, NSURLResponse * _Nullable response, NSError * _Nullable error)
                                  {
                                      for (int i=0; i

提交回复
热议问题