If you are having issues downloading Portal Knights, please check to ensure you have sufficient space on your device. If you have less than 5GB available, this could be what is causing the download problem. Also try restarting your router or trying a different Wi-Fi network to see if this fixes the issue.
If problems persist, please contact Apple support for help. You can also check out this link for some help on getting this resolved: https://support.apple.com/en-us/HT207165.