[Pods] Updates AppCenter to 4.2.0

Allows compiling AltStore for iOS simulator from an ARM Mac.
This commit is contained in:
Riley Testut
2021-07-21 13:20:14 -07:00
parent ae0aa7dc65
commit ec1eaf00eb
365 changed files with 16447 additions and 1089 deletions

View File

@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenterAnalytics/MSACAnalytics.h>)
#import <AppCenterAnalytics/MSACAnalytics.h>
#import <AppCenterAnalytics/MSACAnalyticsAuthenticationProvider.h>
#import <AppCenterAnalytics/MSACAnalyticsAuthenticationProviderDelegate.h>
#import <AppCenterAnalytics/MSACAnalyticsTransmissionTarget.h>
#import <AppCenterAnalytics/MSACEventLog.h>
#import <AppCenterAnalytics/MSACEventProperties.h>
#else
#import "MSACAnalytics.h"
#import "MSACAnalyticsAuthenticationProvider.h"
#import "MSACAnalyticsAuthenticationProviderDelegate.h"
#import "MSACAnalyticsTransmissionTarget.h"
#import "MSACEventLog.h"
#import "MSACEventProperties.h"
#endif

View File

@@ -0,0 +1,226 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_ANALYTICS_H
#define MSAC_ANALYTICS_H
#if __has_include(<AppCenter/MSACServiceAbstract.h>)
#import <AppCenter/MSACServiceAbstract.h>
#else
#import "MSACServiceAbstract.h"
#endif
#if __has_include(<AppCenterAnalytics/MSACAnalyticsTransmissionTarget.h>)
#import <AppCenterAnalytics/MSACAnalyticsTransmissionTarget.h>
#else
#import "MSACAnalyticsTransmissionTarget.h"
#endif
@class MSACEventProperties;
NS_ASSUME_NONNULL_BEGIN
/**
* App Center analytics service.
*/
NS_SWIFT_NAME(Analytics)
@interface MSACAnalytics : MSACServiceAbstract
/**
* Track an event.
*
* @param eventName Event name. Cannot be `nil` or empty.
*
* @discussion Validation rules apply depending on the configured secret.
*
* For App Center, the name cannot be longer than 256 and is truncated otherwise.
*
* For One Collector, the name needs to match the `[a-zA-Z0-9]((\.(?!(\.|$)))|[_a-zA-Z0-9]){3,99}` regular expression.
*/
+ (void)trackEvent:(NSString *)eventName;
/**
* Track a custom event with optional string properties.
*
* @param eventName Event name. Cannot be `nil` or empty.
* @param properties Dictionary of properties. Keys and values must not be `nil`.
*
* @discussion Additional validation rules apply depending on the configured secret.
*
* For App Center:
*
* - The event name cannot be longer than 256 and is truncated otherwise.
*
* - The property names cannot be empty.
*
* - The property names and values are limited to 125 characters each (truncated).
*
* - The number of properties per event is limited to 20 (truncated).
*
*
* For One Collector:
*
* - The event name needs to match the `[a-zA-Z0-9]((\.(?!(\.|$)))|[_a-zA-Z0-9]){3,99}` regular expression.
*
* - The `baseData` and `baseDataType` properties are reserved and thus discarded.
*
* - The full event size when encoded as a JSON string cannot be larger than 1.9MB.
*/
+ (void)trackEvent:(NSString *)eventName withProperties:(nullable NSDictionary<NSString *, NSString *> *)properties;
/**
* Track a custom event with optional string properties.
*
* @param eventName Event name. Cannot be `nil` or empty.
* @param properties Dictionary of properties. Keys and values must not be `nil`.
* @param flags Optional flags. Events tracked with the MSACFlagsCritical flag will take precedence over all other events in
* storage. An event tracked with this option will only be dropped if storage must make room for a newer event that is also marked with the
* MSACFlagsCritical flag.
*
* @discussion Additional validation rules apply depending on the configured secret.
*
* For App Center:
*
* - The event name cannot be longer than 256 and is truncated otherwise.
*
* - The property names cannot be empty.
*
* - The property names and values are limited to 125 characters each (truncated).
*
* - The number of properties per event is limited to 20 (truncated).
*
*
* For One Collector:
*
* - The event name needs to match the `[a-zA-Z0-9]((\.(?!(\.|$)))|[_a-zA-Z0-9]){3,99}` regular expression.
*
* - The `baseData` and `baseDataType` properties are reserved and thus discarded.
*
* - The full event size when encoded as a JSON string cannot be larger than 1.9MB.
*/
+ (void)trackEvent:(NSString *)eventName withProperties:(nullable NSDictionary<NSString *, NSString *> *)properties flags:(MSACFlags)flags;
/**
* Track a custom event with name and optional typed properties.
*
* @param eventName Event name.
* @param properties Typed properties.
*
* @discussion The following validation rules are applied:
*
* The name cannot be null or empty.
*
* The property names or values cannot be null.
*
* Double values must be finite (NaN or Infinite values are discarded).
*
* Additional validation rules apply depending on the configured secret.
*
*
* For App Center:
*
* - The event name cannot be longer than 256 and is truncated otherwise.
*
* - The property names cannot be empty.
*
* - The property names and values are limited to 125 characters each (truncated).
*
* - The number of properties per event is limited to 20 (truncated).
*
*
* For One Collector:
*
* - The event name needs to match the `[a-zA-Z0-9]((\.(?!(\.|$)))|[_a-zA-Z0-9]){3,99}` regular expression.
*
* - The `baseData` and `baseDataType` properties are reserved and thus discarded.
*
* - The full event size when encoded as a JSON string cannot be larger than 1.9MB.
*/
+ (void)trackEvent:(NSString *)eventName
withTypedProperties:(nullable MSACEventProperties *)properties NS_SWIFT_NAME(trackEvent(_:withProperties:));
/**
* Track a custom event with name and optional typed properties.
*
* @param eventName Event name.
* @param properties Typed properties.
* @param flags Optional flags. Events tracked with the MSACFlagsCritical flag will take precedence over all other events in
* storage. An event tracked with this option will only be dropped if storage must make room for a newer event that is also marked with the
* MSACFlagsCritical flag.
*
* @discussion The following validation rules are applied:
*
* The name cannot be null or empty.
*
* The property names or values cannot be null.
*
* Double values must be finite (NaN or Infinite values are discarded).
*
* Additional validation rules apply depending on the configured secret.
*
*
* For App Center:
*
* - The event name cannot be longer than 256 and is truncated otherwise.
*
* - The property names cannot be empty.
*
* - The property names and values are limited to 125 characters each (truncated).
*
* - The number of properties per event is limited to 20 (truncated).
*
*
* For One Collector:
*
* - The event name needs to match the `[a-zA-Z0-9]((\.(?!(\.|$)))|[_a-zA-Z0-9]){3,99}` regular expression.
*
* - The `baseData` and `baseDataType` properties are reserved and thus discarded.
*
* - The full event size when encoded as a JSON string cannot be larger than 1.9MB.
*/
+ (void)trackEvent:(NSString *)eventName
withTypedProperties:(nullable MSACEventProperties *)properties
flags:(MSACFlags)flags NS_SWIFT_NAME(trackEvent(_:withProperties:flags:));
/**
* Pause transmission of Analytics logs. While paused, Analytics logs are saved to disk.
*
* @see resume
*/
+ (void)pause;
/**
* Resume transmission of Analytics logs. Any Analytics logs that accumulated on disk while paused are sent to the
* server.
*
* @see pause
*/
+ (void)resume;
/**
* Get a transmission target.
*
* @param token The token of the transmission target to retrieve.
*
* @returns The transmission target object.
*
* @discussion This method does not need to be annotated with
* NS_SWIFT_NAME(transmissionTarget(forToken:)) as this is a static method that
* doesn't get translated like a setter in Swift.
*
* @see MSACAnalyticsTransmissionTarget for comparison.
*/
+ (MSACAnalyticsTransmissionTarget *)transmissionTargetForToken:(NSString *)token NS_SWIFT_NAME(transmissionTarget(forToken:));
/**
* Send time interval for non-critical logs.
* Must be between 3 seconds and 86400 seconds (1 day).
* Must be called before Analytics service start.
*/
@property(class, atomic) NSUInteger transmissionInterval;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -0,0 +1,70 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#if __has_include(<AppCenterAnalytics/MSACAnalyticsAuthenticationProviderDelegate.h>)
#import <AppCenterAnalytics/MSACAnalyticsAuthenticationProviderDelegate.h>
#else
#import "MSACAnalyticsAuthenticationProviderDelegate.h"
#endif
/**
* Different authentication types, e.g. MSA Compact, MSA Delegate, AAD,... .
*/
typedef NS_ENUM(NSUInteger, MSACAnalyticsAuthenticationType) {
/**
* AuthenticationType MSA Compact.
*/
MSACAnalyticsAuthenticationTypeMsaCompact,
/**
* AuthenticationType MSA Delegate.
*/
MSACAnalyticsAuthenticationTypeMsaDelegate
} NS_SWIFT_NAME(AnalyticsAuthenticationType);
NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_NAME(AnalyticsAuthenticationProvider)
@interface MSACAnalyticsAuthenticationProvider : NSObject
/**
* The type.
*/
@property(nonatomic, readonly, assign) MSACAnalyticsAuthenticationType type;
/**
* The ticket key for this authentication provider.
*/
@property(nonatomic, readonly, copy) NSString *ticketKey;
/**
* The ticket key as hash.
*/
@property(nonatomic, readonly, copy) NSString *ticketKeyHash;
@property(nonatomic, readonly, weak) id<MSACAnalyticsAuthenticationProviderDelegate> delegate;
/**
* Create a new authentication provider.
*
* @param type The type for the provider, e.g. MSA.
* @param ticketKey The ticket key for the provider.
* @param delegate The delegate.
*
* @return A new authentication provider.
*/
- (instancetype)initWithAuthenticationType:(MSACAnalyticsAuthenticationType)type
ticketKey:(NSString *)ticketKey
delegate:(id<MSACAnalyticsAuthenticationProviderDelegate>)delegate;
/**
* Check expiration.
*/
- (void)checkTokenExpiry;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
@class MSACAnalyticsAuthenticationProvider;
/**
* Completion handler that returns the authentication token and the expiry date.
*/
typedef void (^MSACAnalyticsAuthenticationProviderCompletionBlock)(NSString *token, NSDate *expiryDate)
NS_SWIFT_NAME(AnalyticsAuthenticationProviderCompletionBlock);
NS_SWIFT_NAME(AnalyticsAuthenticationProviderDelegate)
@protocol MSACAnalyticsAuthenticationProviderDelegate <NSObject>
/**
* Required method that needs to be called from within your authentication flow to provide the authentication token and expiry date.
*
* @param authenticationProvider The authentication provider.
* @param completionHandler The completion handler.
*/
- (void)authenticationProvider:(MSACAnalyticsAuthenticationProvider *)authenticationProvider
acquireTokenWithCompletionHandler:(MSACAnalyticsAuthenticationProviderCompletionBlock)completionHandler;
@end

