<commit_before>// CountlyConfig.h
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

//NOTE: Countly features
#if TARGET_OS_IOS
extern NSString* const CLYPushNotifications;
extern NSString* const CLYCrashReporting;
extern NSString* const CLYAutoViewTracking;
#elif TARGET_OS_TV
extern NSString* const CLYAutoViewTracking;
#endif
//NOTE: Disable APM feature until Countly Server completely supports it
// extern NSString* const CLYAPM;


//NOTE: Device ID options
#if TARGET_OS_IOS
extern NSString* const CLYIDFV;
extern NSString* const CLYIDFA DEPRECATED_MSG_ATTRIBUTE("Use CLYIDFV instead!");
extern NSString* const CLYOpenUDID DEPRECATED_MSG_ATTRIBUTE("Use CLYIDFV instead!");
#elif TARGET_OS_OSX
extern NSString* const CLYOpenUDID DEPRECATED_MSG_ATTRIBUTE("Use custom device ID instead!");
#endif

@interface CountlyConfig : NSObject

/**
 * County Server's URL without the slash at the end.
 * @discussion e.g. https://example.com
 */
@property (nonatomic) NSString* host;

/**
 * Application's App Key found on Countly Server's "Management > Applications" section.
 * @discussion Using API Key or App ID will not work.
 */
@property (nonatomic) NSString* appKey;

#pragma mark -

/**
 * For enabling SDK debug mode which prints internal logs.
 * @discussion If set, SDK will print internal logs to console for debugging. Internal logging works only for Development environment where DEBUG flag is set in Build Settings.
 */
@property (nonatomic) BOOL enableDebug;

#pragma mark -

/**
 * For specifying which features Countly will start with.
 * @discussion Available features:
 * @discussion @c CLYPushNotifications for push notifications,
 * @discussion @c CLYCrashReporting for crash reporting,
 * @discussion @c CLYAutoViewTracking for auto view tracking and
 * @discussion @c CLYAPM for application performance management.
 */
@property (nonatomic) NSArray* features;

#pragma mark -

/**
 * For manually marking a device as test device for @c CLYPushNotifications feature.
 * @discussion Test push notifications can be sent to test devices by selecting "Development & test users only" on "Create Push Notification" section on Countly Server.
 */
@property (nonatomic) BOOL isTestDevice;

/**
 * For sending push tokens to Countly Server even for users who have not granted permission to display notifications.
 * @discussion Push tokens from users who have not granted permission to display notifications, can be used to send silent notifications. But there will be no notification UI for users to interact. This may cause incorrect push notification interaction stats.
 */
@property (nonatomic) BOOL sendPushTokenAlways;

/**
 * For disabling automatically showing of message alerts by @c CLYPushNotifications feature.
 * @discussion If set, push notifications that contain a message or a URL visit request will not show alerts automatically. Push Open event will be recorded, but Push Action event needs to be recorded manually, as well as displaying the message manually.
 */
@property (nonatomic) BOOL doNotShowAlertForNotifications;

/**
 * Location latitude and longitude can be specified as @c CLLocationCoordinate2D struct to be used for geo-location based push notifications and advanced segmentation.
 * @discussion By default, Countly Server uses a geo-ip database for acquiring user's location. If the app uses Core Location services and granted permission, a location with better accuracy can be provided using this property.
 * @discussion It will be sent with @c begin_session requests only.
 */
@property (nonatomic) CLLocationCoordinate2D location;

/**
 * City name can be specified as string to be used for geo-location based push notifications and advanced segmentation.
 * @discussion By default, Countly Server uses a geo-ip database for acquiring user's location. If the app has information about user's city, it can be provided using this property.
 * @discussion It will be sent with @c begin_session request only.
 */
@property (nonatomic) NSString* city;

