Skip to content
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

iOS 9 App Transport Security Error #18

Open
cliftonlabrum opened this issue Sep 18, 2015 · 2 comments
Open

iOS 9 App Transport Security Error #18

cliftonlabrum opened this issue Sep 18, 2015 · 2 comments

Comments

@cliftonlabrum
Copy link

I honestly have no why this error would occur, but I'm using this to create a PDF:

self.htmlPdfKit.saveHtmlAsPdf(data, toFile: pdfPath)

...where pdfPath is a local URL in the iOS Simulator's file system. Somehow I'm getting this error:

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

Has anyone gotten BNHtmlPdfKit to work with Swift and/or iOS 9?

@arnold-maderthaner
Copy link

yes you need to add:
NSAppTransportSecurity

NSAllowsArbitraryLoads

to your application-Info.plist file

@cliftonlabrum
Copy link
Author

This works, thanks. I had read that it's a bad idea to disable ATS but I guess in the case where I'm making a local save, it's probably not a significant security issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants