FeedbackMe是一个Pod,用于简化用户反馈/评价的请求。它类似于Appirater,但主要区别是我们不会在用户打开应用程序时请求反馈。
您可以使用以下两种方式使用此Pod:
这种方式可以使您自定义所需的反馈,并将其上传至您的服务器或做您想要的其他任何事情。
它也是免费的。
或者
如果您选择使用FeedbackMe API,则已经有一个完成的视图,它会请求姓名、电子邮件和用户意见。
FeedbackMe通过CocoaPods提供。要安装它,只需将以下行添加到您的Podfile中:
#Podfile
pod 'FeedbackMe', '~> 1.0'
然后进入终端并运行
pod install
首先您需要您的iTunes ID。您可以在您的应用程序的iTunes链接中找到它。例如:https://itunes.apple.com/br/app/me-lembra-clovis/id928556821这个应用程序ID是"id928556821"(不带引号)。如果您的应用程序尚未发布,您可以使用另一个用于测试,但一旦您在iTunes Connect上注册了您的应用程序,请记住更改它。苹果在iTunes Connect应用程序注册时为您的应用程序分配一个ID。
我们使用这些信息来打开您的iTunes页面。
然后您必须决定是实现您自己的反馈API还是使用我们的。
您必须在AppDelegate.m文件中,在applicationDidEnterBackground方法内部调用setup。
//AppDelegate.m
#import <LBFeedbackMe.h>
- (void) setupFeedbackMe {
[LBFeedbackMe setupWithAppStoreId:@"id928556821" openFeedbackViewBlock:^{
UIViewController *actualViewController; //Get current view controller from AppDelegate or other place
UIViewController *feedbackViewController = [UIViewController new]; //Instantiate your custom feedback view controller
[actualViewController presentViewController:feedbackViewController animated:true completion:nil];
}];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self setupFeedbackMe];
return YES;
}
首先,感谢您支持我们 :)
您必须在AppDelegate.m文件中,在applicationDidEnterBackground方法内部调用setup。
//AppDelegate.m
#import <LBFeedbackMe.h>
- (void) setupFeedbackMe {
[LBFeedbackMe setupWithAppStoreId:@"id928556821" andApiKey:@"YOUR-API-KEY"];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self setupFeedbackMe];
return YES;
}
设置完成后,您需要决定您的应用何时将请求反馈。
例如,假设当用户注册并喜欢三张照片后,您将请求反馈
//AppDelegate.m
- (void) setupFeedbackMe {
[LBFeedbackMe setupWithAppStoreId:@"id928556821" andApiKey:@"YOUR-API-KEY"];
[LBFeedbackMe waitForEvent:@"REGISTER" times: @1];
[LBFeedbackMe waitForEvent:@"LIKE_PHOTO" times: @3];
}
好的,现在您的应用正在等待事件来展示反馈视图。您只需告诉这些事件何时发生。例如
//CustomRegistrationViewController.m
- (void) userRegistered
{
//Custom code
[LBFeedbackMe eventFired:@"REGISTER"];
}
//CustomPhotosViewController.m
- (void) likePhoto
{
//Custom code
[LBFeedbackMe eventFired:@"LIKE_PHOTO"];
}
在 userRegistered 被调用一次并且 likePhoto 被调用三次后,会弹出一个请求用户反馈的窗口。
您可以将这些字符串添加到您的本地化文件中,FeedbackMe 将自动加载它们
//Localizable.strings
"First Feedback Alert Title" = "Quick Feedback";
"First Feedback Alert Message" = "Are you enjoying this app?";
"First Feedback Button Yes" = "Yes, very much!";
"First Feedback Button Confused" = "I am confused";
"First Feedback Button No" = "Not actually";
"Positive Feedback Alert Title" = "That's nice. Thank you";
"Positive Feedback Alert Message" = "Since you are liking our app, can you help us by leaving a review on the AppStore?";
"Positive Feedback Button Yes" = "Sure!";
"Positive Feedback Button No" = "No";
"Negative Feedback Alert Title" = "How can we improve?";
"Negative Feedback Alert Message" = "Do you want to tell us how to improve our app and make you happy? :)";
"Negative Feedback Button Yes" = "Sure!";
"Negative Feedback Button No" = "No";
"Name" = "Name"
"E-mail" = "E-mail"
"How can we improve?" = "How can we improve?"
如果您想添加一些东西,请做吧!然后稍后打开一个 pull 请求。
有一个自定义反馈视图控制器布局的方式会很棒。我将在未来的版本中实现这个功能。
Leonardo Baptista,[email protected]
FeedbackMe 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。