Multiple commands produce '.../Frameworks/OneSignalExtension.framework

57 Views Asked by At

I'm encountering a 'Multiple commands produce' error related to OneSignalExtension.framework in my React Native iOS app (Xcode 15.1, OneSignal 4.5.1).

Here is full error message:

Multiple commands produce '/Users/hamzabakaran/Library/Developer/Xcode/DerivedData  
/mobile-ctpnuulbuipfykbyqdihvziwoxdf/Build/Products/Debug-iphonesimulator   
 /AppName.app/Frameworks/OneSignalExtension.framework'


Target 'mobile' (project 'mobile') has copy command from '/Users/hamzabakaran/Documents/Projects/app/app-mobile 
 /ios/Pods/OneSignalXCFramework/iOS_SDK/OneSignalSDK/OneSignal_Extension/OneSignalExtension.xcframework   
 /ios-arm64_i386_x86_64-simulator/OneSignalExtension.framework' to  
'/Users/hamzabakaran/Library/Developer/Xcode/DerivedData/mobile-ctpnuulbuipfykbyqdihvziwoxdf/Build  
/Products/Debug-iphonesimulator/AppName.app/Frameworks/OneSignalExtension.framework'

I've tried switching to OneSignal 4.5.0, removing OneSignalExtension.xcframework form Embed Frameworks (got

/Users/hamzabakaran/Documents/Projects/app/app- 
 mobile/ios/Pods/boost/boost/container_hash/hash.hpp:131:33  
 No template named 'unary_function' in namespace 'std';
 did you mean '__unary_function'?

) but the issue persists. Can anyone offer guidance on resolving this?

1

There are 1 best solutions below

0
Raj Rohit Yadav On

I was facing the same issue and this was caused by

target 'OneSignalNotificationServiceExtension' do
  use_frameworks!
  pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
end

I removed these from pod and and added frameworks to OneSignalNotificationServiceExtension [Project > General > Targets > OneSignalNotificationServiceExtension]

This is how it should look (Click + icon to add)

enter image description here