Getting YouTube embedded in IOS 9 using Swift

These are just basic notes for me because I will forget.

This uses the Swift-YouTube-Player Cocoapod from https://github.com/gilesvangruisen/Swift-YouTube-Player

Copy the instructions here to get it installed using pods.

It isn’t up-to-date with swift 2.0 yet so copy the changes here

Then (using the information from here) make sure the VTPlayer.html file is included in the Pods (YouTubePlayer) resources list:

  • Click on Pods ‘project’
  • Click on YouTubePlayer under TARGETS
  • Click on Build Phases
  • Click on the plus sign (add build phase)
  • Add a Copy Files build phase
  • Set Destination to Resources and add the YTPlayer.html file

Rebuild all the things.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s