diff --git a/.gitignore b/.gitignore index d534044..a4b4a49 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output +.DS_Store diff --git a/ARVideoKit.xcodeproj/project.pbxproj b/ARVideoKit.xcodeproj/project.pbxproj index 7b28ede..351d86d 100644 --- a/ARVideoKit.xcodeproj/project.pbxproj +++ b/ARVideoKit.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ FB2E36891FAE29C00035B8D6 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = FB2E36881FAE29BF0035B8D6 /* LICENSE */; }; FB404FFE20D72A190056EA1D /* JPEG.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB404FFD20D72A190056EA1D /* JPEG.swift */; }; FBD604DF1FA969DD00EC9804 /* ARVideoKit.h in Headers */ = {isa = PBXBuildFile; fileRef = FBD604DD1FA969DD00EC9804 /* ARVideoKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FBD604EB1FA96B1C00EC9804 /* video.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = FBD604EA1FA96B1C00EC9804 /* video.scnassets */; }; FBD604EE1FA96B2700EC9804 /* ARVideoOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBD604EC1FA96B2700EC9804 /* ARVideoOptions.swift */; }; FBD604EF1FA96B2700EC9804 /* ARInputViewOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBD604ED1FA96B2700EC9804 /* ARInputViewOptions.swift */; }; FBD604F51FA96B3300EC9804 /* UIImage+VideoBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBD604F01FA96B3300EC9804 /* UIImage+VideoBuffer.swift */; }; @@ -40,7 +39,6 @@ FBD604DA1FA969DD00EC9804 /* ARVideoKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ARVideoKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FBD604DD1FA969DD00EC9804 /* ARVideoKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ARVideoKit.h; sourceTree = ""; }; FBD604DE1FA969DD00EC9804 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - FBD604EA1FA96B1C00EC9804 /* video.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = video.scnassets; sourceTree = ""; }; FBD604EC1FA96B2700EC9804 /* ARVideoOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ARVideoOptions.swift; sourceTree = ""; }; FBD604ED1FA96B2700EC9804 /* ARInputViewOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ARInputViewOptions.swift; sourceTree = ""; }; FBD604F01FA96B3300EC9804 /* UIImage+VideoBuffer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+VideoBuffer.swift"; sourceTree = ""; }; @@ -110,7 +108,6 @@ isa = PBXGroup; children = ( B466A8B62279E33800BD7070 /* Utils */, - FBD604E51FA96ACD00EC9804 /* Assets */, FBD604E61FA96AD400EC9804 /* Enumerations */, FBD604E71FA96AE500EC9804 /* Extensions */, FBD604E81FA96AEC00EC9804 /* Protocols */, @@ -122,14 +119,6 @@ path = ARVideoKit; sourceTree = ""; }; - FBD604E51FA96ACD00EC9804 /* Assets */ = { - isa = PBXGroup; - children = ( - FBD604EA1FA96B1C00EC9804 /* video.scnassets */, - ); - path = Assets; - sourceTree = ""; - }; FBD604E61FA96AD400EC9804 /* Enumerations */ = { isa = PBXGroup; children = ( @@ -281,7 +270,6 @@ buildActionMask = 2147483647; files = ( FB2E36891FAE29C00035B8D6 /* LICENSE in Resources */, - FBD604EB1FA96B1C00EC9804 /* video.scnassets in Resources */, FBD605071FA96B6B00EC9804 /* LoveLiver_LICENSE in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/ARVideoKit/Assets/video.scnassets/vid.scn b/ARVideoKit/Assets/video.scnassets/vid.scn deleted file mode 100755 index 5386e72..0000000 Binary files a/ARVideoKit/Assets/video.scnassets/vid.scn and /dev/null differ diff --git a/ARVideoKit/Enumerations/ARVideoOptions.swift b/ARVideoKit/Enumerations/ARVideoOptions.swift index 62958d6..96a5907 100644 --- a/ARVideoKit/Enumerations/ARVideoOptions.swift +++ b/ARVideoKit/Enumerations/ARVideoOptions.swift @@ -5,6 +5,7 @@ // Created by Ahmed Bekhit on 10/18/17. // Copyright © 2017 Ahmed Fathi Bekhit. All rights reserved. // +import Foundation /// Allows specifying the final video orientation. @objc public enum ARFrameMode: Int { diff --git a/ARVideoKit/Extensions/RecordAR+PhotoRender.swift b/ARVideoKit/Extensions/RecordAR+PhotoRender.swift index 0d5ffbb..a8aaea5 100644 --- a/ARVideoKit/Extensions/RecordAR+PhotoRender.swift +++ b/ARVideoKit/Extensions/RecordAR+PhotoRender.swift @@ -8,6 +8,7 @@ import AVFoundation import Photos +import UIKit @available(iOS 11.0, *) extension RecordAR { diff --git a/ARVideoKit/Rendering/Live Photo/Generate+LivePhoto.swift b/ARVideoKit/Rendering/Live Photo/Generate+LivePhoto.swift index 82c4c89..4a9b7ee 100644 --- a/ARVideoKit/Rendering/Live Photo/Generate+LivePhoto.swift +++ b/ARVideoKit/Rendering/Live Photo/Generate+LivePhoto.swift @@ -8,6 +8,7 @@ import AVFoundation import Photos +import UIKit @available(iOS 11.0, *) class LivePhotoGenerator { diff --git a/ARVideoKit/Sources/RecordAR.swift b/ARVideoKit/Sources/RecordAR.swift index 293a8b4..e1d8e31 100644 --- a/ARVideoKit/Sources/RecordAR.swift +++ b/ARVideoKit/Sources/RecordAR.swift @@ -143,16 +143,9 @@ import PhotosUI view = ARSpriteKit scnView = SCNView(frame: UIScreen.main.bounds) - let bundle = Bundle(for: RecordAR.self) - let url = bundle.url(forResource: "video.scnassets/vid", withExtension: "scn") - - do { - let scene = try SCNScene(url: url!, options: nil) - scnView.scene = scene - setup() - }catch let error { - logAR.message("Error occurred while loading SK Video Assets : \(error). Please download \"video.scnassets\" from\nwww.ahmedbekhit.com/ARVideoKitAssets") - } + let scene = SCNScene() + scnView.scene = scene + setup() } /** diff --git a/Package.swift b/Package.swift index 33605a4..7dc2481 100644 --- a/Package.swift +++ b/Package.swift @@ -1,8 +1,23 @@ -// swift-tools-version:4.0 +// swift-tools-version:5.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( - name: "ARVideoKit" + name: "ARVideoKit", + platforms: [ + .iOS(.v11) + ], + products: [ + .library( + name: "ARVideoKit", + targets: ["ARVideoKit"]), + ], + dependencies: [ ], + targets: [ + .target( + name: "ARVideoKit", + dependencies: [], + path: "ARVideoKit") + ] ) diff --git a/README.md b/README.md index 8ea508a..977084f 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,11 @@ github "AFathi/ARVideoKit" ~> 1.31 $ carthage update ``` +### Swift Package Manager (available Xcode 11.2 and forward) + +1. In Xcode, select File > Swift Packages > Add Package Dependency. +2. Follow the prompts using the URL for this repository. + ### Manual Drag `ARVideoKit.xcodeproj` into your project and click the **+** button in the embedded binaries section of your project's target. ![example embed framework](http://www.ahmedbekhit.com/embeddedBinary.png)