-2

I am trying to embed a youtube video in iOS 9 using xcode.

This code all works well:

    let url = NSURL(string: "https://www.youtube.com/watch?v=kmv4kEbmWgc")
    let request = NSURLRequest(URL: url!)
    youTubeView.loadRequest(request)

However, because I dont want to use https because of encryption export issues: Does my application "contain encryption"?

I am trying a non-http version of the above code:

    let url = NSURL(string: "http://www.youtube.com/watch?v=kmv4kEbmWgc")
    let request = NSURLRequest(URL: url!)
    youTubeView.loadRequest(request)

But that doesnt work. Anyone know a way around this?

Thanks

Community
  • 1
  • 1
Charlie S
  • 4,366
  • 6
  • 59
  • 97
  • I don't think that you need to worry about HTTPS urls being classified as encryption. – Artjom B. Oct 03 '15 at 13:57
  • http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ – vivek bhoraniya Oct 03 '15 at 14:00
  • Hi Artjom. This post seems to think I do :-/ http://stackoverflow.com/questions/2135081/does-my-application-contain-encryption – Charlie S Oct 03 '15 at 14:00
  • By "non-http", I think you mean "non-httpS". Since you are using iOS 9, I believe it has something to do with "App Transport Security". There's an option to completely turn it off, but I don't suggest doing it at all. – Behdad Oct 03 '15 at 14:03
  • seems like the web has a lot of contradictory advice on whether https counts as apple export encryption. I think I contacted apple about this a few months ago - so will have a look and see what I can find. – Charlie S Oct 03 '15 at 14:08
  • @CharlieSeligman I have commented on your question before the answer given by oz solomon....though you have marked his answer correct. Not voted on my comment – vivek bhoraniya Nov 02 '15 at 10:24

1 Answers1

1

iOS9 defaults to allowing only HTTPS connections. Please see answers to this StackOverflow question for workarounds.

Specifically for YouTube, all videos are available as HTTPS so I would stick with just HTTPS URLs.

Community
  • 1
  • 1
Oz Solomon
  • 2,969
  • 23
  • 22