This part of code:
var validator = new CrossPlatformValidator(GooglePlayTangle.Data(),
AppleTangle.Data(), Application.bundleIdentifier);
Throw me this:
The type or namespace name ‘CrossPlatformValidator’ could not be found (are you missing a using directive or an assembly reference?)
The name ‘GooglePlayTangle’ does not exist in the current context
The name ‘AppleTangle’ does not exist in the current context
‘Application’ does not contain a definition for ‘bundleIdentifier’
Shall i use any specific libraries (except using UnityEngine.Purchasing)?
Unity 2018.3.7f1. After adding - using UnityEngine.Purchasing.Security; Still have this errors when compiling script with this code: #if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_OSX
var validator = new CrossPlatformValidator(GooglePlayTangle.Data(),
AppleTangle.Data(), Application.bundleIdentifier); #endif
Errors:
The name ‘GooglePlayTangle’ does not exist in the current context
The name ‘AppleTangle’ does not exist in the current context
‘Application’ does not contain a definition for ‘bundleIdentifier’
I missed this step (thought it was enought that i put my Google API key into Services-IAP-Options). Now 1 error with Application.bundleIdentifier:
‘Application’ does not contain a definition for ‘bundleIdentifier’
I can replace it with Application.identifier: No errors since now but does it returns the same thing?
I also can replace it with UnityEditor.PlayerSettings.applicationIdentifier will it work on Android or IOS? (I`m scared oif this “UnityEditor”)
Ok I found that Application.bundleidentifier returns package name (that probably previously was called “bundle identifier”) so now I`m using Application.identifier that returns it (or we can use UnityEditor.PlayerSettings.applicationIdentifier - same result in debug logs: com.company.prodname)