Building app for iOS

We have an app that we can build fine for Andriod on Ionic Pro but get the following errors when building for iOS.

We don’t have much for expierence building for iOS. Can anyone give me some hints?

Here are the error details

❌  duplicate symbol _OBJC_CLASS_$_CDVLogger in
> CDVLogger.o
> libCordova.a(CDVLogger.o)


❌  duplicate symbol _OBJC_METACLASS_$_CDVLogger in
> CDVLogger.o
> libCordova.a(CDVLogger.o)


❌  ld: 2 duplicate symbols for architecture armv7



❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)


▸ Linking Appi4\

❌  duplicate symbol _OBJC_CLASS_$_CDVLogger in
> CDVLogger.o
> libCordova.a(CDVLogger.o)


❌  duplicate symbol _OBJC_METACLASS_$_CDVLogger in
> CDVLogger.o
> libCordova.a(CDVLogger.o)


❌  ld: 2 duplicate symbols for architecture arm64



❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)

[23:07:50]: Exit status: 65

+---------------+-------------------------+
|            Build environment            |
+---------------+-------------------------+
| xcode_path    | /Applications/Xcode.app |
| gym_version   | 2.75.1                  |
| export_method | development             |
| sdk           | iPhoneOS11.2.sdk        |
+---------------+-------------------------+

