In a simple app, you may only use the project, but the larger the project, the more complex it will be, the need to split the project and separate the functions into each project.
You can use WORKSAPCE to manage project collections.
But resource files are poorly managed because Xcode can only add its own project, or sub-project resource files to target, by default.
If it is a lateral project, how to add it? You can use bundles
Bundle is a resource type in OS X, but is compatible with iOS
We can first create a bundle of OS X and then modify its compilation type to iOS
Adjust the base SDK to
then add the resource file (Png,xib,storyboard, etc.) to this bundle.
Although the resource file is packaged in bundles, the bundle cannot be added to the target of other project compilations
We need to change scheme
Edit scheme-"build-" ADD this bundle
This will automatically compile the bundle when the other target is compiled, but the bundle will not be packaged in the app.
We also need to add the run script to the build parses
Build parses-"Add Run script (dot + sign)
Cp-r-F $BUILT _products_dir/mybundlename.bundle $BUILT _products_dir/$CONTENTS _folder_path/
If there are multiple bundles
Cp-r-F $BUILT _products_dir/*.bundle $BUILT _products_dir/$CONTENTS _folder_path/
So bundles can be packaged into the app as usual.
You need to specify bundles when you use them.
[UIImage imagenamed: @"Yourbundlefile.bundle/imageinbundle"];