Request module and iOS fyi


#1

just wanted document a little bug, well maybe not a big but it’s a shift from module 2.8 and 2.9

basically 2.9 will not accept a response that is not utf8 character set.

I ran into this last night while testing, I needed to encode the json file as utf8 I was surprised that iOS full on crashed, after a few hours of pulling hair out, yelling at the screen contemplating body slamming the pc I discovered the utf8 issue.

now with that said it really wasn’t until i dropped down to 2.8, now 2.8 won’t decode it because it’s the char set but it does not crash, giving more details and ultimately solving the problem.

so, moral of the story, make sure your json response is utf8 or it may crash iOS


#2

Thanks!

We switched the request module from AFNetworking to Apple’s NSURLSession framework while we were trying to figure out why they were rejecting Trigger.IO apps.

For testing purposes, can you tell me which encoding your response was using?

You can track the issue here:


#3

I don’t think there was any charset set on the file so basically I just had my backend app serialize the JSON and save it to a file, android had no problem but IOS crashed with a totally weird non-descriptive error :slight_smile: Sorry not sure if that will help