Skip to content

Commit

Permalink
build generated frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaszurkan-optimizely committed Nov 8, 2018
1 parent ae862a9 commit 5750115
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 67 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/// Condition type
@property (nonatomic, strong) NSString *type;
/// Condition value
@property (nonatomic, strong) NSObject *value;
@property (nonatomic, strong) NSString *value;

+(BOOL)isBaseConditionJSON:(NSData *)jsonData;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Evaluate the condition against the user attributes.
*/
- (BOOL)evaluateConditionsWithAttributes:(NSDictionary<NSString *, NSObject *> *)attributes;
- (BOOL)evaluateConditionsWithAttributes:(NSDictionary<NSString *, NSString *> *)attributes;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*/
- (nullable OPTLYVariation *)getVariation:(nonnull NSString *)userId
experiment:(nonnull OPTLYExperiment *)experiment
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary *)attributes;

/**
* Get a variation the user is bucketed into for the given FeatureFlag
Expand All @@ -65,6 +65,6 @@
*/
- (nullable OPTLYFeatureDecision *)getVariationForFeature:(nonnull OPTLYFeatureFlag *)featureFlag
userId:(nonnull NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary *)attributes;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_END
- (nullable NSDictionary *)buildImpressionEventForUser:(nonnull NSString *)userId
experiment:(nonnull OPTLYExperiment *)experiment
variation:(nonnull OPTLYVariation *)variation
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

/**
* Create the parameters for a conversion event.
Expand All @@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_END
event:(nonnull OPTLYEvent *)event
decisions:(nonnull NSArray<NSDictionary *> *)decisions
eventTags:(nullable NSDictionary *)eventTags
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;
@end

@interface OPTLYEventBuilderDefault : NSObject<OPTLYEventBuilder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,6 @@
*/

@protocol OPTLYExperiment

/// The experiment's ID.
@property (nonatomic, strong, nonnull) NSString *experimentId;
/// The experiment's Key.
@property (nonatomic, strong, nonnull) NSString *experimentKey;
/// The experiment's status.
@property (nonatomic, strong, nonnull) NSString *status;
/// The group ID the experiment belongs to.
@property (nonatomic, strong, nullable) NSString<Ignore> *groupId;
/// The experiment's traffic allocations.
@property (nonatomic, strong, nonnull) NSArray<OPTLYTrafficAllocation> *trafficAllocations;
/// An array of audience Ids for the experiment
@property (nonatomic, strong, nonnull) NSArray<NSString *> *audienceIds;
/// An array of variation Ids for the experiment
@property (nonatomic, strong, nonnull) NSArray<OPTLYVariation> *variations;
/// A dictionary indicating the forced and control variation
@property (nonatomic, strong, nonnull) NSDictionary<NSString *, NSString *> *forcedVariations;
/// Personalization layer id
@property (nonatomic, strong, nonnull) NSString *layerId;

/// Gets the variation object for a given variation id
- (nullable OPTLYVariation *)getVariationForVariationId:(nonnull NSString *)variationId;
/// Gets the variation object for a given variation key
- (nullable OPTLYVariation *)getVariationForVariationKey:(nonnull NSString *)variationKey;

/// Determines if the experiment is running
- (BOOL)isExperimentRunning;


@end

