react-native-unity icon indicating copy to clipboard operation
react-native-unity copied to clipboard

dyld: Library not loaded

Open daniel-keen opened this issue 3 years ago • 4 comments

We use agora video call unity plugin, that gets built into the following framework files: image These frameworks are included in the “Build Phases - Link Binary with Libraries” section.

Build gets compiled successfully. However when launched it gives us the following error:

dyld[75718]: Library not loaded: '@rpath/AgoraSoundTouch.framework/AgoraSoundTouch'
  Referenced from: '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework'
Reason: tried: '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/UnityFramework.framework/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
'/usr/lib/swift/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/usr/lib/swift/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file), 
'/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/usr/lib/swift/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/usr/lib/swift/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/System/Library/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file)
Library not loaded: '@rpath/AgoraSoundTouch.framework/AgoraSoundTouch'
  Referenced from: '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework'
  Reason: tried: '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/UnityFramework.framework/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file), '/usr/lib/swift/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/usr/lib/swift/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' (no such file),
 '/private/var/containers/Bundle/Application/31AAF2E4-A539-4D64-85CB-FFEC5586C98B/MyApp.app/Frameworks/Ag

daniel-keen avatar Sep 13 '22 16:09 daniel-keen

Solution found: you need to make a unity reference inside of your xcode workspace and make all agora framework usages to be marked as "optional" in the Build Settings.

daniel-keen avatar Oct 03 '22 14:10 daniel-keen

@daniel-keen I was getting the same error. After marked as optional ,It is building successful but its showing me another error "Thread 1: signal SIGABRT" at reinterrpret_cast in CreateIris function. Can you please share any possible solution. Thankyou

mariaInvozone avatar Mar 30 '23 11:03 mariaInvozone

@azesmway I'm facing exactly same issue while integrating agora unity plugin. I have tried searching for solutions online but haven't found anything that has worked for me. After marking agora framework as optional , Now I am getting this error "Thread 1: signal SIGABRT" at reinterrpret_cast in CreateIris function. I would appreciate it if you could check this issue.

mariaInvozone avatar Mar 31 '23 10:03 mariaInvozone

i use wikitude as a plugin and do this


package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
  s.name         = "react-native-unity"
  s.version      = package["version"]
  s.summary      = package["description"]
  s.homepage     = package["homepage"]
  s.license      = package["license"]
  s.authors      = package["author"]

  s.platforms    = { :ios => "12.0" }
  s.source       = { :git => "https://github.com/azesmway/react-native-unity.git", :tag => "#{s.version}" }

  s.source_files = "ios/**/*.{h,m,mm}"

  s.dependency "React-Core"
  s.vendored_frameworks = ["ios/UnityFramework.framework", "ios/WikitudeSDK.framework"]
end

azesmway avatar Mar 31 '23 10:03 azesmway