Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix json model problems so that you can access objects correctly #329

Merged
merged 2 commits into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion OptimizelyDemoApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

})
#endif
let variation = optimizelyClient?.activate((self?.experimentKey)!, userId: (self?.userId)!, attributes: (self?.attributes))
let variation = optimizelyClient?.activate((self?.experimentKey)!, userId: (self?.userId)!)

if let experiments = optimizelyClient?.optimizely?.config?.experiments {
for experiment in experiments {
print(experiment.experimentKey)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print? Is this desired?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the demo app. this is just proving that the change works.

}
}
self?.setRootViewController(optimizelyClient: optimizelyClient, bucketedVariation:variation)
})

Expand Down
18 changes: 9 additions & 9 deletions OptimizelySDKCore/OptimizelySDKCore/OPTLYProjectConfig.h
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