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

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

Open hendrytb opened this issue 2 years ago • 18 comments

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?

  • [X] iOS
  • [ ] Android

Relevant log output

ld: library not found for -lPods-OneSignalNotificationServiceExtension

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

hendrytb avatar Nov 16 '22 05:11 hendrytb

same here, facing this issue

SafdarSikander avatar Dec 08 '22 23:12 SafdarSikander

same issue

haletosun3 avatar Dec 19 '22 08:12 haletosun3

Also running into this issue.

dewey4iv avatar Jan 05 '23 19:01 dewey4iv

Same here, waiting for a solution

pbroeker avatar Jan 12 '23 16:01 pbroeker

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.

dewey4iv avatar Jan 13 '23 01:01 dewey4iv

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

nan-li avatar Jan 13 '23 02:01 nan-li

@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.

dewey4iv avatar Jan 13 '23 19:01 dewey4iv

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.

nan-li avatar Jan 17 '23 21:01 nan-li

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.

dewey4iv avatar Jan 18 '23 02:01 dewey4iv

Same here.

Xcode 14.2, React Native 0.71.2, OneSignal 4.5.0

macielrsf avatar Mar 07 '23 19:03 macielrsf

Hello, any updates on this issue?

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

Chayuan avatar Mar 20 '23 15:03 Chayuan

Same happening here

dnlsilva avatar Jun 08 '23 00:06 dnlsilva

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.

nan-li avatar Jun 08 '23 20:06 nan-li

same here

ozberkctn avatar Jun 18 '23 12:06 ozberkctn

Any updates ? same Issue here

sridharsaminathn avatar Jul 25 '23 14:07 sridharsaminathn

Open your .xcworkspace in Xcode and Make this settings.

Screenshot 2023-07-25 at 8 27 54 PM

sridharsaminathn avatar Jul 25 '23 14:07 sridharsaminathn

same with RN 0.65

Artem-Pavlenko avatar Sep 22 '23 10:09 Artem-Pavlenko

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

RucnikCZ avatar Nov 13 '23 09:11 RucnikCZ