[TASK] Initial commit with basic product setup
This commit is contained in:
42
Assets/Mapbox SDK/Mapbox/Unity/Telemetry/TelemetryIos.cs
Normal file
42
Assets/Mapbox SDK/Mapbox/Unity/Telemetry/TelemetryIos.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
#if UNITY_IOS
|
||||
namespace Mapbox.Unity.Telemetry
|
||||
{
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class TelemetryIos : ITelemetryLibrary
|
||||
{
|
||||
[DllImport("__Internal")]
|
||||
private static extern void initialize(string accessToken, string userAgentBase, string hostSDKVersion);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
static extern void sendTurnstileEvent();
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern void setLocationCollectionState(bool enable);
|
||||
|
||||
static ITelemetryLibrary _instance = new TelemetryIos();
|
||||
public static ITelemetryLibrary Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public void Initialize(string accessToken)
|
||||
{
|
||||
initialize(accessToken, "MapboxEventsUnityiOS", Constants.SDK_VERSION);
|
||||
}
|
||||
|
||||
public void SendTurnstile()
|
||||
{
|
||||
sendTurnstileEvent();
|
||||
}
|
||||
|
||||
public void SetLocationCollectionState(bool enable)
|
||||
{
|
||||
setLocationCollectionState(enable);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user