Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple commands produce #551

Closed
FoloosiApps opened this issue Apr 14, 2022 · 28 comments
Closed

Multiple commands produce #551

FoloosiApps opened this issue Apr 14, 2022 · 28 comments
Labels
Help Wanted Extra attention is needed Need More Information

Comments

@FoloosiApps
Copy link

FoloosiApps commented Apr 14, 2022

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

@emawby
Copy link
Contributor

emawby commented Apr 14, 2022

@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 emawby added Need More Information Help Wanted Extra attention is needed labels Apr 14, 2022
@jaywooltari
Copy link

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.

@jkasten2 jkasten2 transferred this issue from OneSignal/OneSignal-iOS-SDK May 10, 2022
@jkasten2
Copy link
Member

@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.

@ImranKaagga
Copy link

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'

@nan-li
Copy link
Contributor

nan-li commented May 26, 2022

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 nan-li reopened this May 26, 2022
@novigunawan
Copy link

novigunawan commented Jun 9, 2022

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```

@rezvalari
Copy link

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.

@damathryx
Copy link

damathryx commented Oct 6, 2022

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

@ridvanaltun
Copy link

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!

@Chirag-kalsariya
Copy link

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?

@Sega-Zero
Copy link

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

@Chirag-kalsariya
Copy link

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

@moneer-muntazah
Copy link

moneer-muntazah commented Mar 9, 2023

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

@Brechard
Copy link

Brechard commented Mar 9, 2023

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

@Chirag-kalsariya
Copy link

Don't remove anything make onesignal_flutter: 3.4.1 in pubspec.yaml, and reinstall the pod for that refer step-4 and 5 (#551 (comment))

@FoundersApproach
Copy link

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.

@RaoSaqib7860
Copy link

RaoSaqib7860 commented Apr 9, 2023

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
Copy link

RaoSaqib7860 commented Apr 9, 2023

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

@christofkost
Copy link

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: #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?

@Brechard
Copy link

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

@hasanozkaynak26
Copy link

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

this solution worked for me. Thank you !

@emawby
Copy link
Contributor

emawby commented Jan 30, 2024

Closing issue as stale. If this is still happening in 2024 feel free to tag me to reopen

@emawby emawby closed this as completed Jan 30, 2024
@VeArnold
Copy link

@emawby haha literally having this issue as of now :)

@josancamon19
Copy link

Same @emawby

@mdmohsin7
Copy link

mdmohsin7 commented Jun 22, 2024

I too had this issue today, after a lot of messing around, I finally fixed it by doing the following changes:

Follow the below steps only after following the steps mentioned in the official guide.

Step 1: In Targets -> OneSignalNotificationServiceExtension -> General -> Frameworks and Libraries, remove the existing pod_OneSignalNotificationServiceExtension.framework and add the following

OneSignalCore.xcframework
OneSignalExtension.xcframework
OneSignalOSCore.xcframework
OneSignalOutcomes.xcframework

This is how your Frameworks and Libraries section should look after the above changes
Screenshot 2024-06-23 at 12 35 10 AM

Step 2: Now open the podfile and remove the following lines which were added while following the docs

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

Step 3: Move Embed Foundation Extensions right bellow Copy Bundle Resources in the Xcode Build Phases configuration like this
hvTwV


Step 4: No copy Run Script in Build Phases from Runner to OneSignalNotificationServiceExtension Build Phases and then you will get an error Error (Xcode): Sandbox: rsync.samba(34407) deny(1) file-write-create... , you just need to set "User Script Sandboxing" in your "Build Settings" to false (that is, No)

josancamon19 added a commit to BasedHardware/omi that referenced this issue Jun 24, 2024
This PR integrates OneSignal for both Android and iOS.
Fixes #331 
Note: For iOS, the OneSignal Notification Service Extension is only set
up for the bundle ID `com.friend-app-with-wearable.ios12`. This means it
won't work with the bundle ID `com.friend-app-with-wearable.ios12.dev`
because this bundle ID isn't included in the Development Team.

Steps to integrate OneSignal on iOS with xcode 15 or higher:

OneSignal/OneSignal-Flutter-SDK#551 (comment)


Android            |  iOS
:-------------------------:|:-------------------------:

![Android](https://github.com/BasedHardware/Friend/assets/59914433/7c3a7acf-6f5d-43f0-a9ce-e51f1b3bde64)
|
![iOS](https://github.com/BasedHardware/Friend/assets/59914433/6aa20bd5-5cf0-4287-9108-12ad01271be1)
@supermnemonic
Copy link

iam using xcode 15.4. this works for me.

  1. flutter clean
  2. remove file ios/podfile.lock
  3. remove folder ios/Pods
  4. flutter pub get
  5. check build phase order. make sure "Embed Foundation Extensions" order is as follow.
    Screenshot 2024-08-13 at 16 27 30
  6. flutter run

@Jeadonara
Copy link

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!

I guess it is the best solution

@arthurgiani
Copy link

Problem still persists for me

Xcode 15.4
Flutter 3.24
OneSignal 5.2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed Need More Information
Projects
None yet
Development

No branches or pull requests