View File

@@ -0,0 +1,151 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef ANALYTICS_TRANSMISSION_TARGET
#define ANALYTICS_TRANSMISSION_TARGET
#if __has_include(<AppCenter/MSACConstants+Flags.h>)
#import <AppCenter/MSACConstants+Flags.h>
#else
#import "MSACConstants+Flags.h"
#endif
#if __has_include(<AppCenterAnalytics/MSACAnalyticsAuthenticationProvider.h>)
#import <AppCenterAnalytics/MSACAnalyticsAuthenticationProvider.h>
#import <AppCenterAnalytics/MSACPropertyConfigurator.h>
#else
#import "MSACAnalyticsAuthenticationProvider.h"
#import "MSACPropertyConfigurator.h"
#endif
@class MSACEventProperties;
NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_NAME(AnalyticsTransmissionTarget)
@interface MSACAnalyticsTransmissionTarget : NSObject
/**
* Property configurator.
*/
@property(nonatomic, readonly, strong) MSACPropertyConfigurator *propertyConfigurator;
+ (void)addAuthenticationProvider:(MSACAnalyticsAuthenticationProvider *)authenticationProvider
NS_SWIFT_NAME(addAuthenticationProvider(authenticationProvider:));
/**
* Track an event.
*
* @param eventName event name.
*/
- (void)trackEvent:(NSString *)eventName;
/**
* Track an event.
*
* @param eventName event name.
* @param properties dictionary of properties.
*/
- (void)trackEvent:(NSString *)eventName withProperties:(nullable NSDictionary<NSString *, NSString *> *)properties;
/**
* Track an event.
*
* @param eventName event name.
* @param properties dictionary of properties.
* @param flags Optional flags. Events tracked with the MSACFlagsCritical flag will take precedence over all other events in
* storage. An event tracked with this option will only be dropped if storage must make room for a newer event that is also marked with the
* MSACFlagsCritical flag.
*/
- (void)trackEvent:(NSString *)eventName withProperties:(nullable NSDictionary<NSString *, NSString *> *)properties flags:(MSACFlags)flags;
/**
* Track a custom event with name and optional typed properties.
*
* @param eventName Event name.
* @param properties Typed properties.
*
* @discussion The following validation rules are applied:
*
* The name cannot be null or empty.
*
* The property names or values cannot be null.
*
* Double values must be finite (NaN or Infinite values are discarded).
*
* Additional validation rules apply depending on the configured secret.
*
* - The event name needs to match the `[a-zA-Z0-9]((\.(?!(\.|$)))|[_a-zA-Z0-9]){3,99}` regular expression.
*
* - The `baseData` and `baseDataType` properties are reserved and thus discarded.
*
* - The full event size when encoded as a JSON string cannot be larger than 1.9MB.
*/
- (void)trackEvent:(NSString *)eventName
withTypedProperties:(nullable MSACEventProperties *)properties NS_SWIFT_NAME(trackEvent(_:withProperties:));
/**
* Track a custom event with name and optional typed properties.
*
* @param eventName Event name.
* @param properties Typed properties.
* @param flags Optional flags. Events tracked with the MSACFlagsCritical flag will take precedence over all other events in
* storage. An event tracked with this option will only be dropped if storage must make room for a newer event that is also marked with the
* MSACFlagsCritical flag.
*
* @discussion The following validation rules are applied:
*
* The name cannot be null or empty.
*
* The property names or values cannot be null.
*
* Double values must be finite (NaN or Infinite values are discarded).
*
* Additional validation rules apply depending on the configured secret.
*
* - The event name needs to match the `[a-zA-Z0-9]((\.(?!(\.|$)))|[_a-zA-Z0-9]){3,99}` regular expression.
*
* - The `baseData` and `baseDataType` properties are reserved and thus discarded.
*
* - The full event size when encoded as a JSON string cannot be larger than 1.9MB.
*/
- (void)trackEvent:(NSString *)eventName
withTypedProperties:(nullable MSACEventProperties *)properties
flags:(MSACFlags)flags NS_SWIFT_NAME(trackEvent(_:withProperties:flags:));
/**
* Get a nested transmission target.
*
* @param token The token of the transmission target to retrieve.
*
* @returns A transmission target object nested to this parent transmission target.
*/
- (MSACAnalyticsTransmissionTarget *)transmissionTargetForToken:(NSString *)token NS_SWIFT_NAME(transmissionTarget(forToken:));
/**
* The flag indicates whether or not this transmission target is enabled. Changing its state will also change states of nested transmission
* targets.
*/
@property(nonatomic, getter=isEnabled, setter=setEnabled:) BOOL enabled NS_SWIFT_NAME(enabled);
/**
* Pause sending logs for the transmission target. It doesn't pause any of its decendants.
*
* @see resume
*/
- (void)pause;
/**
* Resume sending logs for the transmission target.
*
* @see pause
*/
- (void)resume;
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MSAC_EVENT_LOG_H
#define MSAC_EVENT_LOG_H
#if __has_include(<AppCenterAnalytics/MSACLogWithNameAndProperties.h>)
#import <AppCenterAnalytics/MSACLogWithNameAndProperties.h>
#else
#import "MSACLogWithNameAndProperties.h"
#endif
@class MSACEventProperties;
@class MSACMetadataExtension;
NS_SWIFT_NAME(EventLog)
@interface MSACEventLog : MSACLogWithNameAndProperties
/**
* Unique identifier for this event.
*/
@property(nonatomic, copy) NSString *eventId;
/**
* Event properties.
*/
@property(nonatomic, strong) MSACEventProperties *typedProperties;
@end
#endif

