Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dyld[7510]: Library not loaded: @rpath/OneSignalInAppMessages.framework/OneSignalInAppMessages Error on App Launch when running in Real Device. Simulator it's working fine #1594

Closed
2 of 3 tasks
pankajnegi1893 opened this issue Oct 27, 2023 · 3 comments

Comments

@pankajnegi1893
Copy link

pankajnegi1893 commented Oct 27, 2023

What happened?

I am using latest version of the SDK. But getting below issue in iPhone Device. but working fine in iOS Simulator:

dyld[7510]: Library not loaded: @rpath/OneSignalInAppMessages.framework/OneSignalInAppMessages
  Referenced from: <2C346952-C25D-3A51-BF35-3870ED1EC2BF> /private/var/containers/Bundle/Application/C084B74F-1DE6-4A73-8F3F-256B9A68B85A/Heyo Development.app/Heyo Development

  Reason: tried: '/usr/lib/swift/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file), 
'/private/var/containers/Bundle/Application/C084B74F-1DE6-4A73-8F3F-256B9A68B85A/Heyo Development.app/Frameworks/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file), 

'/private/var/containers/Bundle/Application/C084B74F-1DE6-4A73-8F3F-256B9A68B85A/Heyo Development.app/Frameworks/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file), 

'/usr/lib/swift/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file, not in dyld cache), 

'/private/preboot/Cryptexes/OS/usr/lib/swift/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file), 

'/private/var/containers/Bundle/Application/C084B74F-1DE6-4A73-8F3F-256B9A68B85A/Heyo Development.app/Frameworks/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file), 

'/private/var/containers/Bundle/Application/C084B74F-1DE6-4A73-8F3F-256B9A68B85A/Heyo Development.app/Frameworks/OneSignalInAppMessages.framework/OneSignalInAppMessages' (no such file)

package.json

"react-native-onesignal": "^5.0.2",

Xcode Version : 15.0

Framework,Libraries and Embedded Content :
Screenshot 2023-10-27 at 19 00 40

Podfile

target 'MyApp' do

  config = use_native_modules!
   ........
  target 'OneSignalNotificationServiceExtension' do
    pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
  end
   ............
end

Steps to reproduce?

1. Install latest version 5.0.2
2. Do pod install
3. Launch the app on iOS device

What did you expect to happen?

App should launch correctly like this working in iOS Simulator.

React Native OneSignal SDK version

5.0.2

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jennantilla
Copy link
Contributor

Hi @pankajnegi1893 thank you for your patience. Is this still an issue for you? If so, are you able to update to the latest release and let us know if the behavior is the same?

Thanks!

@pankajnegi1893
Copy link
Author

To fix above issue I have tried below steps

  1. Removed OneSignalNotificationServiceExtension Completed from Xcode project.

  2. cd ios && pod install

  3. Now follow React Native SDK Setup

  4. Because we are added few script like Setup Firebase Environment GoogleService-Info.plist and [CP-User] [RNFB] Crashlytics Configuration. Beacause of these script are running first after that it checking OneSignalInAppMessages.xcframework. So we have to move "Embed Foundation extension" before "Compile sources".

73efff22-c103-4edb-953e-831fe7a8c33d
  1. Some other key points

Add OneSignalInAppMessages.xcframework into Frameworks,Libraries and Embedded Content

f8de7028-eb22-4138-9d59-d938e7b24fc8
  1. In Pod file include this in bottom
 target 'OneSignalNotificationServiceExtension' do
    pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
  end

@jennantilla
Copy link
Contributor

Hello @pankajnegi1893 apologies for the delay in getting back to you. I'm unsure from your previous response if this is still an issue for you or if those steps resolved your problem? Thanks for the udpate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants