Measurements of CP observables in B±→DK± and B±→Dπ± decays are presented, where D represents a superposition of D0 and Dˉ0 states. The D meson is reconstructed in the three-body final state KS0K±π∓. The analysis uses samples of B mesons produced in proton-proton collisions, corresponding to an integrated luminosity of 1.0, 2.0, and 6.0 fb−1 collected with the LHCb detector at centre-of-mass energies of s= 7, 8, and 13 TeV, respectively. These measurements are the most precise to date, and provide important input for the determination of the CKM angle γ.