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!