Get GroundSage Venue Info with iOS
Swift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, IAGSManagerDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// set your api key and api secret. You do this step through add *IAGSApiKey* and *IAGSSecretKey* to application plist
IAGSManager.shared.setApiKey("SET YOUR API KEY HERE", andSecret: "SET YOUR SECRET KEY HERE")
// start to request Venue information
IAGSManager.shared.requestVenueInfo { (venues, error) in
print("venues=\(venues), error=\(error)")
}
return true
}
}
Objective-c
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// set your api key and api secret. You do this step through add *IAGSApiKey* and *IAGSSecretKey* to application plist
[[IAGSManager sharedManager] setApiKey:@"SET YOUR API KEY HERE" andSecret:@"SET YOUR SECRET KEY HERE"];
// start to request Venue information
[[IAGSManager sharedManager] requestVenueInfoWithCompletionHandler:^(NSArray<IAGSVenue *> * _Nullable venues, NSError * _Nullable error) {
// NSLog(@"%@, %@", venues, error);
}];
return YES;
}
@end