Resources in iOS custom infrastructures

I made an empty, one-time application in Xcode 6 (FWTest) and added Cocoa as the target Touch Framework (FWTestKit) and asked to include it in FWTest. Then I add the image (photo.png) to the framework that I expect in Frameworks / FWTestKit.framework / Versions / A / Resources / photo.png when I create and archive my application. However, I find it in Frameworks / FWTestKit.framework / photo.png

How can I do this, at least in the Resources folder? Preferred version folder so that I can send different versions of my framework?

When I add this framework to another application, I need to do something special to make sure the resources are connected with it, so that when I refer to a resource from my structure, I can be sure that it will be available also when use in another application?

Greetings

Nick

+5
source share
2 answers

step1If the desired structure is]! [Step2 You must add your photo.png to a separate folder (let it be called "gica"). Then drag the folder into the project, check the "Copy items" box and create a link to the folder. Then (important) in the build phases, drag photo.png again into the Bundle Copy Resources, saving copies of the items if necessary and creating links to folders. After compilation, you should have the desired folder structure. [She stores gica / photo.png]. enter image description here

+3
source

I think you need to rethink the version control architecture. Anyway, if you still need to put the image inside the folder. Try creating a run script.

In assembly phases, instead of adding images to copy the bundle resource phase. You can create a shell script to copy the images to the desired folder. Please note that the assembly steps are performed in the order in which they were placed. I can say that you can customize the process of creating xCode using your own shell scripts.

0
source

Source: https://habr.com/ru/post/1212615/


All Articles