Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Release AppMetrica Unity Plugin 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliaksei Nestsiarovich committed Aug 5, 2019
1 parent 0586cb5 commit cd4fcb9
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 26 deletions.
4 changes: 2 additions & 2 deletions AppMetrica.unitypackage
Git LFS file not shown
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Documentation could be found at [AppMetrica official site][DOCUMENTATION].

## Changelog

### Version 3.4.0

* Updated native SDKs *(iOS 3.7.1, Android 3.6.4)*

### Version 3.3.0

* Updated native SDKs *(iOS 3.6.0, Android 3.6.0)*
Expand Down
2 changes: 2 additions & 0 deletions YandexMetricaPluginSample/Assets/AppMetrica/AppMetrica.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

public class AppMetrica : MonoBehaviour
{
public const string VERSION = "3.4.0";

[SerializeField]
private string ApiKey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public static void OnPostprocessBuild (BuildTarget buildTarget, string path)
var project = new PBXProject ();
project.ReadFromString (File.ReadAllText (projectPath));

#if UNITY_2019_3_OR_NEWER
var target = project.GetUnityFrameworkTargetGuid();
#else
var target = project.TargetGuidByName ("Unity-iPhone");
#endif

foreach (var frameworkName in StrongFrameworks) {
project.AddFrameworkToProject (target, frameworkName + ".framework", false);
Expand Down

This file was deleted.

Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/** The class to store revenue data.
It enables revenue tracking from in-app purchases and other purchases in your application.
Expand All @@ -16,8 +18,18 @@
It can be negative, e.g. for refunds.
EXAMPLE: 0.99
@warning This property is deprecated. Use priceDecimal instead.
*/
@property (nonatomic, assign, readonly) double price;
@property (nonatomic, assign, readonly) double price DEPRECATED_MSG_ATTRIBUTE("Use priceDecimal");

/** Price of the products purchased.
It can be negative, e.g. for refunds.
@warning Maximal supported accuracy(a scale of decimal number) is 6 digits in fraction.
EXAMPLE: 0.99
*/
@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *priceDecimal;

/** Currency code of the purchase in the ISO 4217 format.
The value should contain 3 Latin letters in uppercase.
Expand All @@ -39,7 +51,7 @@
@warning The value can contain up to 200 characters.
*/
@property (nonatomic, copy, readonly) NSString *productID;
@property (nonatomic, copy, nullable, readonly) NSString *productID;

/** Information about the in-app purchase order from App Store.
It should contain the `transactionIdentifier` string value of the `SKPaymentTransaction` class.
Expand All @@ -49,7 +61,7 @@
For more information, see
https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411288-transactionidentifier
*/
@property (nonatomic, copy, readonly) NSString *transactionID;
@property (nonatomic, copy, nullable, readonly) NSString *transactionID;

/** Details about the in-app purchase order from App Store.
@code
Expand All @@ -62,27 +74,39 @@
For more information, see
https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html
*/
@property (nonatomic, copy, readonly) NSData *receiptData;
@property (nonatomic, copy, nullable, readonly) NSData *receiptData;

/** Additional information to be passed about the purchase.
It should contain the `NSDictionary` object that can be converted to valid JSON.
For instance, it can be used for categorizing your products.
@warning The maximum size of the value is 30 KB.
*/
@property (nonatomic, copy, readonly) NSDictionary *payload;
@property (nonatomic, copy, nullable, readonly) NSDictionary *payload;

/** Use the `initWithPrice:currency:` method instead.
*/
- (instancetype)init NS_UNAVAILABLE;

/** Initializes the RevenueInfo object with the specified price value.
@warning This initializer is deprecated. Use initWithPriceDecimal:currency: instead.
@param price Price of the products purchased. It can be negative, e.g. for refunds. EXAMPLE: 0.99
@param currency Currency code of the purchase in the ISO 4217 format.
The value should contain 3 Latin letters in uppercase. EXAMPLE: RUB
*/
- (instancetype)initWithPrice:(double)price currency:(NSString *)currency;
- (instancetype)initWithPrice:(double)price currency:(NSString *)currency DEPRECATED_MSG_ATTRIBUTE("Use initWithPriceDecimal:currency:");

/** Initializes the RevenueInfo object with the specified price value.
@warning Maximal supported accuracy(a scale of decimal number) of priceDecimal is 6 digits in fraction.
@param priceDecimal Price of the products purchased. It can be negative, e.g. for refunds. EXAMPLE: 0.99
@param currency Currency code of the purchase in the ISO 4217 format.
The value should contain 3 Latin letters in uppercase. EXAMPLE: RUB
*/
- (instancetype)initWithPriceDecimal:(NSDecimalNumber *)priceDecimal currency:(NSString *)currency;

/** Initializes the RevenueInfo object with the following values:
Expand All @@ -105,10 +129,38 @@
- (instancetype)initWithPrice:(double)price
currency:(NSString *)currency
quantity:(NSUInteger)quantity
productID:(NSString *)productID
transactionID:(NSString *)transactionID
receiptData:(NSData *)receiptData
payload:(NSDictionary *)payload;
productID:(nullable NSString *)productID
transactionID:(nullable NSString *)transactionID
receiptData:(nullable NSData *)receiptData
payload:(nullable NSDictionary *)payload DEPRECATED_MSG_ATTRIBUTE("Use initWithPriceDecimal:...");

/** Initializes the RevenueInfo object with the following values:
- priceDecimal;
- currency;
- quantity;
- productID;
- transactionID;
- receiptData;
- payload.
@warning Maximal supported accuracy(a scale of decimal number) of priceDecimal is 6 digits in fraction.
@param priceDecimal Price of the products purchased. It can be negative, e.g. for refunds. EXAMPLE: 0.99
@param currency Currency code of the purchase in the ISO 4217 format. The value should contain 3 Latin letters in uppercase. EXAMPLE: RUB
@param quantity Quantity of the products purchased.
@param productID ID of the product purchased.
@param transactionID Information about the in-app purchase order from App Store.
@param receiptData Details about the in-app purchase order from App Store.
@param payload Additional information to be passed about the purchase.
*/
- (instancetype)initWithPriceDecimal:(NSDecimalNumber *)priceDecimal
currency:(NSString *)currency
quantity:(NSUInteger)quantity
productID:(nullable NSString *)productID
transactionID:(nullable NSString *)transactionID
receiptData:(nullable NSData *)receiptData
payload:(nullable NSDictionary *)payload;

@end

Expand Down Expand Up @@ -160,3 +212,5 @@
@property (nonatomic, copy) NSDictionary *payload;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#define __YMM_VERSION_H__

#define YMM_VERSION_MAJOR 3
#define YMM_VERSION_MINOR 6
#define YMM_VERSION_PATCH 0
#define YMM_VERSION_MINOR 7
#define YMM_VERSION_PATCH 1

// This line is uncommented in pre-releases.
// #define YMM_VERSION_PRERELEASE_ID "rc.1"

#define YMM_BUILD_NUMBER 14209
#define YMM_BUILD_NUMBER 15098

#endif // __YMM_VERSION_H__
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ typedef NS_ENUM(NSInteger, YMMYandexMetricaEventErrorCode) {
YMMYandexMetricaEventErrorCodeJsonSerializationError = 1002,
YMMYandexMetricaEventErrorCodeInvalidRevenueInfo = 1003,
YMMYandexMetricaEventErrorCodeEmptyUserProfile = 1004,
YMMYandexMetricaEventErrorCodeNoCrashLibrary = 1005,
};

@interface YMMYandexMetrica : NSObject
Expand Down Expand Up @@ -158,8 +159,9 @@ typedef NS_ENUM(NSInteger, YMMYandexMetricaEventErrorCode) {
/**
* Sets referral URL for this installation. This might be required to track some specific traffic sources like Facebook.
* @param url referral URL value.
* @warning Referral URL reporting is no longer available.
*/
+ (void)reportReferralUrl:(NSURL *)url;
+ (void)reportReferralUrl:(NSURL *)url DEPRECATED_MSG_ATTRIBUTE("Referral URL reporting is no longer available");

/** Sends all stored events from the buffer.
Expand All @@ -171,6 +173,21 @@ typedef NS_ENUM(NSInteger, YMMYandexMetricaEventErrorCode) {
*/
+ (void)sendEventsBuffer;

/** Resumes the last session or creates a new one if it has been expired.
@warning You should disable the automatic tracking before using this method.
See the sessionsAutoTracking property of YMMYandexMetricaConfiguration.
*/
+ (void)resumeSession;

/** Pauses the current session.
All events reported after calling this method and till the session timeout will still join this session.
@warning You should disable the automatic tracking before using this method.
See the sessionsAutoTracking property of YMMYandexMetricaConfiguration.
*/
+ (void)pauseSession;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, assign) BOOL handleFirstActivationAsUpdate;

/** Whether activation of AppMetrica should be considered as the start of a session.
If this option is disabled session starts at UIApplicationDidBecomeActiveNotification.
The option is disabled by default. Enable this property if you want events that are reported after activation to join
the current session.
*/
@property (nonatomic, assign) BOOL handleActivationAsSessionStart;

/** Whether AppMetrica should automatically track session starts and ends.
AppMetrica uses UIApplicationDidBecomeActiveNotification and UIApplicationWillResignActiveNotification notifications
to track sessions.
The maximum length of the session is 24 hours. To continue the session after 24 hours, you should manually
invoke the resumeSession method.
The option is enabled by default. If the option is disabled, you should manually control the session
using pauseSession and resumeSession methods.
*/
@property (nonatomic, assign) BOOL sessionsAutoTracking;

/** A boolean value indicating whether statistics sending to the AppMetrica server is enabled.
@note Disabling this option also turns off data sending from the reporters that initialized for different apiKey.
Expand Down
Git LFS file not shown
Git LFS file not shown
14 changes: 11 additions & 3 deletions YandexMetricaPluginSample/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.3.2",
"com.unity.collab-proxy": "1.2.16",
"com.unity.ext.nunit": "1.0.0",
"com.unity.ide.rider": "1.0.8",
"com.unity.ide.visualstudio": "1.0.11",
"com.unity.ide.vscode": "1.0.7",
"com.unity.multiplayer-hlapi": "1.0.2",
"com.unity.package-manager-ui": "2.1.2",
"com.unity.purchasing": "2.0.6",
"com.unity.textmeshpro": "2.0.0",
"com.unity.timeline": "1.0.0",
"com.unity.test-framework": "1.0.13",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.1.0",
"com.unity.ugui": "1.0.0",
"com.unity.xr.legacyinputhelpers": "2.0.2",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
Expand Down

0 comments on commit cd4fcb9

Please sign in to comment.