Skip to content

Commit

Permalink
updated for v. 2.0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
amironicheva committed Sep 23, 2019
1 parent 2832c6f commit ee5d116
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,33 @@ You can also receive the profile's group by using the special method:
```


## A/B testing (experiments)

> It's supported since version 2.0.29 of SDK for iOS.

### Step 19

In order to start working with experiments, it's needed to add some methods:

In order to confirm that the experiment payload settings have been applied and the player should take part in the experiment, it's needed to return _true_:

```swift
func canStart(_ experiment: GWExperiment) -> Bool {
//Read experiment.payload, apply changes for experiment and return True if changes were applied

  return true;
}
```

When the experiment is finished, `OnExperimentEnded` method will be called. You are able to remove all experiment changes or keep them for further work regardless of the experiment:

```swift
func onExperimentEnded(_ experiment: GWExperiment) {
//Disable experiment changes or keep them
}




# Objective-C

Expand Down Expand Up @@ -882,6 +909,34 @@ You can also receive the profile's group by using the special method:
NSString * group = [GW GetUserGroup];
```

## A/B testing (experiments)

> It's supported since version 2.0.29 of SDK for iOS.

### Step 19

In order to start working with experiments, it's needed to add some methods:

In order to confirm that the experiment payload settings have been applied and the player should take part in the experiment, it's needed to return  true:

```objc
- (BOOL) CanStartExperiment:(nonnull GWExperiment*) experiment
{
//Read experiment.payload, apply changes for experiment and return True if changes were applied

return true;
}
```

When the experiment is finished, `OnExperimentEnded` method will be called. You are able to remove all experiment changes or keep them for further work regardless of the experiment:

```objc
- (void) OnExperimentEnded:(nonnull GWExperiment*) experiment
{
//Disable experiment changes or keep them
}
```



> You can find an example of using the SDK [here](https://github.com/Game-of-whales/GOW-SDK-IOS/tree/master/Example).
Expand Down

0 comments on commit ee5d116

Please sign in to comment.