Search Unity

Replay Kit in iOS 11

Discussion in 'iOS and tvOS' started by Chris_E, Aug 9, 2017.

  1. Chris_E

    Chris_E

    Joined:
    Jul 10, 2012
    Posts:
    32
    Replaykit appears to fail on iOS 11. It requests permission to record, then nothing happens. Everything works fine in iOS 10. Any idea why this happens?
     
  2. robertas-unity

    robertas-unity

    QA Minion Unity Technologies

    Joined:
    Mar 24, 2015
    Posts:
    29
    Hi Chris, we haven't noticed anything unusual when testing ReplayKit on iOS 11. Could you report a bug with your project and exact steps describing what are you trying to do when it fails? Once you do that, please post the bug report number here. Thanks!
     
  3. jordi-darkcurry

    jordi-darkcurry

    Joined:
    Apr 28, 2016
    Posts:
    5
    Have you tried with the last iOS 11 beta (15A5341f)??
     
  4. robertas-unity

    robertas-unity

    QA Minion Unity Technologies

    Joined:
    Mar 24, 2015
    Posts:
    29
    So I tried running some tests with latest iOS 11 beta 5 and recording did fail a couple times. Then it "magically" started working. Not entirely sure what caused it to fail or start working again.
    I passed it along to our developers, but it will be hard tracking down what causes the issue with such inconsistent results. Would be really useful if you guys could report bugs with your projects, this might help us to track down what exactly causes the problem and fix it.
    Again, if you choose to do so, post the bug # here please.
     
  5. Chris_E

    Chris_E

    Joined:
    Jul 10, 2012
    Posts:
    32
    Hey sorry for the late response... I thought I had the forums set up to email me if there were responses. The same thing happened with me with inconsistency and now it appears to be working consistently. I'm not really sure what happened, sorry I can't give more details!
     
  6. JoMaHo

    JoMaHo

    Joined:
    Apr 2, 2017
    Posts:
    94
    I have the same issue; tried two 3rd party assets as well, dialog asks to use the cam and mic, then nothing. It worked half way with a previous beta of ios11 (beta5), now on beta v8 not.

    Have tried both Unity 2017.1 and 2017.2, no difference.

    From all I can read, a lot of reports on this.

    Anyone have updated info on this issue?
     
  7. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Can you try the GM seed of both Xcode and iOS 11. I was told this was fixed on apple’s side
     
  8. JoMaHo

    JoMaHo

    Joined:
    Apr 2, 2017
    Posts:
    94
    Ah; I missed those releases; I will try it, hopefully it solves the issue....TBA
     
  9. JoMaHo

    JoMaHo

    Joined:
    Apr 2, 2017
    Posts:
    94
    Solved - the iOS11 GM seed solved it.
    Thanks for the tip!
     
  10. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    65
    Still not working for me. iOS 11 Release version. Error message says recording is interrupted by another application.
     
  11. ivanbbartha

    ivanbbartha

    Joined:
    Sep 12, 2017
    Posts:
    3
    I have the same problem. Its been working half of the time when i had iOS11beta 6 and xcode9 beta.
    I am having issues with Unity Patch 5.6.3p4, iOS11 and Xcode9.

    Does it work for you every time JoMaHo? What is your secret????
     
  12. JoMaHo

    JoMaHo

    Joined:
    Apr 2, 2017
    Posts:
    94
    No, I’m sorry to say it is very inconsistent; I do not have time to persue the issue now, just looking into this forum to see how it goes. Something is seriously wrong. 3rd party assets with Replaykit are also mailfunctioning...
     
  13. ivanbbartha

    ivanbbartha

    Joined:
    Sep 12, 2017
    Posts:
    3
    Thank you for the reply JoMaHo!

    Did anyone try prime31 replay kit? or EveryPlay?

    >>>>> Release note
    Prime 31
    Version 2.10
    - iOS 11 compatibility update
     
  14. behrad

    behrad

    Joined:
    Nov 7, 2014
    Posts:
    3
    Hi Everyone,
    I spent the last 24 hours debugging this issue. Below is the relevant error. I've tested this with 5.6.3f1 and 5.6.3f4 and originally got it on 5.6.2f1. Even when you look at UnityReplayKit file in Xcode it tells you that you should be calling the function from main thread as a warning. It happens with iOS 11 GM and Xcode 9 GM. Unfortunately this error only happens about %20 so you have to try a few times.

    Main Thread Checker: UI API called on a background thread: -[UIWindow initWithFrame:]
    PID: 1646, TID: 582483, Thread name: (none), Queue name: com.apple.NSXPCConnection.m-user.com.apple.replayd, QoS: 0
    Backtrace:
    4 **MYAPPNAME** 0x00000001002b8288 -[UnityReplayKit createOverlayWindow] + 108
    5 **MYAPPNAME** 0x00000001002b867c __33-[UnityReplayKit startRecording:]_block_invoke + 116
    6 ReplayKit 0x000000019f90fafc <redacted> + 1036
    7 CoreFoundation 0x0000000184f136a0 <redacted> + 144
    8 CoreFoundation 0x0000000184df2820 <redacted> + 292
    9 ReplayKit 0x000000019f91b400 <redacted> + 172
    10 Foundation 0x0000000185a1dc9c <redacted> + 860
    11 Foundation 0x0000000185a220d4 <redacted> + 520
    12 libxpc.dylib 0x0000000184b71a0c <redacted> + 60
    13 libxpc.dylib 0x0000000184b71948 <redacted> + 88
    14 libdispatch.dylib 0x0000000184891758 <redacted> + 16
    15 libdispatch.dylib 0x00000001848a9060 <redacted> + 324
    16 libdispatch.dylib 0x000000018489ad00 <redacted> + 200
    17 libdispatch.dylib 0x000000018489b7d8 <redacted> + 340
    18 libdispatch.dylib 0x000000018489c200 <redacted> + 400
    19 libdispatch.dylib 0x00000001848a44a0 <redacted> + 644
    20 libsystem_pthread.dylib 0x0000000184b36fe0 _pthread_wqthread + 932
    21 libsystem_pthread.dylib 0x0000000184b36c30 start_wqthread + 4
    2017-09-25 16:29:51.782358-0400 **MYAPPNAME**[1646:582483] [reports] Main Thread Checker: UI API called on a background thread: -[UIWindow initWithFrame:]
    PID: 1646, TID: 582483, Thread name: (none), Queue name: com.apple.NSXPCConnection.m-user.com.apple.replayd, QoS: 0
    Backtrace:
    4 **MYAPPNAME** 0x00000001002b8288 -[UnityReplayKit createOverlayWindow] + 108
    5 **MYAPPNAME** 0x00000001002b867c __33-[UnityReplayKit startRecording:]_block_invoke + 116
    6 ReplayKit 0x000000019f90fafc <redacted> + 1036
    7 CoreFoundation 0x0000000184f136a0 <redacted> + 144
    8 CoreFoundation 0x0000000184df2820 <redacted> + 292
    9 ReplayKit 0x000000019f91b400 <redacted> + 172
    10 Foundation 0x0000000185a1dc9c <redacted> + 860
    11 Foundation 0x0000000185a220d4 <redacted> + 520
    12 libxpc.dylib 0x0000000184b71a0c <redacted> + 60
    13 libxpc.dylib 0x0000000184b71948 <redacted> + 88
    14 libdispatch.dylib 0x0000000184891758 <redacted> + 16
    15 libdispatch.dylib 0x00000001848a9060 <redacted> + 324
    16 libdispatch.dylib 0x000000018489ad00 <redacted> + 200
    17 libdispatch.dylib 0x000000018489b7d8 <redacted> + 340
    18 libdispatch.dylib 0x000000018489c200 <redacted> + 400
    19 libdispatch.dylib 0x00000001848a44a0 <redacted> + 644
    20 libsystem_pthread.dylib 0x0000000184b36fe0 _pthread_wqthread + 932
    21 libsystem_pthread.dylib 0x0000000184b36c30 start_wqthread + 4
    2017-09-25 16:29:51.850471-0400 **MYAPPNAME**[1646:582483] *** Assertion failure in -[UIApplication _cachedSystemAnimationFenceCreatingIfNecessary:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3694.4.18/UIApplication.m:1706
    2017-09-25 16:29:51.850819-0400 **MYAPPNAME**[1646:582483] [general] Exception caught during decoding of received reply to message 'startRecordingWindowLayerContextIDs:windowSize:microphoneEnabled:cameraEnabled:broadcast:systemRecording:captureEnabled:listenerEndpoint:withHandler:', dropping incoming message and calling failure block.

    Exception: accessing _cachedSystemAnimationFence requires the main thread
     
    ina likes this.
  15. ivanbbartha

    ivanbbartha

    Joined:
    Sep 12, 2017
    Posts:
    3
    Hey behradMan

    Just wondering, are you trying to record with front camera on and mic?

    I cant even get basic functionality of capturing a video w/ game audio working....
     
  16. behrad

    behrad

    Joined:
    Nov 7, 2014
    Posts:
    3
    Nope. I'm just recording the screen with mic(which the user can deny). I can start recording but sometimes the stop recording handler is not called with the error I pasted above. I'm also using the built-in replay kit api unity provides and not a plugin.

    If anyone from Unity can take a look at the error, I'm pretty sure it should be a quick fix especially since Xcode highlights it as a warning in UnityReplayKit.mm file. Here is even the same error for another case:

    https://stackoverflow.com/questions...accessing-cachedsystemanimationfence-requires
     
  17. ibartha

    ibartha

    Joined:
    Oct 6, 2012
    Posts:
    7
    hey guys, i just purchased prime31 replayKit and it worked.
    we will hammer it tomorrow on a bunch of devices and will post the results

    best I
     
  18. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    65
    I tried with Prime31 too and get the same error message.
     
  19. behrad

    behrad

    Joined:
    Nov 7, 2014
    Posts:
    3
    Any update on this? I bought Prime31 and it had the same problem...
     
  20. ibartha

    ibartha

    Joined:
    Oct 6, 2012
    Posts:
    7
    nope,
    using Prime31 replayKit I get this error:
    2017-10-02 22:52:37.526478-0700 XXXX[395:54101] screenRecorderDidChangeAvailability. is available: YES
    -> applicationWillResignActive()
    -> applicationDidBecomeActive()
    2017-10-02 22:52:41.834835-0700 XXXX[395:54267] didStopRecordingWithError: Error Domain=com.apple.ReplayKit.RPRecordingErrorDomain Code=-5804 "Failed during recording" UserInfo={NSLocalizedDescription=Failed during recording}

    http://support.prime31.com/28859/replaykit-inconsistent-on-ios11?show=28914#c28914

     
  21. John1515

    John1515

    Joined:
    Nov 29, 2012
    Posts:
    249
    I have the same problem:
    ReplayKit.APIAvailable returns "true", and ReplayKit.StartRecording(); does show the permissions popup, but then nothing happens and ReplayKit.isRecording returns "false".
    It did work once, strangely enough.

    Could it be that the old recording should be deleted ( ReplayKit.Discard ()) before starting a new one?
     
  22. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Bump any news on this?

    Thanks!!
     
    John1515 likes this.
  23. pep_dj

    pep_dj

    Joined:
    Nov 7, 2014
    Posts:
    179
    ReplayKit is not working correctly on iOS11! After I call StopRecording, sometimes the recording is never available.
     
  24. richardzzzarnold

    richardzzzarnold

    Joined:
    Aug 2, 2012
    Posts:
    142
    Yes, Replay is NOT working. If someone at Unity could come up with a fix it would be much appreciated. I am using 2017.1.2p2.
    It seems to start recording....but nothing works after that...

    i am getting the following message:
    Exception: accessing _cachedSystemAnimationFence requires the main thread
     
    Last edited: Nov 3, 2017
    ina and Serhii-Horun like this.
  25. rdbdog

    rdbdog

    Joined:
    Feb 19, 2015
    Posts:
    4
    This definitely worked perfectly before 11. Is the new OS screen recorder function overriding this somehow? I'm not using prime31 but UItimate Mobile on Unity 5.6.3. The problem for me is pressing my in-game 'record' button but never getting the edit/share popup after stopping and calling it.
     
  26. JoMaHo

    JoMaHo

    Joined:
    Apr 2, 2017
    Posts:
    94
    Bump - any news on this issue?
     
  27. jariwake

    jariwake

    Joined:
    Jun 2, 2017
    Posts:
    100
    I just tried recording a video with ReplayKit and got

    [general] Exception caught during decoding of received reply to message 'startRecordingWindowLayerContextIDs:windowSize:microphoneEnabled:cameraEnabled:broadcast:systemRecording:captureEnabled:listenerEndpoint:withHandler:', dropping incoming message and calling failure block.

    So what is the status of this? Is there a way to solve this or do we have to wait for a new version of IOS/Unity?
     
    Serhii-Horun likes this.
  28. apaix

    apaix

    Joined:
    Aug 10, 2017
    Posts:
    21
  29. Anxo

    Anxo

    Joined:
    Jan 7, 2014
    Posts:
    13
    Hi so I tried implementing this solution but with no luck. I tested the example that came with the bridge and the example works. As a result, I believe that this problem everyone is having is related to using ARKit + Replay Kit = BAD.

    I have not found a solution yet.
     
    Last edited: Dec 15, 2017
  30. apaix

    apaix

    Joined:
    Aug 10, 2017
    Posts:
    21
    ARKit + ReplayKit works. Whatever you are trying to achieve may take some more iOS knowledge on your behalf.
     
  31. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    did you get front facing ARKit + ReplayKit to work?

    or just old world facing
     
  32. Trungdv

    Trungdv

    Joined:
    Dec 1, 2012
    Posts:
    22
    So is there no way to fix this bug yet?
     
  33. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
  34. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    Unity should probably just buy out Nat*
     
  35. Trungdv

    Trungdv

    Joined:
    Dec 1, 2012
    Posts:
    22
    Bump - any news on this issue?
     
  36. michaelcolin

    michaelcolin

    Joined:
    Jun 12, 2018
    Posts:
    9
  37. michaelcolin

    michaelcolin

    Joined:
    Jun 12, 2018
    Posts:
    9
    Has anyone noticed that the Unity replay kit video component in Xcode was deprecated with iOS 9? They are using this old component and it has problems.

    It does work, but the buttons are basically untappable on the iPhoneX ( see attachment ) All of the buttons are too close to the edges or in the notched area :/ -- not something you could ship to customers.

    Any ideas for workarounds?


    IMG_27734AA7D7A0-1.jpeg
     
  38. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    @michaelcolin, sorry to hear of your troubles. I can't speak for your particular problems, but natcorder has been fantastic for my purposes. Along with amazing support from the developer.
     
  39. kevinpaulharper_unity

    kevinpaulharper_unity

    Joined:
    Mar 8, 2018
    Posts:
    4
    I would not jump on Netcorder too quickly if you building for IOS. On iPhone X I have to go to a very low resolution to get it to work and even then it sometimes just does not work. It appears to be the better solution right now but its not ready for consumer facing products on the latest devices.
     
  40. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    Hi, just running into this issue. Is there no path to getting ReplayKit to work on 5.6.6?
     
  41. dhanrajsinh24

    dhanrajsinh24

    Joined:
    May 8, 2014
    Posts:
    59
    Hi forum people, I'm getting this problem for a week and could not found any solution. The problem is still there?
     
  42. vn_man

    vn_man

    Joined:
    Jun 7, 2017
    Posts:
    24
    use ReplayKit for live stream to Youtube still not working
     
  43. saimamughal24

    saimamughal24

    Joined:
    Dec 6, 2012
    Posts:
    3
    attempting to link with file built for iOS-arm64

    Undefined symbols for architecture armv7:

    "_NCMTLReadbackReadback", referenced from:

    _MTLReadback_MTLReadbackReadback_m66BABBC64FA43BE2D8A2D6FF36A778A95D916FAE in Assembly-CSharp.o

    _U3CU3Ec__DisplayClass2_0_U3CReadbackU3Eb__0_m93EA5EBACF6F051AE2B24D20099313E300D50E7C in Assembly-CSharp.o

    "_NCMTLReadbackCreate", referenced from:

    _MTLReadback_Readback_mC25CD34CEA32E12302DA6B2CA57D54CB546D2EB9 in Assembly-CSharp.o

    _MTLReadback_MTLReadbackCreate_mDBBD637AFC4F171D0B64DE3F082F11C2FC43F339 in Assembly-CSharp.o

    "_NCEncodeSamples", referenced from:

    _MediaRecorderBridge_EncodeSamples_mB7B02B4BEE53CF514F7C66B4E0CF659A572E01C0 in Assembly-CSharp.o

    _MediaRecorderiOS_CommitSamples_mAAC4711641ED1E0795BAB028E2363C6A4DC50B9C in Assembly-CSharp.o

    "_NCCreateHEVCRecorder", referenced from:

    _HEVCRecorder__ctor_mA0F492DAA8B5F6E8C1747929A8B09694DC49CDDD in Assembly-CSharp.o

    _MediaRecorderBridge_CreateHEVCRecorder_m4B5034CDC963777C8F10D5968A53B6D1C3A570F8 in Assembly-CSharp.o

    "_NCStopRecording", referenced from:

    _MediaRecorderBridge_StopRecording_mA4CFDBBD6CDFE7576B30729CC56B7B2A211E9C98 in Assembly-CSharp.o

    _MediaRecorderiOS_Dispose_m73BCCDE24383DF120D7252C9E369FDEDE416D46F in Assembly-CSharp.o

    "_NCEncodeFrame", referenced from:

    _MediaRecorderBridge_EncodeFrame_m11B197C0DB5AE78EAA9083FAA07DAD343698246D in Assembly-CSharp.o

    _MediaRecorderiOS_CommitFrame_m75B4141A18D5A05DF3F18C974252AF91C69947B2 in Assembly-CSharp.o

    "_NCCreateGIFRecorder", referenced from:

    _GIFRecorder__ctor_mDCADA7399C36E4B0975DD287AA8DBE690C10E0D7 in Assembly-CSharp.o

    _MediaRecorderBridge_CreateGIFRecorder_mE94056AC35C676F2D148BEBFDF8CD61B45B31534 in Assembly-CSharp.o

    "_NCStartRecording", referenced from:

    _MediaRecorderBridge_StartRecording_m1647875A066BCDC5F09CB79D1E2BA01F3197E32D in Assembly-CSharp.o

    "_NCMTLReadbackDispose", referenced from:

    _MTLReadback_Readback_mC25CD34CEA32E12302DA6B2CA57D54CB546D2EB9 in Assembly-CSharp.o

    _MTLReadback_MTLReadbackDispose_m1CA835B6DE78547103996F23916DB76E9F409F2C in Assembly-CSharp.o

    _MTLReadback_U3CDisposeU3Eb__1_0_m67DADD0268017EF4E4DF77CD17C7B2C5085ED72A in Assembly-CSharp.o

    "_NCCreateMP4Recorder", referenced from:

    _MP4Recorder__ctor_mE201ABB17345BDED7E9D0C1C8164FB2BEA69DED4 in Assembly-CSharp.o

    _MediaRecorderBridge_CreateMP4Recorder_m4985D3875286E1B4C0CBB01AA71F012A44636829 in Assembly-CSharp.o

    ld: symbol(s) not found for architecture armv7

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

    ================
    Unity version 2019.2.17f1 . ---> on mac os xcode version -> Version 11.0 (11A420a) .
    after saving video unity crash and video launched .
    the main issue is above log when create a build on xcode (archive). build working fine when i directly run on device via xcode but cant create build . whyy ?
     
  44. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,967
    Hi,
    Incase if any one is interested, we have Cross Platform Replay Kit on asset store where we have our own custom implementation. This avoids microphone issues and many other issues you see in native replay kit framework for iOS.

    Along with it, plugin offers screen recording on Android platform too with same unified api!

    Cheers,
    VB Team