(1) Case
Close the Xcode document, and then open Xcode to select a previous project, Cmd+r found no, prompting that Apple Mach-o Linker Error.
(2) Workaround
Click on the above error, found that there is a hint that, sevenswitch, this is our previous use of Cocoapods imported third-party class library, to Uiswitch to do experiments, Remember when the import said to open the file need to open the suffix is the. xcworkspace file, not our previous. xcodeproj file.
Guess, it's probably the wrong file we opened. Go deep into the storage directory and open the. xcworkspace file directly:
A: Success, Cmd+r normal.
B: Opening the. xcodeproj file sure enough, the error occurred.
(3) Adjust the "posture" you open
In fact, the above two files, the one with the wrong. xcodeproj file is our earliest file, a blue color file; Open the correct. xcworkspace file is a file that we import into a third-party class library and is a white color.
So let's take a look at the following Xcode launcher interface, we choose the right side of the white Hello project file, open is correct, open the Blue Hello project file will be an error.
This may be a case of this kind of error, make a record, meet the other. Over.
iOS Dev 19 encounters Apple Mach-o Linker error scenarios and solutions to adjust your open posture