No such module OneSignal

Viewed 3183

I have an issue with OneSignal module. It keeps giving me No such module OneSignal and I installed it by cocoa pods and have use_frameworks! in my pod file. I really have no clue what else I should configure to make it work

I tried other solutions here like:

Getting error No such module using Xcode, but the framework is there

enter image description here

enter image description here

pod file

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

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

  # Pods for Jaee2


pod 'OneSignal', '>= 2.5.2', '< 3.0'
end

target 'OneSignalNotificationServiceExtension' do
 use_frameworks!

  pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
2 Answers

Are you seeing the same error in AppDelegate as well when you import OneSignal there? If no, ensure that in your pod file you added pod 'OneSignal', '>= 2.5.2', '< 3.0' for the target OneSignalNotificationServiceExtension. So your pod file should look like:

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

  # Pods for OneSignalNotificationServiceExtension
pod 'OneSignal', '>= 2.5.2', '< 3.0'

end

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

  # Pods for test
pod 'OneSignal', '>= 2.5.2', '< 3.0'

end
Related