Removing the sim lock *with* the code I have iPhone 4 which currently has SIM lock. However, a law passed in my country requires my service provider to disable the lock free of charge. However, I have no idea how this is done in practice - Google only gives me guides to remove the SIM lock after jailbreaking and such.

Of course, I can simply ask my service provider what to do, but they are professionals when it comes to being unhelpful and misleading when it is in their best interest, so I'm trying to ask here first.

Other phone users (not iPhone) I asked said they only had to insert a code given from their service provider. I see no place in the iPhone where such a code can be entered. So, if there is such a place - where is it? If not - how can I remove the SIM lock with most ease?
Without going into the technical details, iOS ships in a deactivated state and needs to contact an activation server to determine the carrier and locking status each time the device is restored.

iTunes performs the unlocking of all phones less than iOS 5. With iOS5, the device can self activate or activate through iTunes.

When a device is sold, it enters the database as an unlocked device or a locked device. You need the entity that has a lock on your device to update this database. It doesn't really matter if they type it into their system or pass a message to Apple that the device should now be unlocked, but iOS doesn't seem to have a place to enter a unlock code for DIY unlocking and instead depends on the activation process to determine GSM lock status.



I haven't seen it documented anywhere, but my presumption is that Apple operates the service that determines which phone on a serial number / IMEI basis should be locked or unlocked. Given the millions of devices this system is surely automated and authority to make changes to the database is delegated through to the carriers to handle their own unlock requests.



Even here in the US where our Library of Congress has stated for the record that consumers are allowed by law to unlock their devices in certain circumstances, I have yet to see a documented case where someone actually got AT&amp;T to perform a true unlock as described above.