Problem
When trying to build with XCode 15 getting the following error-
“Cycle inside MyApp; building could produce unreliable results.”
It is working fine with XCode 12, 13 and 14
Solution:
Follow the below steps.
- Select Target
- Goto Build Phase tab.
- Drag ‘Embed App Extension’ and place it below ‘Run script’.
Run it again, It should work.
@sid you blog is amazing ! can you more elaborate this solution with some screenshots and details.
Dear @Anominous, A circular dependency occurs when a build phase depends on another phase that in turn depends on the first phase. This creates a loop that Xcode cannot resolve.
In our case, the problem arises because:
Embed App Extension Phase is responsible for embedding app extensions (like widgets, notification content, etc.) into the app.
Run Script phase typically runs custom scripts that may process resources or configure settings needed by subsequent phases.
If the Embed App Extension phase is executed before the Run Script phase, it might attempt to embed resources that have not yet been configured or generated by the script. This misordering causes a cyclic dependency error.