Where to put code for SwiftyJSON using beacon monitoring

Hi,

I’m working on an app for “automatic” room reservation based on a persons presence in the room with the beacon. So far I think monitoring is the best choice to discover the presence of the person as this works in the background. I have made parts of the app where I call PHP server side to populate the table with the rooms showing vacant or not using SwiftyJSON and Alamofire.

Next step is to go further with the beacon monitoring and I need to be able to use the beacon ID which is found with major/minor and post these as data using SwiftyJSON and Alamofire.

Thing is, as I’m very new to IOS programming - where would I put the function for the server-side call, and how would the “framework” look like? Just to get me started…

For the monitoring part I have just getting started using the example code:func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
ESTConfig.setupAppID(“narvik-kommune—it-s-noti-0kz”, andAppToken: “4416287ddb51bacba2718126da55d1f7”)

    self.beaconNotificationsManager.enableNotifications(
        for: BeaconID(UUIDString: "B9407F30-F5F8-466E-AFF9-25556B57FE6D", major: 29608, minor: 54719),
        enterMessage: "Hello, world.",
        exitMessage: "Goodbye, world."
    )

    // NOTE: "exit" event has a built-in delay of 30 seconds, to make sure that the user has really exited the beacon's range. The delay is imposed by iOS and is non-adjustable.

    return true
}

PJ