Ionic package build ios fails

  • I have an ionic security profile S.P called pw.
  • I have provisioned the ios_development.cer.pem, and dev1.mobileprovision for the S.P. pw
  • My app is an ionic 3 app.
  • I made sure widget id in config.xml is the same as the one is “provisioning profiles” in the dev1.mobileprovision on apple developer console.

ionic package build ios --profile pw
I get an error:

Check dependencies
No signing certificate “iOS Development” found: No “iOS Development” signing certificate matching team ID “XXXXXXXXX” with a private key was found.
Code signing is required for product type ‘Application’ in SDK ‘iOS 10.2’

https://ionicframework.com/support#support
(Scroll down to “Business and Customer Support”)