Can't build on XCode using UMP Pro

I’m using this plugin UMP Pro (Android, iOS) | Video | Unity Asset Store 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:

Undefined symbols for architecture arm64:
  "_inflate", referenced from:
      _http_read_stream in PlayerFFmpeg(http.o)
      _rtmp_open in PlayerFFmpeg(rtmpproto.o)
     (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 )
  "_inflateInit_", referenced from:
      _rtmp_open in PlayerFFmpeg(rtmpproto.o)
     (maybe you meant: _z_inflateInit_, _il2cpp_z_inflateInit_ )
  "_inflateInit2_", referenced from:
      _http_read_header in PlayerFFmpeg(http.o)
     (maybe you meant: _il2cpp_z_inflateInit2_, _z_inflateInit2_ )
  "_zlibCompileFlags", referenced from:
      _http_read_header in PlayerFFmpeg(http.o)
     (maybe you meant: _unity_z_zlibCompileFlags, _il2cpp_z_zlibCompileFlags )
  "_inflateEnd", referenced from:
      _http_close in PlayerFFmpeg(http.o)
      _http_read_header in PlayerFFmpeg(http.o)
      _rtmp_open in PlayerFFmpeg(rtmpproto.o)
     (maybe you meant: _il2cpp_z_inflateEnd, _unity_z_inflateEnd )
  "_uncompress", referenced from:
      _id3v2_read_internal in PlayerFFmpeg(id3v2.o)
      _mov_read_cmov in PlayerFFmpeg(mov.o)
     (maybe you meant: _UNITY_LZ4_uncompress, _unity_z_uncompress2 , _ssl3_do_uncompress , _unity_z_uncompress , _UNITY_LZ4_uncompress_unknownOutputSize )
ld: symbol(s) not found for architecture arm64
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: Linked libraries - Album on Imgur

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

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

var target = pbxProject.TargetGuidByName("Unity-iPhone");

put this:

#if UNITY_2019_3_OR_NEWER
        var target = pbxProject.GetUnityFrameworkTargetGuid();
#else
        var target = pbxProject.TargetGuidByName( PBXProject.GetUnityTargetName() );
#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

2 Likes

Thank you very much!

Thank you @DovitItalia