1
votes

I am trying to build a very old iOS Cordova App.

It builds successfully for Simulators but, when I try to build for any real hardware, it shows error:

Ld /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS normal armv7s cd "/Users/atif/Desktop/Atif/Projects/MIS/MIND_MIS Ver 02.00.0002 Final" export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -L/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos -F/Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos -filelist /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS.LinkFileList -miphoneos-version-min=7.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS_lto.o -Xlinker -no_deduplicate -fobjc-link-runtime -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a -ObjC -framework MessageUI -weak_framework CoreMotion -framework CoreLocation -framework ImageIO -framework OpenAL -framework AssetsLibrary /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/libCordova.a -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework CoreMedia -framework CoreLocation -Xlinker -dependency_info -Xlinker /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Intermediates.noindex/MIND_MIS.build/Debug-iphoneos/MIND_MIS.build/Objects-normal/armv7s/MIND_MIS_dependency_info.dat -o /Users/atif/Library/Developer/Xcode/DerivedData/MIND_MIS-cccdiojxhigimnewheisujbzuhyk/Build/Products/Debug-iphoneos/MIND_MIS.app/MIND_MIS

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

I even tried using Xcode 7, 8 and also 9 but, I still get the same error.

3

3 Answers

1
votes

Try:

  • Clear derived data and then reopen Xcode.
  • Select proper sign in / certificate, or try to re-add account in Xcode.
  • Make sure if your pods supported bitcode if not then you need to set bitcode to NO (Go to Project Build setting search for bitcode & set it to NO.
    Or trying this may help you:

    enter image description here
    OR
  • Open Podfile
  • Uncomment this line ~> platform :ios, 'x.0'
  • From the command line run the following command where Podfile resides
  • pod update
  • In the xcode select Product > clean and then Product > Build
1
votes

I encountered this error before..

Try this solution:

Go to Build Settings > Build Active Architecture Only

Make changes on the selected target

a) Set it as 'YES' if you're building/pushing the app directly to a device

b) Set it as 'NO' if you're trying to build the app as IPA

Hope it helps!

0
votes

Go to project > targets > general > deployment info. Make sure your deployment target is same as your hardware's ios version