Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such module OneSignal

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
like image 570
AlmoDev Avatar asked Sep 27 '17 21:09

AlmoDev


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
like image 142
Murad Ali Avatar answered Nov 04 '22 10:11

Murad Ali


If you dont want use cocoapods. Swift Package Manager available.

Swift Package Manager

like image 1
Asil ARSLAN Avatar answered Nov 04 '22 12:11

Asil ARSLAN