我的iOS应用程序只在iPhone上崩溃,但在iPad上运行

我的iOS应用程序只在iPhone上崩溃,但在iPad上运行,ios,objective-c,Ios,Objective C,我正在iPhone中安装IPA文件,它崩溃了,但在iPad中工作正常。应用程序在调试模式下工作正常(使用xcode连接电缆)。我无法找到崩溃场景 在这里,我给出了Firebase碰撞报告屏幕截图 我的编码截图是: 在这里我分享我的代码为特定块 __weak NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url

我正在iPhone中安装IPA文件,它崩溃了,但在iPad中工作正常。应用程序在调试模式下工作正常(使用xcode连接电缆)。我无法找到崩溃场景

在这里,我给出了Firebase碰撞报告屏幕截图

我的编码截图是:

在这里我分享我的代码为特定块

 __weak NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:100.0];

[request setHTTPMethod: @"POST"];

NSString *msgLength = [NSString stringWithFormat:@"%lu", (unsigned long)[soapMessage length]];

[request addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[request addValue: [NSString stringWithFormat:@"http://tempuri.org/IEvalProcessService/%@",methodName] forHTTPHeaderField:@"SOAPAction"];
[request addValue: msgLength forHTTPHeaderField:@"Content-Length"];
//[request setHTTPBody: requestData];
[request setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]];

NSURLSessionConfiguration *configg=[NSURLSessionConfiguration defaultSessionConfiguration];
NSURLSession*sessionn=[NSURLSession sessionWithConfiguration:configg delegate:nil delegateQueue:[NSOperationQueue mainQueue]];

NSURLSessionDataTask *taskk=[sessionn dataTaskWithRequest:request completionHandler:^(NSData *data,NSURLResponse *responce,NSError *error){
    if(error)
    {
        NSLog(@"%@", [error localizedDescription]);
        completionBlock(nil);
    }else{
         NSString *requestReply = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
        NSLog(@"requestReply: %@", requestReply);
        if (![requestReply isEqualToString:@"Object reference not set to an instance of an object."]) {

            //[arrtoSaveInLocal addObject:dictVal];
            if (completionBlock) {
                completionBlock(requestReply);
            }
        }else
        {
            completionBlock(nil);
        }



    }
}];
[taskk resume];

删除请求声明前的_u弱项(第443行) 这与那里无关!:)
使用它,您的请求对象不会“保留”,这就是它崩溃的原因…

urlString是来自后端的Api。