I am developing an iOS application in Xamarin using visual studio 2017 on MacBookPro. I was able to deploy this application on a test iPhone but whenever I compile the code, it starts asking for credentials and keeps asking for about 12 times. If credentials are entered successfully 12 times in a row then the project builds successfully, otherwise the following error appears in visual studio.
"/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(3,3): Error: Failed to codesign 'bin/iPhone/Debug/Phoneword_iOS.app/libmonosgen-2.0.dylib': bin/iPhone/Debug/Phoneword_iOS.app/libmonosgen-2.0.dylib: unknown error -1=ffffffffffffffff (Phoneword_iOS)"
Below is the message the comes when it starts building. "macOS wants to make changes. Enter an administrator's name and password to allow this. macOS wants to use the "System" keychain." Credentials Dialog