Skip to content

Commit

Permalink
update example project
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbugli committed Feb 3, 2016
1 parent 0402e1d commit 4948be3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
16 changes: 16 additions & 0 deletions Examples/Basic/Basic.xcodeproj/project.pbxproj
Expand Up @@ -186,6 +186,7 @@
49DAB8C91BB697830083AD1B /* Frameworks */,
49DAB8CA1BB697830083AD1B /* Resources */,
40084FD459CDB2B58F498956 /* Copy Pods Resources */,
4F86E673ADF207486DE2B3B9 /* Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -317,6 +318,21 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Basic/Pods-Basic-resources.sh\"\n";
showEnvVarsInLog = 0;
};
4F86E673ADF207486DE2B3B9 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Basic/Pods-Basic-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
B30567E6DFA05664F04F2C73 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
5 changes: 1 addition & 4 deletions Examples/Basic/Basic/DetailViewController.m
Expand Up @@ -19,12 +19,9 @@ -(void)viewDidLoad {
[super viewDidLoad];

//create engagement event
StreamEngagement *event = [StreamEngagement createEngagementEvent:@"open" withForeignId: @"page_main"];
StreamEngagement *event = [StreamEngagement createEngagementEvent:@"open" withContent: @{@"foreign_id": @"page_main"}];
StreamAnalytics *shared = [StreamAnalytics sharedInstance];

//set user id
[shared setUserId:@"userX"];

//send it
[shared send:event completionHandler:^(NSInteger statusCode, id JSON, NSError *error) {

Expand Down
4 changes: 2 additions & 2 deletions Examples/Basic/Basic/ViewController.m
Expand Up @@ -28,10 +28,10 @@ - (void)didReceiveMemoryWarning {
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

//track an impression
StreamImpression *event = [StreamImpression createImpressionEventWithForeignIds:@[@"id1", @"id2", @"id3"]];
StreamImpression *event = [StreamImpression createImpressionEventWithContentList:@[@"id1", @"id2", @"id3"]];

//set user id
[[StreamAnalytics sharedInstance] setUserId:@"userX"];
[[StreamAnalytics sharedInstance] setUserId:@"42" andAlias:@"test-user"];

//send with completion handler
[[StreamAnalytics sharedInstance] send:event completionHandler:^(NSInteger statusCode, id JSON, NSError *error) {
Expand Down

0 comments on commit 4948be3

Please sign in to comment.