OneSignal-Flutter-SDK icon indicating copy to clipboard operation
OneSignal-Flutter-SDK copied to clipboard

Multiple commands produce

Open FoloosiApps opened this issue 4 years ago • 31 comments

Issue:

Multiple commands produce '/Users/admin/Library/Developer/Xcode/DerivedData/Runner-dpyjwukbvwjjmfhhlbogqotonlpd/Build/Products/Debug-iphoneos/Runner.app/Frameworks/OneSignal.framework'

How can i fix this issue?

Note:

My XCode Version 13.3.1

FoloosiApps avatar Apr 14 '22 12:04 FoloosiApps

@FoloosiApps Which version of OneSignal is Cocoapods trying to use? It looks like this is Flutter so in the future please report issues here

emawby avatar Apr 14 '22 15:04 emawby

If you add Onesignal via "Pod" & "Swift package", please remove one for consistency. I solved this issue by removing "pod onesignal" that made the multiple commands issue. hope this help the issue.

jaywooltari avatar May 10 '22 08:05 jaywooltari

@FoloosiApps Closing due to no response.

If the above does not help please add the full contains of your Podfile and confirm you are only using Cocoapods and not SwiftPM.

jkasten2 avatar May 10 '22 18:05 jkasten2

Any update on this ? Facing same issue multiple commands at 4 places. Any help ?

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignal.framework'

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework'

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework'

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalOutcomes/OneSignalOutcomes.framework'

ImranKaagga avatar May 26 '22 19:05 ImranKaagga

Hi @ImranKaagga,

Did you try the suggestion above?

If you add Onesignal via "Pod" & "Swift package", please remove one for consistency. I solved this issue by removing "pod onesignal" that made the multiple commands issue. hope this help the issue.

If the above does not help please add the full contains of your Podfile and confirm you are only using Cocoapods and not SwiftPM.

nan-li avatar May 26 '22 19:05 nan-li

hi there, i had the same issue and i had made sure that i add onesignal only using cocoapods.

Here's my Podfile :

platform :ios, '10.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks! :linkage => :static
  # use_modular_headers!
  pod 'GoogleUtilities'
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

target 'SatwakuIDNotificationServiceExtension' do
  use_frameworks!
  pod 'OneSignalXCFramework', '>= 3.4.3', '< 4.0'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
     config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
   end
