Changed delegate APIs to avoid clashes with Apple's private APIs