Ionic Pro building for iOS


#21

Thanks. Also having similar issues. What worked a couple days ago is not working now. In spite of the bumps in the road working with Ionic Pro so far, I’m pretty hesitant to lay any blame on Ionic… Apple’s app-store system is essentially an anxiety attack waiting to happen, and I’m pretty sure they’re playing a massive practical joke on app-developers with their process.


#22

Jaydz, I could not agree more.

To the point where my past mobile apps have all been HTML5 offline based with the app cache manifest.


#23

Hi All,

To add to this - I have done what I said, create a completely blank app and start afresh. The blank app worked. I have been able to build, upload to diawi and install on my phone.

Knowing it CAN work is good. Now gotta get it to work with my code.

I’ll be taking a close look at the config.xml and package.json to see how far off mine is.


#24

Hi All,

I’ve been adding my commits one by one - and I think I’ve found ‘the’ culprit (I say ‘the’, there could be more than one).

call-number

I could successfully build when it was not part of my project - as soon as I added it I got errors.


#25

What is ‘call-number’ in reference to, and how do I remove it?


#26

It’s a plugin.

The link beneath mentions it.

BTW I don’t think that’s the whole story - but it does at least prove the thing can work.

I’d suggest you try something similar…

  • Start a new project
  • Make sure you can at least build that
  • Copy over the config.xml / package.json and that new weird package-lock.json (sigh) to your project
  • Make sure that builds
  • Add one plugin at a time
  • Pray

#27

It’s now even working with wkwebview.


#28

Awesome, i’ll give it a shot ASAP.


#29

Been beating my head against this for two days now. Will try your suggestion and pray hard to the silicon gods.


#30

Also to add - in order to get production transpiled code as opposed to debug code update your package.json…

"scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build --prod", // <--- add the --prod bit
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },

#31

I test from a blank project and i have the problem after ionic cordova platform add ios

duplicate symbol OBJC_METACLASS$_CDVLogger


#32

You don’t need to run that command unless you’re compiling locally.


#33

Uh really? I also thought the platform would have to be added to the project.


#34

Not required. Infact when you run the package command on Ionic Pro you can see they add it themselves.


#35

Oh that is interesting and surprising. But makes sense, no need to have the platform cloned locally if you are not going to build it.


#36

you have to remove ios platform to do it working with the following command

ionic cordova platform remove ios


#37

Hi All,

As per Sujan12’s suggestion I did go to Ionic Support and have received a good response from Zach H. which I’ll post beneath:

Hi James,

Thanks for getting in touch! It looks like this might be related to a recent update in the cordova-ios platform. The most recent release of cordova-ios (4.5) requires that the cordova-plugin-console plugin be removed from your project in order to build since it is now integrated directly. Cordova iOS versions less than 4.5 still require the cordova-plugin-console to be installed if you intend to use it.

In order to ensure you project builds properly on our package service, we’re now suggesting that you specify the exact version of cordova-ios you wish to use in both the package.json and the config.xml as currently platform versions are specified in both. That means removing the ~ or ^ symbols that may appear by default. For example, if you want to use cordova-ios 4.5 add"cordova-ios": “4.5.0” to the dependencies section in you package.json and ​ to the ios platform section of your config.xml.

If you are specifying version 4.5.0, you will need to run the command cordova plugin remove cordova-plugin-console then commit the changed files to version control in order for your builds to succeed.

I also see from your other ticket that you narrowed down errors to the call-number plugin. Let me know if that persists after you’ve specified a cordova-ios version. It may be that there is an entirely separate issue on top of the original one.

Let us know if this helps – thanks!

The main take on this I think could be the cordova-plugin-console - it has to be removed (if on Cordova 4.5.0 and above). Certainly when I started with a fresh pair of package.json / config.xml files I never bothered adding that one back in when re-adding my plugins. I haven’t tested in that scenario but I would suspect many of those having trouble building with Ionic Pro (as per my original error message) have fallen into this trap.

My other take from now on, I will not be editing the package.json / config.xml files in regards to plugin version updates, instead to do that from the cli based on the release notes by the vendors and also what the ionic commands inform you of.

Apologies for the long post but I thought it important enough to share with the community.


Ionic not building for ios, linker command failed, error 65
#38

Which is now also a FAQ entry:


#39

This solved my problem, thank you so much!
I would have never found it in the FAQ.