Xcode / Phonegap - Apple Mach-O Linker Error

I just finished programming my application. I tried to archive the application for sending , but this did not work, the following error appeared. This problem occurs only when I want to archive the application, it works on a test device, and the simulator works fine (no errors).

Ld /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp normal armv7 cd /Users/Admin/Desktop/MyApp3 setenv IPHONEOS_DEPLOYMENT_TARGET 6.1 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos -L/Users/Admin/Desktop/MyApp3 -F/Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos -filelist /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Objects-normal/armv7/MyApp.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/libCordova.a -ObjC -fobjc-link-runtime -miphoneos-version-min=6.1 -lxml2 -lxml2.2 -larchive.2 -framework CoreLocation -framework ImageIO -framework OpenAL -framework AssetsLibrary /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/BuildProductsPath/Release-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 -lCordova -o /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/MyApp ld: file not found: /Users/Admin/Library/Developer/Xcode/DerivedData/MyApp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/libCordova.a clang: error: linker command failed with exit code 1 (use -v to see invocation) (null): File not found: /Users/Admin/Library/Developer/Xcode/DerivedData/Myapp-ekptdmvfytpoeoaedgfvjzqudoqa/Build/Intermediates/ArchiveIntermediates/Myapp/InstallationBuildProductsLocation/Applications/libCordova.a (null): Linker command failed with exit code 1 (use -v to see invocation) 

I have already come out of this in the past days. I tried everything I found. I installed Build Active Architecture only on β€œYES”, deleted search paths (they were already empty), changed the iOS version, installed Validate Build Product and other materials.

I create my projects using the terminal and. / create.

I even made a new clean project and posted my source code there. The problem occurs every time (even if I try to archive a new project without changing anything in the source)

Usage: XCode 4.6.3 PhoneGap 2.9.0

I am desperate and hope for help. Thanks.

+3
source share
3 answers

Decision

I found a solution / workaround. (Failed to publish it, because if the limit is 10Rep, it should have waited 8 hours)

  • In the target build settings, find β€œOther linker flags”
  • Edit $ (TARGET_BUILD_DIR) /libCordova.a
  • Up to $ (BUILT_PRODUCTS_DIR) /libCordova.a

Or just go to the Cordoba website and download Cordova 3.0.0 (although the old famous "splashscreen - white flash" is back)

With Cordova 3.0, this problem has been fixed :) Archiving works fine.

+8
source

I have the same problem ... Works well on the simulator and test device, set Build Active Architecture to "YES" on the projects "Cardova" and "MyApp" created using the terminal. / create, rebuild the project from scratch. Usage: XCode 4.6.3 PhoneGap 2.9.0

Update: I restored my project using PhoneGap 3.0.0 and now I can archive.

0
source

This was resolved for me by setting "Build Active Architecture Only" to "Yes" for the "Release" parameter in the build settings in xcode.

The fix described by FlyingLemon has already been completed since I have the latest version of PhoneGap installed.

Phone version 3.4.0-0.19.13

Xcode Version 5.1

0
source

Source: https://habr.com/ru/post/978977/


All Articles