This article explains how to authorize the computer you connected your iPhone to have access to the data and information on the iOS device in order to sync.
Steps
Part 1 of 2: Authorize a Computer

Step 1. Connect iPhone to computer via USB cable
You will be asked to authorize the computer in order to establish the connection (if it is not a computer that you have already authorized in the past).

Step 2. Unlock the iPhone screen
In order to authorize the computer you connected the device to, you will need to log in to it by unlocking it.

Step 3. Press the Authorize button displayed in the notification message that appeared on the iPhone screen
As soon as you unlock the device screen, you will see the notification message appear.
If the "Do you want to authorize this computer" dialog box does not appear, it means that you may have already authorized that computer in the past. If not, you may need to reset the permission settings of the iOS device

Step 4. Choose the Continue option in iTunes (if prompted)
Depending on your computer settings, an additional notification message may appear on the screen after you authorize it to access your iPhone. This will launch the iTunes app on your computer.
Part 2 of 2: Reset Authorization Settings

Step 1. Launch the iPhone Settings app
It is located on the Home of the device and is characterized by a gray gear icon.

Step 2. Select the General item
It is located within the first group of options in the "Settings" menu.

Step 3. Scroll down the menu and select the Restore option

Step 4. Choose the item Reset location and privacy

Step 5. Enter the iPhone passcode if prompted
Any computers that you have already authorized to access the iPhone in the past will be deleted from the device memory. At this point, when you connect the iPhone to the computer, you will be asked to authorize the connection.

Step 6. Connect the iPhone to the computer again
As soon as you unlock the screen of the iOS device, the notification message should appear asking you to authorize the connection to the computer.

Step 7. Check for new iTunes updates
If the dialog to authorize connection to the computer does not appear, it could mean that the iTunes app is out of date. You can check for new updates by following the instructions in this article.

Step 8. Restart the iPhone
If the problem persists, try restarting the iOS device. Press and hold the Power and Home buttons until the iPhone screen turns off and the Apple logo appears. When the device has completed the boot process, it tries again to establish the connection with the computer.