Search Unity

Video Can't build on XCode using UMP Pro

Discussion in 'Audio & Video' started by visionnaireMedia, Oct 7, 2020.

  1. visionnaireMedia

    visionnaireMedia

    Joined:
    Jul 25, 2016
    Posts:
    17
    I'm using this plugin https://assetstore.unity.com/packages/tools/video/ump-pro-android-ios-83283 to stream through RTMP or HLS on the app.
    Everything works fine on Android, but when I try to build on iOS XCode gives an error:
    Code (csharp):
    1. Undefined symbols for architecture arm64:
    2.   "_inflate", referenced from:
    3.       _http_read_stream in PlayerFFmpeg(http.o)
    4.       _rtmp_open in PlayerFFmpeg(rtmpproto.o)
    5.      (maybe you meant: _unity_z_inflate_copyright, _unity_z_inflateUndermine , _unity_z_inflateCopy , _unity_z_inflateGetHeader , _unity_z_inflateSetDictionary , _unity_z_inflateGetDictionary , _unity_z_inflatePrime , _il2cpp_z_inflate_copyright , _il2cpp_class_is_inflated , _unity_z_inflate_fast , _z_inflateInit_ , _unity_z_inflateBackEnd , _unity_z_inflate_table , _unity_z_inflateBack , _il2cpp_z_inflateValidate , _il2cpp_z_inflateSync , _il2cpp_z_inflateReset2 , _il2cpp_z_inflateReset , _il2cpp_z_inflateResetKeep , _unity_z_inflateMark , _unity_z_inflateValidate , _il2cpp_z_inflateEnd , _unity_z_inflateSync , _unity_z_inflateReset2 , _png_zlib_inflate , _unity_z_inflateEnd , _unity_z_inflateReset , _il2cpp_method_is_inflated , il2cpp_codegen_inflate_generic_class(Il2CppClass*, Il2CppGenericInst const*) , _il2cpp_z_inflateMark , _il2cpp_z_inflateInit2_ , _unity_z_inflateResetKeep , scripting_class_is_inflated(ScriptingClassPtr) , _il2cpp_z_inflate , _il2cpp_z_inflateGetDictionary , _il2cpp_z_inflateCodesUsed , _il2cpp_z_inflateUndermine , _il2cpp_z_inflateGetHeader , _il2cpp_z_inflate_table , _il2cpp_z_inflate_fast , _z_inflateInit2_ , _il2cpp_z_inflatePrime , _unity_z_inflateBackInit_ , _unity_z_inflateSyncPoint , _il2cpp_z_inflateInit_ , _unity_z_inflateCodesUsed , _il2cpp_z_inflateSetDictionary , _il2cpp_z_inflateCopy , _unity_z_inflate , _il2cpp_z_inflateSyncPoint )
    6.   "_inflateInit_", referenced from:
    7.       _rtmp_open in PlayerFFmpeg(rtmpproto.o)
    8.      (maybe you meant: _z_inflateInit_, _il2cpp_z_inflateInit_ )
    9.   "_inflateInit2_", referenced from:
    10.       _http_read_header in PlayerFFmpeg(http.o)
    11.      (maybe you meant: _il2cpp_z_inflateInit2_, _z_inflateInit2_ )
    12.   "_zlibCompileFlags", referenced from:
    13.       _http_read_header in PlayerFFmpeg(http.o)
    14.      (maybe you meant: _unity_z_zlibCompileFlags, _il2cpp_z_zlibCompileFlags )
    15.   "_inflateEnd", referenced from:
    16.       _http_close in PlayerFFmpeg(http.o)
    17.       _http_read_header in PlayerFFmpeg(http.o)
    18.       _rtmp_open in PlayerFFmpeg(rtmpproto.o)
    19.      (maybe you meant: _il2cpp_z_inflateEnd, _unity_z_inflateEnd )
    20.   "_uncompress", referenced from:
    21.       _id3v2_read_internal in PlayerFFmpeg(id3v2.o)
    22.       _mov_read_cmov in PlayerFFmpeg(mov.o)
    23.      (maybe you meant: _UNITY_LZ4_uncompress, _unity_z_uncompress2 , _ssl3_do_uncompress , _unity_z_uncompress , _UNITY_LZ4_uncompress_unknownOutputSize )
    24. ld: symbol(s) not found for architecture arm64
    25. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    The plugin publisher won't answer any email and the plugin is a bit outdated, but still does its job for streaming.
    It just can't build.
    The setting I have are:
    - both Native and FFmpeg players
    - using only FFmpeg
    - Unity 2020.1.3
    - XCode latest version (12.0.1)

    Has anyone else had this issue? It looks like some lib is missing, but I put everyone that should be needed in Build Phases>Link with binary libraries: https://imgur.com/gallery/1RucCO8
     
  2. DovitItalia

    DovitItalia

    Joined:
    Mar 23, 2020
    Posts:
    50
    I was going to buy that plugin but your post stopped me, have you solved / received an answer from the author?
    I will use the plugin to do exactly what you said on this post so it will be sad to spend money on something that wont work. Thanks
     
  3. DovitItalia

    DovitItalia

    Joined:
    Mar 23, 2020
    Posts:
    50
    I bought the plugin and found the solution to that issue. In case you are still facing it i write here the solution:

    you need to edit this file: UniversalMediaPlayer/editor/UmpPostBuilds.cs

    on row 55, instead of the instruction

    Code (CSharp):
    1. var target = pbxProject.TargetGuidByName("Unity-iPhone");
    put this:

    Code (CSharp):
    1. #if UNITY_2019_3_OR_NEWER
    2.         var target = pbxProject.GetUnityFrameworkTargetGuid();
    3. #else
    4.         var target = pbxProject.TargetGuidByName( PBXProject.GetUnityTargetName() );
    5. #endif
    as TargetGuiByName is deprecated, unity stopped the next instruction there and failed to add all the correct libs in the final build, you could have solved by adding all the libs manually in all the targets from xcode, but this is a much cleaner solution
     
    airespt and visionnaireMedia like this.
  4. visionnaireMedia

    visionnaireMedia

    Joined:
    Jul 25, 2016
    Posts:
    17
    Thank you very much!
     
  5. Felipe-Brito

    Felipe-Brito

    Joined:
    May 23, 2013
    Posts:
    5