Step 1: Goal → In the build settings → Header search path → press return key (enter) ---> replace /usr/include/libxml2
Step 2: Goal -> In the build phase -> confirm if the "libxml2.dylib" framework "libxml2.dylib" if it is not added
Step 3: Goal -> In the build phase -> search for libxml2.dylib , then click the add button
Pay attention to the screenshot:

source share