This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release AppMetrica Push Unity Plugin 1.1.0
- Loading branch information
Aliaksei Nestsiarovich
committed
Aug 15, 2022
1 parent
c1b7f2e
commit 722c14b
Showing
34 changed files
with
1,718 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
YandexMetricaPushPluginSample/Assets/AppMetricaPush/Editor/AppMetricaPushDependencies.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?xml version="1.0"?> | ||
<dependencies> | ||
<androidPackages> | ||
<androidPackage spec="com.yandex.android:mobmetricapushlib:2.1.1"/> | ||
<androidPackage spec="com.yandex.android:appmetricapush-plugin:2.2.1"/> | ||
<androidPackage spec="com.google.firebase:firebase-messaging:22.0.0"/> | ||
<androidPackage spec="com.google.android.gms:play-services-base:17.5.0"/> | ||
<androidPackage spec="androidx.legacy:legacy-support-v4:1.0.0"/> | ||
<androidPackage spec="com.yandex.android:mobmetricapushlib:2.2.0" /> | ||
<androidPackage spec="com.yandex.android:appmetricapush-plugin:2.3.0" /> | ||
<androidPackage spec="com.google.firebase:firebase-messaging:22.0.0" /> | ||
<androidPackage spec="com.google.android.gms:play-services-base:17.5.0" /> | ||
<androidPackage spec="androidx.legacy:legacy-support-v4:1.0.0" /> | ||
</androidPackages> | ||
<iosPods> | ||
<iosPod name="YandexMobileMetricaPush" version="1.1.1" minTargetSdk="9.0"/> | ||
<iosPod name="YandexMobileMetricaPush" version="1.3.0" minTargetSdk="9.0" /> | ||
</iosPods> | ||
</dependencies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
YandexMetricaPushPluginSample/Assets/AppMetricaPush/Plugins/iOS/YMPUTokenStorage.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Version for Unity | ||
* © 2022 YANDEX | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* https://yandex.com/legal/appmetrica_sdk_agreement/ | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface YMPUTokenStorage : NSObject | ||
|
||
+ (void)saveToken:(NSData *)token; | ||
+ (NSData *)getToken; | ||
|
||
@end |
25 changes: 25 additions & 0 deletions
25
YandexMetricaPushPluginSample/Assets/AppMetricaPush/Plugins/iOS/YMPUTokenStorage.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Version for Unity | ||
* © 2022 YANDEX | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* https://yandex.com/legal/appmetrica_sdk_agreement/ | ||
*/ | ||
|
||
#import "YMPUTokenStorage.h" | ||
|
||
@implementation YMPUTokenStorage | ||
|
||
NSString *const kYMPUUserDefaultsTokenKey = @"com.yandex.mobile.metrica.push.unity.PushToken"; | ||
|
||
+ (void)saveToken:(NSData *)token | ||
{ | ||
[[NSUserDefaults standardUserDefaults] setObject:token forKey:kYMPUUserDefaultsTokenKey]; | ||
} | ||
|
||
+ (NSData *)getToken | ||
{ | ||
return [[NSUserDefaults standardUserDefaults] dataForKey:kYMPUUserDefaultsTokenKey]; | ||
} | ||
|
||
@end |
13 changes: 13 additions & 0 deletions
13
YandexMetricaPushPluginSample/Assets/AppMetricaPush/Plugins/iOS/YMPUUtils.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Version for Unity | ||
* © 2022 YANDEX | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* https://yandex.com/legal/appmetrica_sdk_agreement/ | ||
*/ | ||
|
||
@interface YMPUUtils : NSObject | ||
|
||
+ (NSString *)stringForTokenData:(NSData *)deviceToken; | ||
|
||
@end |
27 changes: 27 additions & 0 deletions
27
YandexMetricaPushPluginSample/Assets/AppMetricaPush/Plugins/iOS/YMPUUtils.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Version for Flutter | ||
* © 2022 YANDEX | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* https://yandex.com/legal/appmetrica_sdk_agreement/ | ||
*/ | ||
|
||
#import "YMPUUtils.h" | ||
|
||
@implementation YMPUUtils | ||
|
||
+ (NSString *)stringForTokenData:(NSData *)deviceToken | ||
{ | ||
if (deviceToken.length == 0) { | ||
return nil; | ||
} | ||
|
||
const char *bytes = [deviceToken bytes]; | ||
NSMutableString *token = [NSMutableString string]; | ||
for (NSUInteger i = 0; i < deviceToken.length; ++i) { | ||
[token appendFormat:@"%02.2hhx", bytes[i]]; | ||
} | ||
return [token copy]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.