Replay Kit

Replay Kit

 

View and activate on the Corona Store

Replay kit is a framework in iOS 9 which allows you to record screen and audio (including voice). All system events like notification and music from 3rd party apps(apple music, Spotify) are ignored from the video. The app does not have access to the video. Once you are finished a pop is displayed which allows users to share or save video to camera roll. There is also a broadcasting feature added in iOS 10 which allows users of your app to stream to other broadcast enabled apps that a users has on their device.

Documentation

Hi! Thanks for making the plugin, looks great! We just bought it today.

Getting an error when trying to build with it though. Using Daily Build 2016.2972. Tried removing all other plugins from build.settings as well.

Error in console:

clang: error: linker command failed with exit code 1 (use -v to see invocation)</result>

Oct 18 04:10:12.824 ERROR: Builder failed: Undefined symbols for architecture armv7:

Oct 18 04:10:12.824   “_OBJC_CLASS_$_RPBroadcastActivityViewController”, referenced from:

                          objc-class-ref in libplugin_replayKit.a(replayKitLibrary.o)

                    ld: symbol(s) not found for architecture armv7

                    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Oct 18 04:10:12.839 BUILD ERROR: There was a problem linking the app.

                    

                    Check the console for more information.

Oct 18 04:10:12.854 iOS build failed (12) after 23 seconds

Oct 18 04:10:13.280 ERROR: Build Failed: There was a problem linking the app.

                    

                    Check the console for more information.

Thanks for reporting looking into asap

I was just able to build with corona sdk using 2016.2972 using demo (https://github.com/scottrules44/replaykit-demo). Make sure your Xcode is up to date. What device and iOS version are you build on? It should not matter but just checking.

Updated Xcode, building works now! Thanks for the help!

Noticed a small bug btw, 

replayKit.availbleToRecord() should probably be replayKit.availableToRecord()

Confused me a bit :slight_smile:

I wish there was auto correct in Xcode

Just fixed this will push out update tonight, you should be able to use either/or

Two notes

  1. the docs have changed to www.scotth.tech/plugin-replaykit   https://scotth.tech/plugin-replayKit

replayKit.availbleToRecord() and replayKit.availableToRecord()

will work the same but the docs say availableToRecord

TvOS support added

Hey Scott,

When I press “save” on the popup, it doesn’t actually save it anywhere. Am I doing something wrong? :smiley:

Thanks,

Hi rob Allison,

It actually save the video to the camera roll. Replay kit will not allow you to save to the app files. I am guessing that is what you mean by it not saving anywhere.

Thanks
Scott

Hi! I tried this in our game now, and I can’t seem to find the saved movie in the camera roll (or anywhere on the phone).  Sharing works as expected from the popup though. 

What i do:

  1. Use replaykit.record()

  2. replayKit.stopRecording()  popup opens

  3. pressing save on the popup - popup closes

  4. can’t find the video on the phone in the camera roll

Thanks!

That is weird what version of iOS is the test running on? I try testing again.

Does your app have premison to access the camera roll?

Not sure. How do i see that? Running ios 10.0.2 on iphone6

I am testing now add this to you plist

NSPhotoLibraryUsageDescription = "Testing",

hold that did not work, come back with a real solution

There is no build in api for to request permission for camera roll, let me add one to the plugin. 

Ok fixed, check an hour. You don’t have to change anything, it should just work. That was a weird bug but it is fixed