To start, you can find a bunch of backstory in App Translocation Notes. On Apple platforms, we use the term app to refer to a GUI program that a user launches by double clicking in the Finder (or tapping on the Home Screen, or whatever). Apps are structured as a bundle, that is, a directory ending in .app with a very specific internal structure. You can learn more about that structure in Placing content in a bundle. If an app needs to access internal resources, it does so using the NSBundle API (Bundle in Swift). For example, if your code wants to reference an image called my-image.png, you’d add it to the app’s bundle like so: % find Test852702.app Test852702.app Test852702.app/Contents Test852702.app/Contents/MacOS Test852702.app/Contents/MacOS/Test852702 Test852702.app/Contents/Resources Test852702.app/Contents/Resources/my-image.png Test852702.app/Contents/Info.plist …and then find it with this code: let u = Bundle.main.url(forResource: my-image, withExtension: png)!where u is a file URL that points to Te
Topic:
App & System Services
SubTopic:
Core OS
Tags: