asihttprequest

iOS13 崩溃 Fatal Exception: NSInternalInconsistencyException

独自空忆成欢 提交于 2020-11-25 11:52:28
以下是 Firebase 的崩溃日志: Fatal Exception : NSInternalInconsistencyException Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.` 0 应用名称 0x100df14e4 CLSProcessRecordAllThreads + 4316009700 1 应用名称 0x100df18cc CLSProcessRecordAllThreads + 4316010700 2 应用名称 0x100de1144 CLSHandler + 4315943236 3 应用名称 0x100defae8 __CLSExceptionRecord_block_invoke + 4316003048 4 libdispatch.dylib 0x1c515c184 _dispatch_client_callout + 16 5 libdispatch.dylib 0x1c510ec44 _dispatch_lane_barrier_sync_invoke_and_complete + 56 6 应用名称 0x100def554

need help using NSXMLParser with ASIHTTPRequest

五迷三道 提交于 2020-01-25 11:26:08
问题 I am currently trying to parse the string representation of my xml that I get back from my php script on my server which is passed to the ASIHTTPRequest method *- (void)requestFinished:(ASIHTTPRequest )request I want to use NSXMLParser to parse this xml, so far I have got everything up and running please see code for how I have done this, however the issue I am having is that it seems to be accessing the *- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString )string{ method multiple

ASIHTTPRequest post json to php server

╄→гoц情女王★ 提交于 2020-01-19 07:39:28
问题 I have been trying to post a json object to a PHP script for the last 5 hours. I have read all the docs and it seems the code should work BUT it does not. The request is made and received ok, but I can't access the posted json data or dont even know if its been sent correctly. I keep getting an empty php array, instead of the json data. NSString *jsonString = [self.tableDataSource JSONRepresentation]; NSURL *url = [NSURL URLWithString:@"http://myserver.com/test.php"]; ASIHTTPRequest *request

ASIHTTPRequest post json to php server

混江龙づ霸主 提交于 2020-01-19 07:38:54
问题 I have been trying to post a json object to a PHP script for the last 5 hours. I have read all the docs and it seems the code should work BUT it does not. The request is made and received ok, but I can't access the posted json data or dont even know if its been sent correctly. I keep getting an empty php array, instead of the json data. NSString *jsonString = [self.tableDataSource JSONRepresentation]; NSURL *url = [NSURL URLWithString:@"http://myserver.com/test.php"]; ASIHTTPRequest *request

iPhone: Downloading data asynchronously with NSURL request as opposed to [NSData datawithContents ofURL]

梦想的初衷 提交于 2020-01-14 04:31:06
问题 Hi Im a newbie and Im trying to download geocoding data from googleapi webpage. I did it using this: code: NSMutableString *urlStr = [[NSMutableString alloc] initWithString:temp]; NSMutableString *address = [[NSMutableString alloc] initWithString:l.Address]; [address appendString:@" "]; [address appendString:l.CityName]; [address appendString:@" "]; [address appendString:l.State]; [address appendString:@" "]; [address appendString:l.PostalCode]; NSArray *addressArray = [address

Posting JSON from iOS to Rails 3.1 (Stringify_keys error)

橙三吉。 提交于 2020-01-14 03:22:12
问题 I'm trying to create a user acount on my rails backend via json from an iPhone app. Here is what is currently being posted to the server: Started POST "/patients" for 127.0.0.1 at 2011-11-27 20:52:29 -0800 Processing by PatientsController#create as HTML Parameters: {"patient"=>"{\"password\":\"password\",\"password_confirmation\":\"password\",\"email\":\"testagain\"}"} WARNING: Can't verify CSRF token authenticity Completed 500 Internal Server Error in 1ms NoMethodError (undefined method

ASIHTTPRequest dealloc and EXC_BAD_ACCESS problem

為{幸葍}努か 提交于 2020-01-13 19:28:37
问题 I'm using an array of ASIHTTPRequest wrappers (AsyncImageLoader) to download images for cells in a UITableView. I'm having problems handling ASIHTTPRequests lifetime. If I release them, I end up having a EXC_BAD_ACCESS if I keep scrolling up and down while they try to load images. Here's what my wrapper looks like. self.request has retain property, targetCell is the cell I want to put the image in: @implementation AsyncImageLoader - (void)loadImageFromURL:(NSString*)fileName target:

Is calling -[NSRunLoop runUntilDate:] a good idea?

泄露秘密 提交于 2020-01-10 01:41:06
问题 Is it generally a good idea to call -[NSRunLoop runUntilDate:] ? It seems to work without any issues, but it makes me nervous to tell the run loop to run from within the run loop. More info: I have a project right now that is fetching data from a REST service. One critical piece of information that needs to be obtained is the range of dates with valid data. It's a very small bit of data that only needs to be gotten once, so I decided that the best way to handle it is to have the property

Referencing a string inside an NSURL

▼魔方 西西 提交于 2020-01-06 14:20:54
问题 I'm trying to use this string inside this NSURL however I don't think its right and in turn giving me an ASI HTTP request failed error. NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://furious-ice-356.heroku.com/places/%@/reviews.xml",self.identifier]]; 回答1: self.identifier returns (in most cases) an object of the type id . You cannot cast this object to a NSString* . The only exception is the in 10.7 newly introduced identifier property of NSString* in the

How to write a dowloader class for updating download progress in iOs

时光怂恿深爱的人放手 提交于 2020-01-06 08:04:24
问题 Here is my actual issue, as some suggested I want to write a class for handling the multiple download progress in a UITableView. I have no idea how to write a class for this, can somebody help with some tips or ideas? 回答1: The group to look at is NSURLRequest and NSURLConnection. The former let's you specify the request (URL, http method, params, etc) and the latter runs it. Since you want to update status as it goes (I answered a sketch of this in your other question, I think), you'll need