It's an unique string that identifies your app.
It is usually written in reverse DNS notation i.e (com.Yourcompanyname.yourApp).
Bundle IDs should be app specific (either iOS or macOS) and it can't be used for both iOS and macOS apps.
Bundle ID can be set in your project's target as follows
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
let bundleIdentifier = Bundle.main.bundleIdentifier
What are best practices that you use when developing projects in Objective-C ?
Top 5 most common Xcode Errors solved