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

ld: library not found for -lPods-OneSignalNotificationServiceExtension #1369

Closed
sickssickssicks opened this issue Mar 9, 2022 · 8 comments
Closed

Comments

@sickssickssicks
Copy link

sickssickssicks commented Mar 9, 2022

Description:

Unable to run/build react native project since adding one signal as a dependency.
Same configuration works for my colleague, I even tried to copy his ios folder
Tried with xcode, tried via react native, nothing gives
Followed all steps in setup guide

Reinstalled pods, packages, node, xcode, npm, nothing works

Crashes on step "Link OneSignalNotificationServiceExtension" (arm64)

Environment

M1 Mac
react-native-onesignal": "^4.3.4",
XCode 13.2.1 (13C100)

Steps to Reproduce Issue:

cannot provide

Anything else:

Full crash log from xcode

Ld /Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Products/Release-iphonesimulator/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension normal (in target 'OneSignalNotificationServiceExtension' from project 'PinginSpace')
cd /Users/mac/dev/pingin-app/ios
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios10.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -L/Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Products/Release-iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator -F/Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Products/Release-iphonesimulator -F/Users/mac/dev/pingin-app/ios/Pods/OneSignalXCFramework/iOS_SDK/OneSignalSDK/OneSignal_XCFramework -F/Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Products/Release-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework -filelist /Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Intermediates.noindex/PinginSpace.build/Release-iphonesimulator/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Intermediates.noindex/PinginSpace.build/Release-iphonesimulator/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fapplication-extension -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Intermediates.noindex/PinginSpace.build/Release-iphonesimulator/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension.swiftmodule -ObjC -framework OneSignal -e _NSExtensionMain -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Intermediates.noindex/PinginSpace.build/Release-iphonesimulator/OneSignalNotificationServiceExtension.build/OneSignalNotificationServiceExtension.appex-Simulated.xcent -lPods-OneSignalNotificationServiceExtension -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Intermediates.noindex/PinginSpace.build/Release-iphonesimulator/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension_dependency_info.dat -o /Users/mac/Library/Developer/Xcode/DerivedData/PinginSpace-gqubvlxbuxnyxcdagldclpjybagi/Build/Products/Release-iphonesimulator/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension

ld: library not found for -lPods-OneSignalNotificationServiceExtension
clang: error: linker command failed with exit code 1 (use -v to see invocation)

2022-03-09_15-55-56 (22)

@nan-li
Copy link
Contributor

nan-li commented Mar 11, 2022

Hi @soblinskas,

Can you check your Deployment Target following this comment? #838 (comment).

Confirm that the ios version in Deployment Info of your project target, OneSignalNotificationService, and podfile is the same.

@sickssickssicks
Copy link
Author

Hi @soblinskas,

Can you check your Deployment Target following this comment? #838 (comment).

Confirm that the ios version in Deployment Info of your project target, OneSignalNotificationService, and podfile is the same.

did that, no change

@wmarsey
Copy link

wmarsey commented Apr 12, 2022

Getting this same problem and its hindering development. Deployment targets are all correct. Did anyone here work out a fix?

@KestasVenslauskas
Copy link

KestasVenslauskas commented May 20, 2022

Same problem here after trying to setup project on M1 mac, any update on this?
If I open xcode using Rosetta it builds fine.

@KestasVenslauskas
Copy link

So I got past by this issue by updating Framework search paths with new entry:
"${PODS_ROOT}/OneSignalXCFramework/iOS_SDK/OneSignalSDK/OneSignal_XCFramework"

Same for Library search paths.

But the main issue was to remove everything under "Excluded Architectures" I had "arm64" excluded which is saying to not build for M1

@KestasVenslauskas
Copy link

Another thing that helped is to have arm64 exluded on all project targets and also pods project (which I forgot about).

@znanick
Copy link

znanick commented Jun 3, 2022

+1
Mac M1

@rgomezp
Copy link
Contributor

rgomezp commented Jun 3, 2022

Duplicate of #1260

@rgomezp rgomezp marked this as a duplicate of #1260 Jun 3, 2022
@rgomezp rgomezp closed this as completed Jun 3, 2022
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

6 participants