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]: error build Framework not found OneSignalCore #1447

Closed
2 of 3 tasks
kingkongqn4444 opened this issue Nov 7, 2022 · 5 comments
Closed
2 of 3 tasks

[Bug]: error build Framework not found OneSignalCore #1447

kingkongqn4444 opened this issue Nov 7, 2022 · 5 comments

Comments

@kingkongqn4444
Copy link

kingkongqn4444 commented Nov 7, 2022

What happened?

I facing an error when build the release simulator, this work perfectly on debug simulator and release on devices, please help me

Screen Shot 2022-11-07 at 10 04 06

Pod config

Screen Shot 2022-11-07 at 10 04 33

System:
OS: macOS 12.6
CPU: (8) arm64 Apple M1
Memory: 88.44 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.11.0 - /var/folders/_r/f61rgp5d21j19bjgt31xk4w00000gn/T/yarn--1667790071449-0.9577995649944078/node
Yarn: 1.22.19 - /var/folders/_r/f61rgp5d21j19bjgt31xk4w00000gn/T/yarn--1667790071449-0.9577995649944078/yarn
npm: 8.19.2 - /opt/homebrew/bin/npm
Watchman: 2022.10.24.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.0/14A309 - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /usr/bin/javac
Python: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.63.4 => 0.63.4
react-native-onesignal => 4.0.6,

Steps to reproduce?

1. install react-native-onesignal
2. read the document and integrate step by step in the office page
3. open xcode change variant debug to release and build project
4. xcode thought this error "Framework not found OneSignalCore"

What did you expect to happen?

Can build release on simulator

React Native OneSignal SDK version

4.0.6

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

error build: Framework not found OneSignalCore

Code of Conduct

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

emawby commented Nov 8, 2022

@kingkongqn4444 I will attempt to reproduce this issue, but I did notice that you are using both OneSignal and OneSignalXCFramework in your podfile which is unnecessary. I recommend just using the OneSignalXCFramework pod

@BautizarCodigo
Copy link

I have a similar issue

dyld[36319]: Library not loaded: @rpath/OneSignalCore.framework/OneSignalCore

The app crashes on launch on a physical device and on an emulator.

@Rueff19
Copy link

Rueff19 commented Apr 3, 2023

+1

The app was building successfully on an intel Macbook but on an M2 mac this issue appears when building the app.

I have already added "arm64" on the "Excluded Architectures" section but with no result.

Any suggestions?

@BautizarCodigo
Copy link

I was able to resolve it.

Ensure you have the latest version of OneSignal SDK: Check the official OneSignal repository (https://github.com/OneSignal/OneSignal-iOS-SDK) and make sure you are using the latest version of the SDK.

Check your project's build settings:
a. Open your project in Xcode.
b. Select your project in the Project Navigator.
c. Go to the "Build Settings" tab.
d. Search for "Framework Search Paths" and make sure the path to the OneSignalCore.framework is included.

Verify the framework is added to the "Link Binary With Libraries" build phase:
a. Select your project in the Project Navigator.
b. Choose your target.
c. Go to the "Build Phases" tab.
d. Expand the "Link Binary With Libraries" section.
e. Check that OneSignalCore.framework is listed. If not, click the "+" button and add it.

Ensure the framework is embedded in your project:
a. Select your project in the Project Navigator.
b. Choose your target.
c. Go to the "General" tab.
d. Scroll down to the "Frameworks, Libraries, and Embedded Content" section.
e. Check that OneSignalCore.framework is listed with "Embed & Sign" selected in the dropdown menu. If not, click the "+" button, add the framework, and set it to "Embed & Sign".

Clean and rebuild your project:
a. In Xcode, go to "Product" > "Clean Build Folder" or press Shift + Command + K.
b. After cleaning, rebuild your project by pressing Command + B or going to "Product" > "Build".

@jennantilla
Copy link
Contributor

Thank you @BautizarCodigo for your detailed steps to resolve the issue! Since this issue has not seen some action for some time, I'm going to close it as stale. If there are still any issues please @ mention me and we will be happy to give this some fresh eyes!

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

No branches or pull requests

5 participants