OneSignal-Flutter-SDK
OneSignal-Flutter-SDK copied to clipboard
[Bug]: XCode throws `Cycle inside Runner` when building for iOS
What happened?
After following the installation steps in https://documentation.onesignal.com/docs/flutter-sdk-setup XCode will no longer build the project
Steps to reproduce?
1. Create a new Flutter project
2. Follow the steps to install the OneSignal SDK
3. Try running on a iOS device
What did you expect to happen?
For the app to run
OneSignal Flutter SDK version
5.0.4
Which platform(s) are affected?
- [X] iOS
- [ ] Android
Relevant log output
Could not build the precompiled application for the device.
Error (Xcode): Cycle inside Runner; building could produce unreliable results.
Cycle details:
→ Target 'Runner': CodeSign /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app
○ That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
○ Target 'Runner' has copy command from '/Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/OneSignalNotificationServiceExtension.appex' to '/Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex'
○ That command depends on command in Target 'Runner': script phase “Thin Binary”
○ Target 'Runner' has process command with output '/Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Info.plist'
○ Target 'Runner' has copy command from '/Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/OneSignalNotificationServiceExtension.appex' to '/Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex'
Raw dependency cycle trace:
target: ->
node: <all> ->
command: <all> ->
node: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/_CodeSignature ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:CodeSign /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app ->
node: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Frameworks/OneSignalCore.framework/ ->
directoryTreeSignature: r ->
directoryContents: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Frameworks/OneSignalCore.framework ->
node: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Frameworks/OneSignalCore.framework ->
command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:PhaseScriptExecution [CP] Embed Pods Frameworks /Users/alexfourman/Library/Developer/Xcode/DerivedData/Runner-dtorhcpcrdcckrervwipimaomntv/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-A8FB6AFC6A0A3F7844CA877C.sh ->
node: /Users/alexfourman/Library/Developer/Xcode/DerivedData/Runner-dtorhcpcrdcckrervwipimaomntv/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/InputFileList-A8FB6AFC6A0A3F7844CA877C-Pods-Runner-frameworks-Debug-input-files-da5e40a7284a37f6e7fccba33ed143c9-resolved.xcfilelist ->
command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:WriteAuxiliaryFile /Users/alexfourman/Library/Developer/Xcode/DerivedData/Runner-dtorhcpcrdcckrervwipimaomntv/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/InputFileList-A8FB6AFC6A0A3F7844CA877C-Pods-Runner-frameworks-Debug-input-files-da5e40a7284a37f6e7fccba33ed143c9-resolved.xcfilelist ->
node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase5-copy-files> ->
command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase5-copy-files ->
node: <Copy /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex> ->
CYCLE POINT ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:Copy /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/OneSignalNotificationServiceExtension.appex ->
node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase4-thin-binary> ->
command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase4-thin-binary ->
node: <execute-shell-script-18c1723432283e0cc55f10a6dcfd9e02f1eee2015e8ff5ebcd27678f788c2826-target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-> ->
command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:PhaseScriptExecution Thin Binary /Users/alexfourman/Library/Developer/Xcode/DerivedData/Runner-dtorhcpcrdcckrervwipimaomntv/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh ->
node: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Info.plist/ ->
directoryTreeSignature: Z ->
directoryContents: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Info.plist ->
node: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Info.plist ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:ProcessInfoPlistFile /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/Info.plist /Users/alexfourman/StudioProjects/onesignal/ios/Runner/Info.plist ->
node: /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:Copy /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex /Users/alexfourman/StudioProjects/onesignal/build/ios/Debug-iphoneos/OneSignalNotificationServiceExtension.appex
Error launching application on Alex’s iPhone.
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Flutter doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.0 23A344 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
[✓] Network resources
Hello,
I had the same issue. We really need OneSignal to step up on this as the 5.0.4 is really buggy. Anyhow, there is a workaround for this bug (happening on Xcode 15 and iOS 17).
In Xcode, in your app target build phases, you should have something called "Embed App Extensions" or "Embed Foundation Extensions" at the end of the build phases. If you drag it BEFORE "Run Script", it should prevent this build error to happen.
Check this screenshot to see where I put my "Embed Foundation Extensions" phase in the list
Hello,
I had the same issue. We really need OneSignal to step up on this as the 5.0.4 is really buggy. Anyhow, there is a workaround for this bug (happening on Xcode 15 and iOS 17).
In Xcode, in your app target build phases, you should have something called "Embed App Extensions" or "Embed Foundation Extensions" at the end of the build phases. If you drag it BEFORE "Run Script", it should prevent this build error to happen.
Check this screenshot to see where I put my "Embed Foundation Extensions" phase in the list
this. thank you! worked 🙏
Hello,
I had the same issue. We really need OneSignal to step up on this as the 5.0.4 is really buggy. Anyhow, there is a workaround for this bug (happening on Xcode 15 and iOS 17).
In Xcode, in your app target build phases, you should have something called "Embed App Extensions" or "Embed Foundation Extensions" at the end of the build phases. If you drag it BEFORE "Run Script", it should prevent this build error to happen.
Check this screenshot to see where I put my "Embed Foundation Extensions" phase in the list
Thank you very much @ipapps. This workaround helped me a lot!
Hello,
I had the same issue. We really need OneSignal to step up on this as the 5.0.4 is really buggy. Anyhow, there is a workaround for this bug (happening on Xcode 15 and iOS 17).
In Xcode, in your app target build phases, you should have something called "Embed App Extensions" or "Embed Foundation Extensions" at the end of the build phases. If you drag it BEFORE "Run Script", it should prevent this build error to happen.
Check this screenshot to see where I put my "Embed Foundation Extensions" phase in the list
This worked for me, I'm currently onesignal_flutter: 5.1.2
@ipapps thanks a million, you just saved the day. Works for me like charm on Xcode 15.3 Beta and iOS 17.3. Great job with finding this.
I would assume when you drag items, this is moving lines in some file.
Hi everyone i have the same problem, but i have a conflict with FMDB Error (Xcode): Framework 'FMDB' not found And if i add pod 'FMDB' after i have the same error for OneSignalExtension. Can you help me, thanks.
Hello,
I had the same issue. We really need OneSignal to step up on this as the 5.0.4 is really buggy. Anyhow, there is a workaround for this bug (happening on Xcode 15 and iOS 17).
In Xcode, in your app target build phases, you should have something called "Embed App Extensions" or "Embed Foundation Extensions" at the end of the build phases. If you drag it BEFORE "Run Script", it should prevent this build error to happen.
Check this screenshot to see where I put my "Embed Foundation Extensions" phase in the list
Genius! Worked as a charm.
Hello,
I had the same issue. We really need OneSignal to step up on this as the 5.0.4 is really buggy. Anyhow, there is a workaround for this bug (happening on Xcode 15 and iOS 17).
In Xcode, in your app target build phases, you should have something called "Embed App Extensions" or "Embed Foundation Extensions" at the end of the build phases. If you drag it BEFORE "Run Script", it should prevent this build error to happen.
Check this screenshot to see where I put my "Embed Foundation Extensions" phase in the list
Unbelievable, I spent 2 hours on this and this is the solution? I can't believe it’s still happening after a whole year!
yep i spent quite a lot of time trying to resolve this one before i found this




