测试 0.2.2

测试 0.2.2

Taylan PinceSalih Karasuluoglu维护。



测试 0.2.2

测试

Version License Platform

使用方法

要运行示例项目,首先克隆仓库,然后从示例目录运行pod install

要为您自己的应用设置,前往Tryouts仪表板上的集成部分,并找到以下密钥

  • 应用标识符
  • API 密钥
  • API 密钥

在您的应用代理的application:didFinishLaunchingWithOptions:方法中,初始化Tryouts SDK

[Tryouts initializeWithAppIdentifier:@"<App Identifier>"
                              APIKey:@"<API Key>"
                              secret:@"<API Secret>"];

每次应用变为活跃状态时,Tryouts SDK都会自动检查新版本,并在有新版本可用时提醒用户。

反馈

可以使用Tryouts SDK收集用户的应用内反馈。使用方法是presentFeedbackControllerFromViewController:animated:

[Tryouts presentFeedbackControllerFromViewController:presentingViewController
                                            animated:animated];

在调用此方法时,将在presentingViewController上显示反馈覆盖视图。反馈覆盖视图有用户名和反馈字段,反馈是可选的,而用户名是必需的。此外,在显示反馈覆盖视图时,会在后台截取屏幕快照并发送到您的Tryouts账户。

Tryouts SDK还具有通过摇动手势显示反馈视图的支持。此功能为可选。要使用此功能,只需使用TRYMotionRecognizingWindow类初始化您应用程序的窗口,并实现符合TRYMotionRecognizingWindowDelegate协议的motionRecognizingWindowDidRecognizeShakeMotion:andTopMostController:代理方法。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
	...
    TRYMotionRecognizingWindow *motionRecognizingWindow = [[TRYMotionRecognizingWindow alloc]
                                                           initWithFrame:[[UIScreen mainScreen] bounds]];
    motionRecognizingWindow.motionDelegate = self;
	...
}

- (void)motionRecognizingWindowDidRecognizeShakeMotion:(TRYMotionRecognizingWindow *)motionRecognizingWindow
                                  andTopMostController:(UIViewController *)topMostController {

    if ([topMostController isKindOfClass:[TRYFeedbackViewController class]]) {
        return;
    }

    [Tryouts presentFeedbackControllerFromViewController:topMostController
                                                animated:YES];
}

安装

可以在 CocoaPods 中试用。要安装,只需将以下行添加到您的 Podfile 中

pod "Tryouts"

作者

Taylan Pince,[email protected]

许可协议

Tryouts 采用 MIT 许可协议。更多信息请参阅 LICENSE 文件。