'Initialize APNS application.'

def __init__(self, hass, app_name, topic, sandbox, cert_file):

    self.hass = hass
    self.app_name = app_name
    self.sandbox = sandbox
    self.certificate = cert_file
    self.yaml_path = hass.config.path(((app_name + '_') + APNS_DEVICES))
    self.devices = {}
    self.device_states = {}
    self.topic = topic
    if os.path.isfile(self.yaml_path):
        self.devices = {str(key): ApnsDevice(str(key), value.get('name'), value.get('tracking_device_id'), value.get('disabled', False)) for (key, value) in load_yaml_config_file(self.yaml_path).items()}
    tracking_ids = [device.full_tracking_device_id for (key, device) in self.devices.items() if (device.tracking_device_id is not None)]
    track_state_change(hass, tracking_ids, self.device_state_changed_listener)
