CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

DebuggIt 1.1.0

DebuggIt 1.1.0

TestsTested
LangLanguage Obj-CObjective C
License Apache-2.0
ReleasedLast Release Aug 2019

Maintained by MoodUp.team.



 
Depends on:
Alamofire~> 5.0.0-beta.7
SwiftyJSON~> 5.0.0
IQKeyboardManagerSwift~> 6.3.0
KMPlaceholderTextView~> 1.4.0
RNCryptor~> 5.1.0
ReachabilitySwift~> 4.3.1
 

DebuggIt 1.1.0

  • By
  • MoodUp.team

Version License Platform

debugg.it

https://debugg.it

Table of Contents

What is this repository for?

This is a library, which provides a tool to report iOS application bugs directly into JIRA / GitHub/ BitBucket Issue Tracker.

Example

To run the example project, open DebuggIt.xcworkspace, choose DebuggItDemo scheme and build it.

Installation

debugg.it is available through CocoaPods. To install it, add the following to your Podfile and run pod install:

use_modular_headers!
pod 'DebuggIt'

Configure and initialize debugg.it in your project

In your AppDelegate import the pod:

import DebuggIt

Configure service for issues

Add one of these lines (at start of method) to initialize debugg.it issue service

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    ...
    // Override point for customization after application launch.
    DebuggIt.sharedInstance.initBitbucket(repoSlug: "repo-name", accountName: "repo-owner-username")
    // or Github
    DebuggIt.sharedInstance.initGithub(repoSlug: "repo-name", accountName: "repo-owner-username")
    // or JIRA
    DebuggIt.sharedInstance.initJira(host: "jira-host-url", projectKey: "project-key")
    ...
    return true
}

Note: If you are using JIRA and your host do not use SSL, use additional parameter in initialize method:

DebuggIt.sharedInstance.initJira(host: "jira-host-url", projectKey: "project-key", usesHttps: false)

API for uploading image files and (optionally) audio files

debugg.it requires an API where it can send image files and (optionally) audio files. There are 3 available configurations:

  • Default API

    This configuration uses your backend to send image and audio files. Data is sent via POST call on given endpoint with following parameter:

    {
        "data": "base64String"
    }
    • DebuggIt.getInstance().initDefaultStorage(url: "baseUrl", imagePath: "imagePath", audioPath: "audioPath")
      • where
        • baseUrl is a base url of your backend (e.g. https://url-to-backend.com)
        • imagePath is an endpoint handling image upload (e.g. /debuggit/uploadImage)
        • audioPath is an endpoint handling audio upload (e.g. /debuggit/uploadAudio)

  • Custom API

    This is an extension of default API configuration. The difference is that you have to handle uploadImage / uploadAudio request and response. You are responsible for communication with your backend, but at the same time you have full control over it.

    • DebuggIt.sharedInstance.initCustomStorage(uploadImage: { (base64, delegate) in }, uploadAudio: { (base64, delegate) in })
      • where
        • uploadImage is a callback with prepared base64 converted image and response delegate
          • delegate is a ApiClientDelegate object, and should call .uploadSuccessClousure("url-to-image") in case of success or .errorClousure(code, message)in case of error.
        • uploadImage is a callback with prepared base64 converted image and response delegate
          • delegate is a ApiClientDelegate object, and should call .uploadSuccessClousure("url-to-audio") in case of success or .errorClousure(code, message)in case of error.

Sample configurations

  • Init BitBucket with S3:

DebuggIt.sharedInstance
        .initAWS(bucketName: "bucketName", regionType: .EUCentral1, identityPool: "identityPool")
        .initBitbucket(repoSlug: "repo-name", accountName: "repo-owner-username")
  • Init GitHub with default API:

DebuggIt.sharedInstance
        .initDefaultStorage(url: "baseUrl", imagePath: "imagePath", audioPath: "audioPath")
        .initGithub(repoSlug: "repo-name", accountName: "repo-owner-username")
  • Init JIRA with custom API:

DebuggIt.sharedInstance
        .initCustomStorage(uploadImage: { (base64, delegate) in
            // Handle API call to your backend and call uploadSuccessClousure on delegate with url
            // delegate.uploadSuccessClousure("url-to-image")

            // If something went wrong, call errorClousure on delegate
            // delegate.errorClousure(400, "Could not upload image")
        }, uploadAudio: { (base64, delegate) in
            // Handle API call to your backend and call uploadSuccessClousure on delegate with url
            // delegate.uploadSuccessClousure("url-to-audio")

            // If something went wrong, call errorClousure on delegate
            // delegate.errorClousure(400, "Could not upload audio")    
        })
        .initJira(host: "jira-host-url", projectKey: "project-key")

That's all. Your debugg.it is ready to work.

Additional options

debugg.it allows to record audio notes and add it to bug description. To enable this feature simply add this line to your configuration in AppDelegate class:

DebuggIt.sharedInstance.recordingEnabled = true

Ensure you have added Microphone Usage Description in your Info.plist file. For example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSMicrophoneUsageDescription</key>
	<string>debugg.it record notes</string>
	<!-- 
		Rest of Info.plist file... 
	-->
</dict>
</plist>

Author

Mood Up Labs, [email protected]

Licence

Copyright 2019 MoodUp Team

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.