end```

novigunawan avatar Jun 09 '22 17:06 novigunawan

Any update on this ? Facing same issue multiple commands at 4 places. Any help ?

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignal.framework'

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework'

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework'

Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalOutcomes/OneSignalOutcomes.framework'

I'm using React Native but I am also getting this issue.

rezvalari avatar Oct 06 '22 13:10 rezvalari

Any update on this ? Facing same issue multiple commands at 4 places. Any help ? Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignal.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalOutcomes/OneSignalOutcomes.framework'

I'm using React Native but I am also getting this issue.

I was able to solve this by using use_frameworks! :linkage => :static instead of use_frameworks inside the notification target

target 'OneSignalNotificationServiceExtension' do
  use_frameworks! :linkage => :static
  pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
end

damathryx avatar Oct 06 '22 16:10 damathryx

Any update on this ? Facing same issue multiple commands at 4 places. Any help ? Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignal.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalOutcomes/OneSignalOutcomes.framework'

I'm using React Native but I am also getting this issue.

I was able to solve this by using use_frameworks! :linkage => :static instead of use_frameworks inside the notification target

target 'OneSignalNotificationServiceExtension' do
  use_frameworks! :linkage => :static
  pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
end

Works like a charm! Thanks!

ridvanaltun avatar Dec 05 '22 16:12 ridvanaltun

Any update on this ? Facing same issue multiple commands at 4 places. Any help ? Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignal.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework' Multiple commands produce '/Users/macbookpro/Library/Developer/Xcode/DerivedData/Runner-guxfrrsooqgfuierbfplcdnromlw/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignalOutcomes/OneSignalOutcomes.framework'

I'm using React Native but I am also getting this issue.

I was able to solve this by using use_frameworks! :linkage => :static instead of use_frameworks inside the notification target

target 'OneSignalNotificationServiceExtension' do
  use_frameworks! :linkage => :static
  pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
end

This does not work for me. any other solution?

Chirag-kalsariya avatar Dec 05 '22 18:12 Chirag-kalsariya

Fixed this by specifying differend pods in app and extension, like this

target 'App' do
  use_frameworks! 
  pod 'OneSignal', '>= 3.0', '< 4.0'
end
target 'OneSignalNotificationServiceExtension' do
  use_frameworks! :linkage => :static
  pod 'OneSignalXCFramework/OneSignalExtension', '>= 3.4.3', '< 4.0'
end

Sega-Zero avatar Dec 11 '22 13:12 Sega-Zero

For this error, I follow these steps step-1: remove ^ in pubspec.yaml

  # PUSH NOTIFICATION
  onesignal_flutter: 3.4.1

step-2: open Xcode in making this change

Open Targets -> Runner -> General -> Frameworks, Libraries, and Embedded Content
// Only Add This One, Remove all other Onesignals Names
Name: OnesignalNotificationServiceExtension.appex 
Embed: Embed Without Signing

step-3: Open podefile

target 'OneSignalNotificationServiceExtension' do
  use_frameworks!
  pod 'OneSignalXCFramework', '>= 3.4.3', '< 4.0'
end

step-4: use this commands

flutter clean
flutter pub get

step-5: delete Pods folder and Podfile.lock on ios folder and use this commands

cd ios/
pod install

All these step works for me

Chirag-kalsariya avatar Dec 14 '22 16:12 Chirag-kalsariya

I'm having the same issue it appears that it started happening after upgrading to 3.5 but now even downgrading doesn't help so frustrated

removing OneSignalCore.xcframework and OnceSignalOutcomes.xcframework solves it but I don't want to do it because I don't understand what this is for

moneer-muntazah avatar Mar 09 '23 10:03 moneer-muntazah

I am having the same issue, I just got a MacBook, pulled the repo that is working correctly on my college's M1 Mac (I have M2 but should not have a difference) and I get the error:

Error (Xcode): Multiple commands produce '/Users/brechard/dev/flutter/front-end-mobile-app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/OneSignalOutcomes.framework'

Error (Xcode): Multiple commands produce '/Users/brechard/dev/flutter/front-end-mobile-app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/OneSignalCore.framework'

the Podfile looks like this:

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

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

target 'OneSignalNotificationServiceExtension' do
  use_frameworks!
  pod 'OneSignalXCFramework', '>= 3.4.3', '< 4.0'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

I have tried as suggested above but it is still not working.

I am using COCOAPODS: 1.12.0 and one onesignal_flutter: ^3.5.0

The only place I have found a duplication of OneSignalCore.xcframework and OneSignalOutcomes.xcframework is in the file project.pbxproj in the section:

/* Begin PBXBuildFile section */
		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
		74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
		8C7A907B6F7F6D2D5026B139 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 83EB99D0D807307C9093F506 /* GoogleService-Info.plist */; };
		9544155A2976DF8C0000776D /* OneSignalOutcomes.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 954415592976DF8C0000776D /* OneSignalOutcomes.xcframework */; };
		9544155B2976DF8C0000776D /* OneSignalOutcomes.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 954415592976DF8C0000776D /* OneSignalOutcomes.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
		9544155E2976DF9C0000776D /* OneSignalCore.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9544155D2976DF9C0000776D /* OneSignalCore.xcframework */; };
		9544155F2976DF9C0000776D /* OneSignalCore.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9544155D2976DF9C0000776D /* OneSignalCore.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
		95C6B5BD2972CCB800098EB1 /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = 95C6B5BC2972CCB800098EB1 /* NotificationService.m */; };
		95C6B5C12972CCB800098EB1 /* OneSignalNotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 95C6B5B92972CCB800098EB1 /* OneSignalNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
		DB951E8DE7A8FAE53AE6B77F /* Pods_OneSignalNotificationServiceExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63806D98F93A2B561549810D /* Pods_OneSignalNotificationServiceExtension.framework */; };
		E5AEC3BFC89334C561C42F14 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E80EF9DB7634D149E8AA1F11 /* Pods_Runner.framework */; };

where If I remove the lines:

  • OneSignalCore.xcframework in Embed Frameworks
  • OneSignalOutcomes.xcframework in Embed Frameworks

then the app runs but the notifications are not received in the emulator and I remove the lines :

  • OneSignalCore.xcframework in Frameworks
  • OneSignalOutcomes.xcframework in Frameworks

I keep getting the same error messages

Brechard avatar Mar 09 '23 17:03 Brechard

Don't remove anything make onesignal_flutter: 3.4.1 in pubspec.yaml, and reinstall the pod for that refer step-4 and 5 (https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/551#issuecomment-1351728448)

Chirag-kalsariya avatar Mar 11 '23 06:03 Chirag-kalsariya

Hello,

I faced Multiple Commands produce issue in my react native app. I upgraded xcode from 13 to 14 and start facing this error.

Above solution helps and guided me to fix the issue. So thank you!

Below is the solution are applied:

Choose your target > Build Phase > [CP] Embed Pods Framework > Output files. REMOVE > OneSignalCore.framework REMOVE > OneSignalOutComes.framework

Screenshot 2023-04-07 at 9 28 20 PM

Also make sure to add those library to "Framework, Libraries, and Embedded Content" Screenshot 2023-04-07 at 9 40 18 PM

Hope this save your time! Thank you.

FoundersApproach avatar Apr 07 '23 16:04 FoundersApproach

Version of one signal and the target version should be same <img width="814" alt="Screenshot 2023-04-10 at 12 56 53 AM" src="https://user-images.githubusercontent.com/69755012/230794056-1fea17d6-edcc Screenshot 2023-04-10 at 12 59 56 AM -4158-81ed-2a74212f6707.png">

RaoSaqib7860 avatar Apr 09 '23 20:04 RaoSaqib7860

here you can change 15.0 Screenshot 2023-04-10 at 12 56 53 AM

RaoSaqib7860 avatar Apr 09 '23 20:04 RaoSaqib7860

Hey everybody! I can fix this issue by deleting OneSignalOutcomes and OneSignalCore: image Now the build passes, but app immediately crashes when being started due to this issue: https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/608

Now I am in some kind of deadlock. Having the needed framework inside project results in "Multiple Commands"-error, having them not results in crash on app startup. I am sad and desperate :( Does anybody know a solution?

christofkost avatar Apr 13 '23 10:04 christofkost

I think I finally found out when this is happening. It is when you update CocoaPods to version 1.12.0. My colleague's laptop was using 1.11.3 and was not having all these issues but I had. He just updated his CocoaPods to 1.12.0 and this error happened to him. Doing these changes on his laptop and mine made it work again.

Thanks a lot for your help!

For this error, I follow these steps step-1: remove ^ in pubspec.yaml

  # PUSH NOTIFICATION
  onesignal_flutter: 3.4.1

step-2: open Xcode in making this change

Open Targets -> Runner -> General -> Frameworks, Libraries, and Embedded Content
// Only Add This One, Remove all other Onesignals Names
Name: OnesignalNotificationServiceExtension.appex 
Embed: Embed Without Signing

step-3: Open podefile

target 'OneSignalNotificationServiceExtension' do
  use_frameworks!
  pod 'OneSignalXCFramework', '>= 3.4.3', '< 4.0'
end

step-4: use this commands

flutter clean
flutter pub get

step-5: delete Pods folder and Podfile.lock on ios folder and use this commands

cd ios/
pod install

All these step works for me

Brechard avatar Apr 13 '23 10:04 Brechard