Skip to content

Commit 8cb037b

Browse files
committed
Merge branch 'release/1.1.0'
2 parents 809d74f + 5d8e4af commit 8cb037b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4127
-2892
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project(ios) (${{ steps.version.outputs.RN_IOS_TRACKER_VERSION }})"
6666
exit 1
6767
fi
68-
if [ "${{ steps.version.outputs.TAG_VERSION }}" != "${{ steps.version.outputs.RN_TRACKER_VERSION }}" ] ; then
69-
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project(android) (${{ steps.version.outputs.RN_ANDR_TRACKER_VERSION }})"
68+
if [ "${{ steps.version.outputs.TAG_VERSION }}" != "${{ steps.version.outputs.RN_ANDROID_TRACKER_VERSION }}" ] ; then
69+
echo "Tag version (${{ steps.version.outputs.TAG_VERSION }}) doesn't match version in project(android) (${{ steps.version.outputs.RN_ANDROID_TRACKER_VERSION }})"
7070
exit 1
7171
fi
7272

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Version 1.1.0 (2022-02-07)
2+
--------------------------
3+
Update mobile tracker dependencies to v3 (#141)
4+
Add deep link and message notification events (#142)
5+
Update demo app to show accessing tracker instance from platform native code (#136)
6+
Fix compilation error for iOS build on ARM macs (#140)
7+
Fix check for byteLimitGet when reading emitter configuration (#138)
8+
Fix check for Android version in GitHub Actions (#134)
9+
Update year in all copyright notices (#148)
10+
Update dependencies (#150)
11+
112
Version 1.0.0 (2021-08-09)
213
--------------------------
314
Fix action-gh-release to specific commit (#133)

DemoApp/App.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,43 @@ const App = () => {
230230
});
231231
};
232232

233+
const onPressTrackDeepLinkReceivedEvent = () => {
234+
tracker.trackDeepLinkReceivedEvent({
235+
url: 'https://deeplink.com',
236+
referrer: 'http://refr.com',
237+
});
238+
};
239+
240+
const onPressTrackMessageNotificationEvent = () => {
241+
tracker.trackMessageNotificationEvent({
242+
title: 'title1',
243+
body: 'body1',
244+
trigger: 'push',
245+
action: 'action1',
246+
attachments: [
247+
{
248+
identifier: 'att_id1',
249+
type: 'att_type1',
250+
url: 'http://att.url.1',
251+
},
252+
],
253+
bodyLocArgs: ['bodyArg1', 'bodyArg2'],
254+
bodyLocKey: 'bodyKey1',
255+
category: 'category1',
256+
contentAvailable: true,
257+
group: 'group1',
258+
icon: 'icon1',
259+
notificationCount: 3,
260+
notificationTimestamp: '2022-02-02T15:17:42.767Z',
261+
sound: 'sound1',
262+
subtitle: 'subtitle1',
263+
tag: 'tag1',
264+
threadIdentifier: 'threadIdentifier1',
265+
titleLocArgs: ['titleArg1', 'titleArg2'],
266+
titleLocKey: 'titleKey1',
267+
});
268+
};
269+
233270
const onPressShowMeSomeWarnings = () => {
234271
tracker.trackSelfDescribingEvent({});
235272
tracker.trackStructuredEvent({});
@@ -354,6 +391,22 @@ const App = () => {
354391
accessibilityLabel="testPageView"
355392
/>
356393
</Section>
394+
<Section title="Deep Link">
395+
<Button
396+
onPress={onPressTrackDeepLinkReceivedEvent}
397+
title="Track a Deep Link Received Event"
398+
color="#841584"
399+
accessibilityLabel="testDeepLinkReceived"
400+
/>
401+
</Section>
402+
<Section title="Message Notification">
403+
<Button
404+
onPress={onPressTrackMessageNotificationEvent}
405+
title="Track a Message Notification Event"
406+
color="#841584"
407+
accessibilityLabel="testMessageNotification"
408+
/>
409+
</Section>
357410
<Section title="Second tracker">
358411
<Button
359412
onPress={onPressTestSecondTracker}

DemoApp/android/app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ dependencies {
215215
} else {
216216
implementation jscFlavor
217217
}
218+
219+
implementation 'com.snowplowanalytics:snowplow-android-tracker:3.+'
218220
}
219221

220222
// Run this once to be able to run the application with BUCK

DemoApp/android/app/src/main/java/com/demoapp/MainActivity.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package com.demoapp;
22

3+
import android.view.KeyEvent;
4+
35
import com.facebook.react.ReactActivity;
6+
import com.snowplowanalytics.snowplow.Snowplow;
7+
import com.snowplowanalytics.snowplow.event.Structured;
48

59
public class MainActivity extends ReactActivity {
610

@@ -12,4 +16,13 @@ public class MainActivity extends ReactActivity {
1216
protected String getMainComponentName() {
1317
return "DemoApp";
1418
}
19+
20+
/**
21+
* Demonstrates the use of a tracker initialized in React native.
22+
*/
23+
@Override
24+
public boolean onKeyDown(int keyCode, KeyEvent event) {
25+
Snowplow.getDefaultTracker().track(new Structured("key", "press"));
26+
return super.onKeyDown(keyCode, event);
27+
}
1528
}

DemoApp/ios/DemoApp.xcodeproj/project.pbxproj

Lines changed: 69 additions & 59 deletions
Large diffs are not rendered by default.

DemoApp/ios/DemoApp/AppDelegate.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#import "AppDelegate.h"
2+
#import "ViewController.h"
3+
4+
#if RCT_DEV
5+
#import <React/RCTDevLoadingView.h>
6+
#endif
27

38
#import <React/RCTBridge.h>
49
#import <React/RCTBundleURLProvider.h>
@@ -32,6 +37,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3237
#endif
3338

3439
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
40+
#if RCT_DEV
41+
[bridge moduleForClass:[RCTDevLoadingView class]];
42+
#endif
3543
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
3644
moduleName:@"DemoApp"
3745
initialProperties:nil];
@@ -43,7 +51,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4351
}
4452

4553
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
46-
UIViewController *rootViewController = [UIViewController new];
54+
ViewController *rootViewController = [ViewController new];
4755
rootViewController.view = rootView;
4856
self.window.rootViewController = rootViewController;
4957
[self.window makeKeyAndVisible];
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// ViewController.h
3+
// DemoApp
4+
//
5+
// Created by Matus Tomlein on 19/01/2022.
6+
//
7+
8+
#import <UIKit/UIKit.h>
9+
10+
NS_ASSUME_NONNULL_BEGIN
11+
12+
@interface ViewController : UIViewController
13+
14+
@end
15+
16+
NS_ASSUME_NONNULL_END
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// ViewController.m
3+
// DemoApp
4+
//
5+
// Created by Matus Tomlein on 19/01/2022.
6+
//
7+
8+
#import "ViewController.h"
9+
#import "SPSnowplow.h"
10+
#import "SPStructured.h"
11+
12+
@interface ViewController ()
13+
14+
@end
15+
16+
@implementation ViewController
17+
18+
- (void)viewDidLoad {
19+
[super viewDidLoad];
20+
}
21+
22+
/**
23+
Demonstrates the use of a tracker initialized in React native.
24+
*/
25+
- (void)pressesBegan:(NSSet<UIPress *> *)presses withEvent:(UIPressesEvent *)event
26+
{
27+
id<SPTrackerController> tracker = [SPSnowplow defaultTracker];
28+
SPStructured *structured = [[SPStructured alloc] initWithCategory:@"key" action:@"press"];
29+
[tracker track:structured];
30+
[super pressesBegan:presses withEvent:event];
31+
}
32+
33+
@end

DemoApp/ios/Podfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ target 'DemoApp' do
2121
#
2222
# Note that if you have use_frameworks! enabled, Flipper will not work and
2323
# you should disable the next line.
24-
use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
24+
use_flipper!({'Flipper' => '0.132.0', 'Flipper-Folly' => '2.6.10', 'Flipper-RSocket' => '1.4.3'})
2525

2626
post_install do |installer|
2727
react_native_post_install(installer)
28+
29+
installer.pods_project.build_configurations.each do |config|
30+
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
31+
end
2832
end
2933
end

0 commit comments

Comments
 (0)