├── .gitignore ├── .travis.yml ├── Example ├── Podfile ├── Podfile.lock ├── SSSwiftUIVideoLayerView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── SSSwiftUIVideoLayerView-Example.xcscheme ├── SSSwiftUIVideoLayerView.xcworkspace │ └── contents.xcworkspacedata ├── SSSwiftUIVideoLayerView │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── ContentView.swift │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── Resources │ │ └── simformsolutions.mp4 │ └── SceneDelegate.swift └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md ├── SSSwiftUIVideoLayerExample.gif ├── SSSwiftUIVideoLayerView.podspec ├── SSSwiftUIVideoLayerView ├── Assets │ └── .gitkeep └── Classes │ └── .gitkeep ├── Source ├── SwiftUIVideoLayerView.swift └── VideoLayerView.swift └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/SSSwiftUIVideoLayerView.xcworkspace -scheme SSSwiftUIVideoLayerView-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'SSSwiftUIVideoLayerView_Example' do 4 | pod 'SSSwiftUIVideoLayerView', :path => '../' 5 | 6 | target 'SSSwiftUIVideoLayerView_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SSSwiftUIVideoLayerView (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - SSSwiftUIVideoLayerView (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | SSSwiftUIVideoLayerView: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | SSSwiftUIVideoLayerView: 6ba36efc8c80067aa956731423b98b203c1014ad 13 | 14 | PODFILE CHECKSUM: 603249b09f298a2e2d66e130a1aaf461a76b3329 15 | 16 | COCOAPODS: 1.8.4 17 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0E2AE6932B32A919E16E7329 /* Pods_SSSwiftUIVideoLayerView_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89F6BBDE7CBC590A8CDFEB76 /* Pods_SSSwiftUIVideoLayerView_Tests.framework */; }; 11 | 36442AEB1362925031CC5AE0 /* Pods_SSSwiftUIVideoLayerView_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C209F7697E1C3EA6AE796D35 /* Pods_SSSwiftUIVideoLayerView_Example.framework */; }; 12 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 13 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 14 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 15 | 8CA1786023C62D8E003A0E0F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CA1785D23C62D8D003A0E0F /* AppDelegate.swift */; }; 16 | 8CA1786123C62D8E003A0E0F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CA1785E23C62D8E003A0E0F /* ContentView.swift */; }; 17 | 8CA1786223C62D8E003A0E0F /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CA1785F23C62D8E003A0E0F /* SceneDelegate.swift */; }; 18 | 8CA1786523C62DE3003A0E0F /* simformsolutions.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 8CA1786423C62DE3003A0E0F /* simformsolutions.mp4 */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 27 | remoteInfo = SSSwiftUIVideoLayerView; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 287DC3881ED08DB50C2C1179 /* Pods-SSSwiftUIVideoLayerView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SSSwiftUIVideoLayerView_Example.debug.xcconfig"; path = "Target Support Files/Pods-SSSwiftUIVideoLayerView_Example/Pods-SSSwiftUIVideoLayerView_Example.debug.xcconfig"; sourceTree = ""; }; 33 | 607FACD01AFB9204008FA782 /* SSSwiftUIVideoLayerView_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SSSwiftUIVideoLayerView_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 36 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 37 | 607FACE51AFB9204008FA782 /* SSSwiftUIVideoLayerView_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SSSwiftUIVideoLayerView_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 40 | 72FDC2C4A454F34EC2074DBA /* SSSwiftUIVideoLayerView.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SSSwiftUIVideoLayerView.podspec; path = ../SSSwiftUIVideoLayerView.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 41 | 89F6BBDE7CBC590A8CDFEB76 /* Pods_SSSwiftUIVideoLayerView_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SSSwiftUIVideoLayerView_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 8CA1785D23C62D8D003A0E0F /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 43 | 8CA1785E23C62D8E003A0E0F /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 44 | 8CA1785F23C62D8E003A0E0F /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 45 | 8CA1786423C62DE3003A0E0F /* simformsolutions.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = simformsolutions.mp4; sourceTree = ""; }; 46 | B55A6D92EE83DF1AEB493550 /* Pods-SSSwiftUIVideoLayerView_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SSSwiftUIVideoLayerView_Tests.release.xcconfig"; path = "Target Support Files/Pods-SSSwiftUIVideoLayerView_Tests/Pods-SSSwiftUIVideoLayerView_Tests.release.xcconfig"; sourceTree = ""; }; 47 | C209F7697E1C3EA6AE796D35 /* Pods_SSSwiftUIVideoLayerView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SSSwiftUIVideoLayerView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | C66076F10F1441802B56F2AF /* Pods-SSSwiftUIVideoLayerView_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SSSwiftUIVideoLayerView_Tests.debug.xcconfig"; path = "Target Support Files/Pods-SSSwiftUIVideoLayerView_Tests/Pods-SSSwiftUIVideoLayerView_Tests.debug.xcconfig"; sourceTree = ""; }; 49 | C9CED62F0B01D3494FD5DADF /* Pods-SSSwiftUIVideoLayerView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SSSwiftUIVideoLayerView_Example.release.xcconfig"; path = "Target Support Files/Pods-SSSwiftUIVideoLayerView_Example/Pods-SSSwiftUIVideoLayerView_Example.release.xcconfig"; sourceTree = ""; }; 50 | E61E56827FA65E084B1DA2A9 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 51 | F6375810F2D89670A8EA57FA /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 36442AEB1362925031CC5AE0 /* Pods_SSSwiftUIVideoLayerView_Example.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 0E2AE6932B32A919E16E7329 /* Pods_SSSwiftUIVideoLayerView_Tests.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 553587621DD1138BE70293ED /* Pods */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 287DC3881ED08DB50C2C1179 /* Pods-SSSwiftUIVideoLayerView_Example.debug.xcconfig */, 78 | C9CED62F0B01D3494FD5DADF /* Pods-SSSwiftUIVideoLayerView_Example.release.xcconfig */, 79 | C66076F10F1441802B56F2AF /* Pods-SSSwiftUIVideoLayerView_Tests.debug.xcconfig */, 80 | B55A6D92EE83DF1AEB493550 /* Pods-SSSwiftUIVideoLayerView_Tests.release.xcconfig */, 81 | ); 82 | path = Pods; 83 | sourceTree = ""; 84 | }; 85 | 607FACC71AFB9204008FA782 = { 86 | isa = PBXGroup; 87 | children = ( 88 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 89 | 607FACD21AFB9204008FA782 /* Example for SSSwiftUIVideoLayerView */, 90 | 607FACE81AFB9204008FA782 /* Tests */, 91 | 607FACD11AFB9204008FA782 /* Products */, 92 | 553587621DD1138BE70293ED /* Pods */, 93 | A4C5B0E42AAD8F4BA2BAD102 /* Frameworks */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | 607FACD11AFB9204008FA782 /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 607FACD01AFB9204008FA782 /* SSSwiftUIVideoLayerView_Example.app */, 101 | 607FACE51AFB9204008FA782 /* SSSwiftUIVideoLayerView_Tests.xctest */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 607FACD21AFB9204008FA782 /* Example for SSSwiftUIVideoLayerView */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 8CA1786323C62DCF003A0E0F /* Resources */, 110 | 8CA1785D23C62D8D003A0E0F /* AppDelegate.swift */, 111 | 8CA1785E23C62D8E003A0E0F /* ContentView.swift */, 112 | 8CA1785F23C62D8E003A0E0F /* SceneDelegate.swift */, 113 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 114 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 115 | 607FACD31AFB9204008FA782 /* Supporting Files */, 116 | ); 117 | name = "Example for SSSwiftUIVideoLayerView"; 118 | path = SSSwiftUIVideoLayerView; 119 | sourceTree = ""; 120 | }; 121 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 607FACD41AFB9204008FA782 /* Info.plist */, 125 | ); 126 | name = "Supporting Files"; 127 | sourceTree = ""; 128 | }; 129 | 607FACE81AFB9204008FA782 /* Tests */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 133 | 607FACE91AFB9204008FA782 /* Supporting Files */, 134 | ); 135 | path = Tests; 136 | sourceTree = ""; 137 | }; 138 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 607FACEA1AFB9204008FA782 /* Info.plist */, 142 | ); 143 | name = "Supporting Files"; 144 | sourceTree = ""; 145 | }; 146 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 72FDC2C4A454F34EC2074DBA /* SSSwiftUIVideoLayerView.podspec */, 150 | E61E56827FA65E084B1DA2A9 /* README.md */, 151 | F6375810F2D89670A8EA57FA /* LICENSE */, 152 | ); 153 | name = "Podspec Metadata"; 154 | sourceTree = ""; 155 | }; 156 | 8CA1786323C62DCF003A0E0F /* Resources */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 8CA1786423C62DE3003A0E0F /* simformsolutions.mp4 */, 160 | ); 161 | path = Resources; 162 | sourceTree = ""; 163 | }; 164 | A4C5B0E42AAD8F4BA2BAD102 /* Frameworks */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | C209F7697E1C3EA6AE796D35 /* Pods_SSSwiftUIVideoLayerView_Example.framework */, 168 | 89F6BBDE7CBC590A8CDFEB76 /* Pods_SSSwiftUIVideoLayerView_Tests.framework */, 169 | ); 170 | name = Frameworks; 171 | sourceTree = ""; 172 | }; 173 | /* End PBXGroup section */ 174 | 175 | /* Begin PBXNativeTarget section */ 176 | 607FACCF1AFB9204008FA782 /* SSSwiftUIVideoLayerView_Example */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SSSwiftUIVideoLayerView_Example" */; 179 | buildPhases = ( 180 | 2E81D3463866B295C6B7316F /* [CP] Check Pods Manifest.lock */, 181 | 607FACCC1AFB9204008FA782 /* Sources */, 182 | 607FACCD1AFB9204008FA782 /* Frameworks */, 183 | 607FACCE1AFB9204008FA782 /* Resources */, 184 | 68AC1A9830FB77C4B742881B /* [CP] Embed Pods Frameworks */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | ); 190 | name = SSSwiftUIVideoLayerView_Example; 191 | productName = SSSwiftUIVideoLayerView; 192 | productReference = 607FACD01AFB9204008FA782 /* SSSwiftUIVideoLayerView_Example.app */; 193 | productType = "com.apple.product-type.application"; 194 | }; 195 | 607FACE41AFB9204008FA782 /* SSSwiftUIVideoLayerView_Tests */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SSSwiftUIVideoLayerView_Tests" */; 198 | buildPhases = ( 199 | 7CDA647FCD654B257695147C /* [CP] Check Pods Manifest.lock */, 200 | 607FACE11AFB9204008FA782 /* Sources */, 201 | 607FACE21AFB9204008FA782 /* Frameworks */, 202 | 607FACE31AFB9204008FA782 /* Resources */, 203 | ); 204 | buildRules = ( 205 | ); 206 | dependencies = ( 207 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 208 | ); 209 | name = SSSwiftUIVideoLayerView_Tests; 210 | productName = Tests; 211 | productReference = 607FACE51AFB9204008FA782 /* SSSwiftUIVideoLayerView_Tests.xctest */; 212 | productType = "com.apple.product-type.bundle.unit-test"; 213 | }; 214 | /* End PBXNativeTarget section */ 215 | 216 | /* Begin PBXProject section */ 217 | 607FACC81AFB9204008FA782 /* Project object */ = { 218 | isa = PBXProject; 219 | attributes = { 220 | LastSwiftUpdateCheck = 0830; 221 | LastUpgradeCheck = 1120; 222 | ORGANIZATIONNAME = CocoaPods; 223 | TargetAttributes = { 224 | 607FACCF1AFB9204008FA782 = { 225 | CreatedOnToolsVersion = 6.3.1; 226 | DevelopmentTeam = Y98X8JAPH6; 227 | LastSwiftMigration = 1120; 228 | }; 229 | 607FACE41AFB9204008FA782 = { 230 | CreatedOnToolsVersion = 6.3.1; 231 | LastSwiftMigration = 1120; 232 | TestTargetID = 607FACCF1AFB9204008FA782; 233 | }; 234 | }; 235 | }; 236 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SSSwiftUIVideoLayerView" */; 237 | compatibilityVersion = "Xcode 3.2"; 238 | developmentRegion = en; 239 | hasScannedForEncodings = 0; 240 | knownRegions = ( 241 | en, 242 | Base, 243 | ); 244 | mainGroup = 607FACC71AFB9204008FA782; 245 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 246 | projectDirPath = ""; 247 | projectRoot = ""; 248 | targets = ( 249 | 607FACCF1AFB9204008FA782 /* SSSwiftUIVideoLayerView_Example */, 250 | 607FACE41AFB9204008FA782 /* SSSwiftUIVideoLayerView_Tests */, 251 | ); 252 | }; 253 | /* End PBXProject section */ 254 | 255 | /* Begin PBXResourcesBuildPhase section */ 256 | 607FACCE1AFB9204008FA782 /* Resources */ = { 257 | isa = PBXResourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 261 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 262 | 8CA1786523C62DE3003A0E0F /* simformsolutions.mp4 in Resources */, 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | 607FACE31AFB9204008FA782 /* Resources */ = { 267 | isa = PBXResourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | /* End PBXResourcesBuildPhase section */ 274 | 275 | /* Begin PBXShellScriptBuildPhase section */ 276 | 2E81D3463866B295C6B7316F /* [CP] Check Pods Manifest.lock */ = { 277 | isa = PBXShellScriptBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | ); 281 | inputFileListPaths = ( 282 | ); 283 | inputPaths = ( 284 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 285 | "${PODS_ROOT}/Manifest.lock", 286 | ); 287 | name = "[CP] Check Pods Manifest.lock"; 288 | outputFileListPaths = ( 289 | ); 290 | outputPaths = ( 291 | "$(DERIVED_FILE_DIR)/Pods-SSSwiftUIVideoLayerView_Example-checkManifestLockResult.txt", 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | shellPath = /bin/sh; 295 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 296 | showEnvVarsInLog = 0; 297 | }; 298 | 68AC1A9830FB77C4B742881B /* [CP] Embed Pods Frameworks */ = { 299 | isa = PBXShellScriptBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | ); 303 | inputPaths = ( 304 | "${PODS_ROOT}/Target Support Files/Pods-SSSwiftUIVideoLayerView_Example/Pods-SSSwiftUIVideoLayerView_Example-frameworks.sh", 305 | "${BUILT_PRODUCTS_DIR}/SSSwiftUIVideoLayerView/SSSwiftUIVideoLayerView.framework", 306 | ); 307 | name = "[CP] Embed Pods Frameworks"; 308 | outputPaths = ( 309 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSSwiftUIVideoLayerView.framework", 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | shellPath = /bin/sh; 313 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SSSwiftUIVideoLayerView_Example/Pods-SSSwiftUIVideoLayerView_Example-frameworks.sh\"\n"; 314 | showEnvVarsInLog = 0; 315 | }; 316 | 7CDA647FCD654B257695147C /* [CP] Check Pods Manifest.lock */ = { 317 | isa = PBXShellScriptBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | ); 321 | inputFileListPaths = ( 322 | ); 323 | inputPaths = ( 324 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 325 | "${PODS_ROOT}/Manifest.lock", 326 | ); 327 | name = "[CP] Check Pods Manifest.lock"; 328 | outputFileListPaths = ( 329 | ); 330 | outputPaths = ( 331 | "$(DERIVED_FILE_DIR)/Pods-SSSwiftUIVideoLayerView_Tests-checkManifestLockResult.txt", 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | shellPath = /bin/sh; 335 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 336 | showEnvVarsInLog = 0; 337 | }; 338 | /* End PBXShellScriptBuildPhase section */ 339 | 340 | /* Begin PBXSourcesBuildPhase section */ 341 | 607FACCC1AFB9204008FA782 /* Sources */ = { 342 | isa = PBXSourcesBuildPhase; 343 | buildActionMask = 2147483647; 344 | files = ( 345 | 8CA1786123C62D8E003A0E0F /* ContentView.swift in Sources */, 346 | 8CA1786023C62D8E003A0E0F /* AppDelegate.swift in Sources */, 347 | 8CA1786223C62D8E003A0E0F /* SceneDelegate.swift in Sources */, 348 | ); 349 | runOnlyForDeploymentPostprocessing = 0; 350 | }; 351 | 607FACE11AFB9204008FA782 /* Sources */ = { 352 | isa = PBXSourcesBuildPhase; 353 | buildActionMask = 2147483647; 354 | files = ( 355 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | /* End PBXSourcesBuildPhase section */ 360 | 361 | /* Begin PBXTargetDependency section */ 362 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 363 | isa = PBXTargetDependency; 364 | target = 607FACCF1AFB9204008FA782 /* SSSwiftUIVideoLayerView_Example */; 365 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 366 | }; 367 | /* End PBXTargetDependency section */ 368 | 369 | /* Begin PBXVariantGroup section */ 370 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 371 | isa = PBXVariantGroup; 372 | children = ( 373 | 607FACDF1AFB9204008FA782 /* Base */, 374 | ); 375 | name = LaunchScreen.xib; 376 | sourceTree = ""; 377 | }; 378 | /* End PBXVariantGroup section */ 379 | 380 | /* Begin XCBuildConfiguration section */ 381 | 607FACED1AFB9204008FA782 /* Debug */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | ALWAYS_SEARCH_USER_PATHS = NO; 385 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 387 | CLANG_CXX_LIBRARY = "libc++"; 388 | CLANG_ENABLE_MODULES = YES; 389 | CLANG_ENABLE_OBJC_ARC = YES; 390 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 391 | CLANG_WARN_BOOL_CONVERSION = YES; 392 | CLANG_WARN_COMMA = YES; 393 | CLANG_WARN_CONSTANT_CONVERSION = YES; 394 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 395 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 396 | CLANG_WARN_EMPTY_BODY = YES; 397 | CLANG_WARN_ENUM_CONVERSION = YES; 398 | CLANG_WARN_INFINITE_RECURSION = YES; 399 | CLANG_WARN_INT_CONVERSION = YES; 400 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 401 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 402 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 403 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 404 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 405 | CLANG_WARN_STRICT_PROTOTYPES = YES; 406 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 407 | CLANG_WARN_UNREACHABLE_CODE = YES; 408 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 409 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 410 | COPY_PHASE_STRIP = NO; 411 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 412 | ENABLE_STRICT_OBJC_MSGSEND = YES; 413 | ENABLE_TESTABILITY = YES; 414 | GCC_C_LANGUAGE_STANDARD = gnu99; 415 | GCC_DYNAMIC_NO_PIC = NO; 416 | GCC_NO_COMMON_BLOCKS = YES; 417 | GCC_OPTIMIZATION_LEVEL = 0; 418 | GCC_PREPROCESSOR_DEFINITIONS = ( 419 | "DEBUG=1", 420 | "$(inherited)", 421 | ); 422 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 427 | GCC_WARN_UNUSED_FUNCTION = YES; 428 | GCC_WARN_UNUSED_VARIABLE = YES; 429 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 430 | MTL_ENABLE_DEBUG_INFO = YES; 431 | ONLY_ACTIVE_ARCH = YES; 432 | SDKROOT = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 434 | }; 435 | name = Debug; 436 | }; 437 | 607FACEE1AFB9204008FA782 /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_SEARCH_USER_PATHS = NO; 441 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 443 | CLANG_CXX_LIBRARY = "libc++"; 444 | CLANG_ENABLE_MODULES = YES; 445 | CLANG_ENABLE_OBJC_ARC = YES; 446 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 447 | CLANG_WARN_BOOL_CONVERSION = YES; 448 | CLANG_WARN_COMMA = YES; 449 | CLANG_WARN_CONSTANT_CONVERSION = YES; 450 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 451 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 452 | CLANG_WARN_EMPTY_BODY = YES; 453 | CLANG_WARN_ENUM_CONVERSION = YES; 454 | CLANG_WARN_INFINITE_RECURSION = YES; 455 | CLANG_WARN_INT_CONVERSION = YES; 456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 457 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 458 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 459 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 460 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 461 | CLANG_WARN_STRICT_PROTOTYPES = YES; 462 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 463 | CLANG_WARN_UNREACHABLE_CODE = YES; 464 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 465 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 466 | COPY_PHASE_STRIP = NO; 467 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 468 | ENABLE_NS_ASSERTIONS = NO; 469 | ENABLE_STRICT_OBJC_MSGSEND = YES; 470 | GCC_C_LANGUAGE_STANDARD = gnu99; 471 | GCC_NO_COMMON_BLOCKS = YES; 472 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 473 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 474 | GCC_WARN_UNDECLARED_SELECTOR = YES; 475 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 476 | GCC_WARN_UNUSED_FUNCTION = YES; 477 | GCC_WARN_UNUSED_VARIABLE = YES; 478 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 479 | MTL_ENABLE_DEBUG_INFO = NO; 480 | SDKROOT = iphoneos; 481 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 482 | VALIDATE_PRODUCT = YES; 483 | }; 484 | name = Release; 485 | }; 486 | 607FACF01AFB9204008FA782 /* Debug */ = { 487 | isa = XCBuildConfiguration; 488 | baseConfigurationReference = 287DC3881ED08DB50C2C1179 /* Pods-SSSwiftUIVideoLayerView_Example.debug.xcconfig */; 489 | buildSettings = { 490 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 491 | CLANG_ENABLE_MODULES = YES; 492 | DEVELOPMENT_TEAM = Y98X8JAPH6; 493 | INFOPLIST_FILE = SSSwiftUIVideoLayerView/Info.plist; 494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 495 | MODULE_NAME = ExampleApp; 496 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 497 | PRODUCT_NAME = "$(TARGET_NAME)"; 498 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 499 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 500 | SWIFT_VERSION = 5.0; 501 | }; 502 | name = Debug; 503 | }; 504 | 607FACF11AFB9204008FA782 /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | baseConfigurationReference = C9CED62F0B01D3494FD5DADF /* Pods-SSSwiftUIVideoLayerView_Example.release.xcconfig */; 507 | buildSettings = { 508 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 509 | CLANG_ENABLE_MODULES = YES; 510 | DEVELOPMENT_TEAM = Y98X8JAPH6; 511 | INFOPLIST_FILE = SSSwiftUIVideoLayerView/Info.plist; 512 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 513 | MODULE_NAME = ExampleApp; 514 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 517 | SWIFT_VERSION = 5.0; 518 | }; 519 | name = Release; 520 | }; 521 | 607FACF31AFB9204008FA782 /* Debug */ = { 522 | isa = XCBuildConfiguration; 523 | baseConfigurationReference = C66076F10F1441802B56F2AF /* Pods-SSSwiftUIVideoLayerView_Tests.debug.xcconfig */; 524 | buildSettings = { 525 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 526 | FRAMEWORK_SEARCH_PATHS = ( 527 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 528 | "$(inherited)", 529 | ); 530 | GCC_PREPROCESSOR_DEFINITIONS = ( 531 | "DEBUG=1", 532 | "$(inherited)", 533 | ); 534 | INFOPLIST_FILE = Tests/Info.plist; 535 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 536 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 539 | SWIFT_VERSION = 5.0; 540 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SSSwiftUIVideoLayerView_Example.app/SSSwiftUIVideoLayerView_Example"; 541 | }; 542 | name = Debug; 543 | }; 544 | 607FACF41AFB9204008FA782 /* Release */ = { 545 | isa = XCBuildConfiguration; 546 | baseConfigurationReference = B55A6D92EE83DF1AEB493550 /* Pods-SSSwiftUIVideoLayerView_Tests.release.xcconfig */; 547 | buildSettings = { 548 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 549 | FRAMEWORK_SEARCH_PATHS = ( 550 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 551 | "$(inherited)", 552 | ); 553 | INFOPLIST_FILE = Tests/Info.plist; 554 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 555 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 556 | PRODUCT_NAME = "$(TARGET_NAME)"; 557 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 558 | SWIFT_VERSION = 5.0; 559 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SSSwiftUIVideoLayerView_Example.app/SSSwiftUIVideoLayerView_Example"; 560 | }; 561 | name = Release; 562 | }; 563 | /* End XCBuildConfiguration section */ 564 | 565 | /* Begin XCConfigurationList section */ 566 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SSSwiftUIVideoLayerView" */ = { 567 | isa = XCConfigurationList; 568 | buildConfigurations = ( 569 | 607FACED1AFB9204008FA782 /* Debug */, 570 | 607FACEE1AFB9204008FA782 /* Release */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SSSwiftUIVideoLayerView_Example" */ = { 576 | isa = XCConfigurationList; 577 | buildConfigurations = ( 578 | 607FACF01AFB9204008FA782 /* Debug */, 579 | 607FACF11AFB9204008FA782 /* Release */, 580 | ); 581 | defaultConfigurationIsVisible = 0; 582 | defaultConfigurationName = Release; 583 | }; 584 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SSSwiftUIVideoLayerView_Tests" */ = { 585 | isa = XCConfigurationList; 586 | buildConfigurations = ( 587 | 607FACF31AFB9204008FA782 /* Debug */, 588 | 607FACF41AFB9204008FA782 /* Release */, 589 | ); 590 | defaultConfigurationIsVisible = 0; 591 | defaultConfigurationName = Release; 592 | }; 593 | /* End XCConfigurationList section */ 594 | }; 595 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 596 | } 597 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView.xcodeproj/xcshareddata/xcschemes/SSSwiftUIVideoLayerView-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 51 | 52 | 53 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 76 | 78 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SSSwiftUIGIFView 4 | // 5 | // Created by Vatsal Tanna on 01/07/2020. 6 | // Copyright (c) 2020 Vatsal Tanna. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 15 | // Override point for customization after application launch. 16 | return true 17 | } 18 | 19 | // MARK: UISceneSession Lifecycle 20 | 21 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 22 | // Called when a new scene session is being created. 23 | // Use this method to select a configuration to create the new scene with. 24 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 25 | } 26 | 27 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 28 | // Called when the user discards a scene session. 29 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 30 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // SSSwiftUIGIFView 4 | // 5 | // Created by Simform Solutions on 07/01/20. 6 | // Copyright © 2020 Simform. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import SSSwiftUIVideoLayerView 11 | 12 | struct ContentView: View { 13 | var body: some View { 14 | SwiftUIVideoLayerView(videoName: "simformsolutions", videoType: "mp4").frame(width: 300, height: 300, alignment: .center) 15 | } 16 | } 17 | 18 | struct ContentView_Previews: PreviewProvider { 19 | static var previews: some View { 20 | ContentView() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView/Resources/simformsolutions.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSwiftUIVideoLayerView/1a83140734f7f0771c8d60952b946cc6b959acac/Example/SSSwiftUIVideoLayerView/Resources/simformsolutions.mp4 -------------------------------------------------------------------------------- /Example/SSSwiftUIVideoLayerView/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // SSSwiftUIGIFView_Example 4 | // 5 | // Created by Ketan Chopda on 07/01/20. 6 | // Copyright © 2020 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Create the SwiftUI view that provides the window contents. 23 | let contentView = ContentView() 24 | 25 | // Use a UIHostingController as window root view controller. 26 | if let windowScene = scene as? UIWindowScene { 27 | let window = UIWindow(windowScene: windowScene) 28 | window.rootViewController = UIHostingController(rootView: contentView) 29 | self.window = window 30 | window.makeKeyAndVisible() 31 | } 32 | } 33 | 34 | func sceneDidDisconnect(_ scene: UIScene) { 35 | // Called as the scene is being released by the system. 36 | // This occurs shortly after the scene enters the background, or when its session is discarded. 37 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 38 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 39 | } 40 | 41 | func sceneDidBecomeActive(_ scene: UIScene) { 42 | // Called when the scene has moved from an inactive state to an active state. 43 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 44 | } 45 | 46 | func sceneWillResignActive(_ scene: UIScene) { 47 | // Called when the scene will move from an active state to an inactive state. 48 | // This may occur due to temporary interruptions (ex. an incoming phone call). 49 | } 50 | 51 | func sceneWillEnterForeground(_ scene: UIScene) { 52 | // Called as the scene transitions from the background to the foreground. 53 | // Use this method to undo the changes made on entering the background. 54 | } 55 | 56 | func sceneDidEnterBackground(_ scene: UIScene) { 57 | // Called as the scene transitions from the foreground to the background. 58 | // Use this method to save data, release shared resources, and store enough scene-specific state information 59 | // to restore the scene back to its current state. 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import SSSwiftUIVideoLayerView 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testExample() { 17 | // This is an example of a functional test case. 18 | XCTAssert(true, "Pass") 19 | } 20 | 21 | func testPerformanceExample() { 22 | // This is an example of a performance test case. 23 | self.measure() { 24 | // Put the code you want to measure the time of here. 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Vatsal Tanna 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SSSwiftUIVideoLayerView 2 | SSSwiftUIVideoPlayerLayer is a custom controller which helps to load video in SwiftUI. 3 | 4 | [![Version](https://img.shields.io/cocoapods/v/SSSwiftUIVideoLayerView.svg?style=flat)](https://cocoapods.org/pods/SSSwiftUIVideoLayerView) 5 | [![License](https://img.shields.io/cocoapods/l/SSSwiftUIVideoLayerView.svg?style=flat)](https://cocoapods.org/pods/SSSwiftUIVideoLayerView) 6 | [![Platform](https://img.shields.io/cocoapods/p/SSSwiftUIVideoLayerView.svg?style=flat)](https://cocoapods.org/pods/SSSwiftUIVideoLayerView) 7 | 8 | ![Alt text](https://github.com/simformsolutions/SSSwiftUIVideoLayerView/blob/master/SSSwiftUIVideoLayerExample.gif?raw=true) 9 | 10 | ## Example 11 | 12 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 13 | 14 | ## Requirements 15 | - iOS 13.0+ 16 | - Xcode 11+ 17 | 18 | ## Installation 19 | 20 | SSSwiftUIVideoLayerView is available through [CocoaPods](https://cocoapods.org). To install 21 | it, simply add the following line to your Podfile: 22 | 23 | ```ruby 24 | pod 'SSSwiftUIVideoLayerView' 25 | ``` 26 | 27 | # Usage example 28 | - 29 | **Import framework** 30 | 31 | import SSSwiftUIVideoLayerView 32 | 33 | - 34 | **Load Video with SwiftUIVideoLayerView function** 35 | 36 | SwiftUIVideoLayerView(videoName: "VideoName", videoType: "mp4") 37 | 38 | ## License 39 | 40 | SSSwiftUIVideoLayerView is available under the MIT license. See the LICENSE file for more info. 41 | -------------------------------------------------------------------------------- /SSSwiftUIVideoLayerExample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSwiftUIVideoLayerView/1a83140734f7f0771c8d60952b946cc6b959acac/SSSwiftUIVideoLayerExample.gif -------------------------------------------------------------------------------- /SSSwiftUIVideoLayerView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint SSSwiftUIVideoLayerView.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'SSSwiftUIVideoLayerView' 11 | s.version = '1.0.0' 12 | s.summary = 'SSSwiftUIVideoPlayerLayer is a custom controller which helps to load video in SwiftUI.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | SSSwiftUIVideoPlayerLayer is a very easy way to load any video in SwiftUI, User just need to call one function with video name and video type and its done. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/simformsolutions/SSSwiftUIVideoLayerView' 25 | s.license = { :type => 'MIT', :file => 'LICENSE' } 26 | s.author = { 'Vatsal Tanna' => 'vatsal.t@simformsolutions.com' } 27 | s.source = { :git => 'https://github.com/simformsolutions/SSSwiftUIVideoLayerView.git', :tag => s.version.to_s } 28 | 29 | s.ios.deployment_target = '13.0' 30 | s.swift_version = '5.0' 31 | s.platforms = { 32 | "ios": "13.0" 33 | } 34 | 35 | s.source_files = 'Source/**/*.swift' 36 | 37 | end 38 | -------------------------------------------------------------------------------- /SSSwiftUIVideoLayerView/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSwiftUIVideoLayerView/1a83140734f7f0771c8d60952b946cc6b959acac/SSSwiftUIVideoLayerView/Assets/.gitkeep -------------------------------------------------------------------------------- /SSSwiftUIVideoLayerView/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSwiftUIVideoLayerView/1a83140734f7f0771c8d60952b946cc6b959acac/SSSwiftUIVideoLayerView/Classes/.gitkeep -------------------------------------------------------------------------------- /Source/SwiftUIVideoLayerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUIVideoPlayerView.swift 3 | // SSSwiftUIVideoPlayerLayer 4 | // 5 | // Created by Simform Solutions on 08/01/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public struct SwiftUIVideoLayerView: UIViewRepresentable { 11 | 12 | private var videoName: String 13 | private var videoType: String 14 | 15 | public init(videoName: String, videoType: String) { 16 | self.videoName = videoName 17 | self.videoType = videoType 18 | } 19 | 20 | public func updateUIView(_ uiView: UIView, context: UIViewRepresentableContext) { 21 | 22 | } 23 | 24 | public func makeUIView(context: Context) -> UIView { 25 | return VideoLayerView(videoName: videoName, videoType: videoType) 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Source/VideoLayerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlyerView.swift 3 | // SwiftUI-Demo 4 | // 5 | // Created by Simform Solutions on 12/09/19. 6 | // Copyright © 2019 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVKit 11 | 12 | class VideoLayerView: UIView { 13 | private let playerLayer = AVPlayerLayer() 14 | 15 | convenience init(videoName: String, videoType: String) { 16 | self.init() 17 | guard let path = Bundle.main.path(forResource: videoName, ofType: videoType) else { 18 | debugPrint("Video not found") 19 | return 20 | } 21 | let url = URL(fileURLWithPath: path) 22 | let player = AVPlayer(url: url) 23 | self.loopVideo(videoPlayer: player) 24 | player.play() 25 | playerLayer.player = player 26 | playerLayer.videoGravity = .resizeAspect 27 | layer.addSublayer(playerLayer) 28 | } 29 | 30 | override init(frame: CGRect) { 31 | super.init(frame: frame) 32 | } 33 | 34 | required init?(coder: NSCoder) { 35 | fatalError("init(coder:) has not been implemented") 36 | } 37 | 38 | 39 | override func layoutSubviews() { 40 | super.layoutSubviews() 41 | playerLayer.frame = bounds 42 | } 43 | 44 | func loopVideo(videoPlayer: AVPlayer) { 45 | NotificationCenter.default.addObserver(forName: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { notification in 46 | videoPlayer.seek(to: CMTime.zero) 47 | videoPlayer.play() 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------