View File

@@ -0,0 +1,61 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef EVENT_PROPERTIES
#define EVENT_PROPERTIES
NS_ASSUME_NONNULL_BEGIN
/**
* Contains typed event properties.
*/
NS_SWIFT_NAME(EventProperties)
@interface MSACEventProperties : NSObject
/**
* Set a string property.
*
* @param value Property value.
* @param key Property key.
*/
- (instancetype)setString:(NSString *)value forKey:(NSString *)key NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a double property.
*
* @param value Property value. Must be finite (`NAN` and `INFINITY` not allowed).
* @param key Property key.
*/
- (instancetype)setDouble:(double)value forKey:(NSString *)key NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a 64-bit integer property.
*
* @param value Property value.
* @param key Property key.
*/
- (instancetype)setInt64:(int64_t)value forKey:(NSString *)key NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a boolean property.
*
* @param value Property value.
* @param key Property key.
*/
- (instancetype)setBool:(BOOL)value forKey:(NSString *)key NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a date property.
*
* @param value Property value.
* @param key Property key.
*/
- (instancetype)setDate:(NSDate *)value forKey:(NSString *)key NS_SWIFT_NAME(setEventProperty(_:forKey:));
@end
NS_ASSUME_NONNULL_END
#endif

View File

@@ -0,0 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
#ifndef MSAC_LOG_WITH_NAME_PROPERTIES_H
#define MSAC_LOG_WITH_NAME_PROPERTIES_H
#if __has_include(<AppCenter/MSACLogWithProperties.h>)
#import <AppCenter/MSACLogWithProperties.h>
#else
#import "MSACLogWithProperties.h"
#endif
NS_SWIFT_NAME(LogWithNameAndProperties)
@interface MSACLogWithNameAndProperties : MSACLogWithProperties
/**
* Name of the event.
*/
@property(nonatomic, copy) NSString *name;
@end
#endif

