Code Monkey home page Code Monkey logo

cordova-plugin-call-directory's Introduction

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

cordova-plugin-call-directory's People

Contributors

btietze avatar dependabot[bot] avatar mmrosekgi avatar niklasmerz avatar tombell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jannerantanen

cordova-plugin-call-directory's Issues

[BUG] Cannot install plugin

Describe the bug
Cannot install plugin.

To Reproduce
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.."

Expected behavior
Install the plugin
Logs

[Failed to fetch plugin cordova-plugin-call-directory via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: npm: Command failed with exit code 128 Error output:
npm ERR! code 128
npm ERR! command failed
npm ERR! command git ls-remote ssh://[email protected]/GEDYSIntraWare/cordova-node-xcode.git
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/simone/.npm/_logs/2021-08-02T07_05_31_942Z-debug.log]

[BUG] Call to reloadExtension failed ()

Describe the bug
After calling reloadExtension, I receive the following error message:
The operation couldn’t be completed. (com.apple.CallKit.error.calldirectorymanager error 4.)

To Reproduce
Ionic:
Ionic CLI : 5.4.16 (/Users/muk9014/.nvm/versions/node/v14.17.0/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.11.5
@angular-devkit/build-angular : 0.1001.0-rc.0
@angular-devkit/schematics : 10.1.0-rc.0
@angular/cli : 10.1.0-rc.0
@ionic/angular-toolkit : 2.1.1

Cordova:
Cordova CLI : 11.0.0
Cordova Platforms : ios 6.2.0

this.callDirectory.reloadExtension()
.then((res: string) => {
console.log(res);
})
.catch((error: any) => {
console.error(error);
});

Expected behavior
reloadExtension

Logs

[[Error] The operation couldn’t be completed. (com.apple.CallKit.error.calldirectorymanager error 4.)
	(anonymous function) (cordova.js:1413)
	(anonymous function) (directory-directory-module-es2015.js:671)
	callbackFromNative (cordova.js:297)
	(anonymous function) (ios-wkwebview-exec.js:129)
	run (polyfills-es2015.js:2773)
	(anonymous function) (polyfills-es2015.js:3507)
	runTask (polyfills-es2015.js:2817)
	drainMicroTaskQueue (polyfills-es2015.js:3219)
	promiseReactionJob]

Thank you,
MK

[BUG] Error during the build fase with command-line.

When i try to compile my cordova project with command-line i obtain an error.
If i remove the cordova-plugin-call-directory from my project the build command works fine.

To Reproduce
cordova platform rm ios

cordova plugin rm cordova-plugin-call-directory

cordova plugin add cordova-plugin-call-directory --variable EXT_NAME="Cordova-Directory" --variable ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES="NO" --variable DEVELOPMENT_TEAM="my_team" --variable PROVISIONING_PROFILE="my_provision_id"

cordova platform add ios

cordova build ios --device --release

Expected behavior
A clear and concise description of what you expected to happen.

Logs
CompileC /Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/arm64/CDVCommandQueue.o Classes/Public/CDVCommandQueue.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/xxxxx/myWork/APP/platforms/ios/CordovaLib
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/xxxxx/.nvm/versions/node/v15.14.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/xxxxx/Applications/apache-maven-3.6.0/bin:/Users/xxxxx/Library/Android/sdk/emulator:/Users/xxxxx/Library/Android/sdk/tools:/Users/xxxxx/Library/Android/sdk/tools/bin:/Users/xxxxx/Library/Android/sdk/platform-tools:/Users/xxxxx/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4/bin:/Users/xxxxx/Library/Python/2.7/bin:/Users/xxxxx/Applications/flutter/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target arm64-apple-ios11.0 -fmessage-length=238 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/xxxxx/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/xxxxx/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fembed-bitcode -iquote /Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Cordova-generated-files.hmap -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Cordova-own-target-headers.hmap -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Cordova-all-target-headers.hmap -iquote /Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Cordova-project-headers.hmap -I/Users/xxxxx/myWork/APP/platforms/ios/build/device/include -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/DerivedSources-normal/arm64 -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/DerivedSources/arm64 -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/DerivedSources -F/Users/xxxxx/myWork/APP/platforms/ios/build/device -include /Users/xxxxx/myWork/APP/platforms/ios/build/sharedpch/CordovaLib_Prefix-amjwnqcpauaesdaojnvhlqsayset/CordovaLib_Prefix.pch -MMD -MT dependencies -MF /Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/arm64/CDVCommandQueue.d --serialize-diagnostics /Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/arm64/CDVCommandQueue.dia -c /Users/xxxxx/myWork/APP/platforms/ios/CordovaLib/Classes/Public/CDVCommandQueue.m -o /Users/xxxxx/Library/Developer/Xcode/DerivedData/MyApp-bpdfcqaobzinnvbbfmtuuhbpylql/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/CordovaLib.build/Release-iphoneos/CordovaLib.build/Objects-normal/arm64/CDVCommandQueue.o

** ARCHIVE FAILED **

The following build commands failed:
Check dependencies
(1 failure)
xcodebuild: Command failed with exit code 65

[BUG] Upload error "Invalid Bundle"

Describe the bug
We get an error when uploading to the App Store

This seems not to work. We could default here to false.

buildSettingsObj['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES || 'YES';

To Reproduce
Upload build and get error from App Store connect

Expected behavior
We need to fix the build files to not "Embedded Swift Standard Libraries"

Logs

[Please insert any logs here]

[BUG] Error while trying to call reloadExtension()

Describe the bug
I receive the following error message after calling reloadExtension:
The operation couldn't be completed. (com.apple.CallKit.error.calldirectory manager error 7.)
Remark: The EXTENSION and GROUP references are correct.

To Reproduce
Via ionic-angular 3.9.2:

this.callDirectory.reloadExtension()
  .then((res: string) => {
  console.log(res);
  })
  .catch((error: any) => {
    console.error(error);
  });

Expected behavior
Reload extension.

Logs

The operation couldn't be completed.
(com.apple.CallKit.error.calldirectory manager error 7.)

Any hints?

Best regards
Heiko

Call directory remove all identification failed - no such table: CallDirectoryNumbers

Describe the bug
When calling the removeAllIdentification method I'm getting the error no such table: CallDirectoryNumbers. This is with the latest 1.7.1 version. Prior to this I was using 1.6.0 and was getting more or less the same error except the table name was different no such table: CallDirectory.

The removeAllIdentification method is called second in a series of four synchronous tasks. The first is calling the isAvailable method, then removeAllIdentification, then addIdentification and finally reloadExtension. If any of the tasks fail the remaining tasks are not run.

Expected behavior
The CallDirectoryNumbers table to be available so that the error doesn't occur.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.