OneSignal-XCFramework icon indicating copy to clipboard operation
OneSignal-XCFramework copied to clipboard

Fails to build when archiving

Open sipersso opened this issue 4 years ago • 14 comments

Hi!

I am new to OneSignal and just added the SDK via SPM (OneSignal-XCFramework). The build works fine when building for a simulator. But when archiving for release, build fails, with a "No Such Module" compiler error. This seems to be a common error with other swift packages as well. Is this an issue you are aware of?

sipersso avatar Jan 29 '21 21:01 sipersso

We're having this same problem. The app builds locally, but fails with No Such Module when building on Bitrise.

dsmailes avatar Feb 11 '22 13:02 dsmailes

Facing same issue any solution Xcode 13.2.1 Chip Apple M1

neha275 avatar May 12 '22 16:05 neha275

same issue here with Bitrise. I tried Xcode 13.1.x, 13.2.x and 13.3.x ... nothing works. Any ideas? The local build works.

ortinteractive avatar May 16 '22 15:05 ortinteractive

same issue here with Bitrise. I tried Xcode 13.1.x, 13.2.x and 13.3.x ... nothing works. Any ideas? The local build works.

Try setting to manual build order.

dsmailes avatar May 16 '22 15:05 dsmailes

@dsmailes doesn't work but I found a solution. I am using branch = "release-3.10.0" now

ortinteractive avatar May 16 '22 20:05 ortinteractive

yes, @ortinteractive it's work for me

neha275 avatar May 18 '22 09:05 neha275

any updates to this?

jarrodparkes avatar Jun 02 '22 16:06 jarrodparkes

What it work for me, I have change the version, attached message for Reference

Screen Shot 2022-06-03 at 3 37 43 pm

  • You have to do some changes if you using SPM: -> Use product OneSignal for your app target, and product OneSignalExtension for your Notification Service Extension target. -> Then in your NotificationService class import OneSignalExtension instead of OneSignal

Than follow below step it will work:

  • clean the build
  • delete the derived data
  • try to create a archieve

neha275 avatar Jun 03 '22 10:06 neha275

Hi @neha275 , can you please provide more information or a screenshot for this step? "-> Use product OneSignal for your app target, and product OneSignalExtension for your Notification Service Extension target."

How do you change the targets?

Thanks!

jtansley avatar Sep 20 '22 13:09 jtansley

Same issue with Xcode 14.0.1 Can build and run on device in debug mode No such module 'OneSignal' when create an archive Ty to clean the build, derived data and SwiftPM caches Use OneSignal-XCFramework 3.11.2

TofPlay avatar Sep 27 '22 11:09 TofPlay

Fixed this archive issue for Xcode 14.0.1 as following After adding the package,

  • Open project settings
  • Tap on OneSignalNotificationServiceExtension target
  • In Frameworks and Libraries, add 'OneSignalExtension'
  • Clean all and try to archive again 🎉
Screen Shot 2022-10-12 at 2 12 00 AM

hkawii avatar Oct 12 '22 00:10 hkawii

This worked for me.

grd888 avatar Feb 10 '23 10:02 grd888

Fixed this archive issue for Xcode 14.0.1 as following After adding the package,

  • Open project settings
  • Tap on OneSignalNotificationServiceExtension target
  • In Frameworks and Libraries, add 'OneSignalExtension'
  • Clean all and try to archive again 🎉
Screen Shot 2022-10-12 at 2 12 00 AM

This worked for me as well. Thanks!!

jtansley avatar Mar 20 '23 01:03 jtansley

Late for the party but they included it in the official troubleshooting: https://documentation.onesignal.com/docs/troubleshooting-ios#no-such-module-onesignal

fedeolto avatar Dec 11 '23 19:12 fedeolto