Skip to content
Cordova plugin for using iOS Callkit call identification
Branch: master
Clone or download
Latest commit 01da94f Mar 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
.vscode
hooks
src Add objc annotation for Swift 4+ compatibility Feb 21, 2019
tests
www
.eslintrc.json Public release Apr 12, 2018
.gitignore
.npmignore
.travis.yml Swift version update (#12) Mar 5, 2019
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE
README.md
package.json
plugin.xml Version bump Mar 5, 2019

README.md

cordova-plugin-call-directory

Build Status

Installation

cordova plugin add cordova-plugin-call-directory --variable EXT_NAME="Cordova-Directory" --variable ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES="NO" --variable DEVELOPMENT_TEAM="TEAMID" --variable PROVISIONING_PROFILE="prov-id-5677-67567567.."

If you encounter problems during installation please remove the iOS platform, add the plugin and add the iOS platform again. This plugins creates some source files and modifies config files in the Xcode project with installation hooks.

API & Examples

Global object CallDirectory

isAvailable

CallDirectory.isAvailable(
  (value) => console.log(value),
  (err) => console.error(err));

addIdentification

Make sure to not add duplicate numbers.

let indexItems = [{label: "Test", number: "001123456"}];

CallDirectory.addIdentification(indexItems, 
  (value) => console.log(value),
  (err) => console.error(err));

removeIdentification

let indexItems = [{label: "Test", number: "001123456"}];

CallDirectory.removeIdentification(indexItems,
  (value) => console.log(value),
  (err) => console.error(err));

removeAllIdentification

CallDirectory.removeAllIdentification(
  (value) => console.log(value),
  (err) => {console.error(err));

getAllItems

Returns an array with items: { label: "Test", number: "1234567890"}

CallDirectory.getAllItems(
  (value) => console.log(value),
  (err) => console.error(err))

reloadExtension

Reload the extenstion after adding or removing items.

CallDirectory.reloadExtension(
  (value) => console.log(value),
  (err) => console.error(err));

getLog

Returns an object with log entries by extension and plugin log: { plugin: ["Delete..."..], extension: ["1234567890"..]}

CallDirectory.getLog(
  (value) => console.log(value),
  (err) => console.error(err))

Error Codes

Apple documentation

Fix build problems in Xcode build settings

Run path: @executable_path/../../Frameworks for extension

Always embedd swift standard libraries: NO for extension

Acknowledgements

Thanks to @David Strausz whose plugin is the base of all hooks, which add the extension during cordova platform add ios

You can’t perform that action at this time.