OCJiraFeedback 0.4.0

OCJiraFeedback 0.4.0

测试已测试
语种语言 Obj-CObjective C
许可 MIT
发布上次发布2015年2月

Victor Berga 维护。



  • Víctor Berga

概述

一个简单的框架,可将您的应用反馈数据发送到 Atlassian Jira 实例。

安装

  • 获取 OCJiraFeedback 的支持方式是使用 CocoaPods

    将 OCJiraFeedback 添加到您的 Podfile

    platform :ios, '7.0'
    
    pod 'OCJiraFeedback'
    

使用

  • 将 OCJiraFeedback 添加到您的应用

    #import <OCJiraFeedback/OCJiraFeedback.h>
  • 为了配置与 Jira 实例的连接,在 main bundle 中添加和编辑一个 Instance.plist 文件。从这里获取模板版本

    issueType 的有效值有 'Improvement', 'Bug' 或 'Task'。

Instance.plist example

  • 您可以可选地导入 'OCJiraConfiguration' 头文件,并将这些值作为字典设置。

    #import <OCJiraFeedback/OCJiraConfiguration.h>
    
    OCJiraConfiguration.sharedConfiguration.configuration = @{
        @"host"         : @"hostname.example.com",
        @"username"     : @"jira_username",
        @"password"     : @"1234",
        @"projectKey"   : @"TEST",
        @"issueType"    : @"Bug"
    }
  • 收集摘要和描述字段

    例如,从一个控制器内部实现的动作中获取,该控制器有两个 textfield 的出口:'summary' 和 'description'。

    - (IBAction)sendFeedbackAction:(id)sender
    {
        NSString *summary       = self.summaryField.text;
        NSString *description   = self.description.text;
    
            [OCJiraFeedback feedbackWithSummary:summary
                                description:description
                                     completion:^(NSError *error) {
                if (error) {
                    // Handle error if exists
                };
            }];
    
        // or with a creenshot of your current view
    
            [OCJiraFeedback feedbackWithSummary:summary
                                    description:description
                           view:self.view
                                     completion:^(NSError *error) {
                    if (error) {
                        // Handle error if exists
                    }
                }];
    }