Handling Cycle inside Runner; building could produce unreliable results after update xcode to xcode 15
Asked Answered
C

7

26

I am upgrading xcode into 15 and ios into 17 version. But when I try to build my flutter project in iphone 15 pro max, I get this error

Error (Xcode): Cycle inside Runner; building could produce unreliable results.
Cycle details:
→ Target 'Runner': CodeSign /Users/umsi06/Documents/project/devV17Ke18/build/ios/Debug-iphonesimulator/Runner.app
○ That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
○ That command depends on command in Target 'Runner': script phase “Thin Binary”
○ Target 'Runner' has process command with output '/Users/umsi06/Documents/project/devV17Ke18/build/ios/Debug-iphonesimulator/Runner.app/Info.plist'
○ Target 'Runner' has copy command from '/Users/umsi06/Documents/project/devV17Ke18/build/ios/Debug-iphonesimulator/OneSignalNotificationServiceExtension.appex' to '/Users/umsi06/Documents/project/devV17Ke18/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex'
○ That command depends on command in Target 'Runner': script phase “[CP] Copy Pods Resources”

is there a way to solve this

Commorancy answered 20/9, 2023 at 2:38 Comment(1)
A
65

I managed to solve it by moving Embed Foundation Extensions right bellow Copy Bundle Resources in the Xcode Build Phases configuration like this enter image description here

Note, that my project is quiet large and it is using things like OneSignalNotificationServiceExtension.appex in the Embed Foundation Extensions phase. Thats why this was needed.

This might not work for everyone but might help someone with similar project config.

My other project config:

  • cococapods v1.13.0
  • Flutter 3.13.5
Alliterate answered 26/9, 2023 at 9:10 Comment(2)
Hi I have done it, and finally I can build my project.. I run it from xcode to simulator and it is really fine, but when I try to do debugging from my code, it is really takes a long time to build. (Xcode build done and stuck in keep Launching...) and another error show: here is my error log gist.github.com/wahyu-handayani/… can you give me a suggestion to solve this ?Commorancy
This answer is worth 100 million upvotes! This cost me about a week of frustration to fix!.. I upgraded from Ventura to Sonoma which forced XCODE update to 15 and caused this. In the end i reinstalled back to Ventura which did not fix the issue (as the problem is probably with XCODE 15), reinstalled flutter and Android studio and then somehow found this which fixed the problem.. GOD BLESS YOU!Impacted
S
15

In my case, I have to move up Embed App Extensions above Copy Bundle Resources

In sort Embed Extensions need to be up above Copy Bundle Resources

enter image description here

Seals answered 21/12, 2023 at 15:3 Comment(0)
T
10

For anyone Feeling lost, this how to do it. I'm just providing a clarification for @MartinM answer.

In step 4: Make sure Embed App Extensions is below Copy Bundle Resources.

enter image description here

Tomlinson answered 14/3 at 2:19 Comment(0)
S
3

Managed to fix the error just by moving 'Embed Foundation Extensions' up before the 'Run Script' steps in the build phases.

enter image description here

Symptomatic answered 2/4 at 17:3 Comment(0)
H
2

If you have watch extension within your project, you need to move it above Copy Bundle Resources as well, like this:

img

Hardness answered 25/2 at 14:46 Comment(1)
Same applies to an AppClipKnurled
H
1

It worked for me aswell. The copy only when installing in the embeded foundation extension, solved the error but it didn't launch the widget. This Embed Foundation Extensions right bellow Copy Bundle Resources works. I hope moving Embed Foundation Extensions doesn't cause any other issues in the app.

Hefner answered 6/2 at 14:3 Comment(0)
B
0

None of the rearranging Build Phases worked by itself. What worked for me was:

  1. Build Settings
  2. Plus in top left
  3. Add User Defined Setting
  4. Set value INSTALL_ROOT to /

(based on answer by the kind stranger here https://developer.apple.com/forums/thread/730974)

And then on top of that, my build phase is: enter image description here

Borchers answered 1/5 at 3:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.