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

Commit 2d28156

Browse files
author
Benjamin Scholtysik (Reimold)
authored
Merge pull request #34 from MatkovIvan/fix/feedback-api
Revert feedback API
2 parents eafcffb + 9283f9f commit 2d28156

File tree

10 files changed

+37
-8
lines changed

10 files changed

+37
-8
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public enum AuthenticatorType
6161
[DllImport("__Internal")]
6262
private static extern string HockeyApp_GetSdkName();
6363
[DllImport("__Internal")]
64+
private static extern void HockeyApp_ShowFeedbackListView();
65+
[DllImport("__Internal")]
6466
private static extern void HockeyApp_CheckForUpdate();
6567
#endif
6668

@@ -120,10 +122,9 @@ void StartPlugin ()
120122
/// <summary>
121123
/// Present the modal feedback list user interface.
122124
/// </summary>
123-
[System.Obsolete("This is an obsolete method")]
124125
public static void ShowFeedbackForm() {
125126
#if (UNITY_IPHONE && !UNITY_EDITOR)
126-
Debug.Log("The method HockeyApp_ShowFeedbackListView() is no longer supported.");
127+
HockeyApp_ShowFeedbackListView();
127128
#endif
128129
}
129130

ExampleGame/Assets/HockeyAppUnityIOS/HockeyAppUnity.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ extern "C" {
2727

2828
#pragma mark - SDK features
2929

30+
+ (void)showFeedbackListView;
3031
+ (void)checkForUpdate;
3132
+ (NSString *)versionCode;
3233
+ (NSString *)versionName;

ExampleGame/Assets/HockeyAppUnityIOS/HockeyAppUnityWrapper.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ void HockeyApp_StartHockeyManager(char *appID, char *serverURL, char *authType,
1212
autoSendEnabled:autoSendEnabled];
1313
}
1414

15+
void HockeyApp_ShowFeedbackListView() {
16+
17+
[HockeyAppUnity showFeedbackListView];
18+
}
19+
1520
void HockeyApp_CheckForUpdate() {
1621

1722
[HockeyAppUnity checkForUpdate];

ExampleGame/Assets/TestUI/TestUI.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ void OnGUI(){
7676
{
7777
CheckForUpdate();
7878
}
79+
80+
if(GUI.Button(GetControlRect(12), "Show Feedback"))
81+
{
82+
ShowFeedbackForm();
83+
}
7984
}
8085
public void AutoResize(int screenWidth, int screenHeight){
8186

@@ -116,7 +121,12 @@ public void ForceAppCrash(){
116121
}
117122

118123
public void CheckForUpdate(){
119-
124+
Debug.Log("CheckForUpdate");
120125
HockeyAppIOS.CheckForUpdate ();
121-
}
126+
}
127+
128+
public void ShowFeedbackForm(){
129+
Debug.Log("ShowFeedbackForm");
130+
HockeyAppIOS.ShowFeedbackForm ();
131+
}
122132
}

Plugins/HockeyAppUnityIOS/HockeyAppUnity-Scripts/HockeyAppIOS.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public enum AuthenticatorType
6161
[DllImport("__Internal")]
6262
private static extern string HockeyApp_GetSdkName();
6363
[DllImport("__Internal")]
64+
private static extern void HockeyApp_ShowFeedbackListView();
65+
[DllImport("__Internal")]
6466
private static extern void HockeyApp_CheckForUpdate();
6567
#endif
6668

@@ -120,10 +122,9 @@ void StartPlugin ()
120122
/// <summary>
121123
/// Present the modal feedback list user interface.
122124
/// </summary>
123-
[System.Obsolete("This is an obsolete method")]
124125
public static void ShowFeedbackForm() {
125126
#if (UNITY_IPHONE && !UNITY_EDITOR)
126-
Debug.Log("The method HockeyApp_ShowFeedbackListView() is no longer supported.");
127+
HockeyApp_ShowFeedbackListView();
127128
#endif
128129
}
129130

Plugins/HockeyAppUnityIOS/HockeyAppUnity.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ extern "C" {
2727

2828
#pragma mark - SDK features
2929

30+
+ (void)showFeedbackListView;
3031
+ (void)checkForUpdate;
3132
+ (NSString *)versionCode;
3233
+ (NSString *)versionName;

Plugins/HockeyAppUnityIOS/HockeyAppUnityWrapper.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ void HockeyApp_StartHockeyManager(char *appID, char *serverURL, char *authType,
1212
autoSendEnabled:autoSendEnabled];
1313
}
1414

15+
void HockeyApp_ShowFeedbackListView() {
16+
17+
[HockeyAppUnity showFeedbackListView];
18+
}
19+
1520
void HockeyApp_CheckForUpdate() {
1621

1722
[HockeyAppUnity checkForUpdate];

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
### Feedback and iOS 10 and later
55
**This version brings back the Feedback feature**
66

7-
The reason for this is that iOS 10 ant later require developers to add a usage string to their Info.plist in case they include the photos framework in their app. If this string is missing, the app will be rejected when submitting the app to the app store. As HockeyApp's Feedback feature includes a dependency to the photos framework.
7+
The reason for this is that iOS 10 and later require developers to add a usage string to their Info.plist in case they include the photos framework in their app. If this string is missing, the app will be rejected when submitting the app to the app store. As HockeyApp's Feedback feature includes a dependency to the photos framework.
88
You must add a `NSPhotoLibraryUsageDescription` to your `Info.plist` to avoid a AppStore rejection during upload of your app.
99

1010
## Introduction
@@ -38,7 +38,7 @@ This document contains the following sections:
3838
## <a name="1"></a>Requirements
3939
* [Changelog](Documentation/Changelog.md)
4040
* Unity 5.0 or newer (SDK versions with Unity 4 support can be found at the [Unity Asset Store](https://www.assetstore.unity3d.com/en/?gclid=CO) or by switching to the 1.0.4 tag on GitHub).
41-
* iOS 7.0 or newer.
41+
* iOS 8.0 or newer.
4242

4343
## <a name="2"></a>Installation & Setup
4444

UnityPluginSources/HockeyAppUnity/HockeyAppUnity.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ extern "C" {
2727

2828
#pragma mark - SDK features
2929

30+
+ (void)showFeedbackListView;
3031
+ (void)checkForUpdate;
3132
+ (NSString *)versionCode;
3233
+ (NSString *)versionName;

UnityPluginSources/HockeyAppUnity/HockeyAppUnity.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ + (BOOL)handleOpenURL:(NSURL *) url sourceApplication:(NSString *) sourceApplica
6767

6868
#pragma mark - Setup SDK
6969

70+
+ (void)showFeedbackListView {
71+
[[BITHockeyManager sharedHockeyManager].feedbackManager showFeedbackListView];
72+
}
73+
7074
+ (void)checkForUpdate {
7175
[[BITHockeyManager sharedHockeyManager].updateManager checkForUpdate];
7276
}

0 commit comments

Comments
 (0)