Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when archive project: ld: can't open output file for writing

When I run my application on a device, it works perfect, but when I am trying to Archive it to upload to iTunes Connect, i get this error:

Error 1:

ld: can't open output file for writing: /Users/xxxx/Library/Developer/Xcode/DerivedData/Drikkespillet-bmengfxihzksonhdoqpbllpzpagg/Build/Intermediates/ArchiveIntermediates/Drikkespillet/IntermediateBuildFilesPath/Drikkespillet.build/Release-iphoneos/Drikkespillet.build/Objects-normal/arm64/Drikkespillet, errno=21 for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Error 2:

ld: can't open output file for writing: /Users/xxxx/Library/Developer/Xcode/DerivedData/Drikkespillet-bmengfxihzksonhdoqpbllpzpagg/Build/Intermediates/ArchiveIntermediates/Drikkespillet/IntermediateBuildFilesPath/Drikkespillet.build/Release-iphoneos/Drikkespillet.build/Objects-normal/armv7/Drikkespillet, errno=21 for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have tried to remove both of the "Framework Search Paths" and "Library Search Paths". But it still does not work to Archive the project. Any suggestions here?

like image 359
IdaEmilie Avatar asked Oct 31 '22 17:10

IdaEmilie


1 Answers

In Project file go to build setting -->Architectures section --> valid Architectures -- >Delete arm64.

like image 81
sourav dey Avatar answered Nov 13 '22 18:11

sourav dey