View File

@@ -0,0 +1,116 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_NAME(PropertyConfigurator)
@interface MSACPropertyConfigurator : NSObject
/**
* Override the application version.
*
*/
@property(nonatomic, copy) NSString *_Nullable appVersion;
/**
* Override the application name.
*
*/
@property(nonatomic, copy) NSString *_Nullable appName;
/**
* Override the application locale.
*
*/
@property(nonatomic, copy) NSString *_Nullable appLocale;
/**
* User identifier.
* The identifier needs to start with c: or i: or d: or w: prefixes.
*
*/
@property(nonatomic, copy) NSString *_Nullable userId;
/**
* Set a string event property to be attached to events tracked by this transmission target and its child transmission targets.
*
* @param propertyValue Property value.
* @param propertyKey Property key.
*
* @discussion A property set in a child transmission target overrides a property with the same key inherited from its parents. Also, the
* properties passed to the `trackEvent:withProperties:` or `trackEvent:withTypedProperties:` override any property with the same key from
* the transmission target itself or its parents.
*/
- (void)setEventPropertyString:(NSString *)propertyValue forKey:(NSString *)propertyKey NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a double event property to be attached to events tracked by this transmission target and its child transmission targets.
*
* @param propertyValue Property value. Must be finite (`NAN` and `INFINITY` not allowed).
* @param propertyKey Property key.
*
* @discussion A property set in a child transmission target overrides a property with the same key inherited from its parents. Also, the
* properties passed to the `trackEvent:withProperties:` or `trackEvent:withTypedProperties:` override any property with the same key from
* the transmission target itself or its parents.
*/
- (void)setEventPropertyDouble:(double)propertyValue forKey:(NSString *)propertyKey NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a 64-bit integer event property to be attached to events tracked by this transmission target and its child transmission targets.
*
* @param propertyValue Property value.
* @param propertyKey Property key.
*
* @discussion A property set in a child transmission target overrides a property with the same key inherited from its parents. Also, the
* properties passed to the `trackEvent:withProperties:` or `trackEvent:withTypedProperties:` override any property with the same key from
* the transmission target itself or its parents.
*/
- (void)setEventPropertyInt64:(int64_t)propertyValue forKey:(NSString *)propertyKey NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a boolean event property to be attached to events tracked by this transmission target and its child transmission targets.
*
* @param propertyValue Property value.
* @param propertyKey Property key.
*
* @discussion A property set in a child transmission target overrides a property with the same key inherited from its parents. Also, the
* properties passed to the `trackEvent:withProperties:` or `trackEvent:withTypedProperties:` override any property with the same key from
* the transmission target itself or its parents.
*/
- (void)setEventPropertyBool:(BOOL)propertyValue forKey:(NSString *)propertyKey NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Set a date event property to be attached to events tracked by this transmission target and its child transmission targets.
*
* @param propertyValue Property value.
* @param propertyKey Property key.
*
* @discussion A property set in a child transmission target overrides a property with the same key inherited from its parents. Also, the
* properties passed to the `trackEvent:withProperties:` or `trackEvent:withTypedProperties:` override any property with the same key from
* the transmission target itself or its parents.
*/
- (void)setEventPropertyDate:(NSDate *)propertyValue forKey:(NSString *)propertyKey NS_SWIFT_NAME(setEventProperty(_:forKey:));
/**
* Remove an event property from this transmission target.
*
* @param propertyKey Property key.
*
* @discussion This won't remove properties with the same name declared in other nested transmission targets.
*/
- (void)removeEventPropertyForKey:(NSString *)propertyKey NS_SWIFT_NAME(removeEventProperty(forKey:));
/**
* Once called, the App Center SDK will automatically add UIDevice.identifierForVendor to common schema logs.
*
* @discussion Call this before starting the SDK. This setting is not persisted, so you need to call this when setting up the SDK every
* time. If you want to provide a way for users to opt-in or opt-out of this setting, it is on you to persist their choice and configure the
* App Center SDK accordingly.
*/
- (void)collectDeviceId;
NS_ASSUME_NONNULL_END
@end

View File

@@ -0,0 +1,9 @@
framework module AppCenterAnalytics {
umbrella header "AppCenterAnalytics.h"
export *
module * { export * }
link framework "Foundation"
link framework "UIKit"
}