-
If you are looking for help, please confirm the following...
Which mobile framework are you using?Flutter (Dart) Steps to reproduceWhen I compile my Flutter App for iOS through Codemagic then the build fails. I use the following scripts in my Ci/CD, because before I ran into the errors from https://github.com/orgs/codemagic-ci-cd/discussions/2907 . Post-clone script:
Pre-build script:
The mentioned "ios/Model.xcdatamodeld" is part of my GitHub files. I guess it has something to do with absolute paths and relative paths, but I do not know how to fix it and didn't find anything about it within the Codemagic documentation. Expected resultsBuild succeeds as it does local on Xcode / Android Studio, too: Actual results
Build id (optional)68272c9645a94079f8cc6b95 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
I hoped changing the path in my Runner.xcodeproj > project.pbxproj with Visual Studio Code would help by changing the path to But now I run into the following CI error (Build ID 68277246311d3da1daafedc5):
|
Beta Was this translation helpful? Give feedback.
-
When you added the Core Data model, did you do it manually or through Xcode? When following this documentation the default path being created is relative Could you try this on a new branch—one where the Core Data model hasn’t been added yet—and follow the same steps as outlined in the documentation? Also, what versions of Xcode and Flutter are you using locally? Ideally, you should use the same versions locally and on CI. It might also be worth testing with a different Xcode or Flutter version. |
Beta Was this translation helpful? Give feedback.
Hi @dtrdic,
first of all thank you for all of your ideas!
I found the reason within my
project.pbxproj
:There have been two variables with absolute paths which caused the problem:
FLUTTER_APPLICATION_PATH
andFLUTTER_ROOT
In a fresh Flutter project these variables do not exist.
Don't ask me how they have got into my project, because I am sure I didn't add them manually, but after deleting both variables in DEBUG/PROFILE/RELEASE sections my Codemagic build succeeded and the local build also still works. :-)
Best regards