I have started Objective C a few hours ago, apologies if my question is already answered, I could not find anything similar.
I have my API key specified in the AppDelegate
as follows:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[GMSServices provideAPIKey = "..."]
}
As per google documentation this key need to be provided when I query for the nearby locations. Ideally, I would like to have my key in one file, no copy-paste.
Is there way to get the reference to the key from AppDelegate
and use it in another file? Maybe it should be kept in yet another file and both AppDelegate
file and the file that calls Locations API
should query that another file? Thanks.