There are a number of reasons as to why you have been unable to detect the magnetic field due to a mains cable carrying current.
First of all it might help to be conversant with some of the characteristic and position of the magnetometer in a smartphone.
A typical smartphone magnetometer sensor is based on the hall effect and has a range of about $\pm 5 \,\rm mT$ with a sample rate which can be varied between about $8$ samples per second and $100$ samples per second.
If you have tried to detect the magnetic field to to a mains current directly then you have to realise that you are competing with other (stronger) static magnetic fields which are present including the Earth's magnetic field.
This is a typical display and placing the main cable close to the phone may well not change the net magnetic field direction by a noticeable amount.
The magnetic field you are trying to detect is varying at $50\,\rm Hz$.
A step forward would be to get an app which increases the sensitivity of the displayed magnetic field.
The one which I have used is Sensor Kinetics which is available for both the iOS devices and Android devices.
The opening display might look like this noting that I have eliminated the displays for the other sensors which are contained within a smartphone.
This display shows one of the problems with the detection of the fluctuating mains magnetic field at $50\,\rm Hz$ - the sample rate of $38 \,\rm Hz$.
However the x,y and z-components of the magnetic field are displayed to a reasonable sensitivity.
Although you can use this screen activating the time varing screen (top right hand icon) will produce a screen with the magnetic field as a function of time.
Using this screen and a jeweler's (small) screwdriver (do not use a permanent magnet) you can locate the position of the magnetometer watching the display whilst moving the screwdriver around the screen
Mine seemed to be top left of the phone.
The act of putting a mains cable which is carrying no current will disturb the magnetometer reading before settling down.
Switching on the current (to an electric kettle) shows the effect you were looking for.
The variation of magnetic field is not shown a being at $50 \,\rm Hz$ because the sample rate is not great enough.
So you are trying to detect a magnetic field which is varying at $50 \,\rm Hz$ and is actually smaller than one might suspect in that the detected field is due to two currents which are travelling in opposite directions through the live wire and the neutral wire so their magnetic field almost cancel each other out.
Just detecting the magnetic field from only the live wire carrying an alternating current should produce a larger effect.
Perhaps it would be safer to investigate the field due to a current driven by a lower voltage eg from an unrectified and/or unsmoothed low voltage power supply?