Table of contents Set the Location's Site Name with the Aternity iOS Mobile SDK (setSite and setOffSite) You can set the location's site name for a mobile app in the Aternity Mobile SDK, to track the performance of all end users in that location. In iOS, the Aternity class provides two static methods for setting the site: setSite to define the site name, and setOffSite to define the site as Off-site. Set the site name to correspond to the Site field in your organization's Microsoft Active Directory, so Aternity can automatically map the site to its Country, State and City in the dashboards. For more information see how to configure location mapping. In addition to using this method, you can also set this property when the iOS app initializes with activateWithDictionary and setting the property ATERNITY_CONFIG_SITE. Using the site-based location of monitored mobile apps Before You Begin Before you begin, ensure you have already done the following: The system requirements of the developer's computer must conform to those of the Aternity iOS Mobile SDK. The Aternity iOS Mobile SDK requires a mobile device with at least Integrate the Aternity iOS Mobile SDK into your app development environment. Include the Aternity.h header file (in Objective-C) into your source code file. To add it to a Swift project, use a bridging header (see Apple's documentation). Initialize the SDK either automatically (by adding Aternity.plist to your project) or manually using activateWithDictionary. Method Definition In iOS, the Aternity class provides two static methods for setting the site: setSite to define the site name, and setOffSite to define the site as Off-site. +(void)setSite:(NSString *)newSite; +(void)setOffSite; Parameter Description newSite Set the site name of device's location's site name to this value, which should correspond to the Site name in your Microsoft Active Directory. Example This example queries the name (SSID) of the connected WiFi network to determine the location's site name. If the network names are not recognized, it sets the name to Off-Site. In Objective-C: //No need to use the singleton object as these are static methods. if([wifiSSID isEqualToString:@"AP-1"]) [Aternity setSite:@"Warehouse"]; else if([wifiSSID isEqualToString:@"AP-2"]) [Aternity setSite:@"Sales"]; else [Aternity setOffSite]; In Swift: //No need to use the singleton object as these are static methods. if wifiSSID=="AP-1" { Aternity.setSite("Warehouse") } else if wifiSSID=="AP-2" { Aternity.setSite("Sales"); } else { Aternity.setOffSite(); } Parent topic Embed Monitoring in your iOS App with the Aternity iOS SDKRelated tasksIntegrate the Aternity iOS SDK into your App(Troubleshoot Mobile App Crashes with Breadcrumbs)Related referenceInitialize the Aternity iOS Mobile SDK Manually (activateWithDictionary)Set the Username with the Aternity iOS Mobile SDK (userNameStr)Set the Device Name with the Aternity iOS Mobile SDK (setDeviceName)Tag and Report an Event in an iOS App (tagApplicationWithName, reportTag)Set Contextual Data to Report from an iOS App (setContextValue)Add a Callback for App Crashes (setCrashCallback) SavePDF Selected topic Selected topic and subtopics All content Related Links
Set the Location's Site Name with the Aternity iOS Mobile SDK (setSite and setOffSite) You can set the location's site name for a mobile app in the Aternity Mobile SDK, to track the performance of all end users in that location. In iOS, the Aternity class provides two static methods for setting the site: setSite to define the site name, and setOffSite to define the site as Off-site. Set the site name to correspond to the Site field in your organization's Microsoft Active Directory, so Aternity can automatically map the site to its Country, State and City in the dashboards. For more information see how to configure location mapping. In addition to using this method, you can also set this property when the iOS app initializes with activateWithDictionary and setting the property ATERNITY_CONFIG_SITE. Using the site-based location of monitored mobile apps Before You Begin Before you begin, ensure you have already done the following: The system requirements of the developer's computer must conform to those of the Aternity iOS Mobile SDK. The Aternity iOS Mobile SDK requires a mobile device with at least Integrate the Aternity iOS Mobile SDK into your app development environment. Include the Aternity.h header file (in Objective-C) into your source code file. To add it to a Swift project, use a bridging header (see Apple's documentation). Initialize the SDK either automatically (by adding Aternity.plist to your project) or manually using activateWithDictionary. Method Definition In iOS, the Aternity class provides two static methods for setting the site: setSite to define the site name, and setOffSite to define the site as Off-site. +(void)setSite:(NSString *)newSite; +(void)setOffSite; Parameter Description newSite Set the site name of device's location's site name to this value, which should correspond to the Site name in your Microsoft Active Directory. Example This example queries the name (SSID) of the connected WiFi network to determine the location's site name. If the network names are not recognized, it sets the name to Off-Site. In Objective-C: //No need to use the singleton object as these are static methods. if([wifiSSID isEqualToString:@"AP-1"]) [Aternity setSite:@"Warehouse"]; else if([wifiSSID isEqualToString:@"AP-2"]) [Aternity setSite:@"Sales"]; else [Aternity setOffSite]; In Swift: //No need to use the singleton object as these are static methods. if wifiSSID=="AP-1" { Aternity.setSite("Warehouse") } else if wifiSSID=="AP-2" { Aternity.setSite("Sales"); } else { Aternity.setOffSite(); } Parent topic Embed Monitoring in your iOS App with the Aternity iOS SDKRelated tasksIntegrate the Aternity iOS SDK into your App(Troubleshoot Mobile App Crashes with Breadcrumbs)Related referenceInitialize the Aternity iOS Mobile SDK Manually (activateWithDictionary)Set the Username with the Aternity iOS Mobile SDK (userNameStr)Set the Device Name with the Aternity iOS Mobile SDK (setDeviceName)Tag and Report an Event in an iOS App (tagApplicationWithName, reportTag)Set Contextual Data to Report from an iOS App (setContextValue)Add a Callback for App Crashes (setCrashCallback)
Set the Location's Site Name with the Aternity iOS Mobile SDK (setSite and setOffSite) You can set the location's site name for a mobile app in the Aternity Mobile SDK, to track the performance of all end users in that location. In iOS, the Aternity class provides two static methods for setting the site: setSite to define the site name, and setOffSite to define the site as Off-site. Set the site name to correspond to the Site field in your organization's Microsoft Active Directory, so Aternity can automatically map the site to its Country, State and City in the dashboards. For more information see how to configure location mapping. In addition to using this method, you can also set this property when the iOS app initializes with activateWithDictionary and setting the property ATERNITY_CONFIG_SITE. Using the site-based location of monitored mobile apps Before You Begin Before you begin, ensure you have already done the following: The system requirements of the developer's computer must conform to those of the Aternity iOS Mobile SDK. The Aternity iOS Mobile SDK requires a mobile device with at least Integrate the Aternity iOS Mobile SDK into your app development environment. Include the Aternity.h header file (in Objective-C) into your source code file. To add it to a Swift project, use a bridging header (see Apple's documentation). Initialize the SDK either automatically (by adding Aternity.plist to your project) or manually using activateWithDictionary. Method Definition In iOS, the Aternity class provides two static methods for setting the site: setSite to define the site name, and setOffSite to define the site as Off-site. +(void)setSite:(NSString *)newSite; +(void)setOffSite; Parameter Description newSite Set the site name of device's location's site name to this value, which should correspond to the Site name in your Microsoft Active Directory. Example This example queries the name (SSID) of the connected WiFi network to determine the location's site name. If the network names are not recognized, it sets the name to Off-Site. In Objective-C: //No need to use the singleton object as these are static methods. if([wifiSSID isEqualToString:@"AP-1"]) [Aternity setSite:@"Warehouse"]; else if([wifiSSID isEqualToString:@"AP-2"]) [Aternity setSite:@"Sales"]; else [Aternity setOffSite]; In Swift: //No need to use the singleton object as these are static methods. if wifiSSID=="AP-1" { Aternity.setSite("Warehouse") } else if wifiSSID=="AP-2" { Aternity.setSite("Sales"); } else { Aternity.setOffSite(); } Parent topic Embed Monitoring in your iOS App with the Aternity iOS SDKRelated tasksIntegrate the Aternity iOS SDK into your App(Troubleshoot Mobile App Crashes with Breadcrumbs)Related referenceInitialize the Aternity iOS Mobile SDK Manually (activateWithDictionary)Set the Username with the Aternity iOS Mobile SDK (userNameStr)Set the Device Name with the Aternity iOS Mobile SDK (setDeviceName)Tag and Report an Event in an iOS App (tagApplicationWithName, reportTag)Set Contextual Data to Report from an iOS App (setContextValue)Add a Callback for App Crashes (setCrashCallback)