ClangNotifications 0.1.9

ClangNotifications 0.1.9

Maintained by Stephan van Maris.



  • By
  • e-Village

Deployteq

Platforms CocoaPods Compatible Carthage Compatible SPM Compatible Documentation Swift Xcode MIT

This repository contains the Deployteq Mobile SDK with a demo iOS application which uses our custom library for notifications App is written in Swift, uses Firebase cloud messaging for notifications.

How to run the application

  • Clone this repository (default working branch is master)
  • Open project directory in terminal and run pod install (if you don't have CocoaPods installed the run first sudo gem install cocoapods)
  • Open .xcworkspace file in Xcode and you're ready for using it
  • Run the app on simulator or connect an iOS device (supported iOS is 12 and 13). Remember push notifications won't work on the simulator.

Deployteq library setup

To start using the Deployteq library you need to set the keys "authorizationToken" and "integrationId" via Environment. These values will be provided when you contact Deployteq to start integrating with the Deployteq platform.

Create a new version on Cocoapods

Cocoapods used the tag system of bitbucket to specifcy which version is being used. When you want to create a new version of the ClangNotifications pod perfrom the following steps

  1. Tag the version in Bitbucket with the new version number
  2. Change the $(spec.version) in the ClangNotifications.podspec file to the same version as you just tagged in bitbucket
  3. Open terminal and navigate to the root of the project and run pod lib lint to see if everything is correct
  4. run pod repo push evillage-podspecs ClangNotifications.podspec in the same terminal to submit the code to Cocoapods

Generate documentation

To generate documentation for this project, follow these simple steps:

  1. Install Jazzy on your mac by going to terminal and run 'sudo gem install jazzy' this will install the required files need to generate documentation
  2. Still in terminal navigate to the root of the project and run 'jazzy' the documentation will be generated in the /Documentation folder
  3. Enjoy the generated documentation!

Using the Deployteq library in your own project

  • Install cocoapods by opening terminal and run sudo gem install cocoapods
  • Open the root folder of your project and run pod init this will create a POD file which will contain all pod libraries you want to use in your project.
  • Open the POD file in a text editor of your choice (I recommend Visual Studio Code) and uncomment the line where it says: platform :iOS, 'XX.X' and change the XX.X to 12.0.
  • Below the target 'project_name' do add souce 'https://bitbucket.org/wi/evillage-podspecs.git'
  • Below the # Pods for project_name add pod 'ClangNotifications'
  • Head back to the terminal and run pod install in the root project of your project (where the POD file is located)

Call visual ticket in your own project

  • To make a notification ticket anywhere in your app, check the demo app and the file AppDelegate+NotificationsExtension.swift

  • In the function "didReceiveRemoteNotification" ask for the string of the

    payload let body = userInfo["cd_payload"] as? String ?? ""
    
  • Then place it in the function buildTheTickets like so:

    ClangFunctions().buildTheTickets(parent: (UIApplication.shared.keyWindow?.rootViewController)!, toAdd: body) 
    
  • adding the UIApplication.shared.keyWindow?.rootViewController to parant:

Links