guys is you are tearing your hair out. if you did ANY repairs or have had any repairs done to the phone before your sim issue do this (if you have the tools)
BACKUP TO ITUNES (with the password to save everything)
open back up the iphone screen
unscrew the 2 little tin plates that cover the charging port ribbon and battery ribbon (youtube charging port replacement if unsure. its litterally just after opening it up)
remove SIM card
locate and remove the battery ribbon for 30 seconds
replace ribbon, boot phone while still open to check if it has resolved the issue. mine started reading no sim immediately
while its open just quickly check to make sure no other plugs are loose or unplugged and if ti works re assemble.
its just taken me 3 hours to figure this out. and i did absolutely everything right down to a full factory reset, but short of the "mechanics fix" that others have attempted.
to buy these tools are nothing if you buy a replacement iphone battery or whatever from ebay. and new batteries are only 15-25 dollars depending on location. you can get a tool set alone off there too.
my problem was when i had to replace my charging port this afternoon as it was worn out and not charging anymore.