A wireless charging apparatus, wherein the apparatus comprises a transmit end or a receive end; the transmit end comprises a transmit end resonant network and an inverter circuit, and the transmit end resonant network comprises a transmitting coil; the receive end comprises a receive end resonant network and a rectifier circuit, and the receive end resonant network comprises a receiving coil; and the apparatus further comprises a controller; the controller is configured to obtain a relative position between the transmit end and the receive end based on a self-inductance of the transmitting coil and at least one parameter; and the at least one parameter comprises one or more of a current of the transmitting coil, efficiency of a wireless charging system formed by the transmit end and the receive end, and a direct current output voltage at the receive end, wherein the relative position comprises a horizontal relative position and a vertical relative position; and the controller is specifically configured to obtain the vertical relative position based on the self-inductance of the transmitting coil, and obtain the horizontal relative position based on the at least one parameter, characterized in that the controller is further configured to: obtain an alternating current impedance of the transmitting coil based on the horizontal relative position and the vertical relative position; obtain a power loss at the transmit end based on the alternating current impedance of the transmitting coil and a current of the transmitting coil in a charging process; obtain a transmit power based on an input power at the transmit end and the power loss at the transmit end; obtain a foreign object loss based on the transmit power and a receive power at the receive end; and when the foreign object loss is greater than a power threshold, determine that a foreign object exists between the transmit end and the receive end. the controller is configured to obtain a relative position between the transmit end and the receive end based on a self-inductance of the transmitting coil and at least one parameter; and the at least one parameter comprises one or more of a current of the transmitting coil, efficiency of a wireless charging system formed by the transmit end and the receive end, and a direct current output voltage at the receive end, wherein the relative position comprises a horizontal relative position and a vertical relative position; and the controller is specifically configured to obtain the vertical relative position based on the self-inductance of the transmitting coil, and obtain the horizontal relative position based on the at least one parameter, characterized in that the controller is further configured to: obtain an alternating current impedance of the transmitting coil based on the horizontal relative position and the vertical relative position; obtain a power loss at the transmit end based on the alternating current impedance of the transmitting coil and a current of the transmitting coil in a charging process; obtain a transmit power based on an input power at the transmit end and the power loss at the transmit end; obtain a foreign object loss based on the transmit power and a receive power at the receive end; and when the foreign object loss is greater than a power threshold, determine that a foreign object exists between the transmit end and the receive end.