Ionic 2 Diagnostic plugin cause problem in Ionic Package ios build


#1

Before installing Diagnostic plugin i am able to generate build from https://apps.ionic.io.
But when i add plugin Diagnostic my build fails and give attached error log.


#2

I think you forgot something.


#3

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


#4

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?


#5

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) {
      console.log(this.file.dataDirectory);
        let successCallback = (isAvailable) => { alert('Is available? ' + isAvailable); };
        let errorCallback = (e) => alert(e);
        this.diagnostic.requestMicrophoneAuthorization().then(successCallback).catch(errorCallback);
  }

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


#6

So this is taken care of: http://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module ?


#7

Yes, i included diagnostic plugin in provider already.


#8

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


#9

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


#10

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.


#11

Hey,

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.

Thanks,
Harish


#12

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.


#13

See this


#14

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


#15

Crap.

Then this is a case for this form here:
https://ionic.zendesk.com/hc/en-us/requests/new?ticket_form_id=632068
as it seems to be a problem with Ionic Package :confused:


#16

Ok… I was testing on MAC.