{"id":4586,"url":"https://github.com/react-native-webrtc/react-native-callkit","last_synced_at":"2025-08-04T01:32:36.797Z","repository":{"id":57335975,"uuid":"77517322","full_name":"react-native-webrtc/react-native-callkit","owner":"react-native-webrtc","description":"#deprecated iOS 10 new CallKit framework for React Native","archived":true,"fork":false,"pushed_at":"2019-05-26T12:13:38.000Z","size":72,"stargazers_count":122,"open_issues_count":44,"forks_count":66,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-29T10:56:44.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-native-webrtc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-28T08:41:32.000Z","updated_at":"2023-12-18T08:21:31.000Z","dependencies_parsed_at":"2022-09-11T08:21:47.105Z","dependency_job_id":null,"html_url":"https://github.com/react-native-webrtc/react-native-callkit","commit_stats":null,"previous_names":["ianlin/react-native-callkit"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/react-native-webrtc/react-native-callkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-webrtc%2Freact-native-callkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-webrtc%2Freact-native-callkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-webrtc%2Freact-native-callkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-webrtc%2Freact-native-callkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-webrtc","download_url":"https://codeload.github.com/react-native-webrtc/react-native-callkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-webrtc%2Freact-native-callkit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268636411,"owners_count":24282086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:17.147Z","updated_at":"2025-08-04T01:32:36.560Z","avatar_url":"https://github.com/react-native-webrtc.png","language":"Objective-C","funding_links":[],"categories":["Components","Objective-C"],"sub_categories":["System"],"readme":"# DEPRECATED\n\n# This is no longer supported, please use [react-native-callkeep](https://github.com/react-native-webrtc/react-native-callkeep) instead.\n\n--\n\n## React Native CallKit - iOS \u003e= 10.0 only\n\n[![npm version](https://badge.fury.io/js/react-native-callkit.svg)](https://badge.fury.io/js/react-native-callkit)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-callkit.svg?maxAge=2592000)](https://img.shields.io/npm/dm/react-native-callkit.svg?maxAge=2592000)\n\n**React Native CallKit** utilises a brand new iOS 10 framework **CallKit** to make the life easier for VoIP developers using React Native.\n\nFor more information about **CallKit**, please see [Official CallKit Framework Document][1] or [Introduction to CallKit by Xamarin][2]\n\n**Note**: Since CallKit is quite new, this module will be updated frequently so be careful with the version you are using.\n\n## Version\n\nUse version \u003e= **1.1.0** if you're using react native \u003e= 0.40\n\n## Installation (without CocoaPods)\n\n### NPM module\n\n```bash\nnpm install --save react-native-callkit\n```\n\n### Link Library\n\n```bash\nrnpm link react-native-callkit\n```\n\n## Installation (with CocoaPods)\n\n### NPM module\n\n```bash\nnpm install --save react-native-callkit\n```\n\n### CocaPods\n```bash\ncd ios\npod install\n```\n\n## Installation common steps\n\n### Info.plist\n\nAdd `voip` under `UIBackgroundModes`\n\nNote that it must be done via editing `Info.plist` as in Xcode 9 there is no `voip` option in `Capabilities`.\n\n```\n\u003ckey\u003eUIBackgroundModes\u003c/key\u003e\n\u003carray\u003e\n  \u003cstring\u003evoip\u003c/string\u003e\n\u003c/array\u003e\n```\n\n### Add Frameworks\n\nIn `Xcode` -\u003e `Build Phases` -\u003e `Link Binary With Libraries`, add `CallKit.framework` and `Intents.framework` with `Optional` status\n\n### AppDelegate.m\n\n#### - Import Library\n\n```obj-c\n#import \"RNCallKit.h\"\n```\n\n#### - Change the way you initialise React Root View (required if \u003c= 1.2.1)\n\nInitialise **RNCallKit** first, since we need our custom `observer` of `NSNotificationCenter` to be started as soon as the app is initialising\n\n```diff\n\n// This is how you normally initialise React Root View, delete it\n-RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation\n-                                                    moduleName:@\"MyApp\"\n-                                             initialProperties:nil\n-                                                 launchOptions:launchOptions];\n\n// Initialise RNCallKit\n+RNCallKit *rncallkit = [[RNCallKit alloc] init];\n\n// Initialise React Bridge with RNCallKit\n+RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation\n+                                          moduleProvider:^{ return @[rncallkit]; }\n+                                           launchOptions:launchOptions];\n\n// Initialise React Root View with React Bridge you've just created\n+RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge\n+                                                 moduleName:@\"MyApp\"\n+                                          initialProperties:nil];\n```\n\n#### - Handling User Activity\n\nThis delegate will be called when the user tries to start a call from native Phone App\n\n```obj-c\n\n- (BOOL)application:(UIApplication *)application\ncontinueUserActivity:(NSUserActivity *)userActivity\n  restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler\n{\n  return [RNCallKit application:application\n           continueUserActivity:userActivity\n             restorationHandler:restorationHandler];\n}\n\n\n```\n\n## API\n\n### setup\n\n- **options**: object\n  - **appName**: string (required)\n    - It will be displayed on system UI when incoming calls received\n  - **imageName**: string (optional)\n    - If provided, it will be displayed on system UI during the call\n  - **ringtoneSound**: string (optional)\n    - If provided, it will be played when incoming calls received; the system will use the default ringtone if this is not provided\n\nInitialise RNCallKit with options\n\n### displayIncomingCall\n\n- **uuid**: string\n- **handle**: string\n- **handleType**: string (optional)\n  - generic\n  - number (default)\n  - email\n- **hasVideo**: boolean (optional)\n  - false (default)\n- **localizedCallerName**: string (optional)\n\nCall when you receive incoming calls to display system UI\n\n### startCall\n\n- **uuid**: string\n- **handle**: string\n- **handleType**: string (optional)\n  - generic\n  - number (default)\n  - email\n- **contactIdentifier**: string (optional)\n  - The identifier is displayed in the native call UI, and is typically the name of the call recipient.\n\nCall when you make an outgoing call\n\n### endCall\n\n- **uuid**: string\n\nCall when you finish an incoming/outgoing call\n\n### setMutedCall\n\n- **uuid**: string\n- **muted**: boolean\n\nSwitch the mic on/off\n\n### checkIfBusy\n\nChecks if there are any active calls on the device and returns a promise with a boolean value (`true` if there're active calls, `false` otherwise).\n\n### checkSpeaker\n\nChecks if the device speaker is on and returns a promise with a boolean value (`true` if speaker is on, `false` otherwise).\n\n## Events\n\n### - didReceiveStartCallAction\n\n**data**:\n\n```javascript\n{\n  handle: '886900000000' // The number/name got from Recents in built-in Phone app\n}\n```\n\nUser start call action from **Recents** in built-in **Phone** app\n\nTry to start your call action from here (e.g. get credentials of the user by `data.handle` and/or send INVITE to your SIP server)\n\nAfter all works are done, remember to call `RNCallKit.startCall(uuid, calleeNumber)`\n\n### - answerCall\n\nUser answer the incoming call\n\nDo your normal `Answering` actions here\n\n**data**:\n\n```javascript\n{\n  callUUID: 'f0ee907b-6dbd-45a8-858a-903decb198f8' // The UUID of the call that is to be answered\n}\n```\n\n### - endCall\n\nUser finish the call\n\nDo your normal `Hang Up` actions here\n\n**data**:\n\n```javascript\n{\n  callUUID: 'f0ee907b-6dbd-45a8-858a-903decb198f8' // The UUID of the call that is to be hung\n}\n```\n\n### - didActivateAudioSession\n\nThe `AudioSession` has been activated by **RNCallKit**, you might want to do following things when receiving this event:\n\n- Start playing ringback if it is an outgoing call\n\n### - didDisplayIncomingCall\n\nCallback for `RNCallKit.displayIncomingCall`\n\n**error**: string (optional)\n\n### - didPerformSetMutedCallAction\n\nA call was muted by the system or the user:\n\n**muted**: boolean\n\n## Usage\n\n```javascript\nimport React from 'react';\nimport RNCallKit from 'react-native-callkit';\n\nimport uuid from 'uuid';\n\nclass RNCallKitExample extends React.Component {\n  constructor(props) {\n\n    // Initialise RNCallKit\n    let options = {\n        appName: 'RNCallKitExample',\n        imageName: 'my_image_name_in_bundle',\n        ringtoneSound: 'my_ringtone_sound_filename_in_bundle',\n    };\n    try {\n        RNCallKit.setup(options);\n    } catch (err) {\n        console.log('error:', err.message);\n    }\n\n    // Add RNCallKit Events\n    RNCallKit.addEventListener('didReceiveStartCallAction', this.onRNCallKitDidReceiveStartCallAction);\n    RNCallKit.addEventListener('answerCall', this.onRNCallKitPerformAnswerCallAction);\n    RNCallKit.addEventListener('endCall', this.onRNCallKitPerformEndCallAction);\n    RNCallKit.addEventListener('didActivateAudioSession', this.onRNCallKitDidActivateAudioSession);\n    RNCallKit.addEventListener('didDisplayIncomingCall', this.onRNCallKitDidDisplayIncomingCall);\n    RNCallKit.addEventListener('didPerformSetMutedCallAction', this.onRNCallKitDidPerformSetMutedCallAction);\n  }\n\n  onRNCallKitDidReceiveStartCallAction(data) {\n    /*\n     * Your normal start call action\n     *\n     * ...\n     *\n     */\n\n    let _uuid = uuid.v4();\n    RNCallKit.startCall(_uuid, data.handle);\n  }\n\n  onRNCallKitPerformAnswerCallAction(data) {\n    /* You will get this event when the user answer the incoming call\n     *\n     * Try to do your normal Answering actions here\n     *\n     * e.g. this.handleAnswerCall(data.callUUID);\n     */\n  }\n\n  onRNCallKitPerformEndCallAction(data) {\n    /* You will get this event when the user finish the incoming/outgoing call\n     *\n     * Try to do your normal Hang Up actions here\n     *\n     * e.g. this.handleHangUpCall(data.callUUID);\n     */\n  }\n\n  onRNCallKitDidActivateAudioSession(data) {\n    /* You will get this event when the the AudioSession has been activated by **RNCallKit**,\n     * you might want to do following things when receiving this event:\n     *\n     * - Start playing ringback if it is an outgoing call\n     */\n  }\n\n  onRNCallKitDidDisplayIncomingCall(error) {\n    /* You will get this event after RNCallKit finishes showing incoming call UI\n     * You can check if there was an error while displaying\n     */\n  }\n\n  onRNCallKitDidPerformSetMutedCallAction(muted) {\n    /* You will get this event after the system or the user mutes a call\n     * You can use it to toggle the mic on your custom call UI\n     */\n  }\n\n  // This is a fake function where you can receive incoming call notifications\n  onIncomingCall() {\n    // Store the generated uuid somewhere\n    // You will need this when calling RNCallKit.endCall()\n    let _uuid = uuid.v4();\n    RNCallKit.displayIncomingCall(_uuid, \"886900000000\")\n  }\n\n  // This is a fake function where you make outgoing calls\n  onOutgoingCall() {\n    // Store the generated uuid somewhere\n    // You will need this when calling RNCallKit.endCall()\n    let _uuid = uuid.v4();\n    RNCallKit.startCall(_uuid, \"886900000000\")\n  }\n\n  // This is a fake function where you hang up calls\n  onHangUpCall() {\n    // get the _uuid you stored earlier\n    RNCallKit.endCall(_uuid)\n  }\n\n  render() {\n  }\n}\n\n```\n\n## Original Author:\n\n[![ianlin](https://avatars1.githubusercontent.com/u/914406?s=48)](https://github.com/ianlin)\n\n## License\n\n[ISC License][3] (functionality equivalent to **MIT License**)\n\n[1]: https://developer.apple.com/reference/callkit?language=objc\n[2]: https://developer.xamarin.com/guides/ios/platform_features/introduction-to-ios10/callkit/\n[3]: https://opensource.org/licenses/ISC\n[4]: https://github.com/zxcpoiu/react-native-incall-manager\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-webrtc%2Freact-native-callkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-webrtc%2Freact-native-callkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-webrtc%2Freact-native-callkit/lists"}