Home

Awesome

Swift 4.0 Branch

Use swift_4_2 branch for projects written in Swift 4.2

swift_4_2 branch has been set as the default branch for ARVideoKit as of March 6th, 2019.

intro image

An iOS Framework that enables developers to capture videos πŸ“Ή, photos πŸŒ„, Live Photos πŸŽ‡, and GIFs πŸŽ† with ARKit content.

In other words, you NO LONGER have to screen record/screenshot to capture videos πŸ“Ή and photos πŸŒ„ of your awesome ARKit apps!

Table of ContentsDescription
DocumentationDescribes the configuration options ARVideoKit offers
PreviewDisplays 2 GIF images captured using the supported gif method in ARVideoKit
Key FeaturesLists the key features ARVideoKit offers
CompatibilityDescribes the ARVideoKit device and iOS compatibality
Example ProjectsExplains how to run the example project provided in this repository
InstallationDescribes the Cocoapods, Carthage & Manual options to install ARVideoKit
ImplementationLists the steps needed for Objective-C & Swift, notes, and reference for more options
Publishing to the App StoreDescribes the steps required before submitting an application using ARVideoKit to the App Store.
DonateDonations will support me to keep maintaining ARVideoKit ❀️
ContributionsDescribes how you can contribute to this project
Apps using ARVideoKitA list of published applications using ARVideoKit
LicenseDescribes ARVideoKit license
AppCoda TutorialCheck out a detailed tutorial about implementing ARVideoKit with SpriteKit ☺️

Preview

πŸ‘Ύ Initialized with SpriteKitπŸ‘‡πŸš€ Initialized with SceneKit πŸ‘‡
SpriteKit PreviewSceneKit Preview

Key Features

βœ… Capture Photos from ARSCNView, ARSKView, and SCNView

βœ… Capture Live Photos & GIFs from ARSCNView, ARSKView, and SCNView

βœ… Record Videos from ARSCNView, ARSKView, and SCNView

βœ… Pause/Resume video

βœ… Allow device's Music playing in the background while recording a video

βœ… Returns rendered and raw buffers in a protocol method for additional Image & Video processing

Compatibility

ARVideoKit is compatible on iOS devices that support both ARKit and Metal. Check Apple's iOS Device Compatibility Reference for more information.

ARVideoKit requires:

Example Projects

To try the example project, simply clone this repository and open the Examples folder to choose between the Objective-C and Swift project files.

Installation

Cocoapods

  1. Add this line to your project's Podfile (for Swift 4.0)
pod 'ARVideoKit', '~> 1.5.12'
  1. Install the pod
$ pod install

Carthage

  1. Add this line to your project's Cartfile
github "AFathi/ARVideoKit" ~> 1.31
  1. Update your Carthage directory
$ carthage update

Manual

Drag ARVideoKit.xcodeproj into your project and click the + button in the embedded binaries section of your project's target. example embed framework

Implementation

Swift

Click here to check the Swift implementation steps.

Objective-C

Click here to check the Objective-C implementation steps.

NOTE

Make sure you add the usage description of the camera, microphone, and photo library in the app's Info.plist.

<key>NSCameraUsageDescription</key>
<string>AR Camera</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Export AR Media</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Export AR Media</string>
<key>NSMicrophoneUsageDescription</key>
<string>Audiovisual Recording</string>

Info Plist Screenshot

You're all set. πŸ€“

Check RecordAR documentation for more options!

Publishing to the App Store

Before publishing to the App Store make sure to add the ARVideoKit License to your app licences list.

  1. Build ARVideoKit for release

Open ARVideoKit.xcodeproj

Select ARVideoKitRelease scheme with Generic iOS Device

Build the project (cmd + B)

Right click on Products/ARVideoKit.framework -> Show in finder

Copy and replace ARVideoKit.framework in your project

Additionally, if you are using the binary build from Framework Build or the latest release, you MUST strip out the simulator architectures from the framework before pushing an application to the App Store.

To do so, follow those steps:

  1. Install Carthage

Download Carthage.pkg from here

Or install with Homebrew using this command brew install carthage

  1. Go to your project target's Build Phase

    <img width="684" alt="screen shot 2017-11-14 at 8 21 44 pm" src="https://user-images.githubusercontent.com/4106695/32813978-e70ae5a0-c97a-11e7-9d19-3ef434e4c4f1.png">
  2. Add a new Run Script Phase

    <img width="686" alt="screen shot 2017-11-14 at 8 22 14 pm" src="https://user-images.githubusercontent.com/4106695/32814003-0ab4cffc-c97b-11e7-97d0-cf3143afec6d.png">
  3. Add the following command to the Run Script Phase

/usr/local/bin/carthage copy-frameworks
<img width="676" alt="screen shot 2017-11-14 at 8 30 12 pm" src="https://user-images.githubusercontent.com/4106695/32814033-3302bece-c97b-11e7-867c-e8707ac7dd6b.png">
  1. Finally, add ARVideoKit.framework file path as an Input File. In my case, I have it in a folder named Frameworks inside my project folder <img width="672" alt="screen shot 2017-11-14 at 8 41 06 pm" src="https://user-images.githubusercontent.com/4106695/32814258-327bd048-c97c-11e7-8148-8d606d545214.png">

Donate

Donations will support me to keep maintining ARVideoKit Framework ❀️

Donate

Contributions

If you have an idea for a new ARVideoKit feature/functionality and want to add it to this repository, feel free to fork the project and create a pull request!

Also, feel free to create an issue if you have any suggestions or need any help ☺️

Apps using ARVideoKit

AppDescription
Our SolARAn app that allows you to see our Solar System anywhere at all!

Feel free to add your application to this list!

License

ARVideoKit Framework

Copyright 2018 Ahmed Fathi Bekhit, www.ahmedbekhit.com, me@ahmedbekhit.com

ARVideoKit is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ARVideoKit Logo & Header

Designed by Gabriel Garcia and licensed under the Creative Commons Attribution 4.0 International License DERECHOS.jpg