The invention provides certain thiazole-substituted aminoheteroaryl compounds of the Formula (I) or pharmaceutically acceptable salts thereof, wherein ring R1, R2, R3, R4, ring B, and the subscript r are as defined herein. The invention also provides pharmaceutical compositions comprising such compounds, and methods of using the compounds for treating diseases or conditions mediated by Spleen Tyrosine Kinase (Syk).