小编app*_*y21的帖子

得到错误:“线程1:SOAP请求期间EXC_BAD_ACCESS(Code = EXC_I386_GPFLT)

在我的目标C代码中,我尝试访问SOAP Web服务,但收到以下错误提示:“线程1:EXC_BAD_ACCESS(Code = EXC_I386_GPFLT)”

NSString *httpBodySoapMsg = [NSString stringWithFormat:
                                     @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"......
                                     "</x:Envelope>\n", _encryptedUsername,_encryptedPassword, nonce, digest];
Run Code Online (Sandbox Code Playgroud)

下面是我的完整代码。

#pragma mark - login request method

- (void)sendValidateEmailRequest {
    NSString *nonce = [NSString stringWithFormat:@"%ld", (long)(NSTimeInterval)([[NSDate date] timeIntervalSince1970])];
    NSString *digest = [Utils sha1:[NSString stringWithFormat:@"%@%@%@", _textUsername.text, nonce, _textPassword]];    // input is forsha
    NSString *httpBodySoapMsg = [NSString stringWithFormat:
                                 @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
                                 "<x:Envelope xmlns:x=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:mob=\"https://billing.eukhost.com/webservices/mobile_service_new?wsdl\">\n"
                                 "<x:Header/>\n"
                                 "<x:Body>\n"
                                 "<mob:validate_email>\n"
                                 "<mob:email>%@</mob:email>\n"
                                 "<mob:password>%@</mob:password>\n"
                                 "<mob:nonce>%@</mob:nonce>\n"
                                 "<mob:digest>%@</mob:digest>\n"
                                 "</mob:validate_email>\n"
                                 "</x:Body>\n"
                                 "</x:Envelope>\n", _encryptedUsername, _encryptedPassword, nonce, digest];

    NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:DEMO_URL]]; …
Run Code Online (Sandbox Code Playgroud)

objective-c ios

1
推荐指数
1
解决办法
1257
查看次数

不要在 iOS 中的对话框区域外使用点击手势关闭 uialertcontroller 表

在我的 iOSswift 3.0应用程序中,我UIAlertController在当前的 ViewController 上显示了工作表实例。但是,当我在工作表的某个区域(变暗的半透明背景)之外点击时,我不想关闭该工作表,因为我已经必须取消一个操作。任何的想法?

我有带有更多按钮的 MGSwipeTableViewCell。当用户单击“更多”按钮时,将执行以下代码。

func onClickMore(for vmCell: VmCell) {
    let sheet = UIAlertController(title: vmCell.vmItem?.vmNameWithoutIp, message: vmCell.vmItem?.ipAddress, preferredStyle: .actionSheet)

    sheet.addAction(UIAlertAction(title: "Create Ticket", style: .default) { (action: UIAlertAction) in

    })

    sheet.addAction(UIAlertAction(title: "Start VM", style: .default) { (action: UIAlertAction) in

    })

    sheet.addAction(UIAlertAction(title: "Restart VM", style: .default) { (action: UIAlertAction) in

    })

    sheet.addAction(UIAlertAction(title: "Stop VM", style: .destructive) { (action: UIAlertAction) in

    })

    sheet.addAction(UIAlertAction(title: "Cancel", style: .cancel) { (action: UIAlertAction) in

    })

    present(sheet, animated: true) { 
        sheet.view.superview?.addGestureRecognizer(UITapGestureRecognizer(target: self, …
Run Code Online (Sandbox Code Playgroud)

ios swift swift3

0
推荐指数
1
解决办法
3301
查看次数

标签 统计

ios ×2

objective-c ×1

swift ×1

swift3 ×1