How to transfer published resources from CocoStudio to Xcode? - xcode

using CocoStudio 2.0.6 and Xcode 6.1.1 on MAC inside VMware. After publishing in CocoStudio I open Xcode and "Add Files to myProject" with the "Copy items if needed" option checked. Then I have the folder myProject/res created by CocoStudio inside the myProject/Resources folder used by Xcode. Using CSLoader in HelloWorldScene.cpp works fine and I see the scene in the simulator. Runs ok also in Eclipse on Android emulator.
If I go back to CocoStudio and make changes like adding a sprite to the scene then I need to repeat the whole process of publishing, delete them Resources/res folder in Xcode and add it again. It is faster to delete the whole folder instead of adding new files into it and delete the ones not used any more.
My question is: am I doing it the right way or is it there a better way for Xcode to automatically see modifications to the resources made by CocoStudio?
Like when I use Eclipse and build the project, the resources in the myProject/proj.android/assets folder are automatically updated with the resources from the myProject/Resources folder.
Thank you.

You can make a resources folder in iOS app a symbolic link to the main Resources folder.
Remove the proj.ios_mac/Resources folder. Then go to your main app folder and execute:
ln -s ../Resources proj.ios_mac/Resources

Related

Why the Resources direrctory is not visible on my project navigatior

I just started learning SwiftUI and trying to follow the steps of the Building lists and navigation example from Apple. Although copied and existing on the project directory, I noticed the Resources directory is not visible in my project navigation on Xcode.
The build is successful, but since the app tries to read landmarkData.json file from that directory, it throws:
Could not find landmarkData.json in main bundle.
Why doesn't the Resources show up on Xcode? How can I fix this issue?
Thank you so much
Here's some things you can verify :
Verify if the clock is selected in the search bar. If so, de-select it.
Try deleting the Ressources folder in your projet files. Then, drag and drop it in your files navigator (left panel in xcode).

How to display all files in Project Navigator in Xcode 9?

Some files on my Swift project, like circle.yml and .gitignore, aren't shown in the Xcode 9 Navigator. How do I get them so show up?
The Xcode project navigator is not a file browser. Just because something is in your project folder, doesn't mean the project is aware of it. The project isn't magically watching the project folder to see what's put in there. It knows about the stuff that it put in there, of course.
But you want something to be seen by the project, and you yourself put it into the project folder without telling the project that you did so, then just drag it into the project navigator to bring it to Xcode's attention. Note that you should decline Xcode's offer to make this part of the target. You don't want a .gitignore file to be built into your app; you just want the convenience of accessing it thru Xcode and the project window.

XCode project missing files on other Mac

I have multiple Xcode Projects in my Dropbox so I can use them on my iMac and MacBook. But when I open the projects on another Mac most of the imported Images, Videos etc... are red (missing). the files are all in the Project Root Folder. What can I do?
This error is because when you added the files (images, documents, etc) you did not tick copy if needed option.
That means if you deag/drop items from your desktop to the project, Xcode will reference the documents from your desktop. When opening the project on another computer, the Xcode is not finding your documents in the desktop of the other computer, thus the error.
Solution:
1- Delete all the red marked items (take note of them)
2- move them again to the project and make sure to check copy items if needed checkbox.
3- re upload the project to wherever you need and it will run.
Happy coding!

Cordova + Xcode 7.3 (html + Javascript) not changed or updated when build and emulate

Im a beginner hybrid mobile apps.
Im able to create my hellocordova apps. but when i edit my html file and then build it. it remains same. The apps does not changed at all. i already erase and leave blank my index.html but after i build it still show default cordova index.html.
Im already google it and try to clean + build.
Almost every ways i already try on stackoverflow but never worked. i decide to ask a question because all the solution i try on stack never worked.
How do i solve this problem
If you are directly changing html from the Xcode, then you should change the code/html of the staging folder, not main folder
In the staging folder you will get same structure which you have in the main folder, but it will reflected directly in the xcode (iOS) build
Note: The changes you made in the xcode will be replace when you build again from the cordova build/run, so please copy your changes in the main folder before doing firing cordova commands
You can get more information from this answer: Purpose of Staging folder in PhoneGap 3.4? Only changes to index.html in this folder get recognized?

XCode 4 accidentally deleted product file

I'm using XCode and Appcode for developing.
In Appcode, accidentally I deleted the .app file from the Products folder.
After that I can build the project successfully in both IDE, but can't run on simulator or device, when the build finished, nothing happening.
The .app file created on the derived data directory fine, like earlier so that's not the problem.
If I check the debug scheme in XCode, on the Executable list None is chosen, if I browse the generated app in the derived data directory and set that, then works fine, run on simulator and device too, but the app file not shown in the Products folder and after a restart, XCode set the Executables back to None, which is annoying.
How can I set back the .app file to show in the Products directory in XCode and work like earlier?
I was able to delete the "product" file in my own test project by going to the Project Settings and then clicking on the app under "Targets" and touching the "Delete" key.
To create a new Target, go back to Project Settings and click the "Add Target" button.
Normally, this means you need to reset all of your settings, but if you have the original target's Info.plist (settings) file around, you may be able to pick up some of your previous target's settings from there.
I also faced the same issue.
If we are building for the SIMULATOR - then the Target file still "not-included". Change from the top build actions for - ProjectName>iOS Device (instead of the ios Simulator) then the project target file gets generated and is included in the project folder hierarchy.
There is no need to run - just rebuild and that should do the trick

Resources