Skip to content

Commit

Permalink
Prepare for release 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenzhi committed Mar 22, 2016
1 parent 08dd8cb commit 87fd20b
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ DerivedData
# emacs
*~

# Cocoapods
Example/Podfile.lock

Carthage
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
==========

Version 1.0.2 *(March, 2016)*
-------------------------------------------
*(Supports analytics-ios 3.0.+ and Appboy 2.19.1+)*

- Adds support for custom attribute values with short, long, and float types.
- Modifies `SEGAppboyIntegrationFactory`'s `instance` method to return an `instancetype` for simpler Swift integration.

Version 1.0.1 *(March, 2016)*
-------------------------------------------
*(Supports analytics-ios 3.0.+ and Appboy 2.18.2+)*
Expand Down
35 changes: 0 additions & 35 deletions Example/Podfile.lock

This file was deleted.

4 changes: 2 additions & 2 deletions Example/Segment-Appboy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
3E1CB38A67EF2A5AD3E448E7 /* Pods_Segment_Appboy_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 589BD37A4C260FD9A3C992C7 /* Pods_Segment_Appboy_Example.framework */; };
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
Expand All @@ -23,7 +24,6 @@
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
D3C0897B71D57C614E791C33 /* Pods_Segment_Appboy_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F373C65B14EBD0A693B5E1B9 /* Pods_Segment_Appboy_Tests.framework */; };
E34AFDEF1C0E7B3B0069EFC5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E34AFDEE1C0E7B3B0069EFC5 /* LaunchScreen.xib */; };
EE2F29D98DEAD57250510643 /* Pods_Segment_Appboy_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 589BD37A4C260FD9A3C992C7 /* Pods_Segment_Appboy_Example.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -75,7 +75,7 @@
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
EE2F29D98DEAD57250510643 /* Pods_Segment_Appboy_Example.framework in Frameworks */,
3E1CB38A67EF2A5AD3E448E7 /* Pods_Segment_Appboy_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
9 changes: 8 additions & 1 deletion Example/Segment-Appboy/SEGViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ - (void)didReceiveMemoryWarning
}

- (IBAction)identifyButtonPress:(id)sender {
NSInteger integerAttribute = 200;
float floatAttribute = 12.3f;
int intAttribute = 18;
short shortAttribute = (short)2;
[[SEGAnalytics sharedAnalytics] identify:@"appboySegementTestUseriOS"
traits:@{ @"email": @"[email protected]",
@"bool" : @(YES),
@"double" : @(3.14159),
@"integer": @(31),
@"intAttribute": @(intAttribute),
@"integerAttribute" : @(integerAttribute),
@"floatAttribute" : @(floatAttribute),
@"shortAttribute" : @(shortAttribute),
@"gender" : @"female",
@"birthday" : [NSDate dateWithTimeIntervalSince1970:564559200],
@"firstName" : @"Appboy",
Expand Down
7 changes: 5 additions & 2 deletions Pod/Classes/SEGAppboyIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,13 @@ - (void)identify:(SEGIdentifyPayload *)payload
if (strcmp([traitValue objCType], [@(YES) objCType]) == 0) {
[[Appboy sharedInstance].user setCustomAttributeWithKey:key andBOOLValue:[(NSNumber *)traitValue boolValue]];
SEGLog(@"[[Appboy sharedInstance].user setCustomAttributeWithKey: andBOOLValue:]");
} else if (strcmp([traitValue objCType], @encode(int)) == 0) {
} else if (strcmp([traitValue objCType], @encode(short)) == 0 ||
strcmp([traitValue objCType], @encode(int)) == 0 ||
strcmp([traitValue objCType], @encode(long)) == 0) {
[[Appboy sharedInstance].user setCustomAttributeWithKey:key andIntegerValue:[(NSNumber *)traitValue integerValue]];
SEGLog(@"[[Appboy sharedInstance].user setCustomAttributeWithKey: andIntegerValue:]");
} else if (strcmp([traitValue objCType], @encode(double)) == 0) {
} else if (strcmp([traitValue objCType], @encode(float)) == 0 ||
strcmp([traitValue objCType], @encode(double)) == 0) {
[[Appboy sharedInstance].user setCustomAttributeWithKey:key andDoubleValue:[(NSNumber *)traitValue doubleValue]];
SEGLog(@"[[Appboy sharedInstance].user setCustomAttributeWithKey: andDoubleValue:]");
} else {
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/SEGAppboyIntegrationFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@interface SEGAppboyIntegrationFactory : NSObject<SEGIntegrationFactory>

+ (id)instance;
+ (instancetype)instance;

- (void)saveLaunchOptions:(NSDictionary *)launchOptions;
- (void)saveRemoteNotification:(NSDictionary *)userInfo;
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/SEGAppboyIntegrationFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ @interface SEGAppboyIntegrationFactory ()

@implementation SEGAppboyIntegrationFactory

+ (id)instance
+ (instancetype)instance
{
static dispatch_once_t once;
static SEGAppboyIntegrationFactory *sharedInstance;
Expand Down
2 changes: 1 addition & 1 deletion Segment-Appboy.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Segment-Appboy"
s.version = "1.0.1"
s.version = "1.0.2"
s.summary = "Appboy Integration for Segment's analytics-ios library."

s.description = <<-DESC
Expand Down

0 comments on commit 87fd20b

Please sign in to comment.