/**
 * ISO country code can be specified in ISO 3166-1 alpha-2 format to be used for geo-location based push notifications and advanced segmentation.
 * @discussion By default, Countly Server uses a geo-ip database for acquiring user's location. If the app has information about user's country, it can be provided using this property.
 * @discussion It will be sent with @c begin_session request only.
 */
@property (nonatomic) NSString* ISOCountryCode;

/**
 * IP address can be specified as string to be used for geo-location based push notifications and advanced segmentation.
 * @discussion It will be sent with @c begin_session request only.
 */
@property (nonatomic) NSString* IP;

#pragma mark -

/**
 * @discussion Custom or system generated device ID. If not set, Identifier For Vendor (IDFV) will be used by default.
 * @discussion Available system generated device ID options:
 * @discussion @c CLYIDFV (Identifier For Vendor)
 * @discussion @c CLYIDFA (Identifier For Advertising)
 * @discussion @c CLYOpenUDID (OpenUDID)
 * @discussion Once set, device ID will be stored persistently (even after app delete and re-install) and will not be changed even if set another device ID is set on start, unless @c forceDeviceIDInitialization flag is set.
 */
@property (nonatomic) NSString* deviceID;

/**
 * For forcing device ID initialization on start.
 * @discussion When it is set, persistently stored device ID will be reset and new device ID will be re-initialized using @c deviceID property on @c CountlyConfig object. It is meant to be used for debugging purposes only while developing.
 */
@property (nonatomic) BOOL forceDeviceIDInitialization;

/**
 * For applying zero-IDFA fix on queued requests.
 * @discussion If set, all requests in persistently stored request queue will be checked against zero-IDFA issue. If found, they will be fixed by either replacing with IDFV or removing from queue.
 */
@property (nonatomic) BOOL applyZeroIDFAFix;
<commit_msg>Updated HeaderDoc for IP address initial config property<commit_after>// CountlyConfig.h
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

//NOTE: Countly features
#if TARGET_OS_IOS
extern NSString* const CLYPushNotifications;
extern NSString* const CLYCrashReporting;
extern NSString* const CLYAutoViewTracking;
#elif TARGET_OS_TV
extern NSString* const CLYAutoViewTracking;
#endif
//NOTE: Disable APM feature until Countly Server completely supports it
// extern NSString* const CLYAPM;


//NOTE: Device ID options
#if TARGET_OS_IOS
extern NSString* const CLYIDFV;
extern NSString* const CLYIDFA DEPRECATED_MSG_ATTRIBUTE("Use CLYIDFV instead!");
extern NSString* const CLYOpenUDID DEPRECATED_MSG_ATTRIBUTE("Use CLYIDFV instead!");
#elif TARGET_OS_OSX
extern NSString* const CLYOpenUDID DEPRECATED_MSG_ATTRIBUTE("Use custom device ID instead!");
#endif

@interface CountlyConfig : NSObject

/**
 * County Server's URL without the slash at the end.
 * @discussion e.g. https://example.com
 */
@property (nonatomic) NSString* host;

/**
 * Application's App Key found on Countly Server's "Management > Applications" section.
 * @discussion Using API Key or App ID will not work.
 */
@property (nonatomic) NSString* appKey;

#pragma mark -

/**
 * For enabling SDK debug mode which prints internal logs.
 * @discussion If set, SDK will print internal logs to console for debugging. Internal logging works only for Development environment where DEBUG flag is set in Build Settings.
 */
@property (nonatomic) BOOL enableDebug;

#pragma mark -

/**
 * For specifying which features Countly will start with.
 * @discussion Available features:
 * @discussion @c CLYPushNotifications for push notifications,
 * @discussion @c CLYCrashReporting for crash reporting,
 * @discussion @c CLYAutoViewTracking for auto view tracking and
 * @discussion @c CLYAPM for application performance management.
 */
@property (nonatomic) NSArray* features;

#pragma mark -

/**
 * For manually marking a device as test device for @c CLYPushNotifications feature.
 * @discussion Test push notifications can be sent to test devices by selecting "Development & test users only" on "Create Push Notification" section on Countly Server.
 */
