Closed peterpaulis closed 3 weeks ago
my pod
platform :ios, '13.0'
inhibit_all_warnings!
def app_pods
use_frameworks!
# SDKs
pod 'OneSignalXCFramework'
....
Hello thank you for reaching out. We have seen this error in some of our wrapper SDKs maybe those threads will help.
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
The same issue when run project from xcode:
Out project is based on cordova with onesignal-cordova-plugin 3.3.0 :
+ ionic info
Ionic:
Ionic CLI : 6.20.8 (/Users/jenkins/jenkins_slave/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node16.19.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.5.4
@angular-devkit/build-angular : 15.1.6
@angular-devkit/schematics : 15.1.6
@angular/cli : 15.1.6
@ionic/angular-toolkit : 8.0.0
Cordova:
Cordova CLI : 11.1.0
Cordova Platforms : ios 6.2.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 7 other plugins)
Utility:
cordova-res : 0.15.4
native-run : 1.7.1
System:
ios-deploy : 1.11.4
ios-sim : 8.0.2
NodeJS : v16.19.0 (/Users/jenkins/jenkins_slave/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node16.19.0/bin/node)
npm : 8.19.3
OS : macOS Monterey
Xcode : Xcode 14.2 Build version 14C18
Podfile:
# DO NOT MODIFY -- auto-generated by Apache Cordova
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
target 'rda' do
project 'rda.xcodeproj'
pod 'OneSignalXCFramework', '3.12.3'
end
Podfile.lock:
PODS:
- OneSignalXCFramework (3.12.3):
- OneSignalXCFramework/OneSignalCore (= 3.12.3)
- OneSignalXCFramework/OneSignalExtension (= 3.12.3)
- OneSignalXCFramework/OneSignalOutcomes (= 3.12.3)
- OneSignalXCFramework/OneSignalCore (3.12.3)
- OneSignalXCFramework/OneSignalExtension (3.12.3):
- OneSignalXCFramework/OneSignalCore
- OneSignalXCFramework/OneSignalOutcomes
- OneSignalXCFramework/OneSignalOutcomes (3.12.3):
- OneSignalXCFramework/OneSignalCore
DEPENDENCIES:
- OneSignalXCFramework (= 3.12.3)
SPEC REPOS:
trunk:
- OneSignalXCFramework
SPEC CHECKSUMS:
OneSignalXCFramework: 75844c29607ca95e6176f6f21257b4382c7fdbfb
PODFILE CHECKSUM: 6fa501b03e19ac918fe9af923be039d6e8cfdea3
COCOAPODS: 1.11.3
System:
#system ruby:
>/usr/bin/ruby --version
ruby 2.6.10p210
#user ruby installed with rbenv and selected with rbenv global 3.2.1 command
>ruby --version
ruby 3.2.1 (2023-02-08...)
>pod --version
1.11.3
Steps to reproduce:
>install nodejs 16.9
>npm install -g cordova@11.1.0 cordova-res@0.15.4 native-run@1.7.1 @ionic/cli@6.20.8
>git clone https://github.com/anatoly-spb/ionic6-hello.git
>cd ionic6-hello
>node install
>ionic cordova platforms add ios@6.2.0
>cd platforms/ios
>pod repo update
>pod install
>cd ../..
>ionic cordova build ios
open workspace from platforms/ios in xcode and try to run simulator
Any hints are welcome! Thank you!
I have downgraded to onesignal-cordova-plugin@3.2.0 with 'OneSignalXCFramework', '3.11.2' and it solved the problem. So the problem is between 3.11.2 and 3.12.3 versions of OneSignalXCFramework.
Hi @anatoly-spb, Thanks for reporting. I see:
#system ruby:
>/usr/bin/ruby --version
ruby 2.6.10p210
#user ruby installed with rbenv and selected with rbenv global 3.2.1 command
>ruby --version
ruby 3.2.1 (2023-02-08...)
I suspect the ruby
version that is is actually used to build may be the system ruby 2.6.10p210
. We have seen this crash resolve for most once they use Cocoapods 1.11.3
and ruby 2.7.5+
.
Can you confirm, or make sure xcode is indeed using ruby 3.2.1
?
Hi @anatoly-spb, Thanks for reporting. I see:
#system ruby: >/usr/bin/ruby --version ruby 2.6.10p210 #user ruby installed with rbenv and selected with rbenv global 3.2.1 command >ruby --version ruby 3.2.1 (2023-02-08...)
I suspect the
ruby
version that is is actually used to build may be the systemruby 2.6.10p210
. We have seen this crash resolve for most once they useCocoapods 1.11.3
andruby 2.7.5+
.Can you confirm, or make sure xcode is indeed using
ruby 3.2.1
?
If xcode uses user's profile, so it must be ruby 3.2.1. Could you please point me how to check it?
Another question is how do you explain that downgrade to previous version solve this problem? It seems to me something wrong is between 3.11 and 3.12 versions.
@anatoly-spb We have not been able to reproduce the issue going between 3.11 -> 3.12 with Ruby 3.2.1, but I noticed that a Cocoapods update was released and it explicitly requires a higher Ruby version. You could try updating Cocoapods.
@anatoly-spb @peterpaulis @nan-li @emawby The issue is related. it expect One Signal XC Frameworks in debug-iPhoneSimulator where as it creates one more folder for OneSignalXCFramework and paste all dyld under that folder as a resultant dyld not found in Debug-iPhoneSImulator. so copy paste all the folder in Debug iPhoneSimulator
Attach is the screen shot
Copy all the folder under OneSingalXCFramework and paste it Debug-iPhoneSimulator
What I believe it is releated to Cocoapod version or may be not. I Faced the same issue on other project on our Company own framework while one of the other colleague was not facing such issue.
@KhurramIqbal87 Ah good find that is good to know! Have you tested on the 1.12.+ version of Cocoapods? Cocoapods had not released an update for almost a year but finally did and should have better support for the latest Xcode version.
SAME ISSUE WITH SPM
@ahmedsafadii Hello do you have an example project with SPM that can reproduce this issue? I have not been able to reproduce this issue using SPM. Which Xcode version are you using?
@ahmedsafadii Hello do you have an example project with SPM that can reproduce this issue? I have not been able to reproduce this issue using SPM. Which Xcode version are you using?
Version 14.2 (14C18)
SAME ISSUE WITH SPM
same
Hi, we have had no further reports of this. Please upgrade the OneSignal SDK if you or anyone is still having this issue. If this is still an issue, please open a new report with updated information.
What happened?
updated pods, the app crashes during launch on
Library not loaded: @rpath/OneSignalCore.framework/OneSignalCore
tried Clean and
Steps to reproduce?
What did you expect to happen?
OneSignal iOS SDK version
OneSignalXCFramework 3.12.3
iOS version
15
Specific iOS version
Relevant log output
Code of Conduct