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.
Global object CallDirectory
CallDirectory.isAvailable(
(value) => console.log(value),
(err) => console.error(err));
Make sure to not add duplicate numbers.
let indexItems = [{label: "Test", number: "001123456"}];
CallDirectory.addIdentification(indexItems,
(value) => console.log(value),
(err) => console.error(err));
let indexItems = [{label: "Test", number: "001123456"}];
CallDirectory.removeIdentification(indexItems,
(value) => console.log(value),
(err) => console.error(err));
CallDirectory.removeAllIdentification(
(value) => console.log(value),
(err) => {console.error(err));
Returns an array with items: { label: "Test", number: "1234567890"}
CallDirectory.getAllItems(
(value) => console.log(value),
(err) => console.error(err))
Reload the extenstion after adding or removing items.
CallDirectory.reloadExtension(
(value) => console.log(value),
(err) => console.error(err));
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))
Run path: @executable_path/../../Frameworks
for extension
Always embedd swift standard libraries: NO
for extension
Thanks to @David Strausz whose plugin is the base of all hooks, which add the extension during cordova platform add ios