@property (nonatomic) BOOL isTestDevice;

/**
 * For sending push tokens to Countly Server even for users who have not granted permission to display notifications.
 * @discussion Push tokens from users who have not granted permission to display notifications, can be used to send silent notifications. But there will be no notification UI for users to interact. This may cause incorrect push notification interaction stats.
 */
@property (nonatomic) BOOL sendPushTokenAlways;

/**
 * For disabling automatically showing of message alerts by @c CLYPushNotifications feature.
 * @discussion If set, push notifications that contain a message or a URL visit request will not show alerts automatically. Push Open event will be recorded, but Push Action event needs to be recorded manually, as well as displaying the message manually.
 */
@property (nonatomic) BOOL doNotShowAlertForNotifications;

/**
 * Location latitude and longitude can be specified as @c CLLocationCoordinate2D struct to be used for geo-location based push notifications and advanced segmentation.
 * @discussion By default, Countly Server uses a geo-ip database for acquiring user's location. If the app uses Core Location services and granted permission, a location with better accuracy can be provided using this property.
 * @discussion It will be sent with @c begin_session requests only.
 */
@property (nonatomic) CLLocationCoordinate2D location;

/**
 * City name can be specified as string to be used for geo-location based push notifications and advanced segmentation.
 * @discussion By default, Countly Server uses a geo-ip database for acquiring user's location. If the app has information about user's city, it can be provided using this property.
 * @discussion It will be sent with @c begin_session requests only.
 */
@property (nonatomic) NSString* city;

/**
 * ISO country code can be specified in ISO 3166-1 alpha-2 format to be used for geo-location based push notifications and advanced segmentation.
 * @discussion By default, Countly Server uses a geo-ip database for acquiring user's location. If the app has information about user's country, it can be provided using this property.
 * @discussion It will be sent with @c begin_session requests only.
 */
@property (nonatomic) NSString* ISOCountryCode;

/**
 * IP address can be specified as string to be used for geo-location based push notifications and advanced segmentation.
 * @discussion By default, Countly Server uses a geo-ip database for acquiring user's location, and deduces the IP address from the connection. If the app needs to explicitly specify the IP address due to network requirements, it can be provided using this property.
 * @discussion It will be sent with @c begin_session requests only.
 */
@property (nonatomic) NSString* IP;

#pragma mark -

/**
 * @discussion Custom or system generated device ID. If not set, Identifier For Vendor (IDFV) will be used by default.
 * @discussion Available system generated device ID options:
 * @discussion @c CLYIDFV (Identifier For Vendor)
 * @discussion @c CLYIDFA (Identifier For Advertising)
 * @discussion @c CLYOpenUDID (OpenUDID)
 * @discussion Once set, device ID will be stored persistently (even after app delete and re-install) and will not be changed even if set another device ID is set on start, unless @c forceDeviceIDInitialization flag is set.
 */
@property (nonatomic) NSString* deviceID;

/**
 * For forcing device ID initialization on start.
 * @discussion When it is set, persistently stored device ID will be reset and new device ID will be re-initialized using @c deviceID property on @c CountlyConfig object. It is meant to be used for debugging purposes only while developing.
 */
@property (nonatomic) BOOL forceDeviceIDInitialization;

/**
 * For applying zero-IDFA fix on queued requests.
 * @discussion If set, all requests in persistently stored request queue will be checked against zero-IDFA issue. If found, they will be fixed by either replacing with IDFV or removing from queue.
 */
@property (nonatomic) BOOL applyZeroIDFAFix;

{'fraction_non_alphanumeric': 0.06549098196392786, 'fraction_numerical': 0.001282565130260521, 'mean_word_length': 4.7679149329634765, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1822356', 'n_tokens_mistral': 3351, 'n_tokens_neox': 3075, 'n_words': 1615}