1 Reply Latest reply on Jan 10, 2017 10:10 AM by kerrishotts

    Cordova Plugin Issue in iMessageExtension with CDVViewController

    williamhoang Level 1

      Hi All,


      I am trying to add iMessage Extension to our existing hybrid Cordova project. Basically we want to reuse our existing thin layer and Cordova plugins within iMessage Extension.


      I tried to add iMessage Extension target to our existing hybrid Cordova project and then added the flowing entries in extension target's build settings

      - Under Target Dependencies: add CordovaLib

      - Under Link Binary with Libraries: add libCordova.a and required frameworks


      I ran the app within iMessage and when the webview is loaded, i faced errors saying that the plugins files does not exist (e.g below)


      2017-01-10 18:04:37.263213 iMessageExtension[1726:840063] CDVPlugin class CDVStatusBar (pluginName: statusbar) does not exist.

      2017-01-10 18:04:37.263632 iMessageExtension[1726:840063] [CDVTimer][statusbar] 73230.825007ms

      2017-01-10 18:04:37.264061 iMessageExtension[1726:840063] CDVPlugin class CDVFile (pluginName: file) does not exist.

      2017-01-10 18:04:37.264291 iMessageExtension[1726:840063] [CDVTimer][file] 0.380993ms

      2017-01-10 18:04:37.264726 iMessageExtension[1726:840063] CDVPlugin class CDVSplashScreen (pluginName: splashscreen) does not exist.

      2017-01-10 18:04:37.264957 iMessageExtension[1726:840063] [CDVTimer][splashscreen] 0.331998ms

      2017-01-10 18:04:37.265278 iMessageExtension[1726:840063] CDVPlugin class IonicKeyboard (pluginName: keyboard) does not exist.

      2017-01-10 18:04:37.265591 iMessageExtension[1726:840063] [CDVTimer][keyboard] 0.295997ms

      2017-01-10 18:04:37.265867 iMessageExtension[1726:840063] [CDVTimer][TotalPluginStartup] 73233.117044ms


      I tried some suggestions from the internet but nothing worked out. When I tried to add those plugin files into extension target's build settings under Compiled Sources, XCode is throwing below error in those plugin files


      'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.


      Below are the details of  XCode and Cordova version that we are using

      XCode 8.2.1

      Cordova IOS 3.8.0


      Please help.



      William Hoang