[23:07:50]: ▸ duplicate symbol _OBJC_METACLASS_$_CDVLogger in:
[23:07:50]: ▸     /Users/ionic/Library/Developer/Xcode/DerivedData/Appi4_Spire-hgjmvadrxtzojzcjtqnycsknmszm/Build/Intermediates.noindex/ArchiveIntermediates/Appi4 Spire/IntermediateBuildFilesPath/Appi4 Spire.build/Release-iphoneos/Appi4 Spire.build/Objects-normal/arm64/CDVLogger.o
[23:07:50]: ▸     /Users/ionic/Library/Developer/Xcode/DerivedData/Appi4_Spire-hgjmvadrxtzojzcjtqnycsknmszm/Build/Intermediates.noindex/ArchiveIntermediates/Appi4 Spire/BuildProductsPath/Release-iphoneos/libCordova.a(CDVLogger.o)
[23:07:50]: ▸ ld: 2 duplicate symbols for architecture arm64
[23:07:50]: ▸ clang: error: linker command failed with exit code 1 (use -v to see invocation)
[23:07:50]: 
[23:07:50]: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
[23:07:50]: 📋  For the complete and more detailed error log, check the full log at:
[23:07:50]: 📋  /Users/ionic/Library/Logs/gym/Appi4 Spire-Appi4 Spire.log
[23:07:50]: 
[23:07:50]: Your `export_method` in gym is defined as `development`
[23:07:50]: which might cause problems when signing your application
[23:07:50]: Are you sure want to build and export for development?
[23:07:50]: Please make sure to define the correct export methods when calling
[23:07:50]: gym in your Fastfile or from the command line
[23:07:50]: 
[23:07:50]: 
[23:07:50]: Looks like fastlane ran into a build/archive error with your project
[23:07:50]: It's hard to tell what's causing the error, so we wrote some guides on how
[23:07:50]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[23:07:50]: Before submitting an issue on GitHub, please follow the guide above and make
[23:07:50]: sure your project is set up correctly.
[23:07:50]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[23:07:50]: the full commands printed out in yellow in the above log.
[23:07:50]: Make sure to inspect the output above, as usually you'll find more error information there
[23:07:50]: 
[23:07:50]: -------------------------
[23:07:50]: --- Step: upload_logs ---
[23:07:50]: -------------------------
[23:07:52]: ---------------------------
[23:07:52]: --- Step: shell command ---
[23:07:52]: ---------------------------
[23:07:52]: -----------------------------
[23:07:52]: --- Step: delete_keychain ---
[23:07:52]: -----------------------------
[23:07:52]: Error building the application - see the log above
+-------------------------------------+--------------------------------------+
|                                Lane Context                                |
+-------------------------------------+--------------------------------------+
| DEFAULT_PLATFORM                    | ios                                  |
| PLATFORM_NAME                       | ios                                  |
| LANE_NAME                           | ios package_build                    |
| DOWNLOAD_CERTS_CODESIGNING_IDENTITY | iPhone Developer: Gerhard Peters     |
|                                     | (CCGQ4ENNDL)                         |
| DOWNLOAD_CERTS_TEAM_ID              | G2N23EKGTH                           |
| DOWNLOAD_CERTS_PROJECT_NAME         | Appi4 Spire                          |
| DOWNLOAD_CERTS_CERT_PATH            | /Users/ionic/builds/project-1/cert_  |
|                                     | file.p12                             |
| DOWNLOAD_CERTS_PROVISIONING_PATH    | /Users/ionic/builds/project-1/provi  |
|                                     | sion_file.mobileprovision            |
| SIGH_PROFILE_PATHS                  | ["/Users/ionic/builds/project-1/pro  |
|                                     | vision_file.mobileprovision"]        |
+-------------------------------------+--------------------------------------+
[23:07:52]: Error building the application - see the log above

+------+------------------------+-------------+
|              fastlane summary               |
+------+------------------------+-------------+
| Step | Action                 | Time (in s) |
+------+------------------------+-------------+
| 1    | default_platform       | 0           |
| 2    | build_summary          | 1           |
| 3    | download_www           | 4           |
| 4    | create_keychain        | 0           |
| 5    | download_certs         | 2           |
| 6    | import_certificate     | 0           |
| 7    | npm install --quiet    | 30          |
| 8    | cordova platform add   | 11          |
|      | ios --nofetch          |             |
| 9    | update_project_codesi  | 0           |
|      | gning                  |             |
| 10   | update_project_provis  | 0           |
|      | ioning                 |             |
| 💥   | gym                    | 82          |
| 12   | upload_logs            | 1           |
| 13   | shell command          | 0           |
| 14   | delete_keychain        | 0           |
+------+------------------------+-------------+

[23:07:52]: fastlane finished with errors
\e[91mFailed to upload ipa to storage please retry your build.\e[0m
MAC Iteration 1
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048

[!] Error building the application - see the log above
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
ERROR: Job failed: Process exited with: 1. Reason was:  ()

We were not aware that we needed to use fast lane for iOS. Problem solved

1 Like

Building iOS apps is a mess sadly :worried:

We are finding that out the hard way

We have the same problem, how did you solve it? What is fastlane?

best regards

1 Like

We have the same problem, how did you solve it?

This specific problem is probably caused by you having a new cordova-ios version and the console plugin installed at the same time. The platform contains that by itself, so it clashes with the additionally installed plugin. Removing the plugin should fix the problem.

If @Diretoria and @AppIntelligenceonlin really have the same error message, this might also help.

You don’t, fastlane is the tool that Ionic Pro uses internally.

Fastlane is a tool to automate mobile building and other tasks. It is obviously used on the Ionic Pro service.

 **EXPORT FAILED **
**[19:08:17]: Exit status: 70**
**[19:08:17]: No provisioning profile provided**
**[19:08:17]: Make sure to pass a valid provisioning for each required target**
**[19:08:17]: Check out the docs on how to fix this: https://docs.fastlane.tools/actions/gym/#export-option**s

+---------------+-------------------------+
|            Build environment            |
+---------------+-------------------------+
| xcode_path    | /Applications/Xcode.app |
| gym_version   | 2.75.1                  |
| export_method | development             |
| sdk           | iPhoneOS11.2.sdk        |
+---------------+-------------------------+

[19:08:17]: ▸     cd /Users/ionic/builds/project-0/platforms/ios
[19:08:17]: ▸     export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/ionic/.fastlane/bin/bundle/bin:/usr/local/opt/node@8/bin:/Users/ionic/.fastlane/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
[19:08:17]: ▸     /usr/bin/touch -c /Users/ionic/Library/Developer/Xcode/DerivedData/Vôlei_1.9-fetdncnposqldwgsaendxaslxtni/Build/Intermediates.noindex/ArchiveIntermediates/Vôlei\ 1.9/BuildProductsPath/Release-iphoneos/Vôlei\ 1.9.app.dSYM
[19:08:17]: ▸ ** ARCHIVE SUCCEEDED **
[19:08:17]: 
[19:08:17]: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
[19:08:17]: 📋  For the complete and more detailed error log, check the full log at:
[19:08:17]: 📋  /Users/ionic/Library/Logs/gym/Vôlei 1.9-Vôlei 1.9.log
[19:08:17]: 
[19:08:17]: Your `export_method` in gym is defined as `development`
[19:08:17]: which might cause problems when signing your application
[19:08:17]: Are you sure want to build and export for development?
[19:08:17]: Please make sure to define the correct export methods when calling
[19:08:17]: gym in your Fastfile or from the command line
[19:08:17]: 
[19:08:17]: 
[19:08:17]: Looks like fastlane ran into a build/archive error with your project
[19:08:17]: It's hard to tell what's causing the error, so we wrote some guides on how
[19:08:17]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[19:08:17]: Before submitting an issue on GitHub, please follow the guide above and make
[19:08:17]: sure your project is set up correctly.
[19:08:17]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[19:08:17]: the full commands printed out in yellow in the above log.
[19:08:17]: Make sure to inspect the output above, as usually you'll find more error information there
[19:08:17]: 
[19:08:17]: -------------------------
[19:08:17]: --- Step: upload_logs ---
[19:08:17]: -------------------------
[19:08:25]: ---------------------------
[19:08:25]: --- Step: shell command ---
[19:08:25]: ---------------------------
[19:08:26]: -----------------------------
[19:08:26]: --- Step: delete_keychain ---
[19:08:26]: -----------------------------
[19:08:26]: Error packaging up the application
+-------------------------------------+------------------------------------------------------------------+
|                                              Lane Context                                              |
+-------------------------------------+------------------------------------------------------------------+
| DEFAULT_PLATFORM                    | ios                                                              |
| PLATFORM_NAME                       | ios                                                              |
| LANE_NAME                           | ios package_build                                                |
| DOWNLOAD_CERTS_CODESIGNING_IDENTITY | iPhone Developer: Herly Monteiro Aguiar Junior (BSZH2G4243)      |
| DOWNLOAD_CERTS_TEAM_ID              | 8RJ4JFFLLD                                                       |
| DOWNLOAD_CERTS_PROJECT_NAME         | Vôlei 1.9                                                        |
| DOWNLOAD_CERTS_CERT_PATH            | /Users/ionic/builds/project-0/cert_file.p12                      |
| DOWNLOAD_CERTS_PROVISIONING_PATH    | /Users/ionic/builds/project-0/provision_file.mobileprovision     |
| SIGH_PROFILE_PATHS                  | ["/Users/ionic/builds/project-0/provision_file.mobileprovision"] |
+-------------------------------------+------------------------------------------------------------------+
[19:08:26]: Error packaging up the application

+------+------------------------------------+-------------+
|                    fastlane summary                     |
+------+------------------------------------+-------------+
| Step | Action                             | Time (in s) |
+------+------------------------------------+-------------+
| 1    | default_platform                   | 0           |
| 2    | build_summary                      | 7           |
| 3    | create_keychain                    | 0           |
| 4    | download_certs                     | 1           |
| 5    | import_certificate                 | 0           |
| 6    | build_pro_app                      | 45          |
| 7    | cordova platform add ios --nofetch | 15          |
| 8    | update_project_codesigning         | 0           |
| 9    | update_project_provisioning        | 0           |
| 💥   | gym                                | 94          |
| 11   | upload_logs                        | 8           |
| 12   | shell command                      | 0           |
| 13   | delete_keychain                    | 0           |
+------+------------------------------------+-------------+

[19:08:26]: fastlane finished with errors
\e[91mFailed to upload ipa to storage please retry your build.\e[0m
MAC Iteration 2048
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048

[!] Error packaging up the application
Running after script...
$ clean-up
Cleaning up files...
1 Like

So did you fix the previous problem? If so, how?
Is this a new problem? Please open a new topic for it.