J'ai un projet assez ancien avec une cible de deployment minimale définie sur iOS 8.4. Pour des raisons techniques, le bitcode doit être activé. Le projet se construit et fonctionne bien . Cependant, lorsque vous essayez d'exporter une construction archivée, les choses vont mal. J'utilise Xcode 8.2.1.
Lorsque je crée une version de test (signée avec le certificate Enterprise) avec l'option Rebuild from bitcode
enabled, l'export échoue au stade où elle comstack le bitcode.
Voici la partie pertinente du journal:
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/lib/darwin/libclang_rt.ios.a" "-o" "/private/var/folders/qy/cgq_nq7x2tx1j3z__7f4yx100000gn/T/<redacted target name>WX9bPu/<redacted target name>.armv7.out" -= Output =- Undefined symbols for architecture armv7: "_llvm_gcov_init", referenced from: __hidden#2_ in 001.o __hidden#3_ in 001.o __hidden#4_ in 001.o __hidden#5_ in 001.o __hidden#6_ in 001.o __hidden#7_ in 001.o __hidden#8_ in 001.o ... "_llvm_gcda_end_file", referenced from: __hidden#0_ in 001.o __hidden#0_ in 002.o __hidden#0_ in 003.o __hidden#0_ in 004.o __hidden#0_ in 005.o __hidden#0_ in 006.o __hidden#0_ in 007.o ... "_llvm_gcda_emit_function", referenced from: __hidden#0_ in 001.o __hidden#0_ in 002.o __hidden#0_ in 004.o __hidden#0_ in 005.o __hidden#0_ in 006.o __hidden#0_ in 007.o __hidden#0_ in 008.o ... "_llvm_gcda_emit_arcs", referenced from: __hidden#0_ in 001.o __hidden#0_ in 002.o __hidden#0_ in 004.o __hidden#0_ in 005.o __hidden#0_ in 006.o __hidden#0_ in 007.o __hidden#0_ in 008.o ... "_llvm_gcda_start_file", referenced from: __hidden#0_ in 001.o __hidden#0_ in 002.o __hidden#0_ in 003.o __hidden#0_ in 004.o __hidden#0_ in 005.o __hidden#0_ in 006.o __hidden#0_ in 007.o ... "_llvm_gcda_summary_info", referenced from: __hidden#0_ in 001.o __hidden#0_ in 002.o __hidden#0_ in 003.o __hidden#0_ in 004.o __hidden#0_ in 005.o __hidden#0_ in 006.o __hidden#0_ in 007.o ... ld: symbol(s) not found for architecture armv7 Exited with 1 error: Failed to comstack bundle: /var/folders/qy/cgq_nq7x2tx1j3z__7f4yx100000gn/T/<redacted target name>WX9bPu/<redacted target name>.armv7.xar Stderr: > /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:202:in `run' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1987:in `block in ComstackOrSsortingpBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1944:in `each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1944:in `ComstackOrSsortingpBitcodeInBundle' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2119:in `ProcessIPA' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2687:in `<main>'"; info = { }; level = ERROR; type = exception; } ); thinnableAssetCatalogs = ( "/var/folders/qy/cgq_nq7x2tx1j3z__7f4yx100000gn/T/XcodeDistPipeline.hn6/Root/Payload/<redacted target name>.app/Assets.car" ); } 2017-03-31 12:21:37 +0000 [MT] Exporting using IDEDissortingbutionPackageExportStep 2017-03-31 12:21:58 +0000 [MT] Canceled dissortingbution assistant
Lorsque je désactive Rebuild from bitcode
, l'export est réussie et la construction résultante fonctionne correctement. Je crains que cela ne cause des problèmes lorsque la compilation sera soumise à iTunes Connect.
Quelqu'un at-il une idée de pourquoi cette erreur se produit et comment résoudre ce problème? Je suis un peu perdu ici.
Pour clarifier: oui, le bitcode est activé au niveau cible. Voici les bibliothèques liées:
Ce sont les dependencies:
# Reporting pod 'Fabric' pod 'Crashlytics' pod 'GoogleAnalytics' pod 'CocoaLumberjack', '~> 1.6.2' # Networking pod 'AFNetworking', '~> 2.6.3' pod 'RestKit', '~> 0.27' pod 'Reachability' # Other pod 'UIColor-Utilities', '~> 1.0.1' pod 'ViewDeck', '~> 2.4' pod 'SDWebImage', '~> 3.7.0' pod 'AMRatingControl', '~> 1.3.0'
Après quelques essais et erreurs et grâce aux suggestions utiles de Sven Drielecker (et d'autres), la question a été résolue .
Le GCC_INSTRUMENT_PROGRAM_FLOW_ARCS
génération GCC_INSTRUMENT_PROGRAM_FLOW_ARCS
été défini sur YES
pour les versions de debugging et de publication. L'éteindre pour la libération a résolu le problème.
J'ai essayé de reproduire votre problème mais sans succès. Juste en nommant les symboles manquants, ceux-ci semblent avoir un rapport avec la couverture du code. Vous pouvez essayer de désactiver tout ce qui est lié à la couverture de code dans votre projet, puis réarchiver et réexporter:
Paramètres de schéma :
Paramètres de génération cible: