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

[Bug]: XCode 14.1 ld: library not found for -lPods-OneSignalNotificationServiceExtension #1451

Open
2 of 3 tasks
hendrytb opened this issue Nov 16, 2022 · 18 comments
Open
2 of 3 tasks

Comments

@hendrytb
Copy link

hendrytb commented Nov 16, 2022

What happened?

Environment:

  • React Native: 0.63.4
  • XCode: 14.1
  • React Native Onesignal: 4.4.1

I'm trying to run my application on the simulator, directly from XCode, but it keeps error, saying "ld: library not found for -lPods-OneSignalNotificationServiceExtension", it was running well without error in my old XCode (13.4.1).

But if I'm using "yarn ios" from Terminal, there is no error.

I've already installed the latest React Native Onesignal library, and run pod deintegrate & pod install, and also run "Clean Build Folder" in the XCode, but the issue is still the same.

Screen Shot 2022-11-16 at 12 23 18

Screen Shot 2022-11-16 at 12 22 01

Screen Shot 2022-11-16 at 12 21 42

Steps to reproduce?

1. Install XCode 14.1
2. Run the application on the simulator, directly from XCode 14.1

What did you expect to happen?

The App should be running well without error in XCode 14.1 using direct Run inside the XCode

React Native OneSignal SDK version

4.4.1

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

ld: library not found for -lPods-OneSignalNotificationServiceExtension

Code of Conduct

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

same here, facing this issue

@haletosun3
Copy link

same issue

@dewey4iv
Copy link

dewey4iv commented Jan 5, 2023

Also running into this issue.

@pbroeker
Copy link

Same here, waiting for a solution

@dewey4iv
Copy link

Hey folks -- I have a call with their support next Tuesday (2023-01-17). I'll share any details or solutions we come up with. But so far I've gotten a "works on my machine" kind of response followed by the request for the call.

@nan-li
Copy link
Contributor

nan-li commented Jan 13, 2023

Hi everyone, I apologize for the delayed response on this repository.

We have heard reports of issues after users update Xcode to 14.1, and this might be the same issue.

There are some things to check.

  • Make sure you are using Cocoapods 1.11.3 and try the below code after update. We have seen this issue when using versions lower than 1.11.3.
  • Also, make sure you are using ruby 2.7.5+. We believe Cocoapods 1.11.3 has an FFI dependency that requires a higher ruby version than what you may be using.
rm Podfile.lock
pod cache clean --all
pod install --repo-update

@dewey4iv
Copy link

dewey4iv commented Jan 13, 2023

@nan-li -- thank you for reaching out. It's appreciated.

Confirming that this didn't resolve the issue for us. We are still seeing the same thing (also included a cleaning of the build folder and removing of xcode derived assets).

Ruby: v3.1.2p20
Xcode: 14.2 (14C18)
Cocoapods: 1.11.3

Additionally, we are running on Apple M1s -- I mention this because we are running the [arm64-darwin22] version of Ruby.

We did see libwebp upgrade 1.2.3 -> 1.2.4. Is this the upgrade we should have seen?

Let me know if there are any further details that might be useful.

@nan-li
Copy link
Contributor

nan-li commented Jan 17, 2023

Apologies, the issue I was referring to earlier looked almost similar. However, in that scenario, the app successfully builds but crashes as the app is starting up. This is a different build issue.

Issues like this one with CocoaPods can be a number of different things, and it is difficult to reproduce and pinpoint the issue without being able to run the project ourselves. @dewey4iv I know you are also conversing with our support team and have a call coming up, so sorry there may be repeats of information here. If you are able to, you can send this project to our support team and we can take a look that way as well.

I also recall hearing some issues reported with M1 macs that sound like this one.

@dewey4iv
Copy link

dewey4iv commented Jan 18, 2023

hey @nan-li -- thanks for reaching out. And thanks for jumping on the support call.

@hendrytb @SafdarSikander @pbroeker -- (Forgive me for @'ing you all directly -- I figured you would want to know about a solution ASAP). I was able to get it to compile by making two very small changes that can be found here: OneSignal/OneSignal-Flutter-SDK#383 (comment)

I will also note that I'm on an Apple M1 chip -- your mileage on this may vary.

@macielrsf
Copy link

macielrsf commented Mar 7, 2023

Same here.

Xcode 14.2, React Native 0.71.2, OneSignal 4.5.0

@Chayuan
Copy link

Chayuan commented Mar 20, 2023

Hello, any updates on this issue?

We started having this very same issue when we stopped using Xcode with Rosetta.

@GleidsonDaniel
Copy link

Same happening here

@nan-li
Copy link
Contributor

nan-li commented Jun 8, 2023

Hi @GleidsonDaniel @Chayuan @macielrsf,
Thanks for reporting,
Did you try all the suggestions mentioned above, particularly:

Hi everyone, I apologize for the delayed response on this repository.

We have heard reports of issues after users update Xcode to 14.1, and this might be the same issue.

There are some things to check.

  • Make sure you are using Cocoapods 1.11.3 and try the below code after update. We have seen this issue when using versions lower than 1.11.3.
  • Also, make sure you are using ruby 2.7.5+. We believe Cocoapods 1.11.3 has an FFI dependency that requires a higher ruby version than what you may be using.
rm Podfile.lock
pod cache clean --all
pod install --repo-update

and

hey @nan-li -- thanks for reaching out. And thanks for jumping on the support call.
...-- I figured you would want to know about a solution ASAP). I was able to get it to compile by making two very small changes that can be found here: OneSignal/OneSignal-Flutter-SDK#383 (comment)

I will also note that I'm on an Apple M1 chip -- your mileage on this may vary.

@ozberkctn
Copy link

same here

@sridharsaminathn
Copy link

Any updates ? same Issue here

@sridharsaminathn
Copy link

Open your .xcworkspace in Xcode and Make this settings.

Screenshot 2023-07-25 at 8 27 54 PM

@Artem-Pavlenko
Copy link

same with RN 0.65

@RucnikCZ
Copy link

RucnikCZ commented Nov 13, 2023

Hello for me resolution was to remove arm64 architecture.

"react-native": "0.72.6"
"react-native-onesignal": "^4.5.2",

ruby '3.1.4'
gem 'cocoapods',  '~> 1.14.2'

BUNDLED WITH
   2.4.21

CleanShot 2023-11-13 at 10 02 24

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