### Clone and Setup Project Source: https://github.com/sauravhiremath/react-native-ios-alarmkit/blob/master/CONTRIBUTING.md Clone the repository, navigate into the directory, set up the Node.js version, install dependencies, and run initial specs. ```bash git clone https://github.com/sauravhiremath/react-native-ios-alarmkit.git cd react-native-ios-alarmkit nvm use bun install bun run specs ``` -------------------------------- ### Install iOS Pods Source: https://github.com/sauravhiremath/react-native-ios-alarmkit/blob/master/README.md After configuring Info.plist, navigate to the ios directory and install the necessary pods using the pod install command. ```bash cd ios && pod install ``` -------------------------------- ### Install react-native-ios-alarmkit Source: https://github.com/sauravhiremath/react-native-ios-alarmkit/blob/master/README.md Install the library using bun, npm, or yarn. Ensure react-native-nitro-modules is also installed. ```bash # Using bun bun add react-native-ios-alarmkit react-native-nitro-modules # Using npm npm add react-native-ios-alarmkit react-native-nitro-modules # Using yarn yarn add react-native-ios-alarmkit react-native-nitro-modules ``` -------------------------------- ### Complete Example App with Hooks Source: https://context7.com/sauravhiremath/react-native-ios-alarmkit/llms.txt This example demonstrates the full authorization flow, scheduling various alarm types, and managing active alarms using React hooks. It requires iOS 26+ and handles platform support checks. ```typescript import React, { useCallback, useState } from 'react' import { View, Text, Button, FlatList, Alert } from 'react-native' import AlarmKit, { useAlarms, useAuthorizationState, AlarmKitError, } from 'react-native-ios-alarmkit' export default function AlarmApp() { const { state: authState, isLoading: authLoading } = useAuthorizationState() const { alarms, isLoading: alarmsLoading } = useAlarms() const [scheduling, setScheduling] = useState(false) const handleRequestAuth = useCallback(async () => { if (!AlarmKit.isSupported) { Alert.alert('Not Supported', 'AlarmKit requires iOS 26+') return } try { await AlarmKit.requestAuthorization() } catch (e) { Alert.alert('Error', String(e)) } }, []) const handleScheduleTimer = useCallback(async () => { setScheduling(true) try { const id = crypto.randomUUID() await AlarmKit.scheduleTimer(id, { duration: 10, title: 'Quick Timer', snoozeEnabled: false, tintColor: '#5B7FA6', }) Alert.alert('Success', 'Timer scheduled for 10 seconds') } catch (e) { if (e instanceof AlarmKitError) { Alert.alert(`Error [${e.code}]`, e.message) } } finally { setScheduling(false) } }, []) const handleCancel = useCallback(async (id: string) => { try { await AlarmKit.cancel(id) } catch (e) { Alert.alert('Error', String(e)) } }, []) if (authLoading || alarmsLoading) { return Loading... } return ( Platform Support: {AlarmKit.isSupported ? 'Yes' : 'No'} Authorization: {authState} {authState !== 'authorized' && (