OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
494 stars 262 forks source link

[question]: #1234

Closed caka1011 closed 1 year ago

caka1011 commented 1 year ago

How can we help?

Hello,

I am facing following issue within my Xcode software:

Showing Recent Messages There is no XCFramework found at '/Users/medeiros/Desktop/My IOS App/Delgado/Github/Delgado/Pods/Pods/OneSignal/iOS_SDK/OneSignalSDK/OneSignal_Core/OneSignalCore.xcframework'

My pod file looks like this:

# Uncomment the next line to define a global platform for your project
 #platform :ios, ’10.0’

target 'Delgado' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Delgado
     pod 'Firebase/Database'
     pod 'Firebase/Storage'
     pod 'Firebase/Firestore'
     pod 'Firebase/Auth' 
     pod  'Firebase/Messaging'
     pod  'Firebase/Core'
     pod 'InstantSearch', '~> 7.19'
     pod 'OneSignal', '>= 3.0.0', '< 4.0'
     pod 'SwiftyJSON', '~> 4.0'
     pod 'AlgoliaSearchClient', '~> 8.15'
     pod 'SDWebImage', '~> 5.0'
     pod 'FWPlayer'
     pod 'iOSPhotoEditor'
     pod 'SwiftyWalkthrough', :git => 'git@github.com:caka1011/SwiftyWalkthrough.git'
     pod 'ActiveLabel'

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignal', '>= 3.0.0', '< 4.0'
  #pod 'OneSignalXCFramework', '>= 3.11.1', '< 4.0'
end

Can anyone tell, what is going wrong?

Thanks

Code of Conduct

nan-li commented 1 year ago

Hi @caka1011, It looks like you are using OneSignal pod and not the XCFramework OneSignalXCFramework which is why you are getting "There is no XCFramework found..."

Did you try using pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0' instead of pod 'OneSignal', '>= 3.0.0', '< 4.0' in both your app target and OneSignalNotificationServiceExtension target?

caka1011 commented 1 year ago

Hi @nan-li,

yes, I changed the pod file accordingly like this:


   target 'Delgado' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!

  # Pods for Delgado
     pod 'Firebase/Database'
     pod 'Firebase/Storage'
     pod 'Firebase/Firestore'
     pod 'Firebase/Auth' 
     pod  'Firebase/Messaging'
     pod  'Firebase/Core'
     pod 'InstantSearch', '~> 7.19'
     pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0'
     #pod 'OneSignal', '>= 3.0.0', '< 4.0'
     pod 'SwiftyJSON', '~> 4.0'
     pod 'AlgoliaSearchClient', '~> 8.15'
     pod 'SDWebImage', '~> 5.0'
     pod 'FWPlayer'
     pod 'iOSPhotoEditor'
     pod 'SwiftyWalkthrough', :git => 'git@github.com:caka1011/SwiftyWalkthrough.git'
     pod 'ActiveLabel'

target 'OneSignalNotificationServiceExtension' do
 # pod 'OneSignal', '>= 3.0.0', '< 4.0'
   pod 'OneSignalXCFramework', '>= 3.0.0', '< 4.0'
end

Unfortunately, after installing the new entries, it still doesn't work.

caka1011 commented 1 year ago

Alright, one step closer (hopefully). I could solve this problem.

In TARGETS, we have OneSignalNotificationServiceExtension where under the section Frameworks, Libraries, and Embedded Content

there was this framework OneSignalCore.xcframework attached. I removed it re-added it again. Screenshot is attached

Bildschirmfoto 2023-03-07 um 22 37 37

emawby commented 1 year ago

@caka1011 Hello you should not need to embed and sign the OneSignalCore and OneSignalOutcomes xcframeworks directly. By using cocoapods for your OneSignalNotificationServiceExtension target you should have the full OneSignalXCFramework available. Did you add those to fix a different problem?

emawby commented 1 year ago

Closing for inactivity. Feel free to reopen if this is still an issue!