Latest 1.0.2
Homepage https://github.com/anandramdeo-df/df-vault
License MIT
Platforms ios 10.0
Authors

df-Vault (DFVault SDK)

This SDK provide you storage and sharing features in miscellaneous aspects:

  • Provided you the list of all your uploaded assets.
  • Provide access of any assets to person/ organisation with email address and upto a time period.
  • Show the list of assets those are shared to you.
  • Show the list of shared asset by you.
  • Provide you a list of access request(by any orgs or any person). which you can grant or deny.

You can achieve the functionality with easy integration of following steps:

  • In a new terminal window, run pod install --repo-update to install and update. Get Cocoapods
    you can skip this case if you have updated pod in you mac.

  • Create the podfile in your project.

    pod init
  • Open the pod file from directory and add pods in podfile.

    pod 'DFVault'
  • Run command to install

    pod install

    If any error occure in the process of pod install then try with pod update command.
    Now close the xcode project and open prj.xcworkspace instead.

  • Add your org’s VaultAccessToken token in your Info.plist file.

    <key>VaultAccessToken</key>
    <string>Enter your org&apos;s token</string>
  • import DFVault in your UIViewController file where you want to use this feature.

  • You can choose among 7 different controller which you want to show, and it will show the respected screen.

    enum viewControllers {
        case assetVault                                  // Show the list of all the assets uploaded on the server.
        case shareAsset                                  // Share via Email screen appears with required fields.
        case shareWithMeList                             // Show the list of all the assets/documents share with me by other users.
        case shareByMeList                               // Show the list of all the assets/documents shared by me with other users.
        case organizationRequesetedAssetList             // Show the list of asset/document requested by the organisation for access.
        case organizationUploadAllAssetRequestList       // Show the list of all asset/document requested by the organisation for access 
        case organizationUploadAssetRrequestList         // Show the upload request generated by the organisation for asset/document.
    }

  1. Like in the below code snippet we are using shareWithMe controller type and you will get call back with revokeData, assetID, newDate.
    Instantiate the view with following code :-

     // Open view with default configuration
     let shareByMe = DFVault()
     shareByMe.type = .shareByMeList
     shareByMe.userData = self.getJsondata(filename: "ShareByMe")
    
     shareByMe.getResult(success: { (response) in
        print(response)
        self.unlockDFDocument(completionHandler: {[weak self] frontImage, backImage in
            self?.navigateToDocVC(image1: frontImage, image2: backImage, assetData: assetData)
        })
      }, failure: { (error) in
        print(error)
      })

Output would be:

DFVaultDFVaultDFVaultDFVaultDFVault

You can cutomize the color and theme of the SDK’s view according to your projects user-experience.

Just access the properties mentioned in the SDK. Have a look at the sample below:

let shareByMe = DFVault()
shareByMe.type = .shareByMeList
shareByMe.backgroundColor = #colorLiteral(red: 0.9137254902, green: 0.3921568627, blue: 0.3647058824, alpha: 1)
shareByMe.navigationBarColor = #colorLiteral(red: 0.4039215686, green: 0.7098039216, blue: 0.3647058824, alpha: 1)
shareByMe.navigationTitleColor = UIColor.white
shareByMe.navigationBarTintColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
shareByMe.cellColor = #colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)
shareByMe.cellHeadingColor = UIColor.red
shareByMe.cellSubHeadingColor = UIColor.red
shareByMe.revokeAccessTitle = “Revoke”
shareByMe.revokeAccessColor = UIColor.red
shareByMe.editAccessTitle = “Edit”
shareByMe.editButtonColor = UIColor.blue
shareByMe.userData = self.getJsondata(filename: “ShareByMe”)

shareByMe.getResult(success: { (response) in
print(response)
self.unlockDFDocument(completionHandler: {[weak self] frontImage, backImage in
self?.navigateToDocVC(image1: frontImage, image2: backImage, assetData: assetData)
})
}, failure: { (error) in
print(error)
})

Updated UI output would be:

Latest podspec

{
    "name": "DFVault",
    "version": "1.0.2",
    "summary": "This SDK is created to gives you storage and sharing feature for your uploaded assets.",
    "description": "This SDK provide you storage and sharing features in miscellaneous aspects:n    - Provided you the list of all your uploaded assets.n    - Provide access of any assets to person/ organisation with email address and upto a time period.n    - Show the list of assets those are shared to you.n    - Show the list of shared asset by you.n    - Provide you a list of access request(by any orgs or any person). which you can grant or deny.",
    "homepage": "https://github.com/anandramdeo-df/df-vault",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kritika Middha": "[email protected]"
    },
    "source": {
        "http": "https://github.com/anandramdeo-df/df-vault/releases/download/1.0.2/DFVault.zip"
    },
    "platforms": {
        "ios": "10.0"
    },
    "ios": {
        "vendored_frameworks": "DFVault.framework"
    },
    "swift_version": "4.0"
}

Pin It on Pinterest

Share This