If you are using a modified 3DS with Custom Firmware (CFW) , there are specific considerations for installing the update via CIA:
Patched a well-known glitch that allowed players to complete all Poké Pelago activities instantly by manipulating the console's calendar during a month change. Pokemon Sun: Update 1.2 3DS (WORLD) CIA
Fixed an issue where Pokémon would become unable to attack or switch if they were knocked out by Spiky Shield damage while using Sky Drop . If you are using a modified 3DS with
Update 1.2 for Pokémon Sun on the 3DS is a significant patch released to address critical bugs and is required for all online features like trading and battling. Pokemon Sun: Update 1.2 3DS (WORLD) CIA
Corrected an issue where items could sometimes be given to Pokémon Eggs. Installation for Modded Systems (CIA)