Adding asserts before all provider calls. Added missing functionality to Cocoa's implementation since the latest linux changes.