Can't add package to XCode project #2083
-
If I create a new random project in XCode I can add the package with no problem. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 3 replies
-
Just tested on axmol 2.1.4 and the problem persists. |
Beta Was this translation helpful? Give feedback.
-
I don't know how packages work in Xcode, but if they integrate into your Xcode project, then they will be gone the next time Xcode project is regenerated (e.g. after adding new source files, etc). This is not how Axmol workflow works. You should treat generated Xcode project as "readonly". You'll probably want to look into something that can be integrated from command line like CocoaPods. |
Beta Was this translation helpful? Give feedback.
-
Oh... |
Beta Was this translation helpful? Give feedback.
-
Cocos2d-x v3.17+ and V4 both use cmake, which generate the Xcode project, and Axmol also uses the cmake build system, so nothing has changed in that regard. If you're referring to v2 of Cocos2d-x. then yes, a lot has changed. Anything you want to add to the Xcode project would need to be done via cmake or CocoaPods. The |
Beta Was this translation helpful? Give feedback.
-
To expand on this: yes, you should not edit Xcode project directly, and do not add it to your source control. Basically, you want to have an easy runnable two steps setup:
I was a bit wrong to say "treat generated Xcode project as "readonly"". You can certainly modify it, but it must be automated, cause you will lose changes the second that you modify CMake files, or CMake runs Also, be aware that if you're running build in Xcode after editing CMake files (or if CMake reruns |
Beta Was this translation helpful? Give feedback.
-
I am working with cocos 3.10 which created an XCode project when I created the project and I've been working on it directly all the time and it worked fine. I thought I could do the same with axmol. |
Beta Was this translation helpful? Give feedback.
-
I have never worked directly with CMake. I created my project with cocos 3.10 and it created an XCode project and I've done all my work through XCode and it worked great. |
Beta Was this translation helpful? Give feedback.
-
When the cmake build system was added to Cocos2d-x v3, the intention was never to use it in the way you are describing, and you would not be doing yourself any favors by attempting to continue working in this way. The fact that it worked without issues is purely by chance. Embracing the cmake build system should make things simpler and less time consuming, especially if you wish to support multiple platforms for your application. @halx99 I feel that this should be moved to the discussion section, since it's not an issue with Axmol. |
Beta Was this translation helpful? Give feedback.
-
Xcode is a pain in the butt, you can work on a project for months then all of a sudden, You mite have to reimport the apple license all over again as xcode just throws it out for no reason or the settings just change for no reason. apple keep updating the compile all the time then its a problem to get XCode to compile again. I seem to be spending more time sorting out apple problems and xcode then programming. This is why I program android then ill recompile at the end of project for Xcode. |
Beta Was this translation helpful? Give feedback.
I think you're talking about the old way how Cocos worked, when it generated Xcode project from a template and it was up to you to maintain it. Later Cocos switched fully to CMake, and Axmol inherited this. Now you use CMake to generate projects when you need them to work on or build your game.
Unfortunately, there's no other way. If you will choose to bypass CMake, then you will not be able to update the engine anymore, and probably run into a lot of other issues too. Also it hardcodes full paths to files in the project, and you will not be able to work with this project on other machines or even other folders.