iphone x cellular update failed
i have an iphone x and a week ago it first went into bootloop. finally when i was able to start my device an eroor popped up saying CANNOT USE CELLULAR DATA UNTIL DEVICE IS UPDATED. at that time my phone was running ios 12.0.1. i ran software update check on my device and it downloaded 12.1. when i tried to instal an error popped up saying UNABLE TO VERIFY UPDATE BECAUSE YOU ARE NOT CONNECTED TO THE NETWORK.so i updated through i tunes still no luck. plus my phone's IMEI was gone.then i restores ky device and after that my device is bricked.i cannoy go beyond the wifi network step after i chose the wifi network an error pops up saying COULDNOT ACTIVATE IPHONE and only option that appears is yo shutdown the device i want helo with this matter someone please guide me about this problem that what is actually wrong here .is it software or hardware and if it is hardware will i he able to get a replacement or repair because my device is still under warranty.anyhelp would be deeply appreciated.
iPhone X, iOS 12.1