exponea / exponea-react-native-sdk

MIT License
8 stars 13 forks source link

No such module 'ExponeaSDK_Notifications' #49

Closed adeem closed 2 years ago

adeem commented 2 years ago

I m keep getting this error on Xcode. Any idea? We do have the Empty swift file and bridging header.


❌  (ios/PushContentExtension/NotificationViewController.swift:12:8)

  10 | import UserNotifications
  11 | import UserNotificationsUI
> 12 | import ExponeaSDK_Notifications
     |        ^ no such module 'ExponeaSDK_Notifications'
  13 | 
  14 | class NotificationViewController: UIViewController, UNNotificationContentExtension {
  15 | 

› 1 error(s), and 1 warning(s)

Failed to build iOS project. "xcodebuild" exited with error code 65.

Note: If we change from import ExponeaSDK_Notifications to import ExponeaSDKNotifications it still didnt worked. Note2: We are using latest sdk 1.0.0

image

michaela-dev commented 2 years ago

Hi. Do you have ExponeaSDK-Notifications dependency in your Podfile? Are you implementing this from scratch, or you just updated the SDK version and it issue occurred? I am just making sure you did not miss this step:

Open ios/Podfile and add ExponeaSDK-Notifications for both of your extension targets.

# Don't forget to change names to your targets!

target 'ExampleNotificationService' do
  pod 'ExponeaSDK-Notifications'
end

target 'ExampleNotificationContent' do
  pod 'ExponeaSDK-Notifications'
end

Once done, run pod install in ios folder to install the dependencies.

adeem commented 2 years ago

I solved the problem. And it has nothing to do with ExponeaSDK-Notification.

For anyone else looking for this solution. Simply do the following. Run the project from terminal react-native run-ios and if that works then simply follow the solution here specified https://stackoverflow.com/questions/44492197/react-native-ios-build-cant-find-node