Skip to content

Releases: optimizely/objective-c-sdk

Pre-Release 2.0.2-beta1

18 May 04:04
4131f7a
Compare
Choose a tag to compare
Pre-release

2.0.2-beta1

May 17, 2018

This "-beta1" pre-release corrects two significant bugs present in the
previous 2.0.x releases which have been withdrawn. Please note that
2.0+ SDKs are incompatible with existing 1.x Mobile Optimizely
projects. Before you use 2.0+ and Feature Management, please contact
your Optimizely account team. If you are not upgrading to Feature
Management, we recommend remaining on your current 1.x SDK.

This major release of the Optimizely SDK introduces APIs for Feature Management.

New Features

  • Introduces the isFeatureEnabled:userId:attributes: API to determine whether to show a feature to a user or not.
/**
 * Determine whether a feature is enabled.
 * Send an impression event if the user is bucketed into an experiment using the feature.
 * @param featureKey The key for the feature flag.
 * @param userId The user ID to be used for bucketing.
 * @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 *, NSString *> *)attributes;
  • You can get all the enabled features for the user by calling the getEnabledFeatures:attributes: API which returns an array of strings representing the feature keys:
/**
 * Get array of features that are enabled for the user.
 * @param userId The user ID to be used for bucketing.
 * @param attributes The user's attributes.
 * @return NSArray<NSString> Array of feature keys that are enabled for the user.
 */
- (NSArray<NSString *> *_Nonnull)getEnabledFeatures:(nullable NSString *)userId
                                         attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;
  • Introduces Feature Variables to configure or parameterize your feature. There are four variable types: BOOL, double, int, NSString*.
/**
 * API's that get feature variable values.
 * @param featureKey The key for the feature flag.
 * @param variableKey The key for the variable.
 * @param userId The user ID to be used for bucketing.
 * @param attributes The user's attributes.
 * @return feature variable value.
 */
- (BOOL)getFeatureVariableBoolean:(nullable NSString *)featureKey
                      variableKey:(nullable NSString *)variableKey
                           userId:(nullable NSString *)userId
                       attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;
- (double)getFeatureVariableDouble:(nullable NSString *)featureKey
                       variableKey:(nullable NSString *)variableKey
                            userId:(nullable NSString *)userId
                        attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;
- (int)getFeatureVariableInteger:(nullable NSString *)featureKey
                     variableKey:(nullable NSString *)variableKey
                          userId:(nullable NSString *)userId
                      attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;
- (NSString *_Nullable)getFeatureVariableString:(nullable NSString *)featureKey
                           variableKey:(nullable NSString *)variableKey
                                userId:(nullable NSString *)userId
                            attributes:(nullable NSDictionary<NSString *, NSString *> *)attributes;
  • Introducing Optimizely Notification Center with Notification Listeners
    Optimizely object now has a Notification Center
    @property (nonatomic, strong, readonly, nullable) OPTLYNotificationCenter *notificationCenter;

with Notification Listeners APIs

- (NSInteger)addActivateNotificationListener:(nonnull ActivateListener)activateListener;
- (NSInteger)addTrackNotificationListener:(TrackListener _Nonnull )trackListener;
- (BOOL)removeNotificationListener:(NSUInteger)notificationId;
- (void)clearNotificationListeners:(OPTLYNotificationType)type;
- (void)clearAllNotificationListeners;
  • Added @"$opt_bucketing_id" in the attribute map for overriding bucketing using the user id. This string is
    available as OptimizelyBucketId in OPTLYEventBuilder.h .

  • Adding mobile 2.x data file CDN url change to support FullStack projects without Feature Management V2 schema.

Bug Fixes:

  • Fix single quote in events issue. Event was sent repeatedly because it was
    unable to be deleted from data store due to syntax error.
  • Remove "Pod_..." static library from demo app "Embedded Frameworks".
  • Fix red Xcode Project Navigator group folder.

Breaking Changes

  • Removed track APIs with revenue as a parameter.
  • Deprecated live variable APIs.

Release 1.5.1

17 Apr 22:03
Compare
Choose a tag to compare

1.5.1

April 17, 2018

Bug Fixes:

  • Fix single quote in events issue. Event was sent repeatedly because it was
    unable to be deleted from data store due to syntax error.
  • Remove "Pod_..." static library from demo app "Embedded Frameworks".
  • Fix red Xcode Project Navigator group folder.

Shared 0.2.1 Alpha

05 Dec 23:16
shared-0.2.1-alpha
2bcffb6
Compare
Choose a tag to compare
Shared 0.2.1 Alpha Pre-release
Pre-release

pre-release of shared 0.2.1

Core 0.2.1 Alpha

05 Dec 23:16
core-0.2.1-alpha
23f1d52
Compare
Choose a tag to compare
Core 0.2.1 Alpha Pre-release
Pre-release

This is an internal alpha release of Core 0.2.1.