ssk
ssk

Reputation: 9265

Programmatically check whether CallKit API is supported on iOS

My VOIP has to support the legacy behaviour for iOS versions < 10.0 since the CallKit API is supported from the iOS version >= 10.0.

How can I programmatically check whether the CallKit is supported or not without using IF_DEF?

Upvotes: 1

Views: 463

Answers (2)

zmarties
zmarties

Reputation: 4869

For objective-C use

BOOL callKitAvailable = [CXCall class] != nil;

Upvotes: 0

rmaddy
rmaddy

Reputation: 318874

For Objective-C, read the SDK Compatibility Guide.

For Swift, use #available.

Upvotes: 1

Related Questions