Skip to content

app transport security problems on iOS 9 #695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
prehistoricindustries opened this issue Dec 26, 2015 · 5 comments
Closed

app transport security problems on iOS 9 #695

prehistoricindustries opened this issue Dec 26, 2015 · 5 comments
Labels
type:question Support or code-level question

Comments

@prehistoricindustries
Copy link

app transport security prevents PFFile.getData() from working on iOS 9

Hi there, I'm using the Parse SDK on iOS 9, and I'm running into issues while downloading PFFiles. This started sometime yesterday, without any code changes. Here is the error log output:

[Error]: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. (Code: 100, Version: 1.8.2)
2015-12-26 10:25:57.652 ephemera[1238:298230] [Error]: Network connection failed. Making attempt 1 after sleeping for 1.011460 seconds.

It comes in repeatedly, as Parse continues to make more attempts to download the file. Here is a code snippet:

//posts is an array of PFObjects
posts.forEach {
  if let data = $0.getData(), type = $0.postType {
    //omitted
  }
}
@prehistoricindustries
Copy link
Author

here is a URL. Note that it begins with http:// and not https://

@nlutsenko
Copy link
Contributor

Hey @prehistoricindustries, thanks for the report.
Is there any chance you can try more up-to-date version of our SDK?
We officially support iOS 9, including App Transport Security starting from 1.8.3.
Taking into account that you are running 1.8.2 - I believe purely updating to the latest version is going to resolve this.

@nlutsenko nlutsenko self-assigned this Dec 26, 2015
@pranjalsatija
Copy link

Sure, I'll give that a try. However, this did pique my interest a bit. I've been using 1.8.2 for a little while now, and I only started getting problems yesterday. Was this a change in the Parse backend? I'm only asking because I was very impressed with Parse's support for iOS 9 and App Transport Security since day 1. I had never seen this error before.

@nlutsenko
Copy link
Contributor

It is strange, indeed, since you should have been hitting that long before.
Here is a pull request that implements https for files - #197
Please note that it's marked with 1.8.3 milestone, meaning that it shouldn't have worked on 1.8.2.

Let me know if it works for you now, or please reopen this issue if it doesn't.

@nlutsenko nlutsenko added the type:question Support or code-level question label Dec 27, 2015
@pranjalsatija
Copy link

Updated to the new SDK, everything works perfectly. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

3 participants