Version 1.2 of Pokémon Sun and Moon is now available on Nintendo 3DS. This new update is required to play online – you will receive a message in your game if you attempt to go online before updating. If you are currently playing the game and want to update it, be sure to save and then close the game. When you return to your game, you will be prompted to update it. An Internet connection is required to update your game. Note that once version 1.2 has been installed, any Battle Videos saved prior to the update cannot be played or shared. Version 1.2 includes fixing the following issues:
• Pokémon being unable to attack and switch when Sky Drop is used and when knocked out by damage done by Spiky Shield.
• A glitch in Poké Pelago when entering a new month.
• A rare case where the game ends after using an Evolution item as the last item in your Bag.
• Scatterbug sometimes not learning Egg Moves.
• Eggs sometimes being able to be given items.
• A glitch ending the tournament when pre-registered for an online Friendly Competition (e.g. entry gets canceled or the Battle Teams get unlocked).
Source: Pokémon Global Link