├── YouTubeExample ├── Assets.xcassets │ ├── Contents.json │ ├── AppIcon.appiconset │ │ ├── 120.png │ │ ├── 152.png │ │ ├── 167.png │ │ ├── 180.png │ │ ├── 20.png │ │ ├── 29.png │ │ ├── 40.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 76.png │ │ ├── 80.png │ │ ├── 87.png │ │ ├── 1024.png │ │ └── Contents.json │ ├── JCPrimaryColor.colorset │ │ └── Contents.json │ └── JCSecondaryColor.colorset │ │ └── Contents.json ├── AppDelegate.swift ├── HomeViewController.swift ├── WebViewViewController.swift ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist └── YouTubePlayeriOSHelperViewController.swift ├── README.md ├── YouTubeExample.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── johncodeos.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved ├── xcuserdata │ └── johncodeos.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj └── .gitignore /YouTubeExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![logo](https://i.imgur.com/Dv73hCk.png) 2 | # YouTubeiOSExample 3 | How to embed YouTube videos into your iOS app using Swift 4 | 5 | https://johncodeos.com/how-to-embed-youtube-videos-into-your-ios-app-using-swift/ 6 | -------------------------------------------------------------------------------- /YouTubeExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /YouTubeExample.xcodeproj/project.xcworkspace/xcuserdata/johncodeos.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johncodeos-blog/YouTubeiOSExample/HEAD/YouTubeExample.xcodeproj/project.xcworkspace/xcuserdata/johncodeos.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /YouTubeExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /YouTubeExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "youtube-ios-player-helper", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/youtube/youtube-ios-player-helper", 7 | "state" : { 8 | "revision" : "f57129cd4380ec0a74dd3a59da3270a1d653d59b", 9 | "version" : "1.0.4" 10 | } 11 | } 12 | ], 13 | "version" : 2 14 | } 15 | -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/JCPrimaryColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.294", 9 | "green" : "0.129", 10 | "red" : "0.737" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/JCSecondaryColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.251", 9 | "green" : "0.110", 10 | "red" : "0.620" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /YouTubeExample.xcodeproj/xcuserdata/johncodeos.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | YouTubeExample.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /YouTubeExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // YouTubeExample 4 | // 5 | // Created by John Codeos on 06/01/2020. 6 | // Copyright © 2020 John Codeos. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | var window: UIWindow? 14 | 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 16 | return true 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /YouTubeExample/HomeViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeViewController.swift 3 | // YouTubeExample 4 | // 5 | // Created by John Codeos on 06/01/2020. 6 | // Copyright © 2020 John Codeos. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class HomeViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | configureNavigationBar() 16 | } 17 | 18 | private func configureNavigationBar() { 19 | if #available(iOS 15.0, *) { 20 | let appearance = UINavigationBarAppearance() 21 | appearance.configureWithOpaqueBackground() 22 | appearance.titleTextAttributes = [.foregroundColor: UIColor.white] 23 | appearance.backgroundColor = UIColor(named: "primaryColor") 24 | navigationController?.navigationBar.standardAppearance = appearance 25 | navigationController?.navigationBar.scrollEdgeAppearance = appearance 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /YouTubeExample/WebViewViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebViewViewController.swift 3 | // YouTubeExample 4 | // 5 | // Created by John Codeos on 6/1/20. 6 | // Copyright © 2020 John Codeos. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import WebKit 11 | 12 | class WebViewViewController: UIViewController { 13 | 14 | @IBOutlet weak var webPlayerView: UIView! 15 | 16 | lazy var webPlayer: WKWebView = { 17 | let webConfiguration = WKWebViewConfiguration() 18 | webConfiguration.allowsInlineMediaPlayback = true 19 | let webView = WKWebView(frame: webPlayerView.bounds, configuration: webConfiguration) 20 | return webView 21 | }() 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | setupWebPlayer() 26 | loadVideoURL("https://www.youtube.com/embed/YE7VzlLtp-4?playsinline=1") 27 | } 28 | 29 | private func setupWebPlayer() { 30 | webPlayerView.addSubview(webPlayer) 31 | webPlayer.autoresizingMask = [.flexibleWidth, .flexibleHeight] 32 | } 33 | 34 | private func loadVideoURL(_ urlString: String) { 35 | guard let url = URL(string: urlString) else { 36 | print("Invalid URL") 37 | return 38 | } 39 | let request = URLRequest(url: url) 40 | webPlayer.load(request) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /YouTubeExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /YouTubeExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarStyle 32 | UIStatusBarStyleLightContent 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /YouTubeExample/YouTubePlayeriOSHelperViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // YouTubePlayeriOSHelperViewController.swift 3 | // YouTubeExample 4 | // 5 | // Created by John Codeos on 6/1/20. 6 | // Copyright © 2020 John Codeos. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import YouTubeiOSPlayerHelper 11 | 12 | class YouTubePlayeriOSHelperViewController: UIViewController { 13 | 14 | @IBOutlet var playerView: YTPlayerView! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | setupPlayerView() 19 | loadVideo(videoId: "YE7VzlLtp-4") 20 | } 21 | 22 | private func setupPlayerView() { 23 | playerView.delegate = self 24 | playerView.webView?.backgroundColor = .black 25 | playerView.webView?.isOpaque = false 26 | } 27 | 28 | private func loadVideo(videoId: String) { 29 | // Set playsinline = 1 to enable the video play inside the UIViewController 30 | let playerVars: [String: Any] = ["playsinline": 1] 31 | playerView.load(withVideoId: videoId, playerVars: playerVars) 32 | } 33 | 34 | // Uncomment the following method if you want to change the video after you loaded the first one 35 | /* 36 | private func loadAnotherVideo(videoId: String, startSeconds: Float) { 37 | playerView.cueVideo(byId: videoId, startSeconds: startSeconds) 38 | } 39 | */ 40 | } 41 | 42 | extension YouTubePlayeriOSHelperViewController: YTPlayerViewDelegate { 43 | 44 | func playerViewPreferredWebViewBackgroundColor(_ playerView: YTPlayerView) -> UIColor { 45 | return .black 46 | } 47 | 48 | // Uncomment the following method if you want to use a custom loading view 49 | /* 50 | func playerViewPreferredInitialLoading(_ playerView: YTPlayerView) -> UIView? { 51 | let customLoadingView = UIView() 52 | // Create a custom loading view 53 | return customLoadingView 54 | } 55 | */ 56 | } 57 | 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | *.xcuserdata 20 | *.generated.swift 21 | 22 | ## Other 23 | *.moved-aside 24 | *.xccheckout 25 | *.xcscmblueprint 26 | .DS_Store 27 | 28 | ## Obj-C/Swift specific 29 | *.hmap 30 | *.ipa 31 | *.dSYM.zip 32 | *.dSYM 33 | 34 | ## Playgrounds 35 | timeline.xctimeline 36 | playground.xcworkspace 37 | 38 | # Swift Package Manager 39 | # 40 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 41 | # Packages/ 42 | # Package.pins 43 | # Package.resolved 44 | .build/ 45 | 46 | # CocoaPods 47 | # 48 | # We recommend against adding the Pods directory to your .gitignore. However 49 | # you should judge for yourself, the pros and cons are mentioned at: 50 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 51 | # 52 | Pods/ 53 | # 54 | # Add this line if you want to avoid checking in source code from the Xcode workspace 55 | # *.xcworkspace 56 | 57 | # Carthage 58 | # 59 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 60 | # Carthage/Checkouts 61 | 62 | Carthage/Build 63 | 64 | # fastlane 65 | # 66 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 67 | # screenshots whenever they are needed. 68 | # For more information about the recommended setup visit: 69 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 70 | 71 | fastlane/report.xml 72 | fastlane/Preview.html 73 | fastlane/screenshots/**/*.png 74 | fastlane/test_output 75 | 76 | # Code Injection 77 | # 78 | # After new code Injection tools there's a generated folder /iOSInjectionProject 79 | # https://github.com/johnno1962/injectionforxcode 80 | 81 | iOSInjectionProject/.DS_Store 82 | -------------------------------------------------------------------------------- /YouTubeExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "40.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "60.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "58.png", 17 | "idiom" : "iphone", 18 | "scale" : "2x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "87.png", 23 | "idiom" : "iphone", 24 | "scale" : "3x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "80.png", 29 | "idiom" : "iphone", 30 | "scale" : "2x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "120.png", 35 | "idiom" : "iphone", 36 | "scale" : "3x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "120.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "60x60" 44 | }, 45 | { 46 | "filename" : "180.png", 47 | "idiom" : "iphone", 48 | "scale" : "3x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "filename" : "20.png", 53 | "idiom" : "ipad", 54 | "scale" : "1x", 55 | "size" : "20x20" 56 | }, 57 | { 58 | "filename" : "40.png", 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "20x20" 62 | }, 63 | { 64 | "filename" : "29.png", 65 | "idiom" : "ipad", 66 | "scale" : "1x", 67 | "size" : "29x29" 68 | }, 69 | { 70 | "filename" : "58.png", 71 | "idiom" : "ipad", 72 | "scale" : "2x", 73 | "size" : "29x29" 74 | }, 75 | { 76 | "filename" : "40.png", 77 | "idiom" : "ipad", 78 | "scale" : "1x", 79 | "size" : "40x40" 80 | }, 81 | { 82 | "filename" : "80.png", 83 | "idiom" : "ipad", 84 | "scale" : "2x", 85 | "size" : "40x40" 86 | }, 87 | { 88 | "filename" : "76.png", 89 | "idiom" : "ipad", 90 | "scale" : "1x", 91 | "size" : "76x76" 92 | }, 93 | { 94 | "filename" : "152.png", 95 | "idiom" : "ipad", 96 | "scale" : "2x", 97 | "size" : "76x76" 98 | }, 99 | { 100 | "filename" : "167.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "83.5x83.5" 104 | }, 105 | { 106 | "filename" : "1024.png", 107 | "idiom" : "ios-marketing", 108 | "scale" : "1x", 109 | "size" : "1024x1024" 110 | } 111 | ], 112 | "info" : { 113 | "author" : "xcode", 114 | "version" : 1 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /YouTubeExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 38 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /YouTubeExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C234748D2AD482FF0084FCEF /* YouTubeiOSPlayerHelper in Frameworks */ = {isa = PBXBuildFile; productRef = C234748C2AD482FF0084FCEF /* YouTubeiOSPlayerHelper */; }; 11 | C24BF25724A621AB001BEED5 /* YouTubePlayeriOSHelperViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C24BF25624A621AB001BEED5 /* YouTubePlayeriOSHelperViewController.swift */; }; 12 | C24BF25B24A64834001BEED5 /* WebViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C24BF25A24A64834001BEED5 /* WebViewViewController.swift */; }; 13 | C2AF85772303DD20003A314B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2AF85762303DD20003A314B /* AppDelegate.swift */; }; 14 | C2AF85792303DD20003A314B /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2AF85782303DD20003A314B /* HomeViewController.swift */; }; 15 | C2AF857C2303DD20003A314B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C2AF857A2303DD20003A314B /* Main.storyboard */; }; 16 | C2AF857E2303DD21003A314B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C2AF857D2303DD21003A314B /* Assets.xcassets */; }; 17 | C2AF85812303DD21003A314B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C2AF857F2303DD21003A314B /* LaunchScreen.storyboard */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | C24BF25624A621AB001BEED5 /* YouTubePlayeriOSHelperViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YouTubePlayeriOSHelperViewController.swift; sourceTree = ""; }; 22 | C24BF25A24A64834001BEED5 /* WebViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewViewController.swift; sourceTree = ""; }; 23 | C24BF25C24A64A72001BEED5 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 24 | C2AF85732303DD20003A314B /* YouTubeExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YouTubeExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | C2AF85762303DD20003A314B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 26 | C2AF85782303DD20003A314B /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; 27 | C2AF857B2303DD20003A314B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 28 | C2AF857D2303DD21003A314B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 29 | C2AF85802303DD21003A314B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 30 | C2AF85822303DD21003A314B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | C2AF85702303DD20003A314B /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | C234748D2AD482FF0084FCEF /* YouTubeiOSPlayerHelper in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | A6E74D0B42293D0D3C8FFB97 /* Frameworks */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | C24BF25C24A64A72001BEED5 /* WebKit.framework */, 49 | ); 50 | name = Frameworks; 51 | sourceTree = ""; 52 | }; 53 | C2AF856A2303DD20003A314B = { 54 | isa = PBXGroup; 55 | children = ( 56 | C2AF85752303DD20003A314B /* YouTubeExample */, 57 | C2AF85742303DD20003A314B /* Products */, 58 | A6E74D0B42293D0D3C8FFB97 /* Frameworks */, 59 | ); 60 | sourceTree = ""; 61 | }; 62 | C2AF85742303DD20003A314B /* Products */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | C2AF85732303DD20003A314B /* YouTubeExample.app */, 66 | ); 67 | name = Products; 68 | sourceTree = ""; 69 | }; 70 | C2AF85752303DD20003A314B /* YouTubeExample */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | C2AF85762303DD20003A314B /* AppDelegate.swift */, 74 | C2AF85782303DD20003A314B /* HomeViewController.swift */, 75 | C2AF857A2303DD20003A314B /* Main.storyboard */, 76 | C2AF857D2303DD21003A314B /* Assets.xcassets */, 77 | C2AF857F2303DD21003A314B /* LaunchScreen.storyboard */, 78 | C2AF85822303DD21003A314B /* Info.plist */, 79 | C24BF25624A621AB001BEED5 /* YouTubePlayeriOSHelperViewController.swift */, 80 | C24BF25A24A64834001BEED5 /* WebViewViewController.swift */, 81 | ); 82 | path = YouTubeExample; 83 | sourceTree = ""; 84 | }; 85 | /* End PBXGroup section */ 86 | 87 | /* Begin PBXNativeTarget section */ 88 | C2AF85722303DD20003A314B /* YouTubeExample */ = { 89 | isa = PBXNativeTarget; 90 | buildConfigurationList = C2AF85852303DD21003A314B /* Build configuration list for PBXNativeTarget "YouTubeExample" */; 91 | buildPhases = ( 92 | C2AF856F2303DD20003A314B /* Sources */, 93 | C2AF85702303DD20003A314B /* Frameworks */, 94 | C2AF85712303DD20003A314B /* Resources */, 95 | ); 96 | buildRules = ( 97 | ); 98 | dependencies = ( 99 | ); 100 | name = YouTubeExample; 101 | packageProductDependencies = ( 102 | C234748C2AD482FF0084FCEF /* YouTubeiOSPlayerHelper */, 103 | ); 104 | productName = YouTubeExample; 105 | productReference = C2AF85732303DD20003A314B /* YouTubeExample.app */; 106 | productType = "com.apple.product-type.application"; 107 | }; 108 | /* End PBXNativeTarget section */ 109 | 110 | /* Begin PBXProject section */ 111 | C2AF856B2303DD20003A314B /* Project object */ = { 112 | isa = PBXProject; 113 | attributes = { 114 | BuildIndependentTargetsInParallel = YES; 115 | LastSwiftUpdateCheck = 1030; 116 | LastUpgradeCheck = 1500; 117 | ORGANIZATIONNAME = "John Codeos"; 118 | TargetAttributes = { 119 | C2AF85722303DD20003A314B = { 120 | CreatedOnToolsVersion = 10.3; 121 | }; 122 | }; 123 | }; 124 | buildConfigurationList = C2AF856E2303DD20003A314B /* Build configuration list for PBXProject "YouTubeExample" */; 125 | compatibilityVersion = "Xcode 9.3"; 126 | developmentRegion = en; 127 | hasScannedForEncodings = 0; 128 | knownRegions = ( 129 | en, 130 | Base, 131 | ); 132 | mainGroup = C2AF856A2303DD20003A314B; 133 | packageReferences = ( 134 | C234748B2AD482FF0084FCEF /* XCRemoteSwiftPackageReference "youtube-ios-player-helper" */, 135 | ); 136 | productRefGroup = C2AF85742303DD20003A314B /* Products */; 137 | projectDirPath = ""; 138 | projectRoot = ""; 139 | targets = ( 140 | C2AF85722303DD20003A314B /* YouTubeExample */, 141 | ); 142 | }; 143 | /* End PBXProject section */ 144 | 145 | /* Begin PBXResourcesBuildPhase section */ 146 | C2AF85712303DD20003A314B /* Resources */ = { 147 | isa = PBXResourcesBuildPhase; 148 | buildActionMask = 2147483647; 149 | files = ( 150 | C2AF85812303DD21003A314B /* LaunchScreen.storyboard in Resources */, 151 | C2AF857E2303DD21003A314B /* Assets.xcassets in Resources */, 152 | C2AF857C2303DD20003A314B /* Main.storyboard in Resources */, 153 | ); 154 | runOnlyForDeploymentPostprocessing = 0; 155 | }; 156 | /* End PBXResourcesBuildPhase section */ 157 | 158 | /* Begin PBXSourcesBuildPhase section */ 159 | C2AF856F2303DD20003A314B /* Sources */ = { 160 | isa = PBXSourcesBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | C24BF25724A621AB001BEED5 /* YouTubePlayeriOSHelperViewController.swift in Sources */, 164 | C24BF25B24A64834001BEED5 /* WebViewViewController.swift in Sources */, 165 | C2AF85792303DD20003A314B /* HomeViewController.swift in Sources */, 166 | C2AF85772303DD20003A314B /* AppDelegate.swift in Sources */, 167 | ); 168 | runOnlyForDeploymentPostprocessing = 0; 169 | }; 170 | /* End PBXSourcesBuildPhase section */ 171 | 172 | /* Begin PBXVariantGroup section */ 173 | C2AF857A2303DD20003A314B /* Main.storyboard */ = { 174 | isa = PBXVariantGroup; 175 | children = ( 176 | C2AF857B2303DD20003A314B /* Base */, 177 | ); 178 | name = Main.storyboard; 179 | sourceTree = ""; 180 | }; 181 | C2AF857F2303DD21003A314B /* LaunchScreen.storyboard */ = { 182 | isa = PBXVariantGroup; 183 | children = ( 184 | C2AF85802303DD21003A314B /* Base */, 185 | ); 186 | name = LaunchScreen.storyboard; 187 | sourceTree = ""; 188 | }; 189 | /* End PBXVariantGroup section */ 190 | 191 | /* Begin XCBuildConfiguration section */ 192 | C2AF85832303DD21003A314B /* Debug */ = { 193 | isa = XCBuildConfiguration; 194 | buildSettings = { 195 | ALWAYS_SEARCH_USER_PATHS = NO; 196 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 197 | CLANG_ANALYZER_NONNULL = YES; 198 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 199 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 200 | CLANG_CXX_LIBRARY = "libc++"; 201 | CLANG_ENABLE_MODULES = YES; 202 | CLANG_ENABLE_OBJC_ARC = YES; 203 | CLANG_ENABLE_OBJC_WEAK = YES; 204 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 205 | CLANG_WARN_BOOL_CONVERSION = YES; 206 | CLANG_WARN_COMMA = YES; 207 | CLANG_WARN_CONSTANT_CONVERSION = YES; 208 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 209 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 210 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 211 | CLANG_WARN_EMPTY_BODY = YES; 212 | CLANG_WARN_ENUM_CONVERSION = YES; 213 | CLANG_WARN_INFINITE_RECURSION = YES; 214 | CLANG_WARN_INT_CONVERSION = YES; 215 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 216 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 217 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 218 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 219 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 220 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 221 | CLANG_WARN_STRICT_PROTOTYPES = YES; 222 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 223 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 224 | CLANG_WARN_UNREACHABLE_CODE = YES; 225 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 226 | CODE_SIGN_IDENTITY = "iPhone Developer"; 227 | COPY_PHASE_STRIP = NO; 228 | DEBUG_INFORMATION_FORMAT = dwarf; 229 | ENABLE_STRICT_OBJC_MSGSEND = YES; 230 | ENABLE_TESTABILITY = YES; 231 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 232 | GCC_C_LANGUAGE_STANDARD = gnu11; 233 | GCC_DYNAMIC_NO_PIC = NO; 234 | GCC_NO_COMMON_BLOCKS = YES; 235 | GCC_OPTIMIZATION_LEVEL = 0; 236 | GCC_PREPROCESSOR_DEFINITIONS = ( 237 | "DEBUG=1", 238 | "$(inherited)", 239 | ); 240 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 241 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 242 | GCC_WARN_UNDECLARED_SELECTOR = YES; 243 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 244 | GCC_WARN_UNUSED_FUNCTION = YES; 245 | GCC_WARN_UNUSED_VARIABLE = YES; 246 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 247 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 248 | MTL_FAST_MATH = YES; 249 | ONLY_ACTIVE_ARCH = YES; 250 | SDKROOT = iphoneos; 251 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 252 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 253 | }; 254 | name = Debug; 255 | }; 256 | C2AF85842303DD21003A314B /* Release */ = { 257 | isa = XCBuildConfiguration; 258 | buildSettings = { 259 | ALWAYS_SEARCH_USER_PATHS = NO; 260 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 261 | CLANG_ANALYZER_NONNULL = YES; 262 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 263 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 264 | CLANG_CXX_LIBRARY = "libc++"; 265 | CLANG_ENABLE_MODULES = YES; 266 | CLANG_ENABLE_OBJC_ARC = YES; 267 | CLANG_ENABLE_OBJC_WEAK = YES; 268 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 269 | CLANG_WARN_BOOL_CONVERSION = YES; 270 | CLANG_WARN_COMMA = YES; 271 | CLANG_WARN_CONSTANT_CONVERSION = YES; 272 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 273 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 274 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 275 | CLANG_WARN_EMPTY_BODY = YES; 276 | CLANG_WARN_ENUM_CONVERSION = YES; 277 | CLANG_WARN_INFINITE_RECURSION = YES; 278 | CLANG_WARN_INT_CONVERSION = YES; 279 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 280 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 281 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 282 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 283 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 284 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 285 | CLANG_WARN_STRICT_PROTOTYPES = YES; 286 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 287 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 288 | CLANG_WARN_UNREACHABLE_CODE = YES; 289 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 290 | CODE_SIGN_IDENTITY = "iPhone Developer"; 291 | COPY_PHASE_STRIP = NO; 292 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 293 | ENABLE_NS_ASSERTIONS = NO; 294 | ENABLE_STRICT_OBJC_MSGSEND = YES; 295 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 296 | GCC_C_LANGUAGE_STANDARD = gnu11; 297 | GCC_NO_COMMON_BLOCKS = YES; 298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 299 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 300 | GCC_WARN_UNDECLARED_SELECTOR = YES; 301 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 302 | GCC_WARN_UNUSED_FUNCTION = YES; 303 | GCC_WARN_UNUSED_VARIABLE = YES; 304 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 305 | MTL_ENABLE_DEBUG_INFO = NO; 306 | MTL_FAST_MATH = YES; 307 | SDKROOT = iphoneos; 308 | SWIFT_COMPILATION_MODE = wholemodule; 309 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 310 | VALIDATE_PRODUCT = YES; 311 | }; 312 | name = Release; 313 | }; 314 | C2AF85862303DD21003A314B /* Debug */ = { 315 | isa = XCBuildConfiguration; 316 | buildSettings = { 317 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 318 | CODE_SIGN_STYLE = Automatic; 319 | DEVELOPMENT_TEAM = 6P8Q9Q6J62; 320 | INFOPLIST_FILE = YouTubeExample/Info.plist; 321 | LD_RUNPATH_SEARCH_PATHS = ( 322 | "$(inherited)", 323 | "@executable_path/Frameworks", 324 | ); 325 | PRODUCT_BUNDLE_IDENTIFIER = com.johncodeos.YouTubeExample; 326 | PRODUCT_NAME = "$(TARGET_NAME)"; 327 | SWIFT_VERSION = 5.0; 328 | TARGETED_DEVICE_FAMILY = "1,2"; 329 | }; 330 | name = Debug; 331 | }; 332 | C2AF85872303DD21003A314B /* Release */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 336 | CODE_SIGN_STYLE = Automatic; 337 | DEVELOPMENT_TEAM = 6P8Q9Q6J62; 338 | INFOPLIST_FILE = YouTubeExample/Info.plist; 339 | LD_RUNPATH_SEARCH_PATHS = ( 340 | "$(inherited)", 341 | "@executable_path/Frameworks", 342 | ); 343 | PRODUCT_BUNDLE_IDENTIFIER = com.johncodeos.YouTubeExample; 344 | PRODUCT_NAME = "$(TARGET_NAME)"; 345 | SWIFT_VERSION = 5.0; 346 | TARGETED_DEVICE_FAMILY = "1,2"; 347 | }; 348 | name = Release; 349 | }; 350 | /* End XCBuildConfiguration section */ 351 | 352 | /* Begin XCConfigurationList section */ 353 | C2AF856E2303DD20003A314B /* Build configuration list for PBXProject "YouTubeExample" */ = { 354 | isa = XCConfigurationList; 355 | buildConfigurations = ( 356 | C2AF85832303DD21003A314B /* Debug */, 357 | C2AF85842303DD21003A314B /* Release */, 358 | ); 359 | defaultConfigurationIsVisible = 0; 360 | defaultConfigurationName = Release; 361 | }; 362 | C2AF85852303DD21003A314B /* Build configuration list for PBXNativeTarget "YouTubeExample" */ = { 363 | isa = XCConfigurationList; 364 | buildConfigurations = ( 365 | C2AF85862303DD21003A314B /* Debug */, 366 | C2AF85872303DD21003A314B /* Release */, 367 | ); 368 | defaultConfigurationIsVisible = 0; 369 | defaultConfigurationName = Release; 370 | }; 371 | /* End XCConfigurationList section */ 372 | 373 | /* Begin XCRemoteSwiftPackageReference section */ 374 | C234748B2AD482FF0084FCEF /* XCRemoteSwiftPackageReference "youtube-ios-player-helper" */ = { 375 | isa = XCRemoteSwiftPackageReference; 376 | repositoryURL = "https://github.com/youtube/youtube-ios-player-helper"; 377 | requirement = { 378 | kind = upToNextMajorVersion; 379 | minimumVersion = 1.0.4; 380 | }; 381 | }; 382 | /* End XCRemoteSwiftPackageReference section */ 383 | 384 | /* Begin XCSwiftPackageProductDependency section */ 385 | C234748C2AD482FF0084FCEF /* YouTubeiOSPlayerHelper */ = { 386 | isa = XCSwiftPackageProductDependency; 387 | package = C234748B2AD482FF0084FCEF /* XCRemoteSwiftPackageReference "youtube-ios-player-helper" */; 388 | productName = YouTubeiOSPlayerHelper; 389 | }; 390 | /* End XCSwiftPackageProductDependency section */ 391 | }; 392 | rootObject = C2AF856B2303DD20003A314B /* Project object */; 393 | } 394 | --------------------------------------------------------------------------------