Application used by iOS do communicate via "Public intens". Therefore an app doesn't have to know which other app they're targeting. They're just informing the system what they want to do.
- I want to show a map
- I want to show a picture or a MP3 file
Then the iOS system checks which of the installed apps are able to execute the intended action and allocates them to the user. It's also possible to choose an app permanently for this action.
For a detailed description please see the attached PDF file.