open the .xcworkspace and compile it, you will get the following error message, error: ../gamePods/Pods/Target Support Files/Pods-gamePods/Pods-gamePods.debug.xcconfig: unable to open file (in target "gamePods" in project "gamePods") (in target 'gamePods') To fix it, click Pods folder in your game project, and in the right panel you will see its location, click the folder icon, then select the correct path of Pods in the appeared window(Pods path is locate at the same directory as .xcworkspace ).
Compile again, got the new error message, error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. To fix it, modify the .xcconfig file to move PODS_PODFILE_DIR_PATH and PODS_ROOT from last two lines to first two lines, and set the values to
It seems that the library Pods-DiceCraft canāt be found, you can have a double check to make sure there is a Pods-DiceCraft.
We donāt use CocoaPods to manage the dependency. If you can provide the test demo, we can help to test.
@coulsonwang Thank you. this fix will work for debug/run. but not able to archive. Is there any chance you support old xcode project method(Non CMAKE). Also any plans to release new cocos 3.x version?
@dargomdev01@hiphip
CocoaPods latest version(1.9.1) still has a problem with handle project_dir_path attribute for project location(CocoaPods/Xcodeproj#739). As we can see it already merge into the CocoaPods master branch here, maybe soon to be fixed in next release.
I do still have some linker errors with the Pods. Last night, I somehow managed to get rid of them by playing around with Framework Search Paths/Linker flags/framework embed options/architectures/cleaning and rebuilding project over and over etc. But today somehow it wonāt compile again, argh, and since it was REALLY late last night, I canāt even remember the exact solution :/. The linker still doesnāt know the symbol FIRApp (Firebase).
Even if I get it working again, though, Iām still very unsure how to configure everything so that each and every re-run of cmake does not reset all the settings, so painstakingly adjusted :/.
Iām thinking of skipping pods entirely and manually integrating the frameworks. Might turn out to be even more of a hassle than now, though.
Iāll let you know if I manage to develop a reliable solution with deterministic steps .
OK itās super late again so sorry if itās chaotic. Iām going to describe all the steps I took to get a new v.4. project with Pods working. Not necessarily all working steps.
Starting with: CocoaPods 1.10.0.rc.1 installed, Pods configured in the Podfile, after pod install, and all $(inherited) flags setup as CocoaPods asked.
Error: Framework not found, pointing to some sub-pod framework.
I go to Pods project in the navigator, go to Products, show the libPods-projectName.a in Finder, copy the path and paste it in Framework Search Paths of my project. Ugly, itās just some Xcode/derivedData location.
Build, the error goes away but another one appears: PBXCp, something like ios-build/bin/ProjectName/Debug/Pods_ProjectName.framework: No such file or directory
Remove the red Pods-projectName.a from my projectās Frameworks group in Project navigator.
It builds! But will crash on startup, saying **dyld: Library not loaded:
go to Podfile, comment out use_frameworks, rerun pod install (or pod update), remove the red thingy from step (3) again, try to build
Fails again complaining about library not found for -lYetAnotherLibrary
cleaning the project and other tricks do not seem to work
copy Framework Search path added in step (1) to Library Search Paths.
voila. compiles, links, runs and does not crash.
I just wonder what new surprises are still waiting for me :D. Will probably wake up in the morning and it wonāt build again .
My next research will be how to handle all that in an elegant way? So I can at least add these damn Framework and Lib Search Paths in a generic way in cmake, as well as the inherited flags and other stuff that I still havenāt the slightest idea of.
Iām very interested in the cocoa pods, too. I have an existing iOS project using cocos-2d 3.14.0.0 and it might be the easiest way for me to upgrade. Iāve been trying various ways using the cocos tool, but it makes a project that doesnāt build correctly for me if I move the project to another directory. Thatās problematic in most git situations, so the cocoa pod would be much better in many ways.