Tag: 发布

如何debugging崩溃版本构build?

我的debugging版本不会崩溃,但发布版本。 我已经修改了Runscheme来使用生成的TestFlight版本构build并将其安装在我的设备上。 这工作。 但应用程序在使用过程中不断崩溃。 pipe理器窗口不给我设备日志。 没有崩溃报告。 一点都没有 优点怎么做?

NSURLConnection无法http发布大文件

我们正在尝试在我们的应用程序中添加function,以允许它向我们的Web服务发送一个大约50kb的大文件,文件本身是一个HTML模板,但是下面的代码我们发现数据似乎被切断当networking服务保存时。 Web服务目前被devise为检查$ _POST ['html']variables并将其写入文件。 有没有更好的方式来做到这一点,有没有人有任何想法,为什么上传不完整? 谢谢Aaron NSString *myText; NSString *filePath = [[NSBundle mainBundle] pathForResource:@"template" ofType:@"htm"]; if (filePath) { myText = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; } NSURL *URL = [NSURL URLWithString:@"http://mywebsiteurl.com/receiveData.php"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL]; request.HTTPMethod = @"POST"; NSString *params = [NSString stringWithFormat:@"html=%@", myText]; NSData *data = [params dataUsingEncoding:NSASCIIStringEncoding]; [request addValue:@"8bit" forHTTPHeaderField:@"Content-Transfer-Encoding"]; [request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; […]

通过HTTPClient工作时,ASIHTTPRequest Post请求失败

正如标题所述,我使用ASIHTTPRequest发送一个POST请求,它失败了,但同样的POST请求在HTTPClient ,我做错了什么? – (void)postData:(NSData *)postData { //… NSMutableData *mutableData = [postData.mutableCopy autorelease]; [request setRequestMethod:@"POST"]; [request setPostBody:mutableData]; [request setPostLength:mutableData.length]; //…. }

从iOS应用程序到Google表单的HTTP POST

我正在处理一个POST请求,并已使用此答案 。 有很多文件NSUrlRequest(和连接),但我很难找出为什么请求不起作用。 我使用此代码使用HTTP Dev Client执行了成功的POST entry.0.single=name&entry.1.single=location&entry.4.single=phoneNumber&entry.2.single=order????&pageNumber=0&backupCache= 4个variables(名称,位置,phoneNumber,顺序)都链接到应用程序中的textField。 – (IBAction)placeOrder:(id)sender { NSURL *nsURL = [[NSURL alloc] initWithString:@"url"]; NSMutableURLRequest *nsMutableURLRequest = [[NSMutableURLRequest alloc] initWithURL:nsURL]; // Set HTTP method to POST [nsMutableURLRequest setHTTPMethod:@"POST"]; // Set up the parameters to send. NSString *paramDataString = [NSString stringWithFormat:@"%@=%@&%@=%@&%@=%@&%@=%@&pageNumber=0&backupCache=",@"entry.0.single", _name, @"entry.1.single", _location, @"entry.4.single", _phoneNumber, @"entry.2.single", _order]; // Encode the parameters to […]

没有数据接收与NSURLSession

我的post请求正常工作(我有一个很好的回应,没有错误),但我没有数据接收太..通常当我在我的浏览器在这个网站https://conventiondestage.insa-toulouse.fr/index.php我完成表单和login后,我可以看到页面的内容accueil.php,但为什么我的函数不返回数据(我想这个网页的HTML内容)? 谢谢你的帮助 ! 这是login控制台: 2014-04-07 17:52:00.207 myINSA[22797:60b] Response:<NSHTTPURLResponse: 0x14e92d50> { URL: https://conventiondestage.insa-toulouse.fr/accueil.php } { status code: 200, headers { "Cache-Control" = "no-store, no-cache, must-revalidate"; Connection = "Keep-Alive"; "Content-Encoding" = gzip; "Content-Length" = 1428; "Content-Type" = "text/html"; Date = "Mon, 07 Apr 2014 15:52:00 GMT"; Expires = "Mon, 26 Jul 1997 05:00:00 GMT"; "Keep-Alive" = "timeout=15, […]

iPhone上的HTML上传(iOS):文件名始终相同(image.jpg,image.png,…)

我正在使用非常简单的代码在我的响应式网站上传文件。 但是,当我使用iPhone上传图像时,图像名称始终是image.jpg ,与图像名称image.jpg 。 任何解决这个问题的解决方法? 为了debugging目的,我使用小代码创build了这个示例页面: <?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { print "<pre>"; echo 'post object info:'; print_r($_FILES); print "</pre>"; } ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>File Upload Test for iphone</title> </head> <body> <form enctype="multipart/form-data" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="512000" /> <input name="userfile" type="file" /> <br /> <input type="submit" value="Send File" /> </form> […]

View Controller在发布后收到一条消息,导致崩溃

我有一个设置,我提出了一个UIPickerViewController(模态),然后一些更多的控制器被推上堆栈进行图像编辑。 如果我点击后退button并进入根视图控制器,然后点击另一个选项卡,应用程序崩溃。 这是崩溃消息: -[PostPhotoViewController respondsToSelector:]: message sent to deallocated instance 0x19b16a60 我运行僵尸工具,它看起来像堆栈上的最后一个视图控制器(PostPhotoViewController)获取消息发送到它,即使它已被释放。 iOS5和iOS6都出现这种情况,所以我没有做任何手动释放/保留。 我已经设置所有的零售点无PostPhotoVC并退订所有通知。 该消息似乎来自标签栏控制器。 不知道如何阻止它,有什么想法? 这里的僵尸读数: # Address Category Event Type RefCt Timestamp Size Responsible Library Responsible Caller 0 0x1b730790 PostPhotoViewController Malloc 1 00:19.248.903 256 UIKit -[UIClassSwapper initWithCoder:] 1 0x1b730790 PostPhotoViewController Retain 2 00:19.248.948 0 UIKit UINibDecoderDecodeObjectForValue 2 0x1b730790 PostPhotoViewController Retain 3 00:19.248.998 0 […]

在iOS应用程序中从http切换到https会在发布时引发出口符合性问题

我们最近决定在今年夏天更新一些我们的应用程序,将其从http切换到https,以便遵循2017年1月发布的新的Apple指南。 转移到应用程序的唯一东西是产品信息,没有用户信息或任何东西,甚至是远程敏感的。 但是我们要尽早遵守,以免我们以后再担心。 问题是: 苹果似乎迫使我们处理美国出口合规法律,该法律要求我们获得出口商注册号(ERN)的批准,以及需要公司识别码(CIN)的SNAP-R 。 我想,我不是律师。 现在这个问题在这里得到了一些回答,但是那已经是三年多了,如果我明白发生了什么事情,那么每个与他们的应用程序build立http连接并且在美国以外的地方都可以使用的人正在经历这个。 如果是这种情况,那么我会期望一个非常清楚的解释,什么切换到https将需要大多数iOS应用程序开发人员。 然而,我没有find太多的东西,我很困惑什么是确切的要求(如果有的话)。 任何律师表示赞赏。

AFNetworking 3 x-www-form-urlencoded发布数据

我想用x-www-form-urlencoded正文发布数据。 通过邮递员发送,没关系 但我不能通过networking传播3。这是我的代码 NSDictionary *parameters = @{@"login" : email, @"password": password}; NSError *error; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:&error]; NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; self.requestSerializer = [AFJSONRequestSerializer serializer]; NSString *urlString = [NSString stringWithFormat:@"%@/%@", HTTPBaseRequestURL, appendLoginUrl]; NSLog(@"URL %@\njsonString %@", urlString, jsonString); [self POST:urlString parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) { [formData appendPartWithFormData:jsonData name:@"data"]; } progress:nil […]

_kCFStreamErrorCodeKey = -2102只有一些ISP的WiFi

我使用下面的代码将文件发送到服务器: NSString *urlString = [NSString stringWithFormat:@"%@%@",[LIUtility sharedUtility].uploadConnectionURL,BR_SERVER_UPLOAD_ADDRESS_FILE]; self.request =[[NSMutableURLRequest alloc] init]; [self.request setURL:[NSURL URLWithString:urlString]]; [self.request setHTTPMethod:@"POST"]; PKMultipartInputStream *body = [[PKMultipartInputStream alloc] init]; NSString *requestString =[self getRequestStringForRange:range andExtension:fileName]; NSData *requestData = [requestString dataUsingEncoding:NSUTF8StringEncoding]; NSString *jsonLengthString = [NSString stringWithFormat:@"%04lu",(unsigned long)requestData.length]; NSData *jsonLengthData = [jsonLengthString dataUsingEncoding:NSUTF8StringEncoding]; [body addPartWithName:@"jsonLength" data:jsonLengthData]; [body addPartWithName:@"json" data:requestData]; [body addPartWithName:@"separator" string:@"\r\n"]; [body addPartWithName:@"fileData" filename:fileName […]