A common problem with smartphones is the swollen battery, which depending on the degree can even damage other components of the device, such as the screen, or, in extreme cases, end up exploding and/or catching fire, causing serious damage to people and things. The causes can range from charging problems to overheating and usually when the swelling is noticed it is already too late. With this in mind, Apple would be developing sensors to detect and warn as soon as the battery starts to swell, potentially avoiding a catastrophe.
Two patents were registered for Apple relating to technologies aimed at preventing battery become swollen. Both are related to modifying the space around the component. In simple terms, the greater the space or resistance of the barrier around it, the greater the chances of the swelling being detected in time by sensors or even not happening at all. The records were made in November 2019 and discovered by Apple Insider now.
complicated problem
As current batteries Most smartphones are made with lithium ions or Li-Ion and when some of these materials come into contact with oxygen, oxidation occurs which causes the cell to expand. This is why it is important to keep the right components separate within the battery itself and also the entire battery separated by barriers from the rest of the device's parts.
This can be challenging in smartphone design, as there is always a demand for larger batteries in a smaller space. When this is poorly designed, problems like the ones with the Galaxy Note 7 can occur. where an incorrect positioning of the battery electrodes ended up causing a short circuit.
The first patent of Apple It is about a new way of positioning the smartphone components around the battery, which can safely reduce the space between them. This would be possible due to a reinforced metal casing, which would keep the materials apart without running risks. Figure 1 shows the current model; figure 2, the new proposal.

Image: US Patent Office
The second patent involves the detection itself. 
Image: US Patent OfficeBasically the sensors of the Apple are attached around the battery, when it starts to show signs of swelling, the device can both warn that this is happening and prevent further degradation by offering an extra layer of protection. The figures show the sensors positioned in different locations on the case.
Through which channels you reach those people, classic and out of the box. Apple Insider
Image: steevithak/CC