1

I am trying to archive my Xcode Project to send it to App Store Connect. The project is running completely fine on a normal build and run in the simulator or on a device. However when I archive my project, it returns 100-112 errors that begin with "undefinedSymbol." This happens even after I clean the build folder and restart Xcode.

I looked around Stack Overflow to see if I could find any solutions. I found this question and tried all of the following solution provided in the answers:

  • Set "Build Active Architecture Only" to "Yes"
  • Set "Build Active Architecture Only" to "No"
  • Deleted a pod (and reinstalled it again) "PhoneNumberKit" that seemed to be causing most of the errors.
  • Removed "arm64" and "armv7"
  • Deleted derived data the Xcode 'DerivedData' folder.
  • Added $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) to "Library Search Paths".

None of these solutions worked and I'm still getting the errors. However, when I did delete "PhoneNumberKit," the errors went down to only 70.

Here are some of the outputs Xcode gave me:

Warnings

d: warning: Could not find or use auto-linked library ‘swiftDarwin’
ld: warning: Could not find or use auto-linked library ‘swiftUIKit’
ld: warning: Could not find or use auto-linked library ‘swiftFoundation’
ld: warning: Could not find or use auto-linked library ‘swiftMetal’
ld: warning: Could not find or use auto-linked library ‘swiftObjectiveC’
ld: warning: Could not find or use auto-linked library ‘swiftCoreFoundation’
ld: warning: Could not find or use auto-linked library ‘swiftDispatch’
ld: warning: Could not find or use auto-linked library ‘swiftCoreImage’
ld: warning: Could not find or use auto-linked library ‘swiftQuartzCore’
ld: warning: Could not find or use auto-linked library ‘swiftCoreGraphics’
ld: warning: Could not find or use auto-linked library ‘swiftCore’

Errors

d /Users/michaelderiso/Library/Developer/Xcode/DerivedData/Hostend-gjaxiqkofklirhbihjmyftldzdvr/Build/Intermediates.noindex/ArchiveIntermediates/Hostend/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/PhoneNumberKit.build/Objects-normal/armv7/Binary/PhoneNumberKit normal armv7 (in target ‘PhoneNumberKit’ from project ‘Pods’)

There are even more after these!

I expected the Xcode project to archive normally. I also expected the error to be resolved after I tried some of the solutions from that Stack Overflow question. How can I fix this issue?

UPDATE:

This doesn't seem to be an issue in Xcode 10. Must be something with the beta. Any more potential solutions are welcome!

  • [Have a look on this solution](https://stackoverflow.com/questions/52536380/why-linker-link-static-libraries-with-errors-ios) Hope this works for you. – Abhishek Jul 27 '19 at 05:55
  • @Abhishek Unfortunately, none of those answers were a solution to my problem. I tried adding the $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) to my Library Search Paths, however, that did not work. The other answers were mostly focused towards Objective C based projects. Are there any other possible solutions out there? –  Jul 27 '19 at 14:00
  • https://stackoverflow.com/questions/56855766/xcode-build-fails-due-to-undefined-symbol-swift-force-load-swiftuikit – matt Jul 27 '19 at 20:23
  • @matt How can I locate Xcode's bundle file name to see if that is the issue? –  Jul 27 '19 at 21:35

0 Answers0