Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit f74c344

Browse files
author
Benjamin Scholtysik (Reimold)
authored
Merge pull request #35 from MatkovIvan/fix/default-server-check
Added check with placeholder value
2 parents 2d28156 + aea267f commit f74c344

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ExampleGame/Assets/HockeyAppUnityIOS/HockeyAppUnity-Scripts/HockeyAppIOS.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class HockeyAppIOS : MonoBehaviour
1515
protected const string HOCKEYAPP_BASEURL = "https://rink.hockeyapp.net/";
1616
protected const string HOCKEYAPP_CRASHESPATH = "api/2/apps/[APPID]/crashes/upload";
1717
protected const string LOG_FILE_DIR = "/logs/";
18+
private const string SERVER_URL_PLACEHOLDER = "your-custom-server-url";
1819
protected const int MAX_CHARS = 199800;
1920
private static HockeyAppIOS instance;
2021

@@ -29,7 +30,7 @@ public enum AuthenticatorType
2930

3031
[Header ("HockeyApp Setup")]
3132
public string appID = "your-hockey-app-id";
32-
public string serverURL = "your-custom-server-url";
33+
public string serverURL = SERVER_URL_PLACEHOLDER;
3334

3435
[Header ("Authentication")]
3536
public AuthenticatorType authenticatorType;
@@ -358,8 +359,7 @@ protected virtual string GetBaseURL ()
358359
#if (UNITY_IPHONE && !UNITY_EDITOR)
359360

360361
string urlString = serverURL.Trim();
361-
362-
if (urlString.Length > 0) {
362+
if (urlString.Length > 0 && urlString != SERVER_URL_PLACEHOLDER) {
363363
baseURL = urlString;
364364
if (baseURL[baseURL.Length - 1].Equals("/") != true) {
365365
baseURL += "/";

Plugins/HockeyAppUnityIOS/HockeyAppUnity-Scripts/HockeyAppIOS.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class HockeyAppIOS : MonoBehaviour
1515
protected const string HOCKEYAPP_BASEURL = "https://rink.hockeyapp.net/";
1616
protected const string HOCKEYAPP_CRASHESPATH = "api/2/apps/[APPID]/crashes/upload";
1717
protected const string LOG_FILE_DIR = "/logs/";
18+
private const string SERVER_URL_PLACEHOLDER = "your-custom-server-url";
1819
protected const int MAX_CHARS = 199800;
1920
private static HockeyAppIOS instance;
2021

@@ -29,7 +30,7 @@ public enum AuthenticatorType
2930

3031
[Header ("HockeyApp Setup")]
3132
public string appID = "your-hockey-app-id";
32-
public string serverURL = "your-custom-server-url";
33+
public string serverURL = SERVER_URL_PLACEHOLDER;
3334

3435
[Header ("Authentication")]
3536
public AuthenticatorType authenticatorType;
@@ -358,8 +359,7 @@ protected virtual string GetBaseURL ()
358359
#if (UNITY_IPHONE && !UNITY_EDITOR)
359360

360361
string urlString = serverURL.Trim();
361-
362-
if (urlString.Length > 0) {
362+
if (urlString.Length > 0 && urlString != SERVER_URL_PLACEHOLDER) {
363363
baseURL = urlString;
364364
if (baseURL[baseURL.Length - 1].Equals("/") != true) {
365365
baseURL += "/";

0 commit comments

Comments
 (0)