-2

How do I get the filename for an image stored in Assets.xcassets? I've an image named "default" in an "Avatars" folder in my xcassets. How do I get the filename for this image if possible?

I need the filename to send to a server.

jscs
  • 63,694
  • 13
  • 151
  • 195
Robert J
  • 11
  • 1
  • I'm pretty sure that the actual filename is not saved on the compiled assets file, so you can't retrieve it. – EmilioPelaez Feb 01 '19 at 19:06
  • https://stackoverflow.com/questions/53187032/sktextureatlas-pass-in-a-path-to-an-atlas-instead-of-looking-for-that-specific/53194056#53194056 – E.Coms Feb 01 '19 at 19:09

1 Answers1

2

Files from Assets.xcassets are compiled into a .car file by Xcode and have no individual filenames inside your app bundle.

See e.g. Analysing Assets.car file in iOS for details of how such a .car file looks like.

Gereon
  • 17,258
  • 4
  • 42
  • 73