简体   繁体   English

dyld:库未加载:@rpath/OneSignal.framework/OneSignal

[英]dyld: Library not loaded: @rpath/OneSignal.framework/OneSignal

Trying to integrate one signal in my react native app.试图在我的本机应用程序中集成one signal

I followed all the instructions mentioned in the docshttps://documentation.onesignal.com/docs/react-native-sdk-setup .我遵循了文档https://documentation.onesignal.com/docs/react-native-sdk-setup 中提到的所有说明。

The build for the app gets succeeded but I get an error while attaching the app to the device.应用程序的构建成功,但在将应用程序附加到设备时出现错误。

Xcode opens a thread with a title dyld__abort_with_payload . Xcode 打开一个标题为dyld__abort_with_payload的线程。

Here's the image of it.这是它的图像。 在此处输入图片说明

And when I look into the errors.当我查看错误时。 The Errors look like this.错误看起来像这样。

dyld: Library not loaded: @rpath/OneSignal.framework/OneSignal
  Referenced from: /Users/sakshyaarora/Library/Developer/CoreSimulator/Devices/357B8E50-B8A6-4F9D-AE06-40DD8004351E/data/Containers/Bundle/Application/242BEDF6-76CD-4516-BF58-C86C43F6C4D4/Test.app/Test
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/sakshyaarora/Library/Developer/CoreSimulator/Caches/dyld/20F71/com.apple.CoreSimulator.SimRuntime.iOS-14-5.18E182
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_LIBRARY_PATH=/Users/sakshyaarora/Library/Developer/Xcode/DerivedData/Test-djshtsdmeowdbaebqzmujevyppyj/Build/Products/Debug-iphonesimulator:/Users/sakshyaarora/Sites/projects/Test/Builds/iOS/build/Debug/-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applica

It's been hours since I am trying this out.自从我尝试这个以来已经有几个小时了。 Any help would be appreciated.任何帮助,将不胜感激。

Thanks in advance.提前致谢。 :) :)

The solution I got is really very weird and it just came out while trying and was able to resolve this issue for me.我得到的解决方案真的很奇怪,它只是在尝试时出现并且能够为我解决这个问题。 So if anyone here is getting the same error can try this.所以如果这里有人遇到同样的错误,可以试试这个。

Steps脚步

Open Xcode -> Select your app in the Targets -> Go to General Tab -> Frameworks, Libraries and Embedded Content .打开 Xcode ->在 Targets 中选择您的应用程序-> Go to General Tab -> Frameworks, Libraries and Embedded Content

Click on + .点击+ Search for OneSignal in it and add OneSignal.xcframework .在其中搜索OneSignal并添加OneSignal.xcframework

在此处输入图片说明

Here comes the weird part.奇怪的部分来了。

After OneSignal.xcframework is added.添加OneSignal.xcframework后。 Just remove this OneSignal.xcframework by selecting and clicking - .只需通过选择并单击-来删除此OneSignal.xcframework

Now just build your app again.现在只需再次构建您的应用程序。 Your app should run now.您的应用现在应该可以运行了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM