Skip to content

Commit 24ee080

Browse files
committed
Merge pull request #111 from adjust/nicolas-brugneaux-sociomantic-soc-encode-parameters
Nicolas brugneaux sociomantic soc encode parameters
2 parents 0742960 + e629d58 commit 24ee080

File tree

12 files changed

+71
-19
lines changed

12 files changed

+71
-19
lines changed

Adjust.podspec

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
Pod::Spec.new do |s|
22
s.name = "Adjust"
3-
s.version = "4.2.4"
3+
s.version = "4.2.5"
44
s.summary = "This is the iOS SDK of adjust. You can read more about it at http://adjust.com."
55
s.homepage = "http://adjust.com"
66
s.license = { :type => 'MIT', :file => 'MIT-LICENSE' }
77
s.author = { "Christian Wellenbrock" => "[email protected]" }
8-
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.2.4" }
8+
s.source = { :git => "https://github.com/adjust/ios_sdk.git", :tag => "v4.2.5" }
99
s.platform = :ios, '4.3'
1010
s.framework = 'SystemConfiguration'
1111
s.weak_framework = 'AdSupport', 'iAd'
1212
s.source_files = 'Adjust/*.{h,m}', 'Adjust/ADJAdditions/*.{h,m}'
1313
s.requires_arc = true
14+
s.default_subspec = 'Standard'
15+
16+
s.subspec 'Standard' do |standard|
17+
end
18+
19+
s.subspec 'Sociomantic' do |sm|
20+
sm.source_files = 'plugin/Sociomantic/*.{h,m}'
21+
end
22+
23+
s.subspec 'Criteo' do |cr|
24+
cr.source_files = 'plugin/Criteo/*.{h,m}'
25+
end
1426
end

Adjust/ADJUtil.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <sys/xattr.h>
1717

1818
static NSString * const kBaseUrl = @"https://app.adjust.com";
19-
static NSString * const kClientSdk = @"ios4.2.4";
19+
static NSString * const kClientSdk = @"ios4.2.5";
2020

2121
static NSString * const kDateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'Z";
2222
static NSDateFormatter *dateFormat;

AdjustTests/ADJActivityHandlerTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ - (void)testFirstRun
121121
ADJActivityPackage *activityPackage = (ADJActivityPackage *) self.packageHandlerMock.packageQueue[0];
122122

123123
// check the Sdk version is being tested
124-
XCTAssertEqual(@"ios4.2.4", activityPackage.clientSdk, @"%@", activityPackage.extendedString);
124+
XCTAssertEqual(@"ios4.2.5", activityPackage.clientSdk, @"%@", activityPackage.extendedString);
125125

126126
// check the server url
127127
XCTAssertEqual(@"https://app.adjust.com", ADJUtil.baseUrl);

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you're using [CocoaPods][cocoapods], you can add the following line to your
1717
`Podfile` and continue with [step 3](#step3):
1818

1919
```ruby
20-
pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.2.4'
20+
pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.2.5'
2121
```
2222

2323
### 1. Get the SDK

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.4
1+
4.2.5

doc/criteo_plugin.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Integrate adjust with Criteo events by following these steps:
44

5-
1. Locate the `plugin` folder inside the downloaded archive from our [releases page](https://github.com/adjust/ios_sdk/releases).
5+
1. Locate the `plugin/Criteo` folder inside the downloaded archive from our [releases page](https://github.com/adjust/ios_sdk/releases).
66

77
2. Drag the `ADJCriteo.h` and `ADJCriteo.m` files into the `Adjust` folder inside your project.
88

@@ -137,7 +137,7 @@ ADJEvent *event = [ADJEvent eventWithEventToken:@"{customEvent2EventToken}"];
137137
It's possible to attach an hashed email in every Criteo event with the `injectHashedEmailIntoCriteoEvents` method.
138138
The hashed email will be sent with every Criteo event for the duration of the application lifecycle,
139139
so it must be set again when the app is re-lauched.
140-
The hashed email can be removed by setting the `injectHashedEmailIntoCriteoEvents` method with `nil`.
140+
The hashed email can be removed by setting the `injectHashedEmailIntoCriteoEvents` value with `nil`.
141141
142142
```objc
143143
#import "ADJCriteo.h"
@@ -149,10 +149,22 @@ The hashed email can be removed by setting the `injectHashedEmailIntoCriteoEvent
149149

150150
It's possible to attach a check-in and check-out date to every Criteo event with the `injectViewSearchDatesIntoCriteoEvent` method. The dates will be sent with every Criteo event for the duration of the application lifecycle, so it must be set again when the app is re-lauched.
151151

152-
The search dates can be removed by setting the `injectViewSearchDatesIntoCriteoEvents` dates with `nil`.
152+
The search dates can be removed by setting the `injectViewSearchDatesIntoCriteoEvents` values with `nil`.
153153

154154
```objc
155155
#import "ADJCriteo.h"
156156

157157
[ADJCriteo injectViewSearchDatesIntoCriteoEvents:@"2015-01-01" checkOutDate:@"2015-01-07"];
158158
```
159+
160+
### Partner id
161+
162+
It's possible to attach a partner id to every Criteo event with the `injectPartnerIdIntoCriteoEvent` method. The partner id will be sent with every Criteo event for the duration of the application lifecycle, so it must be set again when the app is re-lauched.
163+
164+
The search dates can be removed by setting the `injectPartnerIdIntoCriteoEvent` value with `nil`.
165+
166+
```objc
167+
#import "ADJCriteo.h"
168+
169+
[ADJCriteo injectPartnerIdIntoCriteoEvents:@"{criteoPartnerId}"];
170+
```

doc/migrate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Migrate your adjust SDK for iOS to v4.2.4 from v3.4.0
1+
## Migrate your adjust SDK for iOS to v4.2.5 from v3.4.0
22

33
### Initial setup
44

doc/sociomantic_plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Integrate adjust with Sociomantic events by following these steps:
44

5-
1. Locate the `plugin` folder inside the downloaded archive from our [releases page](https://github.com/adjust/ios_sdk/releases).
5+
1. Locate the `plugin/Sociomantic` folder inside the downloaded archive from our [releases page](https://github.com/adjust/ios_sdk/releases).
66

77
2. Drag the `ADJSociomantic.h` and `ADJSociomantic.m` files into the `Adjust` folder inside your project.
88

plugin/ADJCriteo.h renamed to plugin/Criteo/ADJCriteo.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,7 @@
6969

7070
+ (void)injectViewSearchDatesIntoCriteoEvents:(NSString *)checkInDate
7171
checkOutDate:(NSString *)checkOutDate;
72+
73+
+ (void)injectPartnerIdIntoCriteoEvents:(NSString *)partnerId;
74+
7275
@end

plugin/ADJCriteo.m renamed to plugin/Criteo/ADJCriteo.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ @implementation ADJCriteo
4242
static NSString * hashEmailInternal;
4343
static NSString * checkInDateInternal;
4444
static NSString * checkOutDateInternal;
45+
static NSString * partnerIdInternal;
4546

4647
+ (id<ADJLogger>) logger {
4748
return ADJAdjustFactory.logger;
@@ -173,9 +174,15 @@ + (void)injectViewSearchDatesIntoCriteoEvents:(NSString *)checkInDate
173174
checkOutDateInternal = checkOutDate;
174175
}
175176

177+
+ (void)injectPartnerIdIntoCriteoEvents:(NSString *)partnerId
178+
{
179+
partnerIdInternal = partnerId;
180+
}
181+
176182
+ (void)injectOptionalParams:(ADJEvent *)event {
177183
[ADJCriteo injectHashEmail:event];
178184
[ADJCriteo injectSearchDates:event];
185+
[ADJCriteo injectPartnerId:event];
179186
}
180187

181188
+ (void)injectHashEmail:(ADJEvent *)event {
@@ -193,6 +200,13 @@ + (void)injectSearchDates:(ADJEvent *)event {
193200
[event addPartnerParameter:@"dout" value:checkOutDateInternal];
194201
}
195202

203+
+ (void)injectPartnerId:(ADJEvent *)event {
204+
if (partnerIdInternal == nil) {
205+
return;
206+
}
207+
[event addPartnerParameter:@"criteo_partner_id" value:partnerIdInternal];
208+
}
209+
196210
+ (NSString*) createCriteoVBFromProducts:(NSArray*) products
197211
{
198212
if (products == nil) {

0 commit comments

Comments
 (0)