copied sdl2.framework to /Library/Frameworks, in Xcode in project general added framework and libraries, build phases add link binary with libraries.
and build settings added header search paths and library search paths. The first run will pass but has lots of warning says Lexical or Preprocessor Issue Group
/Library/Frameworks/SDL2.framework/Headers/SDL.h:32:10: Double-quoted include “SDL_main.h” in framework header, expected angle-bracketed instead
/Library/Frameworks/SDL2.framework/Headers/SDL_main.h:25:10: Double-quoted include “SDL_stdinc.h” in framework header, expected angle-bracketed instead
then in the code will show <SDL2/SDL.h> file not found!