fix hidden undefined symbols using xcpretty

Tags
Apple
Date
Mar 2, 2022
notion image
Over the years, every time I encountered this problem, I would remove xcpretty and run xcodebuild again.
 
See these issues.
 
Finally I couldn't take it anymore and came up with a solution myself.
 
Undefined symbols for architecture armv7: "_kQYPublisherVoteComonentDeleted", referenced from: -[QYPHAssetsPickerViewController initWithSettings:] in libQYPhoto.a(QYPHAssetsPickerViewController.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
 
The output is like this.
 
❌ ld: Undefined symbols for architecture armv7: ❌ ld: "_kQYPublisherVoteComonentDeleted", referenced from: ❌ ld: -[QYPHAssetsPickerViewController initWithSettings:] in libQYPhoto.a(QYPHAssetsPickerViewController.o) ❌ ld: symbol(s) not found for architecture armv7 ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
 
This is how it works. Fixed without changing xcpretty.
 
xcpretty_wrapper="scripts/xcpretty_fix.sh" chmod +x "${xcpretty_wrapper}" xcodebuild xxx | ${xcpretty_wrapper}
 

Loading Comments...