NS_ASSUME_NONNULL_BEGIN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ typedef NS_ENUM(NSUInteger, OPTLYNotificationType) {

typedef void (^ActivateListener)(OPTLYExperiment * _Nonnull experiment,
NSString * _Nonnull userId,
NSDictionary<NSString *, NSObject *> * _Nonnull attributes,
NSDictionary<NSString *,NSString *> * _Nonnull attributes,
OPTLYVariation * _Nonnull variation,
NSDictionary<NSString *,NSObject *> * _Nonnull event);

typedef void (^TrackListener)(NSString * _Nonnull eventKey,
NSString * _Nonnull userId,
NSDictionary<NSString *, NSObject *> * _Nonnull attributes,
NSDictionary<NSString *,NSString *> * _Nonnull attributes,
NSDictionary * _Nonnull eventTags,
NSDictionary<NSString *,NSObject *> * _Nonnull event);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ NS_ASSUME_NONNULL_END
/// Flag for Bot Filtering
@property (nonatomic, strong, nonnull) NSNumber<OPTLYOptional> *botFiltering;
/// List of Optimizely Experiment objects
@property (nonatomic, strong, nonnull) NSArray<id<OPTLYExperiment>> *experiments;
@property (nonatomic, strong, nonnull) NSArray<OPTLYExperiment*><OPTLYExperiment> *experiments;
/// List of Optimizely Event Type objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYEvent> *events;
@property (nonatomic, strong, nonnull) NSArray<OPTLYEvent *><OPTLYEvent> *events;
/// List of audience ids
@property (nonatomic, strong, nonnull) NSArray<OPTLYAudience> *audiences;
@property (nonatomic, strong, nonnull) NSArray<OPTLYAudience *><OPTLYAudience> *audiences;
/// List of attributes objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYAttribute> *attributes;
@property (nonatomic, strong, nonnull) NSArray<OPTLYAttribute*><OPTLYAttribute> *attributes;
/// List of group objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYGroup> *groups;
@property (nonatomic, strong, nonnull) NSArray<OPTLYGroup*><OPTLYGroup> *groups;
/// List of live variable objects (DEPRECATED)
@property (nonatomic, strong, nonnull) NSArray<OPTLYVariable, OPTLYOptional> *variables;
@property (nonatomic, strong, nonnull) NSArray<OPTLYVariable *><OPTLYVariable, OPTLYOptional> *variables;

/// a comprehensive list of experiments that includes experiments being whitelisted (in Groups)
@property (nonatomic, strong, nullable) NSArray<OPTLYExperiment, Ignore> *allExperiments;
@property (nonatomic, strong, nullable) NSArray<OPTLYExperiment*><OPTLYExperiment, OPTLYOptional> *allExperiments;
@property (nonatomic, strong, nullable) id<OPTLYLogger, Ignore> logger;
@property (nonatomic, strong, nullable) id<OPTLYErrorHandler, Ignore> errorHandler;
@property (nonatomic, strong, readonly, nullable) id<OPTLYUserProfileService, Ignore> userProfileService;
Expand All @@ -72,9 +72,9 @@ NS_ASSUME_NONNULL_END
/// Returns the client version number
@property (nonatomic, strong, readonly, nonnull) NSString<Ignore> *clientVersion;
/// List of Optimizely Feature Flags objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYFeatureFlag, OPTLYOptional> *featureFlags;
@property (nonatomic, strong, nonnull) NSArray<OPTLYFeatureFlag*><OPTLYFeatureFlag, OPTLYOptional> *featureFlags;
/// List of Optimizely Rollouts objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYRollout, OPTLYOptional> *rollouts;
@property (nonatomic, strong, nonnull) NSArray<OPTLYRollout*><OPTLYRollout, OPTLYOptional> *rollouts;

/**
* Initialize the Project Config from a builder block.
Expand Down Expand Up @@ -172,7 +172,7 @@ __attribute((deprecated("Use OPTLYProjectConfig initWithBuilder method instead."
*/
- (nullable OPTLYVariation *)getVariationForExperiment:(nonnull NSString *)experimentKey
userId:(nonnull NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes
attributes:(nullable NSDictionary<NSString *,NSString *> *)attributes
bucketer:(nullable id<OPTLYBucketer>)bucketer;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
*/
- (nullable OPTLYVariation *)activate:(nonnull NSString *)experimentKey
userId:(nonnull NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

#pragma mark - getVariation methods
/**
Expand All @@ -90,7 +90,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
*/
- (nullable OPTLYVariation *)variation:(nonnull NSString *)experimentKey
userId:(nonnull NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

#pragma mark - Forced Variation Methods
/**
Expand Down Expand Up @@ -135,7 +135,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
* @param attributes The user's attributes.
* @return YES if feature is enabled, false otherwise.
*/
- (BOOL)isFeatureEnabled:(nullable NSString *)featureKey userId:(nullable NSString *)userId attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
- (BOOL)isFeatureEnabled:(nullable NSString *)featureKey userId:(nullable NSString *)userId attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

/**
* Gets boolean feature variable value.
Expand All @@ -148,7 +148,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
- (nullable NSNumber *)getFeatureVariableBoolean:(nullable NSString *)featureKey
variableKey:(nullable NSString *)variableKey
userId:(nullable NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

/**
* Gets double feature variable value.
Expand All @@ -161,7 +161,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
- (nullable NSNumber *)getFeatureVariableDouble:(nullable NSString *)featureKey
variableKey:(nullable NSString *)variableKey
userId:(nullable NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

/**
* Gets integer feature variable value.
Expand All @@ -174,7 +174,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
- (nullable NSNumber *)getFeatureVariableInteger:(nullable NSString *)featureKey
variableKey:(nullable NSString *)variableKey
userId:(nullable NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

/**
* Gets string feature variable value.
Expand All @@ -187,7 +187,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
- (nullable NSString *)getFeatureVariableString:(nullable NSString *)featureKey
variableKey:(nullable NSString *)variableKey
userId:(nullable NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

/**
* Get array of features that are enabled for the user.
Expand All @@ -196,7 +196,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
* @return NSArray<NSString> Array of feature keys that are enabled for the user.
*/
- (NSArray<NSString *> *_Nonnull)getEnabledFeatures:(nullable NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;

#pragma mark - trackEvent methods
/**
Expand All @@ -215,7 +215,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
*/
- (void)track:(nonnull NSString *)eventKey
userId:(nonnull NSString *)userId
attributes:(nonnull NSDictionary<NSString *, NSObject *> *)attributes;
attributes:(nonnull NSDictionary<NSString *, NSString *> *)attributes;

/**
* Track an event
Expand All @@ -236,7 +236,7 @@ typedef NS_ENUM(NSInteger, OPTLYLiveVariableError) {
*/
- (void)track:(nonnull NSString *)eventKey
userId:(nonnull NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes
eventTags:(nullable NSDictionary<NSString *, id> *)eventTags;

////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -584,7 +584,7 @@ __attribute((deprecated("Use Optimizely initWithBuilder method instead.")));
*/
- (void)track:(nonnull NSString *)eventKey
userId:(nonnull NSString *)userId
attributes:(nullable NSDictionary<NSString *, NSObject *> *)attributes
attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes
eventTags:(nullable NSDictionary<NSString *, id> *)eventTags;

@end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ NS_ASSUME_NONNULL_END
/// Flag for Bot Filtering
@property (nonatomic, strong, nonnull) NSNumber<OPTLYOptional> *botFiltering;
/// List of Optimizely Experiment objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYExperiment> *experiments;
@property (nonatomic, strong, nonnull) NSArray<OPTLYExperiment*><OPTLYExperiment> *experiments;
/// List of Optimizely Event Type objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYEvent> *events;
@property (nonatomic, strong, nonnull) NSArray<OPTLYEvent *><OPTLYEvent> *events;
/// List of audience ids
@property (nonatomic, strong, nonnull) NSArray<OPTLYAudience> *audiences;
@property (nonatomic, strong, nonnull) NSArray<OPTLYAudience *><OPTLYAudience> *audiences;
/// List of attributes objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYAttribute> *attributes;
@property (nonatomic, strong, nonnull) NSArray<OPTLYAttribute*><OPTLYAttribute> *attributes;
/// List of group objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYGroup> *groups;
@property (nonatomic, strong, nonnull) NSArray<OPTLYGroup*><OPTLYGroup> *groups;
/// List of live variable objects (DEPRECATED)
@property (nonatomic, strong, nonnull) NSArray<OPTLYVariable, OPTLYOptional> *variables;
@property (nonatomic, strong, nonnull) NSArray<OPTLYVariable *><OPTLYVariable, OPTLYOptional> *variables;

/// a comprehensive list of experiments that includes experiments being whitelisted (in Groups)
@property (nonatomic, strong, nullable) NSArray<OPTLYExperiment, Ignore> *allExperiments;
@property (nonatomic, strong, nullable) NSArray<OPTLYExperiment*><OPTLYExperiment, OPTLYOptional> *allExperiments;
@property (nonatomic, strong, nullable) id<OPTLYLogger, Ignore> logger;
@property (nonatomic, strong, nullable) id<OPTLYErrorHandler, Ignore> errorHandler;
@property (nonatomic, strong, readonly, nullable) id<OPTLYUserProfileService, Ignore> userProfileService;
Expand All @@ -72,9 +72,9 @@ NS_ASSUME_NONNULL_END
/// Returns the client version number
@property (nonatomic, strong, readonly, nonnull) NSString<Ignore> *clientVersion;
/// List of Optimizely Feature Flags objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYFeatureFlag, OPTLYOptional> *featureFlags;
@property (nonatomic, strong, nonnull) NSArray<OPTLYFeatureFlag*><OPTLYFeatureFlag, OPTLYOptional> *featureFlags;
/// List of Optimizely Rollouts objects
@property (nonatomic, strong, nonnull) NSArray<OPTLYRollout, OPTLYOptional> *rollouts;
@property (nonatomic, strong, nonnull) NSArray<OPTLYRollout*><OPTLYRollout, OPTLYOptional> *rollouts;

/**
* Initialize the Project Config from a builder block.
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 5750115

Please sign in to comment.