Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode : adding very large files to Xcode / number of (image) resources to project results in freeze

Tags:

xcode

I'm working on a computer vision project that requires I package a very large number of jpg images at 640*480 resolution for testing the precision of the application.

In total these 5000 files require around 6GB of space. If I attempt to add all these files to the project, then Xcode will stop responding (and if source control is enabled git will be called recursively until my system crashes).

I've explored the possibility of using an image catalogue but this is problematic as the required format is JPG and considered zipping files (but the same problem occurs).

Is there a 'best' or efficient way to add either very large resources or a very large number of assets to an Xcode project, and re bundles/catalogues necessarily a 'better' solution in terms of performance etc?

Regards,

P.L.G.

like image 483
peter_gent Avatar asked Nov 11 '22 10:11

peter_gent


1 Answers

Fwiw, I just imported thousands of photos into Xcode and was coming up against the same problems outlined above. The best solution I found was to utilize the Images.xcassets resource (it is an asset catalog). While my computer was working pretty hard, the images have been loaded into the project.

Under Images.xcassets, at the bottom click the '+' sign, then "Import". That will allow you to bring images in much more easily. The program is now working very slowly for me, but this has been the best solution I can find yet for such large amounts of images

like image 74
Tron Avatar answered Dec 17 '22 23:12

Tron