OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.56k stars 373 forks source link

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

Open hendrytb opened 1 year ago

hendrytb commented 1 year ago

What happened?

Environment:

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?

Relevant log output

ld: library not found for -lPods-OneSignalNotificationServiceExtension

Code of Conduct

SafdarSikander commented 1 year ago

same here, facing this issue

haletosun3 commented 1 year ago

same issue

dewey4iv commented 1 year ago

Also running into this issue.

pbroeker commented 1 year ago

Same here, waiting for a solution

dewey4iv commented 1 year ago

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 commented 1 year ago

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.

rm Podfile.lock
pod cache clean --all
pod install --repo-update
dewey4iv commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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: https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/383#issuecomment-1255636193

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

macielrsf commented 1 year ago

Same here.

Xcode 14.2, React Native 0.71.2, OneSignal 4.5.0

Chayuan commented 1 year ago

Hello, any updates on this issue?

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

GleidsonDaniel commented 1 year ago

Same happening here

nan-li commented 1 year ago

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 commented 1 year ago

same here

sridharsaminathn commented 1 year ago

Any updates ? same Issue here

sridharsaminathn commented 1 year ago

Open your .xcworkspace in Xcode and Make this settings.

Screenshot 2023-07-25 at 8 27 54 PM
Artem-Pavlenko commented 11 months ago

same with RN 0.65

RucnikCZ commented 9 months ago

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