asihttprequest

OK to retain ASIHTTPRequest delegate?

别说谁变了你拦得住时间么 提交于 2019-12-02 10:42:25
Is it OK to retain a delegate of a subclass of ASIHTTPRequest ? I made a subclass of ASIHTTPRequest called JSONRequest . Each instance of JSONRequest is its own delegate, handles the callbacks, and passes them on to jsonDelegate , which is a private property of JSONRequest , and responds to requestFinished:withResult: , where result is an NSDictionary representation of the JSON response. To do this, I overloaded setDelegate: in JSONRequest to do super.delegate = self; self.jsonDelegate = newDelegate . Is it OK to retain jsonDelegate in this case because often jsonDelegate is a view controller,

Is that possible to download google derive files without integration with ios

限于喜欢 提交于 2019-12-02 10:25:39
Is that possible to download files from google drive without integrate it's sdk (class files) or authentication. Consider following scenario: I Used UIWebView in mysample application. I am logged in to Google Drive through UIWebView (Like logged in to google drive same as browser logged in). Now i want to download google drive documents in to mysample application document folder. Problem: When i am trying to download file from google drive it will now downloaded (I am using nsurl connection or ASIHttpRequest for download file). I Integrate GoogleSDK (Class Library) in another sample

Store userid in memory IOS

一个人想着一个人 提交于 2019-12-02 08:59:24
I made an IOS Application with a login function. I use the ASIHTTPRequest for this to check if the user exists in a MySQL database. All works fine but i want to pass the userid trough other viewcontrollers or retrieve it on other parts of the app. Can someone push me in the right direction how to do this in the best and most secure way? This is my the way i do a POST HTTP request to a PHP script: ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"*SOME_URL*"]]; In a callback i can retrieve the users ID, but i want to store this ID in the memory of the app

duplicate symbol linker error due to libWeANDSFLibrary.a(ASIReachability.o)

我与影子孤独终老i 提交于 2019-12-02 06:23:07
问题 I am using ASI ( ASIHTTPRequest , ASIDownloadCache , Reachability etc) request. Now in my project, I am using reachability.h and .m file.I have added one third party library and in that library I came to know that they are also using ASI library. But as per my knowledge they are using ASIReachability class instead of Reachability . So I added that .h file as well. Still I am getting linker error which says : duplicate symbol _kInternetConnection in: /Users/goutham.v/Library/Developer/Xcode

ASIHTTPRequest build / link error

馋奶兔 提交于 2019-12-02 03:50:20
- (void)getFacebookProfile { NSString *urlString = [NSString stringWithFormat:@"https://graph.facebook.com/me?access_token=%@", [_accessToken stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSURL *url = [NSURL URLWithString:urlString]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setDidFinishSelector:@selector(getFacebookProfileFinished:)]; [request setDelegate:self]; [request startAsynchronous]; } The above method (from www.raywenderlich.com ) fails with the following error: Undefined symbols: "_OBJC_CLASS_$_ASIHTTPRequest", referenced from: objc

Consuming Custom Request Methods with iOS5

陌路散爱 提交于 2019-12-02 03:32:41
My original question regarding Consuming Custom Request Methods with Android seems to have garnered very little attention -- I have converted it to an Android specific question So, quite simply, with iOS5 development, is it possible to consume custom request methods? If so, how. The "standard" set of request methods, as per RFC-2616 are: GET PUT POST DELETE TRACE CONNECT I would like to add another, called SEARCH . On the API, using PHP or Java, this is easy to implement in PHP. The consumption of this new request method is proving to be a challenge for an iOS developer. Does anyone have any

duplicate symbol linker error due to libWeANDSFLibrary.a(ASIReachability.o)

浪子不回头ぞ 提交于 2019-12-01 22:58:11
I am using ASI ( ASIHTTPRequest , ASIDownloadCache , Reachability etc) request. Now in my project, I am using reachability.h and .m file.I have added one third party library and in that library I came to know that they are also using ASI library. But as per my knowledge they are using ASIReachability class instead of Reachability . So I added that .h file as well. Still I am getting linker error which says : duplicate symbol _kInternetConnection in: /Users/goutham.v/Library/Developer/Xcode/DerivedData/My_TWCable-fyaebjpvvaprmgdgtirhzshodpky/Build/Intermediates/My TWCable.build/Debug

ASIHTTPRequest backed RestKit object mapping

拥有回忆 提交于 2019-12-01 10:50:58
We must support some old code that runs using ASIHTTPRequest, but we want the object mapping and core data support provided by RestKit. Does anyone know of any way of "gluing" these two together? I picture using ASIHTTPRequest for the requests and someone manually forwarding the payload over to RestKit. Ok, so this wasn't too hard after all. Here is a class I wrote just for this (no disclaimers, it works for us and may be useful for someone else). You can use this as a direct replacement to the standard RKObjectLoader class. .h file #import <RestKit/RestKit.h> #import "ASIFormDataRequest.h"

ASIHTTPRequest, EXC_BAD_ACCESS when request did finished

我只是一个虾纸丫 提交于 2019-12-01 09:29:34
I'm trying to do an asynchronous request with ASIHTTPRequest, but have some problem getting notified when the request is done. -(void)doDownload{ NSURL *url = [NSURL URLWithString:@"http://www.someurl.com/?"]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; [request setPostValue:@"someValue" forKey:@"someField"]; [request setRequestMethod:@"POST"]; [request setDelegate:self]; [request setDidFinishSelector:@selector(requestFinished)]; [request startAsynchronous]; } - (void)requestFinished:(ASIHTTPRequest *)request { // Use when fetching text data NSString *responseString

ASIHTTPRequest request times out

你。 提交于 2019-12-01 06:54:56
I have been working on this issue for a long time, and I am unsure how to proceed trying to solve it. I have a simple ASIHTTPRequest. The code is posted below. The app always works when I first run it. I have a table view which I can pull to refresh, which initiates the ASIHTTPRequest, and I can refresh as many times as I like with out problem. I can send the app to the background and bring it back and everything works fine. But if I leave the app for a number of hours and come back, sometimes I will start getting a request timed out error. Once this occurs, the error will repeat every time I