Ionic 2 Diagnostic plugin cause problem in Ionic Package ios build


Before installing Diagnostic plugin i am able to generate build from
But when i add plugin Diagnostic my build fails and give attached error log.


I think you forgot something.


Attached now.

My system information:

Cordova CLI: 6.5.0
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.6
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.10.1
Xcode version: Not installed


By this you mean to use the CLI command ionic package ..., correct?
Which command exactly are you using?

What commands exactly did you use to install the Diagnostic plugin? What code changes did you make?


For diagnostic plugin:

$ ionic plugin add --save cordova.plugins.diagnostic
$ npm install --save @ionic-native/diagnostic

For Packaging:
ionic package build ios --profile myapp
ionic package info 33

In my code i do exact same as in this Doc.

import { Diagnostic } from '@ionic-native/diagnostic';

  constructor(public navCtrl: NavController,private file: File,private diagnostic: Diagnostic) {
        let successCallback = (isAvailable) => { alert('Is available? ' + isAvailable); };
        let errorCallback = (e) => alert(e);

Note in my module.ts i already include diagnostic plugin.


So this is taken care of: ?


Yes, i included diagnostic plugin in provider already.


ionic serve is running with no problems?
Try adding the android platform and building that locally (and if this works on ionic package).


ionic serve works
Everything else is also even android is also working but the problem is with ios only.


Ok, I’m out of ideas. I would now just try to build it on my Mac, but I assume you don’t have one handy as you are using Ionic Package.

So the only other idea: Create a new project, only add this plugin and see if this builds on Ionic Package.



Which xCode version is installed in your dev machine? I have tested the same plugin with Cordova 6.5.0 and 7.0.0. I am able to build the application.



Step 1: I tried with fresh setup of ionic 3.
Step 2: include platform android and ios
Step 3: Added diagnostic Plugin
Step 4: Package upload to ionic server for build and it return failure log.


See this


He’s on Windows and using Ionic Package in the cloud.
But thanks for testing the plugin!



Then this is a case for this form here:
as it seems to be a problem with Ionic Package :confused:


Ok… I was testing on MAC.