https://github.com/gedysintraware/cordova-plugin-call-directory
Cordova plugin for using iOS Callkit call identification
https://github.com/gedysintraware/cordova-plugin-call-directory
caller-id callkit cordova cordova-ios cordova-plugin
Last synced: 8 months ago
JSON representation
Cordova plugin for using iOS Callkit call identification
- Host: GitHub
- URL: https://github.com/gedysintraware/cordova-plugin-call-directory
- Owner: GEDYSIntraWare
- License: mit
- Created: 2018-04-11T14:34:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T03:33:26.000Z (almost 3 years ago)
- Last Synced: 2025-09-24T01:35:28.510Z (9 months ago)
- Topics: caller-id, callkit, cordova, cordova-ios, cordova-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/cordova-plugin-call-directory
- Size: 366 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# cordova-plugin-call-directory
[](https://travis-ci.org/GEDYSIntraWare/cordova-plugin-call-directory)
## 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
```javascript
CallDirectory.isAvailable(
(value) => console.log(value),
(err) => console.error(err));
```
### addIdentification
Make sure to not add duplicate numbers.
```javascript
let indexItems = [{label: "Test", number: "001123456"}];
CallDirectory.addIdentification(indexItems,
(value) => console.log(value),
(err) => console.error(err));
```
### removeIdentification
```javascript
let indexItems = [{label: "Test", number: "001123456"}];
CallDirectory.removeIdentification(indexItems,
(value) => console.log(value),
(err) => console.error(err));
```
### removeAllIdentification
```javascript
CallDirectory.removeAllIdentification(
(value) => console.log(value),
(err) => {console.error(err));
```
### getAllItems
Returns an array with items: `{ label: "Test", number: "1234567890"}`
```javascript
CallDirectory.getAllItems(
(value) => console.log(value),
(err) => console.error(err))
```
### reloadExtension
Reload the extenstion after adding or removing items.
```javascript
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"..]}`
```javascript
CallDirectory.getLog(
(value) => console.log(value),
(err) => console.error(err))
```
## Error Codes
[Apple documentation](https://developer.apple.com/documentation/callkit/cxerrorcodecalldirectorymanagererror.code)
## 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](https://github.com/DavidStrausz) whose [plugin](https://github.com/DavidStrausz/cordova-plugin-today-widget) is the base of all hooks, which add the extension during `cordova platform add ios`