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

[Bug]: XCode throws Cycle inside Runner when building for iOS #790

Open
2 of 3 tasks
fourman-alex opened this issue Nov 17, 2023 · 10 comments
Open
2 of 3 tasks

[Bug]: XCode throws Cycle inside Runner when building for iOS #790

fourman-alex opened this issue Nov 17, 2023 · 10 comments

Comments

@fourman-alex
Copy link

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?

  • 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

  • I agree to follow this project's Code of Conduct
@fourman-alex
Copy link
Author

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

@ipapps
Copy link

ipapps commented Nov 27, 2023

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

Screenshot 2023-11-27 at 09 24 35

@pyagmyrov
Copy link

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

Screenshot 2023-11-27 at 09 24 35

this. thank you! worked 🙏

@gitcarlosandrade
Copy link

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

Screenshot 2023-11-27 at 09 24 35

Thank you very much @ipapps. This workaround helped me a lot!

@edwinyoo44
Copy link

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

Screenshot 2023-11-27 at 09 24 35

This worked for me, I'm currently onesignal_flutter: 5.1.2

@markosole
Copy link

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

@meihdimtg
Copy link

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.

@unferna
Copy link

unferna commented Jul 24, 2024

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

Screenshot 2023-11-27 at 09 24 35

Genius! Worked as a charm.

@huseyinsahinli
Copy link

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

Screenshot 2023-11-27 at 09 24 35

Unbelievable, I spent 2 hours on this and this is the solution? I can't believe it’s still happening after a whole year!

@willsmanley
Copy link

yep i spent quite a lot of time trying to resolve this one before i found this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants