Skip to content

Commit

Permalink
prepare 3.0.0 release (#377)
Browse files Browse the repository at this point in the history
* fix changelog

* fix changelog and tests

* merge readme fix

* fix unexported script to use Lagacy Build System

* fix changelog

* fix date

* fix date and link PRs
  • Loading branch information
jaeopt authored Feb 14, 2019
1 parent bf5b2b9 commit dd704d4
Show file tree
Hide file tree
Showing 74 changed files with 906 additions and 1,254 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# Optimizely Objective-C SDK Changelog

## 3.0.0
February 14th, 2019

The 3.0 release improves event tracking and supports additional audience targeting functionality.

### New Features:
* Event tracking ([#359](https://github.com/optimizely/objective-c-sdk/pull/359)):
* The Track method now dispatches its conversion event _unconditionally_, without first determining whether the user is targeted by a known experiment that uses the event. This may increase outbound network traffic.
* In Optimizely results, conversion events sent by 3.0 SDKs are automatically attributed to variations that the user has previously seen, as long as our backend has actually received the impression events for those variations.
* Altogether, this allows you to track conversion events and attribute them to variations even when you don't know all of a user's attribute values, and even if the user's attribute values or the experiment's configuration have changed such that the user is no longer affected by the experiment. As a result, **you may observe an increase in the conversion rate for previously-instrumented events.** If that is undesirable, you can reset the results of previously-running experiments after upgrading to the 3.0 SDK.
* This will also allow you to attribute events to variations from other Optimizely projects in your account, even though those experiments don't appear in the same datafile.
* Note that for results segmentation in Optimizely results, the user attribute values from one event are automatically applied to all other events in the same session, as long as the events in question were actually received by our backend. This behavior was already in place and is not affected by the 3.0 release.
* Support for all types of attribute values, not just strings ([#309](https://github.com/optimizely/objective-c-sdk/pull/309)).
* All values are passed through to notification listeners.
* Strings, booleans, and valid numbers are passed to the event dispatcher and can be used for Optimizely results segmentation. A valid number is a finite number in the inclusive range [-2⁵³, 2⁵³].
* Strings, booleans, and valid numbers are relevant for audience conditions.
* Support for additional matchers in audience conditions ([#337](https://github.com/optimizely/objective-c-sdk/pull/337)):
* An `exists` matcher that passes if the user has a non-null value for the targeted user attribute and fails otherwise.
* A `substring` matcher that resolves if the user has a string value for the targeted attribute.
* `gt` (greater than) and `lt` (less than) matchers that resolve if the user has a valid number value for the targeted attribute. A valid number is a finite number in the inclusive range [-2⁵³, 2⁵³].
* The original (`exact`) matcher can now be used to target booleans and valid numbers, not just strings.
* Support for A/B tests, feature tests, and feature rollouts whose audiences are combined using `"and"` and `"not"` operators, not just the `"or"` operator.
* Datafile-version compatibility check: The SDK will remain uninitialized (i.e., will gracefully fail to activate experiments and features) if given a datafile version greater than 4.
* Updated Pull Request template and commit message guidelines.
* Support for empty bucketing IDs when evaluating feature rollouts ([#367](https://github.com/optimizely/objective-c-sdk/pull/367)).

### Breaking Changes:
* Previously, notification listeners were only given string-valued user attributes because only strings could be passed into various method calls. That is no longer the case. The `ActivateListener` and `TrackListener` interfaces now receive user attributes as `NSDictionary<NSString *, NSObject *> * _Nullable` instead of `NSDictionary<NSString *,NSString *> * _Nonnull`.
* The Localytics integration now relies on the user profile service to attribute events to the user's variations.
* Drops support for the `variableBoolean`, `variableDouble`, `variableInteger`, and `variableString` APIs. Please migrate to the Feature Management APIs which were introduced in the 2.x releases.

### Bug Fixes:
* Experiments and features can no longer activate when a negatively targeted attribute has a missing, null, or malformed value.
* Audience conditions (except for the new `exists` matcher) no longer resolve to `false` when they fail to find an legitimate value for the targeted user attribute. The result remains `null` (unknown). Therefore, an audience that negates such a condition (using the `"not"` operator) can no longer resolve to `true` unless there is an unrelated branch in the condition tree that itself resolves to `true` ([#355](https://github.com/optimizely/objective-c-sdk/pull/355)).
* Support for empty user IDs ([#356](https://github.com/optimizely/objective-c-sdk/pull/356)).
* Updated `JSONModel` definitions ([#329](https://github.com/optimizely/objective-c-sdk/pull/329)).

## 2.1.6
January 25th, 2019

This includes a fix for revenue and metrics. Numbers 0 and 1 were evaluated as false and true causing us to drop them from the event.

### New Features
* No new features for this patch release.

### Bug Fixes:
* Check for BOOL type but allow number values 0 and 1 in revenue and metrics to go to results.
* Only remove old variation assignments from the user profile service when there are >= 100 persisted assignments.

## 2.1.5
December 6th, 2018

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
2 changes: 1 addition & 1 deletion OptimizelySDKCore.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OptimizelySDKCore"
s.version = "2.1.4"
s.version = "3.0.0"
s.summary = "Optimizely server-side testing core framework."
s.homepage = "http://developers.optimizely.com/server/reference/index.html?language=objectivec"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand Down
12 changes: 6 additions & 6 deletions OptimizelySDKCore/OptimizelySDKCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2264,9 +2264,9 @@
MODULEMAP_FILE = OptimizelySDKCore/OptimizelySDKCore.modulemap;
MTL_ENABLE_DEBUG_INFO = NO;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME)";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -2554,9 +2554,9 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME)";
SDKROOT = iphoneos;
Expand Down
4 changes: 2 additions & 2 deletions OptimizelySDKDatafileManager.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OptimizelySDKDatafileManager"
s.version = "2.1.4"
s.version = "3.0.0"
s.summary = "Optimizely server-side testing datafile manager framework."
s.homepage = "http://developers.optimizely.com/server/reference/index.html?language=objectivec"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand All @@ -16,5 +16,5 @@ Pod::Spec.new do |s|
s.framework = "Foundation"
s.requires_arc = true
s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => "OPTIMIZELY_SDK_VERSION=@\\\"#{s.version}\\\"" }
s.dependency 'OptimizelySDKShared', '2.1.4'
s.dependency 'OptimizelySDKShared', "3.0.0"
end
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,9 @@
MODULEMAP_FILE = OptimizelySDKDatafileManager/OptimizelySDKDatafileManager.modulemap;
MTL_ENABLE_DEBUG_INFO = NO;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
Expand Down Expand Up @@ -811,9 +811,9 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
Expand Down
4 changes: 2 additions & 2 deletions OptimizelySDKEventDispatcher.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OptimizelySDKEventDispatcher"
s.version = "2.1.4"
s.version = "3.0.0"
s.summary = "Optimizely server-side testing event dispatcher framework."
s.homepage = "http://developers.optimizely.com/server/reference/index.html?language=objectivec"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand All @@ -16,5 +16,5 @@ Pod::Spec.new do |s|
s.framework = "Foundation"
s.requires_arc = true
s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => "OPTIMIZELY_SDK_VERSION=@\\\"#{s.version}\\\"" }
s.dependency 'OptimizelySDKShared', '2.1.4'
s.dependency 'OptimizelySDKShared', "3.0.0"
end
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,9 @@
MODULEMAP_FILE = OptimizelySDKEventDispatcher/OptimizelySDKEventDispatcher.modulemap;
MTL_ENABLE_DEBUG_INFO = NO;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
Expand Down Expand Up @@ -758,9 +758,9 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
Expand Down
4 changes: 2 additions & 2 deletions OptimizelySDKShared.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OptimizelySDKShared"
s.version = "2.1.4"
s.version = "3.0.0"
s.summary = "Optimizely server-side testing shared framework."
s.homepage = "http://developers.optimizely.com/server/reference/index.html?language=objectivec"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand All @@ -18,5 +18,5 @@ Pod::Spec.new do |s|
s.ios.library = "sqlite3"
s.requires_arc = true
s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => "OPTIMIZELY_SDK_VERSION=@\\\"#{s.version}\\\"" }
s.dependency 'OptimizelySDKCore', '2.1.4'
s.dependency 'OptimizelySDKCore', "3.0.0"
end
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,9 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
Expand Down Expand Up @@ -1201,9 +1201,9 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
Expand Down
8 changes: 4 additions & 4 deletions OptimizelySDKTVOS.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OptimizelySDKTVOS"
s.version = "2.1.4"
s.version = "3.0.0"
s.summary = "Optimizely server-side testing framework for tvOS."
s.homepage = "http://developers.optimizely.com/server/reference/index.html?language=objectivec"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
Expand All @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.framework = "Foundation"
s.requires_arc = true
s.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => "OPTIMIZELY_SDK_VERSION=@\\\"#{s.version}\\\"" }
s.dependency 'OptimizelySDKEventDispatcher', '2.1.4'
s.dependency 'OptimizelySDKUserProfileService', '2.1.4'
s.dependency 'OptimizelySDKDatafileManager', '2.1.4'
s.dependency 'OptimizelySDKEventDispatcher', "3.0.0"
s.dependency 'OptimizelySDKUserProfileService', "3.0.0"
s.dependency 'OptimizelySDKDatafileManager', "3.0.0"
end
12 changes: 6 additions & 6 deletions OptimizelySDKTVOS/OptimizelySDKTVOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,9 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = appletvos;
SWIFT_VERSION = 4.2;
Expand Down Expand Up @@ -771,9 +771,9 @@
MODULEMAP_FILE = OptimizelySDKTVOS/OptimizelySDKTVOS.modulemap;
MTL_ENABLE_DEBUG_INFO = NO;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
SDKROOT = appletvos;
SWIFT_VERSION = 4.2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1949,9 +1949,9 @@
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
RESOURCES_TARGETED_DEVICE_FAMILY = "";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -2022,9 +2022,9 @@
MODULEMAP_FILE = "";
MTL_ENABLE_DEBUG_INFO = NO;
OPTIMIZELY_SDK_VERSION = "$(OPTIMIZELY_SDK_VERSION_MAJOR).$(OPTIMIZELY_SDK_VERSION_MINOR).$(OPTIMIZELY_SDK_VERSION_PATCH)$(OPTIMIZELY_SDK_VERSION_SUFFIX)";
OPTIMIZELY_SDK_VERSION_MAJOR = 2;
OPTIMIZELY_SDK_VERSION_MINOR = 1;
OPTIMIZELY_SDK_VERSION_PATCH = 4;
OPTIMIZELY_SDK_VERSION_MAJOR = 3;
OPTIMIZELY_SDK_VERSION_MINOR = 0;
OPTIMIZELY_SDK_VERSION_PATCH = 0;
OPTIMIZELY_SDK_VERSION_SUFFIX = "";
RESOURCES_TARGETED_DEVICE_FAMILY = "";
SDKROOT = iphoneos;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2016, Optimizely, Inc. and contributors *
* Copyright 2016,2018-2019, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
Expand Down Expand Up @@ -32,9 +32,14 @@
/// The audience name
@property (nonatomic, strong) NSString *audienceName;
/// Audience evaluator conditionals
@property (nonatomic, strong) NSArray<OPTLYCondition> *conditions;
@property (nonatomic, strong) NSArray<OPTLYCondition *><OPTLYCondition> *conditions;

/// Override OPTLYJSONModel set conditions
- (void)setConditionsWithNSString:(NSString *)string;
- (void)setConditionsWithNSArray:(NSArray *)array;
- (void)setConditionsWithNSDictionary:(NSDictionary *)dictionary;

/// Returns conditions string
- (NSString *)getConditionsString;

@end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2016, Optimizely, Inc. and contributors *
* Copyright 2018-2019, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
Expand All @@ -14,38 +14,20 @@
* limitations under the License. *
***************************************************************************/

#import <Foundation/Foundation.h>
#ifdef UNIVERSAL
#import "OPTLYJSONModelLib.h"
#import "OPTLYJSONModelLib.h"
#else
#import <OptimizelySDKCore/OPTLYJSONModelLib.h>
#import <OptimizelySDKCore/OPTLYJSONModelLib.h>
#endif
#import "OPTLYCondition.h"

/**
* This class is a representation of an Optimizely live variable scoped within a project:
* "variables": [
* {
* "id": "6384881128",
* "key": "someString",
* "type": "string",
* "defaultValue": "defaultStringValue"
* },
* ...
* ]
*/

@protocol OPTLYVariable
@protocol OPTLYAudienceBaseCondition
@end

@interface OPTLYVariable : OPTLYJSONModel
@interface OPTLYAudienceBaseCondition : NSObject <OPTLYCondition>

/// The variable's ID.
@property (nonatomic, strong) NSString *variableId;
/// The variable's Key.
@property (nonatomic, strong) NSString *variableKey;
/// The variable's type.
@property (nonatomic, strong) NSString *type;
/// The variable's default value.
@property (nonatomic, strong) NSString *defaultValue;
@property (nonatomic, strong, nonnull) NSString *audienceId;
+(BOOL)isBaseConditionJSON:(nonnull NSData *)jsonData;

@end

Loading

0 comments on commit dd704d4

Please sign in to comment.