I am creating one app in which i want to detect that iphone is on silent mode or not.if not then how to change ringer mode to (Silent or Vibrate) mode .
You could do this by using private API but your app will be rejected by apple AppStore as per apple policy which doesn't allow private API ,so then if you still wanna do it then you could go for Cydia Store to upload which is a store for rooted(jail broken) apple device's.