├── Simlar ├── sounds │ ├── pause.wav │ ├── ringback.wav │ ├── ringtone.wav │ ├── waiting_for_contact.wav │ └── encryption_handshake.wav ├── Images.xcassets │ ├── Contents.json │ ├── ButtonOk.imageset │ │ ├── button_ok@1x.png │ │ ├── button_ok@2x.png │ │ ├── button_ok@3x.png │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── app-icon-29x29.png │ │ ├── app-icon-40x40.png │ │ ├── app-icon-58x58.png │ │ ├── app-icon-76x76.png │ │ ├── app-icon-80x80.png │ │ ├── app-icon-87x87.png │ │ ├── app-icon-120x120.png │ │ ├── app-icon-152x152.png │ │ ├── app-icon-167x167.png │ │ ├── app-icon-180x180.png │ │ ├── app-icon-58x58-1.png │ │ ├── app-icon-80x80-1.png │ │ ├── app-icon-1024x1024.png │ │ ├── app-icon-120x120-1.png │ │ └── Contents.json │ ├── MicrophoneOn.imageset │ │ ├── micro_on@1x.png │ │ ├── micro_on@2x.png │ │ ├── micro_on@3x.png │ │ └── Contents.json │ ├── SpeakerOn.imageset │ │ ├── speaker_on@1x.png │ │ ├── speaker_on@2x.png │ │ ├── speaker_on@3x.png │ │ └── Contents.json │ ├── MicrophoneOff.imageset │ │ ├── micro_off@1x.png │ │ ├── micro_off@2x.png │ │ ├── micro_off@3x.png │ │ └── Contents.json │ ├── SimlarLogo.imageset │ │ ├── simlar_logo@1x.png │ │ ├── simlar_logo@2x.png │ │ ├── simlar_logo@3x.png │ │ └── Contents.json │ ├── SpeakerOff.imageset │ │ ├── speaker_off@1x.png │ │ ├── speaker_off@2x.png │ │ ├── speaker_off@3x.png │ │ └── Contents.json │ ├── ButtonCancel.imageset │ │ ├── button_cancel@1x.png │ │ ├── button_cancel@2x.png │ │ ├── button_cancel@3x.png │ │ └── Contents.json │ ├── CallkitLogo.imageset │ │ ├── callkit_logo@1x.png │ │ ├── callkit_logo@2x.png │ │ ├── callkit_logo@3x.png │ │ └── Contents.json │ ├── HangUpPhone.imageset │ │ ├── hang_up_phone@1x.png │ │ ├── hang_up_phone@2x.png │ │ ├── hang_up_phone@3x.png │ │ └── Contents.json │ ├── BackgroundTile.imageset │ │ ├── background_tile@1x.png │ │ ├── background_tile@2x.png │ │ ├── background_tile@3x.png │ │ └── Contents.json │ ├── ButtonOkSingle.imageset │ │ ├── button_ok_single@1x.png │ │ ├── button_ok_single@2x.png │ │ ├── button_ok_single@3x.png │ │ └── Contents.json │ ├── ButtonSettings.imageset │ │ ├── button_settings@1x.png │ │ ├── button_settings@2x.png │ │ ├── button_settings@3x.png │ │ └── Contents.json │ ├── ContactPicture.imageset │ │ ├── contact_picture@1x.png │ │ ├── contact_picture@2x.png │ │ ├── contact_picture@3x.png │ │ └── Contents.json │ ├── SimlarLogoBig.imageset │ │ ├── simlar_logo_big@1x.png │ │ ├── simlar_logo_big@2x.png │ │ ├── simlar_logo_big@3x.png │ │ └── Contents.json │ ├── Background.imageset │ │ ├── background@1x-768x1024-ipad1.png │ │ ├── background@2x-2048x2731-ipad-pro12.png │ │ ├── background@3x-1242x2686-iphone6plus.png │ │ └── Contents.json │ ├── ButtonCallContact.imageset │ │ ├── button_call_contact@1x.png │ │ ├── button_call_contact@2x.png │ │ ├── button_call_contact@3x.png │ │ └── Contents.json │ ├── ButtonCancelSingle.imageset │ │ ├── button_cancel_single@1x.png │ │ ├── button_cancel_single@2x.png │ │ ├── button_cancel_single@3x.png │ │ └── Contents.json │ ├── MicrophoneOffDisabled.imageset │ │ ├── micro_off_disabled@1x.png │ │ ├── micro_off_disabled@2x.png │ │ ├── micro_off_disabled@3x.png │ │ └── Contents.json │ ├── ButtonRingingHangUp.imageset │ │ ├── button_ringing_hang_up@1x.png │ │ ├── button_ringing_hang_up@2x.png │ │ ├── button_ringing_hang_up@3x.png │ │ └── Contents.json │ ├── ButtonRingingPickUp.imageset │ │ ├── button_ringing_pick_up@1x.png │ │ ├── button_ringing_pick_up@2x.png │ │ ├── button_ringing_pick_up@3x.png │ │ └── Contents.json │ ├── SpeakerOnHighlighted.imageset │ │ ├── speaker_on_highlighted@1x.png │ │ ├── speaker_on_highlighted@2x.png │ │ ├── speaker_on_highlighted@3x.png │ │ └── Contents.json │ ├── MicrophoneOffHighlighted.imageset │ │ ├── micro_off_highlighted@1x.png │ │ ├── micro_off_highlighted@2x.png │ │ ├── micro_off_highlighted@3x.png │ │ └── Contents.json │ ├── MicrophoneOnHighlighted.imageset │ │ ├── micro_on_highlighted@1x.png │ │ ├── micro_on_highlighted@2x.png │ │ ├── micro_on_highlighted@3x.png │ │ └── Contents.json │ ├── SpeakerOffHighlighted.imageset │ │ ├── speaker_off_highlighted@1x.png │ │ ├── speaker_off_highlighted@2x.png │ │ ├── speaker_off_highlighted@3x.png │ │ └── Contents.json │ ├── SpeakerBluetoothAvailable.imageset │ │ ├── speaker_bluetooth_available@1x.png │ │ ├── speaker_bluetooth_available@2x.png │ │ ├── speaker_bluetooth_available@3x.png │ │ └── Contents.json │ ├── ButtonOkSingleHighlighted.imageset │ │ ├── button_ok_single_highlighted@1x.png │ │ ├── button_ok_single_highlighted@2x.png │ │ ├── button_ok_single_highlighted@3x.png │ │ └── Contents.json │ ├── ButtonCancelSingleHighlighted.imageset │ │ ├── button_cancel_single_highlighted@1x.png │ │ ├── button_cancel_single_highlighted@2x.png │ │ ├── button_cancel_single_highlighted@3x.png │ │ └── Contents.json │ ├── ButtonRingingHangUpHighlighted.imageset │ │ ├── button_ringing_hang_up_highlighted@1x.png │ │ ├── button_ringing_hang_up_highlighted@2x.png │ │ ├── button_ringing_hang_up_highlighted@3x.png │ │ └── Contents.json │ ├── ButtonRingingPickUpHighlighted.imageset │ │ ├── button_ringing_pick_up_highlighted@1x.png │ │ ├── button_ringing_pick_up_highlighted@2x.png │ │ ├── button_ringing_pick_up_highlighted@3x.png │ │ └── Contents.json │ └── SpeakerBluetoothAvailableHighlighted.imageset │ │ ├── speaker_bluetooth_available_highlighted@1x.png │ │ ├── speaker_bluetooth_available_highlighted@2x.png │ │ ├── speaker_bluetooth_available_highlighted@3x.png │ │ └── Contents.json ├── resources │ ├── letsencryptca.der │ └── linphonerc ├── images │ ├── button_background_color.png │ ├── button_background_color_red.png │ ├── button_background_color_highlighted.png │ └── button_background_color_red_highlighted.png ├── Settings.bundle │ ├── en.lproj │ │ └── Root.strings │ ├── Acknowledgements.plist │ └── Root.plist ├── Simlar.entitlements ├── en.lproj │ └── InfoPlist.strings ├── src │ ├── SMLRHttpsPostError.h │ ├── SMLRAgreeViewController.h │ ├── SMLRCreateAccountViewController.h │ ├── SMLRVerifyNumberViewController.h │ ├── SMLRRingtone.h │ ├── SMLRServerSettings.h │ ├── SMLRStringCategory.h │ ├── SMLRBrowser.h │ ├── SMLRAppDelegate.h │ ├── SMLRCallSoundManager.h │ ├── SMLRStorePushId.h │ ├── SMLRUploadLogFile.h │ ├── SMLRSettingsChecker.h │ ├── SMLRReportBug.h │ ├── SMLRBrowser.m │ ├── SMLRLogFormatter.h │ ├── SMLRNoAddressBookPermissionViewControllerDelegate.h │ ├── SMLRKeychain.h │ ├── SMLRProviderDelegate.h │ ├── SMLRPushNotifications.h │ ├── SMLRCallViewController.h │ ├── SMLRMicrophoneStatus.h │ ├── SMLRNoAddressBookPermissionViewController.h │ ├── SMLRAesUtil.h │ ├── SMLRAudioOutputType.h │ ├── SMLRMissedCallUserNotification.h │ ├── SMLRUnmaintainedWarning.h │ ├── SMLRCredentials.h │ ├── SMLRGetContactStatus.h │ ├── SMLRMicrophoneStatus.m │ ├── SMLRAudioOutputType.m │ ├── SMLRLinphoneHandlerStatus.h │ ├── SMLRContactsProviderStatus.h │ ├── SMLRPhoneNumber.h │ ├── SMLRNetworkQuality.h │ ├── SMLRHttpsPostError.m │ ├── SMLRStringCategory.m │ ├── SMLRHttpsPost.h │ ├── SMLRAddressBookViewController.h │ ├── SMLRCreateAccount.h │ ├── SMLRLinphoneHandlerStatus.m │ ├── SMLRContactsProvider.h │ ├── SMLRSettings.h │ ├── SMLRContactsProviderStatus.m │ ├── SMLRContact.h │ ├── SMLRContacts.h │ ├── SMLRPushNotifications.m │ ├── SMLRCallStatus.h │ ├── SMLRPhoneManagerDelegate.h │ ├── SMLRAgreeViewController.m │ ├── SMLRAlert.h │ ├── SMLRLog.h │ ├── SMLRLinphoneHandler.h │ ├── SMLRPhoneManager.h │ ├── SMLRNetworkQuality.m │ ├── SMLRCallSoundManager.m │ ├── SMLRLog.m │ ├── SMLRSettings.m │ ├── SMLRCredentials.m │ ├── SMLRMissedCallUserNotification.m │ ├── SMLRAesUtil.m │ ├── SMLRSettingsChecker.m │ ├── SMLRCallStatus.m │ ├── SMLRPhoneNumber.m │ ├── SMLRContact.m │ ├── SMLRUploadLogFile.m │ └── SMLRKeychain.m ├── main.m ├── Simlar-Prefix.pch └── Simlar-Info.plist ├── renovate.json ├── .gitignore ├── Simlar.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── bensartor.xcuserdatad │ └── xcschemes │ ├── xcschememanagement.plist │ └── Simlar.xcscheme ├── AUTHORS ├── Simlar.xcworkspace └── contents.xcworkspacedata ├── .github └── workflows │ └── simlar-ios-ci.yml ├── update-version.sh ├── resize_images.sh ├── create-app-icon.sh ├── SimlarTests ├── SimlarTests-Info.plist ├── en.lproj │ └── InfoPlist.strings └── SimlarTests.m ├── create-tag.sh ├── Podfile.lock ├── Podfile ├── compile-liblinphone.sh ├── README.md ├── .clang-format └── bootstrap-liblinphone.sh /Simlar/sounds/pause.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/sounds/pause.wav -------------------------------------------------------------------------------- /Simlar/sounds/ringback.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/sounds/ringback.wav -------------------------------------------------------------------------------- /Simlar/sounds/ringtone.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/sounds/ringtone.wav -------------------------------------------------------------------------------- /Simlar/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Simlar/resources/letsencryptca.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/resources/letsencryptca.der -------------------------------------------------------------------------------- /Simlar/sounds/waiting_for_contact.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/sounds/waiting_for_contact.wav -------------------------------------------------------------------------------- /Simlar/sounds/encryption_handshake.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/sounds/encryption_handshake.wav -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:recommended" 4 | ], 5 | "reviewers": [ 6 | "BenSartor" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /Simlar/images/button_background_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/images/button_background_color.png -------------------------------------------------------------------------------- /Simlar/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Settings.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /Simlar/images/button_background_color_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/images/button_background_color_red.png -------------------------------------------------------------------------------- /Simlar/images/button_background_color_highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/images/button_background_color_highlighted.png -------------------------------------------------------------------------------- /Simlar/resources/linphonerc: -------------------------------------------------------------------------------- 1 | [sip] 2 | srtp_crypto_suites=AES_256_CM_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_80 3 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOk.imageset/button_ok@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOk.imageset/button_ok@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOk.imageset/button_ok@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOk.imageset/button_ok@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOk.imageset/button_ok@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOk.imageset/button_ok@3x.png -------------------------------------------------------------------------------- /Simlar/images/button_background_color_red_highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/images/button_background_color_red_highlighted.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-29x29.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-40x40.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-58x58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-58x58.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-76x76.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-80x80.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-87x87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-87x87.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOn.imageset/micro_on@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOn.imageset/micro_on@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOn.imageset/micro_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOn.imageset/micro_on@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOn.imageset/micro_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOn.imageset/micro_on@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOn.imageset/speaker_on@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOn.imageset/speaker_on@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOn.imageset/speaker_on@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOn.imageset/speaker_on@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOn.imageset/speaker_on@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOn.imageset/speaker_on@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-120x120.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-152x152.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-167x167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-167x167.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-180x180.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-58x58-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-58x58-1.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-80x80-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-80x80-1.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOff.imageset/micro_off@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOff.imageset/micro_off@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOff.imageset/micro_off@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOff.imageset/micro_off@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOff.imageset/micro_off@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOff.imageset/micro_off@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogo.imageset/simlar_logo@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SimlarLogo.imageset/simlar_logo@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogo.imageset/simlar_logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SimlarLogo.imageset/simlar_logo@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogo.imageset/simlar_logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SimlarLogo.imageset/simlar_logo@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOff.imageset/speaker_off@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOff.imageset/speaker_off@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOff.imageset/speaker_off@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOff.imageset/speaker_off@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOff.imageset/speaker_off@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOff.imageset/speaker_off@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-1024x1024.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/app-icon-120x120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/AppIcon.appiconset/app-icon-120x120-1.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancel.imageset/button_cancel@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancel.imageset/button_cancel@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancel.imageset/button_cancel@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancel.imageset/button_cancel@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancel.imageset/button_cancel@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancel.imageset/button_cancel@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/CallkitLogo.imageset/callkit_logo@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/CallkitLogo.imageset/callkit_logo@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/CallkitLogo.imageset/callkit_logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/CallkitLogo.imageset/callkit_logo@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/CallkitLogo.imageset/callkit_logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/CallkitLogo.imageset/callkit_logo@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/HangUpPhone.imageset/hang_up_phone@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/HangUpPhone.imageset/hang_up_phone@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/HangUpPhone.imageset/hang_up_phone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/HangUpPhone.imageset/hang_up_phone@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/HangUpPhone.imageset/hang_up_phone@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/HangUpPhone.imageset/hang_up_phone@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/BackgroundTile.imageset/background_tile@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/BackgroundTile.imageset/background_tile@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/BackgroundTile.imageset/background_tile@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/BackgroundTile.imageset/background_tile@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/BackgroundTile.imageset/background_tile@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/BackgroundTile.imageset/background_tile@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingle.imageset/button_ok_single@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOkSingle.imageset/button_ok_single@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingle.imageset/button_ok_single@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOkSingle.imageset/button_ok_single@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingle.imageset/button_ok_single@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOkSingle.imageset/button_ok_single@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonSettings.imageset/button_settings@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonSettings.imageset/button_settings@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonSettings.imageset/button_settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonSettings.imageset/button_settings@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonSettings.imageset/button_settings@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonSettings.imageset/button_settings@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ContactPicture.imageset/contact_picture@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ContactPicture.imageset/contact_picture@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ContactPicture.imageset/contact_picture@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ContactPicture.imageset/contact_picture@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ContactPicture.imageset/contact_picture@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ContactPicture.imageset/contact_picture@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogoBig.imageset/simlar_logo_big@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SimlarLogoBig.imageset/simlar_logo_big@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogoBig.imageset/simlar_logo_big@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SimlarLogoBig.imageset/simlar_logo_big@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogoBig.imageset/simlar_logo_big@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SimlarLogoBig.imageset/simlar_logo_big@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/Background.imageset/background@1x-768x1024-ipad1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/Background.imageset/background@1x-768x1024-ipad1.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCallContact.imageset/button_call_contact@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCallContact.imageset/button_call_contact@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCallContact.imageset/button_call_contact@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCallContact.imageset/button_call_contact@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCallContact.imageset/button_call_contact@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCallContact.imageset/button_call_contact@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingle.imageset/button_cancel_single@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancelSingle.imageset/button_cancel_single@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingle.imageset/button_cancel_single@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancelSingle.imageset/button_cancel_single@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingle.imageset/button_cancel_single@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancelSingle.imageset/button_cancel_single@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffDisabled.imageset/micro_off_disabled@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOffDisabled.imageset/micro_off_disabled@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffDisabled.imageset/micro_off_disabled@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOffDisabled.imageset/micro_off_disabled@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffDisabled.imageset/micro_off_disabled@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOffDisabled.imageset/micro_off_disabled@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/Background.imageset/background@2x-2048x2731-ipad-pro12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/Background.imageset/background@2x-2048x2731-ipad-pro12.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/Background.imageset/background@3x-1242x2686-iphone6plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/Background.imageset/background@3x-1242x2686-iphone6plus.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUp.imageset/button_ringing_hang_up@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingHangUp.imageset/button_ringing_hang_up@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUp.imageset/button_ringing_hang_up@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingHangUp.imageset/button_ringing_hang_up@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUp.imageset/button_ringing_hang_up@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingHangUp.imageset/button_ringing_hang_up@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUp.imageset/button_ringing_pick_up@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingPickUp.imageset/button_ringing_pick_up@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUp.imageset/button_ringing_pick_up@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingPickUp.imageset/button_ringing_pick_up@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUp.imageset/button_ringing_pick_up@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingPickUp.imageset/button_ringing_pick_up@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOnHighlighted.imageset/speaker_on_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOnHighlighted.imageset/speaker_on_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOnHighlighted.imageset/speaker_on_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOnHighlighted.imageset/speaker_on_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOnHighlighted.imageset/speaker_on_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOnHighlighted.imageset/speaker_on_highlighted@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffHighlighted.imageset/micro_off_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOffHighlighted.imageset/micro_off_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffHighlighted.imageset/micro_off_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOffHighlighted.imageset/micro_off_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffHighlighted.imageset/micro_off_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOffHighlighted.imageset/micro_off_highlighted@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOnHighlighted.imageset/micro_on_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOnHighlighted.imageset/micro_on_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOnHighlighted.imageset/micro_on_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOnHighlighted.imageset/micro_on_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOnHighlighted.imageset/micro_on_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/MicrophoneOnHighlighted.imageset/micro_on_highlighted@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOffHighlighted.imageset/speaker_off_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOffHighlighted.imageset/speaker_off_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOffHighlighted.imageset/speaker_off_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOffHighlighted.imageset/speaker_off_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOffHighlighted.imageset/speaker_off_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerOffHighlighted.imageset/speaker_off_highlighted@3x.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Simlar.xcodeproj/xcuserdata/ 3 | Simlar.xcworkspace/xcuserdata/ 4 | Simlar.xcworkspace/xcshareddata/ 5 | Pods/ 6 | 7 | build/ 8 | distribute/ 9 | liblinphone_build_*/ 10 | liblinphone/ 11 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailable.imageset/speaker_bluetooth_available@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerBluetoothAvailable.imageset/speaker_bluetooth_available@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailable.imageset/speaker_bluetooth_available@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerBluetoothAvailable.imageset/speaker_bluetooth_available@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailable.imageset/speaker_bluetooth_available@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerBluetoothAvailable.imageset/speaker_bluetooth_available@3x.png -------------------------------------------------------------------------------- /Simlar.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingleHighlighted.imageset/button_ok_single_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOkSingleHighlighted.imageset/button_ok_single_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingleHighlighted.imageset/button_ok_single_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOkSingleHighlighted.imageset/button_ok_single_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingleHighlighted.imageset/button_ok_single_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonOkSingleHighlighted.imageset/button_ok_single_highlighted@3x.png -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Ben Sartor ben@simlar.org 2 | Dominik Sartor domsar@gmx.de 3 | Dennis Klipp dennis@simlar.org 4 | Jan Ritzerfeld jan@simlar.org 5 | Andreas Kozocsa andreas@simlar.org 6 | David Son david@simlar.org 7 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingleHighlighted.imageset/button_cancel_single_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancelSingleHighlighted.imageset/button_cancel_single_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingleHighlighted.imageset/button_cancel_single_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancelSingleHighlighted.imageset/button_cancel_single_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingleHighlighted.imageset/button_cancel_single_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonCancelSingleHighlighted.imageset/button_cancel_single_highlighted@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUpHighlighted.imageset/button_ringing_hang_up_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingHangUpHighlighted.imageset/button_ringing_hang_up_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUpHighlighted.imageset/button_ringing_hang_up_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingHangUpHighlighted.imageset/button_ringing_hang_up_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUpHighlighted.imageset/button_ringing_hang_up_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingHangUpHighlighted.imageset/button_ringing_hang_up_highlighted@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUpHighlighted.imageset/button_ringing_pick_up_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingPickUpHighlighted.imageset/button_ringing_pick_up_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUpHighlighted.imageset/button_ringing_pick_up_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingPickUpHighlighted.imageset/button_ringing_pick_up_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUpHighlighted.imageset/button_ringing_pick_up_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/ButtonRingingPickUpHighlighted.imageset/button_ringing_pick_up_highlighted@3x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailableHighlighted.imageset/speaker_bluetooth_available_highlighted@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerBluetoothAvailableHighlighted.imageset/speaker_bluetooth_available_highlighted@1x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailableHighlighted.imageset/speaker_bluetooth_available_highlighted@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerBluetoothAvailableHighlighted.imageset/speaker_bluetooth_available_highlighted@2x.png -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailableHighlighted.imageset/speaker_bluetooth_available_highlighted@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simlar/simlar-ios/HEAD/Simlar/Images.xcassets/SpeakerBluetoothAvailableHighlighted.imageset/speaker_bluetooth_available_highlighted@3x.png -------------------------------------------------------------------------------- /Simlar/Simlar.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /Simlar.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOk.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_ok@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_ok@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_ok@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "micro_on@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "micro_on@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "micro_on@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOff.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "micro_off@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "micro_off@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "micro_off@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "speaker_on@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "speaker_on@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "speaker_on@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "simlar_logo@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "simlar_logo@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "simlar_logo@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOff.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "speaker_off@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "speaker_off@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "speaker_off@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_cancel@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_cancel@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_cancel@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/CallkitLogo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "callkit_logo@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "callkit_logo@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "callkit_logo@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/HangUpPhone.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "hang_up_phone@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "hang_up_phone@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "hang_up_phone@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/BackgroundTile.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "background_tile@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "background_tile@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "background_tile@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonSettings.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "button_settings@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "button_settings@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "button_settings@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ContactPicture.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "contact_picture@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "contact_picture@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "contact_picture@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SimlarLogoBig.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "simlar_logo_big@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "simlar_logo_big@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "simlar_logo_big@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_ok_single@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_ok_single@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_ok_single@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /.github/workflows/simlar-ios-ci.yml: -------------------------------------------------------------------------------- 1 | name: "simlar-ios-ci" 2 | on: 3 | schedule: 4 | - cron: '0 3 * * *' 5 | pull_request: 6 | push: 7 | branches: 8 | - master 9 | 10 | jobs: 11 | build: 12 | runs-on: macos-15 13 | timeout-minutes: 30 14 | steps: 15 | - name: checkout 16 | uses: actions/checkout@v4 17 | - name: cocoapods 18 | run: pod install 19 | - name: build 20 | run: xcodebuild clean build -workspace Simlar.xcworkspace/ -scheme Simlar -sdk iphoneos -destination 'platform=iOS Simulator,name=iPhone 16' 21 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCallContact.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "button_call_contact@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "button_call_contact@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "button_call_contact@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffDisabled.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "micro_off_disabled@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "micro_off_disabled@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "micro_off_disabled@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_cancel_single@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_cancel_single@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_cancel_single@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_ringing_hang_up@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_ringing_hang_up@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_ringing_hang_up@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_ringing_pick_up@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_ringing_pick_up@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_ringing_pick_up@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOnHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "micro_on_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "micro_on_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "micro_on_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOnHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "speaker_on_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "speaker_on_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "speaker_on_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/MicrophoneOffHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "micro_off_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "micro_off_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "micro_off_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerOffHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "speaker_off_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "speaker_off_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "speaker_off_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/Background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "background@1x-768x1024-ipad1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "background@2x-2048x2731-ipad-pro12.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "background@3x-1242x2686-iphone6plus.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailable.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "speaker_bluetooth_available@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "speaker_bluetooth_available@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "speaker_bluetooth_available@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonOkSingleHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_ok_single_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_ok_single_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_ok_single_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonCancelSingleHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_cancel_single_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_cancel_single_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_cancel_single_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingHangUpHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_ringing_hang_up_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_ringing_hang_up_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_ringing_hang_up_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Simlar/Images.xcassets/ButtonRingingPickUpHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "button_ringing_pick_up_highlighted@1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "button_ringing_pick_up_highlighted@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "button_ringing_pick_up_highlighted@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /update-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## exit if an error occurs or on unset variables 4 | set -eu -o pipefail 5 | 6 | declare -r GIT_RELEASE_VERSION=$(git describe --tags --always --dirty) 7 | 8 | defaults write "${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}" "CFBundleShortVersionString" "${GIT_RELEASE_VERSION}" 9 | defaults write "${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}" "CFBundleVersion" "${GIT_RELEASE_VERSION}" 10 | 11 | ### ATTENTION: this assumes the version is the 3rd property 12 | /usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:2:DefaultValue ${GIT_RELEASE_VERSION}" "${BUILT_PRODUCTS_DIR}/Simlar.app/Settings.bundle/Root.plist" 13 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/SpeakerBluetoothAvailableHighlighted.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "speaker_bluetooth_available_highlighted@1x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "speaker_bluetooth_available_highlighted@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "speaker_bluetooth_available_highlighted@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /resize_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## exit if an error occurs or on unset variables 4 | set -eu -o pipefail 5 | 6 | declare -r SRC_DIR="$(dirname $(greadlink -f $0))/Simlar/Images.xcassets/" 7 | 8 | function resize() 9 | { 10 | local -r SRC=$1 11 | local -r DST=$2 12 | local -r SCALE=$3 13 | 14 | rm -f ${DST} 15 | convert "${SRC}" -strip -resize "${SCALE}" "${DST}" 16 | file "${DST}" 17 | } 18 | 19 | find "${SRC_DIR}" -type f -name "*@3x.png" | sort | while read IMAGE; do 20 | IMAGE_NAME=$(dirname "${IMAGE}")/$(basename -s @3x.png "${IMAGE}") 21 | 22 | resize "${IMAGE}" "${IMAGE_NAME}@1x.png" "33.33%" 23 | resize "${IMAGE}" "${IMAGE_NAME}@2x.png" "66.67%" 24 | done 25 | -------------------------------------------------------------------------------- /create-app-icon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## exit if an error occurs or on unset variables 4 | set -eu -o pipefail 5 | 6 | declare -r INPUT_FILE=${1:?"Please give a picture as first parameter"} 7 | 8 | declare -r DST_DIR="$(dirname $(greadlink -f $0))/Simlar/Images.xcassets/AppIcon.appiconset" 9 | 10 | mkdir -p "${DST_DIR}" 11 | 12 | declare -r DIMENSIONS="29 40 58 76 80 87 120 152 167 180" 13 | 14 | for DIMENSION in ${DIMENSIONS} ; do 15 | convert "${INPUT_FILE}" -strip -resize "${DIMENSION}x${DIMENSION}" "${DST_DIR}/app-icon-${DIMENSION}x${DIMENSION}.png" 16 | done 17 | 18 | cd ${DST_DIR} 19 | cp app-icon-58x58.png app-icon-58x58-1.png 20 | cp app-icon-80x80.png app-icon-80x80-1.png 21 | cp app-icon-120x120.png app-icon-120x120-1.png 22 | -------------------------------------------------------------------------------- /Simlar.xcodeproj/xcuserdata/bensartor.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Simlar.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 3BB653F1199060FB007655F8 16 | 17 | primary 18 | 19 | 20 | 3BB65415199060FB007655F8 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SimlarTests/SimlarTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /create-tag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## exit if an error occurs or on unset variables 4 | set -eu -o pipefail 5 | 6 | declare -r USAGE="Usage example: $0 1 0 0 [master]" 7 | 8 | declare -ri VERSION_MAJOR=${1?${USAGE}} 9 | declare -ri VERSION_MINOR=${2?${USAGE}} 10 | declare -ri VERSION_BUGFIX=${3?${USAGE}} 11 | declare -r BRANCH=${4:-"master"} 12 | 13 | declare -r SIMLAR_VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUGFIX}" 14 | echo "creating tag: '${SIMLAR_VERSION}'" 15 | 16 | if ! git diff --quiet ; then 17 | git status 18 | echo "git is dirty => aborting" 19 | exit 1 20 | fi 21 | 22 | git checkout "${BRANCH}" 23 | git fetch 24 | git fetch --tags 25 | git pull --rebase origin "${BRANCH}" 26 | 27 | 28 | git tag -s "${SIMLAR_VERSION}" -m "Version: ${SIMLAR_VERSION}" 29 | git push origin "${SIMLAR_VERSION}" 30 | git checkout "${SIMLAR_VERSION}" 31 | -------------------------------------------------------------------------------- /Simlar/Settings.bundle/Acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Type 9 | PSChildPaneSpecifier 10 | Title 11 | Linphone 12 | File 13 | LinphoneAcknowledgements 14 | 15 | 16 | Type 17 | PSChildPaneSpecifier 18 | Title 19 | Others 20 | File 21 | PodsAcknowledgements 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Simlar/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | /* Localized versions of Info.plist keys */ 22 | 23 | -------------------------------------------------------------------------------- /SimlarTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | /* Localized versions of Info.plist keys */ 22 | 23 | -------------------------------------------------------------------------------- /Simlar/src/SMLRHttpsPostError.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | BOOL isSMLRHttpsPostOfflineError(NSError *const error); 24 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAgreeViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRAgreeViewController : UIViewController 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCreateAccountViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRCreateAccountViewController : UIViewController 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Simlar/src/SMLRVerifyNumberViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRVerifyNumberViewController : UIViewController 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Simlar/src/SMLRRingtone.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2016 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef SMLRRingtone_h 22 | #define SMLRRingtone_h 23 | 24 | #define SIMLAR_RINGTONE @"ringtone.wav" 25 | 26 | #endif /* SMLRRingtone_h */ 27 | -------------------------------------------------------------------------------- /Simlar/src/SMLRServerSettings.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef Simlar_SMLRServerSettings_h 22 | #define Simlar_SMLRServerSettings_h 23 | 24 | #define SIMLAR_DOMAIN @"sip.simlar.org" 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaLumberjack (3.8.5): 3 | - CocoaLumberjack/Core (= 3.8.5) 4 | - CocoaLumberjack/Core (3.8.5) 5 | - libPhoneNumber-iOS (1.0.4) 6 | - linphone-sdk (5.3.110) 7 | 8 | DEPENDENCIES: 9 | - CocoaLumberjack (= 3.8.5) 10 | - libPhoneNumber-iOS (from `https://github.com/iziz/libPhoneNumber-iOS`, tag `1.1`) 11 | - linphone-sdk (= 5.3.110) 12 | 13 | SPEC REPOS: 14 | https://gitlab.linphone.org/BC/public/podspec.git: 15 | - linphone-sdk 16 | trunk: 17 | - CocoaLumberjack 18 | 19 | EXTERNAL SOURCES: 20 | libPhoneNumber-iOS: 21 | :git: https://github.com/iziz/libPhoneNumber-iOS 22 | :tag: '1.1' 23 | 24 | CHECKOUT OPTIONS: 25 | libPhoneNumber-iOS: 26 | :git: https://github.com/iziz/libPhoneNumber-iOS 27 | :tag: '1.1' 28 | 29 | SPEC CHECKSUMS: 30 | CocoaLumberjack: 6a459bc897d6d80bd1b8c78482ec7ad05dffc3f0 31 | libPhoneNumber-iOS: fcea72ef3dba81f9da2e6f7c4557b64022f3632b 32 | linphone-sdk: 7f3e9ea1bbb012247d33bc296ed0c3a7a65faaf4 33 | 34 | PODFILE CHECKSUM: e2ce1906de6578673991c224e87cfbdfc430532f 35 | 36 | COCOAPODS: 1.16.2 37 | -------------------------------------------------------------------------------- /Simlar/src/SMLRStringCategory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface NSString (SMLRStringCategory) 24 | 25 | - (BOOL)matchesPattern:(NSString *const)pattern; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Simlar/src/SMLRBrowser.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef SMLRBrowser_h 22 | #define SMLRBrowser_h 23 | 24 | @interface SMLRBrowser : NSObject 25 | 26 | + (void)openUrl:(NSString *const)url; 27 | 28 | @end 29 | 30 | 31 | #endif /* SMLRBrowser_h */ 32 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://cdn.cocoapods.org/' 2 | source 'https://gitlab.linphone.org/BC/public/podspec.git' 3 | 4 | platform :ios, '12.0' 5 | inhibit_all_warnings! 6 | 7 | $PODFILE_PATH = 'liblinphone' 8 | 9 | target 'Simlar' do 10 | use_frameworks! 11 | 12 | pod 'libPhoneNumber-iOS', git: 'https://github.com/iziz/libPhoneNumber-iOS', tag: '1.1' 13 | pod 'CocoaLumberjack', '3.8.5' 14 | if File.exist?($PODFILE_PATH) 15 | pod 'linphone-sdk', :path => $PODFILE_PATH 16 | else 17 | pod 'linphone-sdk', '5.3.110' 18 | end 19 | 20 | target 'SimlarTests' do 21 | inherit! :search_paths 22 | end 23 | end 24 | 25 | install! 'cocoapods', :disable_input_output_paths => true 26 | 27 | post_install do | installer | 28 | require 'fileutils' 29 | FileUtils.cp_r('Pods/Target Support Files/Pods-Simlar/Pods-Simlar-acknowledgements.plist', 'Simlar/Settings.bundle/PodsAcknowledgements.plist', :remove_destination => true) 30 | 31 | installer.pods_project.targets.each do | target | 32 | target.build_configurations.each do | config | 33 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRAppDelegate : UIResponder 24 | 25 | @property (strong, nonatomic) UIWindow *window; 26 | 27 | - (void)registerPushNotifications; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCallSoundManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRCallStatus; 24 | 25 | @interface SMLRCallSoundManager : NSObject 26 | 27 | - (void)onCallStatusChanged:(SMLRCallStatus *const)callStatus; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Simlar/src/SMLRStorePushId.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRStorePushId : NSObject 24 | 25 | + (void)storeWithPushId:(NSString *const)pushId completionHandler:(void (^)(NSError *const error))handler; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Simlar/src/SMLRUploadLogFile.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRUploadLogFile : NSObject 24 | 25 | + (void)uploadWithCompletionHandler:(void (^)(NSString *const logFileName, NSError *const error))handler; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Simlar/src/SMLRSettingsChecker.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRSettingsChecker : NSObject 24 | 25 | + (void)checkStatus:(UIViewController *const)parentViewController completionHandler:(void (^)())handler; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Simlar/src/SMLRReportBug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRReportBug : NSObject 24 | 25 | + (void)checkAndReportBugWithViewController:(UIViewController *const)viewController completionHandler:(void (^)())handler; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Simlar/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | #import "SMLRAppDelegate.h" 24 | 25 | int main(int argc, char * argv[]) 26 | { 27 | @autoreleasepool { 28 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([SMLRAppDelegate class])); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRBrowser.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRBrowser.h" 22 | 23 | @implementation SMLRBrowser 24 | 25 | + (void)openUrl:(NSString *const)url 26 | { 27 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url] options:@{} completionHandler:nil]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRLogFormatter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | #import 24 | 25 | @interface SMLRLogFormatter : NSObject 26 | 27 | - (instancetype)init; 28 | - (instancetype)initWithoutDate; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRNoAddressBookPermissionViewControllerDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRContact; 24 | 25 | @protocol SMLRNoAddressBookPermissionViewControllerDelegate 26 | 27 | - (void)callContact:(SMLRContact *const)contact; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Simlar/src/SMLRKeychain.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRKeychain : NSObject 24 | 25 | + (BOOL)storeWithKey:(NSString *const)key value:(NSString *const)value; 26 | + (NSString *)getWithKey:(NSString *const)key; 27 | + (void)deleteWithKey:(NSString *const)key; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Simlar/src/SMLRProviderDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRPhoneManager; 24 | 25 | @interface SMLRProviderDelegate : NSObject 26 | 27 | - (instancetype)initWithPhoneManager:(SMLRPhoneManager *const)phoneManager; 28 | - (void)reportIncomingCallWithHandle:(NSString *)handle; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRPushNotifications.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @protocol PKPushRegistryDelegate; 24 | 25 | @interface SMLRPushNotifications : NSObject 26 | 27 | + (void)registerAtServerWithDelegate:(id)delegate; 28 | + (void)parseLaunchOptions:(NSDictionary *const)launchOptions; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCallViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRContact; 24 | @class SMLRPhoneManager; 25 | 26 | @interface SMLRCallViewController : UIViewController 27 | 28 | @property (nonatomic) SMLRContact *contact; 29 | @property (nonatomic) SMLRPhoneManager *phoneManager; 30 | 31 | - (void)update; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Simlar/src/SMLRMicrophoneStatus.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 - 2015 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, SMLRMicrophoneStatus) { 24 | SMLRMicrophoneStatusNormal = 0, 25 | SMLRMicrophoneStatusMuted, 26 | SMLRMicrophoneStatusDisabled 27 | }; 28 | 29 | NSString *nameForSMLRMicrophoneStatus(const SMLRMicrophoneStatus status); 30 | -------------------------------------------------------------------------------- /Simlar/src/SMLRNoAddressBookPermissionViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @protocol SMLRNoAddressBookPermissionViewControllerDelegate; 24 | 25 | @interface SMLRNoAddressBookPermissionViewController : UIViewController 26 | 27 | - (void)setDelegate:(id)delegate; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAesUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2020 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface SMLRAesUtil : NSObject 26 | 27 | + (NSString *)decryptMessage:(NSString *const)message withInitializationVector:(NSString *const)initializationVector withPassword:(NSString *const)password; 28 | 29 | @end 30 | 31 | NS_ASSUME_NONNULL_END 32 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAudioOutputType.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 - 2015 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, SMLRAudioOutputType) { 24 | SMLRAudioOutputTypeNormal = 0, 25 | SMLRAudioOutputTypeExternalSpeaker, 26 | SMLRAudioOutputTypeBlueToothAvailable 27 | }; 28 | 29 | NSString *nameForSMLRAudioOutputType(const SMLRAudioOutputType output); 30 | -------------------------------------------------------------------------------- /Simlar/src/SMLRMissedCallUserNotification.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 - 2016 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRContact; 24 | @class UNNotificationCategory; 25 | 26 | @interface SMLRMissedCallUserNotification : NSObject 27 | 28 | + (UNNotificationCategory *)createCategory; 29 | + (void)presentWithContact:(SMLRContact *const)contact; 30 | + (BOOL)isActionCall:(UNNotificationResponse *const)response; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Simlar/Simlar-Prefix.pch: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | // 22 | // Prefix header 23 | // 24 | // The contents of this file are implicitly included at the beginning of every source file. 25 | // 26 | 27 | #import 28 | 29 | #ifndef __IPHONE_5_0 30 | #warning "This project uses features only available in iOS SDK 5.0 and later." 31 | #endif 32 | 33 | #ifdef __OBJC__ 34 | #import 35 | #import 36 | #endif 37 | -------------------------------------------------------------------------------- /Simlar/src/SMLRUnmaintainedWarning.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef SMLRUnmaintainedWarning_h 22 | #define SMLRUnmaintainedWarning_h 23 | 24 | @class SMLRUnmaintainedWarningBanner; 25 | 26 | @interface SMLRUnmaintainedWarning : NSObject 27 | 28 | + (void)showAlert:(UIViewController *const)viewController; 29 | + (SMLRUnmaintainedWarningBanner *)addBanner:(UIViewController *const)viewController; 30 | 31 | @end 32 | 33 | 34 | #endif /* SMLRUnmaintainedWarning_h */ 35 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCredentials.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRCredentials : NSObject 24 | 25 | + (BOOL)saveWithTelephoneNumber:(NSString *const)telephoneNumber simlarId:(NSString *const)simlarId password:(NSString *const)password; 26 | + (NSString *)getTelephoneNumber; 27 | + (NSString *)getSimlarId; 28 | + (NSString *)getPassword; 29 | + (NSString *)getPasswordHash; 30 | + (BOOL)isInitialized; 31 | + (void) delete; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Simlar/src/SMLRGetContactStatus.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRGetContactStatus : NSObject 24 | 25 | + (void)getWithSimlarIds:(NSArray *const)simlarIds 26 | completionHandler:(void (^)(NSDictionary *const contactStatusMap, NSError *const error))handler; 27 | 28 | + (void)getWithSimlarId:(NSString *const)simlarId 29 | completionHandler:(void (^)(const BOOL registered, NSError *const error))handler; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Simlar/src/SMLRMicrophoneStatus.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 - 2015 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRMicrophoneStatus.h" 22 | 23 | NSString *nameForSMLRMicrophoneStatus(const SMLRMicrophoneStatus status) 24 | { 25 | switch (status) { 26 | case SMLRMicrophoneStatusNormal: return @"SMLRMicrophoneStatusNormal"; 27 | case SMLRMicrophoneStatusMuted: return @"SMLRMicrophoneStatusMuted"; 28 | case SMLRMicrophoneStatusDisabled: return @"SMLRMicrophoneStatusDisabled"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAudioOutputType.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 - 2015 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRAudioOutputType.h" 22 | 23 | NSString *nameForSMLRAudioOutputType(const SMLRAudioOutputType output) 24 | { 25 | switch (output) { 26 | case SMLRAudioOutputTypeNormal: return @"SMLRAudioOutputNormal"; 27 | case SMLRAudioOutputTypeExternalSpeaker: return @"SMLRAudioOutputExternalSpeacker"; 28 | case SMLRAudioOutputTypeBlueToothAvailable: return @"SMLRAudioOutputBlueToothAvailable"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRLinphoneHandlerStatus.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, SMLRLinphoneHandlerStatus) { 24 | SMLRLinphoneHandlerStatusNone = 0, 25 | SMLRLinphoneHandlerStatusInitializing, 26 | SMLRLinphoneHandlerStatusFailedToConnectToSipServer, 27 | SMLRLinphoneHandlerStatusConnectedToSipServer, 28 | SMLRLinphoneHandlerStatusGoingDown, 29 | SMLRLinphoneHandlerStatusDestroyed 30 | }; 31 | 32 | NSString *nameForSMLRLinphoneHandlerStatus(const SMLRLinphoneHandlerStatus status); 33 | -------------------------------------------------------------------------------- /Simlar/src/SMLRContactsProviderStatus.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, SMLRContactsProviderStatus) { 24 | SMLRContactsProviderStatusNone = 0, 25 | SMLRContactsProviderStatusRequestingAddressBookAccess, 26 | SMLRContactsProviderStatusParsingPhonesAddressBook, 27 | SMLRContactsProviderStatusRequestingContactsStatus, 28 | SMLRContactsProviderStatusError, 29 | SMLRContactsProviderStatusInitialized 30 | }; 31 | 32 | NSString *nameSMLRContactsProviderStatus(const SMLRContactsProviderStatus status); 33 | -------------------------------------------------------------------------------- /Simlar/src/SMLRPhoneNumber.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRPhoneNumber : NSObject 24 | 25 | - (instancetype)initWithNumber:(NSString *const)number; 26 | 27 | - (BOOL)isValid; 28 | 29 | - (NSString *)getRegistrationNumber; 30 | - (NSString *)getGuiNumber; 31 | - (NSString *)getSimlarId; 32 | 33 | + (NSString *)getRegionWithNumber:(NSString *const)countryNumber; 34 | 35 | + (BOOL)isSimlarId:(NSString *const)simlarId; 36 | 37 | + (NSString *)getCountryNumberBasedOnCurrentLocale; 38 | + (NSArray *)getAllSupportedCountryNumbers; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Simlar/src/SMLRNetworkQuality.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, SMLRNetworkQuality) { 24 | SMLRNetworkQualityUnknown = 0, 25 | SMLRNetworkQualityUnusable, 26 | SMLRNetworkQualityVeryPoor, 27 | SMLRNetworkQualityPoor, 28 | SMLRNetworkQualityAverage, 29 | SMLRNetworkQualityGood 30 | }; 31 | 32 | SMLRNetworkQuality createNetworkQualityWithFloat(const float quality); 33 | NSString *nameForSMLRNetworkQuality(const SMLRNetworkQuality quality); 34 | NSString *guiTextForSMLRNetworkQuality(const SMLRNetworkQuality quality); 35 | 36 | -------------------------------------------------------------------------------- /Simlar/src/SMLRHttpsPostError.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRHttpsPostError.h" 22 | 23 | BOOL isSMLRHttpsPostOfflineError(NSError *const error) 24 | { 25 | return [error.domain isEqual:NSURLErrorDomain] && ( 26 | error.code == NSURLErrorTimedOut || 27 | error.code == NSURLErrorCannotFindHost || 28 | error.code == NSURLErrorCannotConnectToHost || 29 | error.code == NSURLErrorNotConnectedToInternet); 30 | } 31 | -------------------------------------------------------------------------------- /Simlar/src/SMLRStringCategory.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRStringCategory.h" 22 | 23 | @implementation NSString (SMLRStringCategory) 24 | 25 | - (BOOL)matchesPattern:(NSString *const)pattern 26 | { 27 | NSRegularExpression *const regex = [NSRegularExpression regularExpressionWithPattern:pattern 28 | options:NSRegularExpressionCaseInsensitive 29 | error:nil]; 30 | return [regex numberOfMatchesInString:self options:0 range:NSMakeRange(0, [self length])] == 1; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /SimlarTests/SimlarTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SimlarTests : XCTestCase 24 | 25 | @end 26 | 27 | @implementation SimlarTests 28 | 29 | - (void)setUp 30 | { 31 | [super setUp]; 32 | // Put setup code here. This method is called before the invocation of each test method in the class. 33 | } 34 | 35 | - (void)tearDown 36 | { 37 | // Put teardown code here. This method is called after the invocation of each test method in the class. 38 | [super tearDown]; 39 | } 40 | 41 | - (void)testExample 42 | { 43 | //XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /compile-liblinphone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## exit if an error occurs or on unset variables 4 | set -eu -o pipefail 5 | 6 | declare -r BUILD_DIR=${1:?"Please give liblinphone dir as first parameter"} 7 | declare -r GIT_HASH=${2:-"unknown"} 8 | 9 | declare -r DEST_DIR="$(dirname $(greadlink -f $0))/liblinphone" 10 | 11 | declare -r CMAKE_BUILD_DIR="${BUILD_DIR}/linphone-sdk/linphone-sdk-build_$(date '+%Y%m%d_%H%M%S')" 12 | 13 | declare -r PIP_ENV_DIR="${BUILD_DIR}/python-virtual-environment" 14 | python3 -m venv "${PIP_ENV_DIR}" 15 | source "${PIP_ENV_DIR}/bin/activate" 16 | python3 -m pip install pystache 17 | python3 -m pip install six 18 | 19 | 20 | cd "${BUILD_DIR}/linphone-sdk" 21 | 22 | cmake \ 23 | --preset=ios-sdk \ 24 | -G Ninja \ 25 | -B "${CMAKE_BUILD_DIR}" \ 26 | -DLINPHONESDK_IOS_ARCHS="arm64, x86_64" \ 27 | -DENABLE_AAUDIO=OFF \ 28 | -DENABLE_GPL_THIRD_PARTIES=ON \ 29 | -DENABLE_NON_FREE_FEATURES=ON \ 30 | -DENABLE_PQCRYPTO=ON \ 31 | -DENABLE_GSM=OFF \ 32 | -DENABLE_ILBC=OFF \ 33 | -DENABLE_ISAC=OFF \ 34 | -DENABLE_MKV=OFF \ 35 | -DENABLE_VCARD=OFF 36 | 37 | cmake --build "${CMAKE_BUILD_DIR}" --config RelWithDebInfo 38 | 39 | ## copy sdk 40 | rm -rf "${DEST_DIR}" 41 | mkdir "${DEST_DIR}" 42 | gcp "${CMAKE_BUILD_DIR}"/linphone-sdk.podspec "${DEST_DIR}/" 43 | unzip -o $(gfind "${CMAKE_BUILD_DIR}" -maxdepth 1 -name linphone-sdk-\*.zip) -d "${DEST_DIR}/" 44 | 45 | echo "liblinphone build successfull with git hash: ${GIT_HASH}" 46 | echo "integrate it with:" 47 | echo " pod install" 48 | -------------------------------------------------------------------------------- /Simlar/src/SMLRHttpsPost.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRHttpsPost : NSObject 24 | 25 | + (void)postAsynchronousCommand:(NSString *const)command 26 | parameters:(NSDictionary *const)parameters 27 | completionHandler:(void (^)(NSData *const data, NSError *const connectionError))handler; 28 | 29 | + (void)postAsynchronousCommand:(NSString *const)command 30 | contentType:(NSString *const)contentType 31 | body:(NSData *const)body 32 | completionHandler:(void (^)(NSData *const data, NSError *const connectionError))handler; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAddressBookViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRContact; 24 | @class SMLRPhoneManager; 25 | 26 | @interface SMLRAddressBookViewController : UIViewController 27 | 28 | - (SMLRPhoneManager *)getPhoneManager; 29 | - (void)getGuiTelephoneNumberWithSimlarId:(NSString *const)simlarId completionHandler:(void (^)(NSString *const guiTelephoneNumber))handler; 30 | 31 | - (void)checkForIncomingCalls; 32 | - (void)acceptCall; 33 | - (void)declineCall; 34 | - (void)callPhoneNumber:(NSString *const)phoneNumber; 35 | - (void)callContact:(SMLRContact *const)contact; 36 | - (UIViewController *)getPresentingViewController; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCreateAccount.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | extern NSString *const SMLRCreateAccountErrorDomain; 24 | 25 | @interface SMLRCreateAccount : NSObject 26 | 27 | + (void)requestWithTelephoneNumber:(NSString *const)telephoneNumber 28 | completionHandler:(void (^)(NSString *const simlarId, NSString *const password, NSError *const error))handler; 29 | 30 | + (void)confirmWithSimlarId:(NSString *const)simlarId 31 | registrationCode:(NSString *const)registrationCode 32 | completionHandler:(void (^)(NSString *const simlarId, NSString *const registrationCode, NSError *const error))handler; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Simlar/src/SMLRLinphoneHandlerStatus.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRLinphoneHandlerStatus.h" 22 | 23 | NSString *nameForSMLRLinphoneHandlerStatus(const SMLRLinphoneHandlerStatus status) 24 | { 25 | switch (status) { 26 | case SMLRLinphoneHandlerStatusNone: return @"NONE"; 27 | case SMLRLinphoneHandlerStatusInitializing: return @"INITIALIZING"; 28 | case SMLRLinphoneHandlerStatusFailedToConnectToSipServer: return @"FAILED"; 29 | case SMLRLinphoneHandlerStatusConnectedToSipServer: return @"CONNECTED"; 30 | case SMLRLinphoneHandlerStatusGoingDown: return @"GOING DOWN"; 31 | case SMLRLinphoneHandlerStatusDestroyed: return @"DESTROYED"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Simlar/src/SMLRContactsProvider.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRContact; 24 | @class SMLRContacts; 25 | 26 | extern NSString *const SMLRContactsProviderErrorDomain; 27 | 28 | typedef NS_ENUM(NSUInteger, SMLRContactsProviderError) { 29 | SMLRContactsProviderErrorUnknown = 0, 30 | SMLRContactsProviderErrorNoPermission, 31 | SMLRContactsProviderErrorOffline, 32 | }; 33 | 34 | @interface SMLRContactsProvider : NSObject 35 | 36 | - (void)getContactsWithCompletionHandler:(void (^)(SMLRContacts *const contacts, NSError *const error))handler; 37 | - (void)getContactBySimlarId:(NSString *const)simlarId completionHandler:(void (^)(SMLRContact *const contact))handler; 38 | - (BOOL)isAddressBookRead; 39 | 40 | - (void)reset; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Simlar/src/SMLRSettings.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, SMLRCreateAccountStatus) { 24 | SMLRCreateAccountStatusNone = 0, 25 | SMLRCreateAccountStatusAgreed, 26 | SMLRCreateAccountStatusWaitingForSms, 27 | SMLRCreateAccountStatusSuccess 28 | }; 29 | 30 | @interface SMLRSettings : NSObject 31 | 32 | + (void)saveDefaultRegion:(NSString *const)region; 33 | + (NSString *)getDefaultRegion; 34 | 35 | + (void)saveCreateAccountStatus:(const SMLRCreateAccountStatus)status; 36 | + (SMLRCreateAccountStatus)getCreateAccountStatus; 37 | 38 | /// gui preferences 39 | + (BOOL)getLogEnabled; 40 | + (BOOL)getReregisterNextStart; 41 | 42 | + (void)resetReportBugNextStart; 43 | + (BOOL)getReportBugNextStart; 44 | 45 | + (void)reset; 46 | 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Simlar/src/SMLRContactsProviderStatus.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRContactsProviderStatus.h" 22 | 23 | NSString *nameSMLRContactsProviderStatus(const SMLRContactsProviderStatus status) 24 | { 25 | switch (status) { 26 | case SMLRContactsProviderStatusNone: return @"None"; 27 | case SMLRContactsProviderStatusRequestingAddressBookAccess: return @"RequestingAddressBookAccess"; 28 | case SMLRContactsProviderStatusParsingPhonesAddressBook: return @"ParsingPhonesAddressBook"; 29 | case SMLRContactsProviderStatusRequestingContactsStatus: return @"RequestingContactsStatus"; 30 | case SMLRContactsProviderStatusError: return @"Error"; 31 | case SMLRContactsProviderStatusInitialized: return @"Initialized"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Simlar/src/SMLRContact.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class CNContact; 24 | 25 | @interface SMLRContact : NSObject 26 | 27 | @property (nonatomic, readonly) NSString *name; 28 | @property (nonatomic, readonly) NSString *guiTelephoneNumber; 29 | @property (nonatomic, readonly) NSString *simlarId; 30 | @property (nonatomic) BOOL registered; 31 | 32 | - (instancetype)initWithSimlarId:(NSString *const)simlarId guiTelephoneNumber:(NSString *const)guiTelephoneNumber name:(NSString *const)name; 33 | - (instancetype)initWithSimlarId:(NSString *const)simlarId; 34 | - (instancetype)initWithDictionary:(NSDictionary *const)dictonary; 35 | - (instancetype)initWithContact:(CNContact *const)contact phoneNumber:(NSString *const)phoneNumber; 36 | 37 | - (NSString *)toString; 38 | - (NSDictionary *)toDictonary; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Simlar/src/SMLRContacts.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRContact; 24 | 25 | @interface SMLRContacts : NSObject 26 | 27 | - (NSUInteger)getCount; 28 | - (NSUInteger)getGroupsCount; 29 | - (NSString *)getGroupLetter:(const NSInteger)index; 30 | - (NSUInteger)getGroupCount:(const NSInteger)index; 31 | - (SMLRContact *)getContactWithGroupIndex:(const NSInteger)groupIndex contactIndex:(const NSInteger)contactIndex; 32 | 33 | @end 34 | 35 | @interface SMLRAllContacts : SMLRContacts 36 | 37 | - (SMLRContact *)getContactWithSimlarId:(NSString *const)simlarId; 38 | - (SMLRContacts *)getSimlarContacts; 39 | - (NSArray *)getSimlarIds; 40 | 41 | @end 42 | 43 | @interface SMLRMutableAllContacts : SMLRAllContacts 44 | 45 | - (void)addContact:(SMLRContact *const)contact groupLetter:(const unichar)groupLetter; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Simlar/src/SMLRPushNotifications.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRPushNotifications.h" 22 | 23 | #import "SMLRLog.h" 24 | 25 | #import 26 | 27 | @implementation SMLRPushNotifications 28 | 29 | + (void)registerAtServerWithDelegate:(id)delegate 30 | { 31 | SMLRLogI(@"using voip push notifications (iOS 8 and later)"); 32 | PKPushRegistry *const voipRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()]; 33 | voipRegistry.delegate = delegate; 34 | voipRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP]; 35 | } 36 | 37 | + (void)parseLaunchOptions:(NSDictionary *const)launchOptions 38 | { 39 | NSDictionary *const pushNotifications = launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]; 40 | if (pushNotifications) { 41 | SMLRLogI(@"Push notification triggered launch: %@", pushNotifications); 42 | } 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | simlar-ios 2 | ========== 3 | 4 | [![Build Status](https://github.com/simlar/simlar-ios/workflows/simlar-ios-ci/badge.svg?branch=master)](https://github.com/simlar/simlar-ios/actions) 5 | 6 | [Simlar](https://www.simlar.org) is a cross platform VoIP App aiming to make ZRTP encrypted calls easy. 7 | 8 |
9 | Screenshot address book 10 | Screenshot call 11 |
12 | 13 | ### Pods ### 14 | simlar-ios uses [CocoaPods](https://cocoapods.org/) to manage its dependencies. Download them with: 15 | ``` 16 | pod install 17 | ``` 18 | 19 | In order to update libs handled by CocoaPods run: 20 | ``` 21 | pod update 22 | ``` 23 | 24 | ### Xcode ### 25 | After downloading dependencies, simply import simlar-ios in XCode. 26 | 27 | ### liblinphone ### 28 | Simlar heavily depends on [liblinphone](http://www.linphone.org/). 29 | Since version 4.2 it is available as Pod. 30 | However if you would like to compile it yourself, you should start with compiling [linphone-sdk](https://gitlab.linphone.org/BC/public/linphone-sdk) for iOS. 31 | Please follow the build instructions there. 32 | Once you have managed to compile linphone-iphone on your system, here is a script for checking out, applying Simlar patches, compile and integrate liblinphone into simlar-ios. 33 | ``` 34 | ./bootstrap-liblinphone.sh origin/master 35 | ``` 36 | 37 | ### Post quantum encryption ### 38 | Simlar uses post quantum encryption since version 2.6 as liblinphone supports it since version 5.2. 39 | However the liblinphone artifacts published in the maven repository do not support it. 40 | So you have to build it yourself. 41 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCallStatus.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, SMLRCallStatusEnum) { 24 | SMLRCallStatusNone = 0, 25 | SMLRCallStatusConnectingToServer, 26 | SMLRCallStatusWaitingForContact, 27 | SMLRCallStatusRemoteRinging, 28 | SMLRCallStatusIncomingCall, 29 | SMLRCallStatusEncrypting, 30 | SMLRCallStatusTalking, 31 | SMLRCallStatusEnded 32 | }; 33 | 34 | @interface SMLRCallStatus : NSObject 35 | 36 | @property (nonatomic, readonly) SMLRCallStatusEnum enumValue; 37 | @property (nonatomic, readonly) NSString *endReason; 38 | @property (nonatomic, readonly) BOOL wantsDismiss; 39 | 40 | - (instancetype)initWithStatus:(const SMLRCallStatusEnum)status; 41 | - (instancetype)initWithEndReason:(NSString *const)reason wantsDismiss:(const BOOL)wantsDismiss; 42 | 43 | - (BOOL)isEqualToCallStatus:(SMLRCallStatus *const)callStatus; 44 | 45 | - (NSString *)description; 46 | - (NSString *)guiText; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Simlar/src/SMLRPhoneManagerDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @class SMLRCallStatus; 24 | enum SMLRNetworkQuality : NSUInteger; 25 | enum SMLRMicrophoneStatus : NSUInteger; 26 | enum SMLRAudioOutputType : NSUInteger; 27 | 28 | @protocol SMLRPhoneManagerDelegate 29 | 30 | - (void)onCallStatusChanged:(SMLRCallStatus *const)callStatus; 31 | - (void)onCallEncrypted:(NSString *const)sas sasVerified:(const BOOL)sasVerified; 32 | - (void)onCallNetworkQualityChanged:(const enum SMLRNetworkQuality)quality; 33 | - (void)onMicrophoneStatusChanged:(const enum SMLRMicrophoneStatus)status; 34 | - (void)onAudioOutputTypeChanged:(const enum SMLRAudioOutputType)type; 35 | 36 | @end 37 | 38 | 39 | @protocol SMLRPhoneManagerCallStatusDelegate 40 | 41 | - (void)onCallStatusChanged:(SMLRCallStatus *const)callStatus; 42 | 43 | @end 44 | 45 | 46 | @protocol SMLRPhoneManagerRootViewControllerDelegate 47 | 48 | - (void)onIncomingCall; 49 | - (void)onCallEnded:(NSString *const)missedCaller; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | # BasedOnStyle: WebKit 4 | AccessModifierOffset: -4 5 | ConstructorInitializerIndentWidth: 4 6 | AlignEscapedNewlinesLeft: false 7 | AlignTrailingComments: false 8 | AllowAllParametersOfDeclarationOnNextLine: true 9 | AllowShortBlocksOnASingleLine: false 10 | AllowShortIfStatementsOnASingleLine: false 11 | AllowShortLoopsOnASingleLine: false 12 | AllowShortFunctionsOnASingleLine: All 13 | AlwaysBreakTemplateDeclarations: false 14 | AlwaysBreakBeforeMultilineStrings: false 15 | BreakBeforeBinaryOperators: true 16 | BreakBeforeTernaryOperators: true 17 | BreakConstructorInitializersBeforeComma: true 18 | BinPackParameters: true 19 | ColumnLimit: 0 20 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 21 | DerivePointerBinding: false 22 | ExperimentalAutoDetectBinPacking: false 23 | IndentCaseLabels: true 24 | MaxEmptyLinesToKeep: 1 25 | KeepEmptyLinesAtTheStartOfBlocks: true 26 | NamespaceIndentation: Inner 27 | ObjCSpaceAfterProperty: true 28 | ObjCSpaceBeforeProtocolList: true 29 | PenaltyBreakBeforeFirstCallParameter: 19 30 | PenaltyBreakComment: 300 31 | PenaltyBreakString: 1000 32 | PenaltyBreakFirstLessLess: 120 33 | PenaltyExcessCharacter: 1000000 34 | PenaltyReturnTypeOnItsOwnLine: 60 35 | PointerBindsToType: false 36 | SpacesBeforeTrailingComments: 1 37 | Cpp11BracedListStyle: false 38 | Standard: Cpp03 39 | IndentWidth: 4 40 | TabWidth: 8 41 | UseTab: Never 42 | BreakBeforeBraces: Stroustrup 43 | IndentFunctionDeclarationAfterType: false 44 | SpacesInParentheses: false 45 | SpacesInAngles: false 46 | SpaceInEmptyParentheses: false 47 | SpacesInCStyleCastParentheses: false 48 | SpacesInContainerLiterals: true 49 | SpaceBeforeAssignmentOperators: true 50 | ContinuationIndentWidth: 4 51 | CommentPragmas: '^ IWYU pragma:' 52 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] 53 | SpaceBeforeParens: ControlStatements 54 | DisableFormat: false 55 | ... 56 | 57 | -------------------------------------------------------------------------------- /Simlar/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | Type 9 | PSChildPaneSpecifier 10 | Title 11 | About 12 | File 13 | About 14 | 15 | 16 | Type 17 | PSChildPaneSpecifier 18 | Title 19 | Acknowledgements 20 | File 21 | Acknowledgements 22 | 23 | 24 | Type 25 | PSTitleValueSpecifier 26 | Title 27 | Version 28 | Key 29 | version_preference 30 | DefaultValue 31 | 0.0.0 32 | 33 | 34 | Type 35 | PSToggleSwitchSpecifier 36 | Title 37 | Enable logging 38 | Key 39 | log_enabled_preference 40 | DefaultValue 41 | 42 | 43 | 44 | DefaultValue 45 | 46 | Key 47 | report_bug_next_start_preference 48 | Title 49 | Report Bug next start 50 | Type 51 | PSToggleSwitchSpecifier 52 | 53 | 54 | DefaultValue 55 | 56 | Key 57 | reregister_next_start_preference 58 | Title 59 | Reregister next start 60 | Type 61 | PSToggleSwitchSpecifier 62 | 63 | 64 | StringsTable 65 | Root 66 | 67 | 68 | -------------------------------------------------------------------------------- /bootstrap-liblinphone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## exit if an error occurs or on unset variables 4 | set -eu -o pipefail 5 | 6 | declare -r BRANCH=${1:-"5.3.110"} ## use master to build current git revision 7 | 8 | declare -r PROJECT_DIR="$(dirname $(greadlink -f $0))" 9 | 10 | declare -r COMPILE_SCRIPT="${PROJECT_DIR}/compile-liblinphone.sh" 11 | declare -r LINPHONE_SDK_PATCH_DIR="${PROJECT_DIR}/patches/linphone-sdk" 12 | declare -r LIBLINPHONE_PATCH_DIR="${PROJECT_DIR}/patches/liblinphone" 13 | declare -r MEDIASTREAMER2_PATCH_DIR="${PROJECT_DIR}/patches/mediastreamer2" 14 | declare -r BELLESIP_PATCH_DIR="${PROJECT_DIR}/patches/belle-sip" 15 | declare -r ORTP_PATCH_DIR="${PROJECT_DIR}/patches/ortp" 16 | declare -r BZRTP_PATCH_DIR="${PROJECT_DIR}/patches/bzrtp" 17 | declare -r LIBOQS_PATCH_DIR="${PROJECT_DIR}/patches/liboqs" 18 | 19 | declare -r BUILD_DIR="${PROJECT_DIR}/liblinphone_build_$(basename "${BRANCH}")_$(date '+%Y%m%d_%H%M%S')" 20 | mkdir "${BUILD_DIR}" 21 | cd "${BUILD_DIR}" 22 | 23 | git clone https://gitlab.linphone.org/BC/public/linphone-sdk.git 24 | cd linphone-sdk 25 | git checkout "${BRANCH}" 26 | 27 | declare -r GIT_HASH=$(git log -n1 --format="%H") 28 | 29 | if [ -d "${LINPHONE_SDK_PATCH_DIR}" ] ; then 30 | git am "${LINPHONE_SDK_PATCH_DIR}"/*.patch 31 | fi 32 | 33 | git submodule sync 34 | git submodule update --recursive --init 35 | 36 | if [ -d "${LIBLINPHONE_PATCH_DIR}" ] ; then 37 | pushd liblinphone/ 38 | git am "${LIBLINPHONE_PATCH_DIR}"/*.patch 39 | popd 40 | fi 41 | 42 | if [ -d "${MEDIASTREAMER2_PATCH_DIR}" ] ; then 43 | pushd mediastreamer2 44 | git am "${MEDIASTREAMER2_PATCH_DIR}"/*.patch 45 | popd 46 | fi 47 | 48 | if [ -d "${BZRTP_PATCH_DIR}" ] ; then 49 | pushd bzrtp/ 50 | git am "${BZRTP_PATCH_DIR}"/*.patch 51 | popd 52 | fi 53 | 54 | if [ -d "${LIBOQS_PATCH_DIR}" ] ; then 55 | pushd external/liboqs 56 | git am "${LIBOQS_PATCH_DIR}"/*.patch 57 | popd 58 | fi 59 | 60 | cd ../.. 61 | 62 | "${COMPILE_SCRIPT}" "${BUILD_DIR}" "${GIT_HASH}" 63 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAgreeViewController.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRAgreeViewController.h" 22 | 23 | #import "SMLRBrowser.h" 24 | #import "SMLRLog.h" 25 | #import "SMLRUnmaintainedWarning.h" 26 | 27 | @interface SMLRAgreeViewController () 28 | 29 | - (IBAction)buttonPrivacyStatementPressed:(id)sender; 30 | - (IBAction)buttonTermsOfUsePressed:(id)sender; 31 | 32 | @end 33 | 34 | @implementation SMLRAgreeViewController 35 | 36 | - (instancetype)initWithCoder:(NSCoder *const)aDecoder 37 | { 38 | self = [super initWithCoder:aDecoder]; 39 | if (self == nil) { 40 | SMLRLogE(@"unable to create SMLRAgreeViewController"); 41 | return nil; 42 | } 43 | return self; 44 | } 45 | 46 | - (void)viewDidLoad 47 | { 48 | [super viewDidLoad]; 49 | } 50 | 51 | - (void)viewDidAppear:(const BOOL)animated 52 | { 53 | [super viewDidAppear:animated]; 54 | 55 | [SMLRUnmaintainedWarning showAlert:self]; 56 | } 57 | 58 | - (void)didReceiveMemoryWarning 59 | { 60 | [super didReceiveMemoryWarning]; 61 | } 62 | 63 | - (IBAction)buttonPrivacyStatementPressed:(id)sender 64 | { 65 | [SMLRBrowser openUrl:@"https://www.simlar.org/datenschutzerklaerung/"]; 66 | } 67 | 68 | - (IBAction)buttonTermsOfUsePressed:(id)sender 69 | { 70 | [SMLRBrowser openUrl:@"https://www.simlar.org/nutzungsbedingungen/"]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAlert.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @interface SMLRAlert : NSObject 24 | 25 | + (void)showWithViewController:(UIViewController *const)viewController 26 | title:(NSString *const)title 27 | message:(NSString *const)message; 28 | 29 | + (void)showWithViewController:(UIViewController *const)viewController 30 | title:(NSString *const)title 31 | message:(NSString *const)message 32 | closeButtonTitle:(NSString *const)closeButtonTitle; 33 | 34 | + (void)showWithViewController:(UIViewController *const)viewController 35 | title:(NSString *const)title 36 | message:(NSString *const)message 37 | buttonTitle:(NSString *const)buttonTitle 38 | buttonHandler:(void (^)())buttonHandler; 39 | 40 | + (void)showWithViewController:(UIViewController *const)viewController 41 | title:(NSString *const)title 42 | message:(NSString *const)message 43 | abortButtonTitle:(NSString *const)abortButtonTitle 44 | abortButtonHandler:(void (^)())abortButtonHandler 45 | continueButtonTitle:(NSString *const)continueButtonTitle 46 | continueButtonHandler:(void (^)())continueButtonHandler; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Simlar/src/SMLRLog.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef Simlar_SMLRLog_h 22 | #define Simlar_SMLRLog_h 23 | 24 | #import 25 | 26 | extern const int ddLogLevel; 27 | 28 | #define SMLRLogV(params...) DDLogVerbose(params); 29 | #define SMLRLogD(params...) DDLogDebug(params); 30 | #define SMLRLogI(params...) DDLogInfo(params); 31 | #define SMLRLogW(params...) DDLogWarn(params); 32 | #define SMLRLogE(params...) DDLogError(params); 33 | 34 | #define SMLRLogFunc SMLRLogI(@"%s", __func__); 35 | 36 | #define SMLR_LOG_ALWAYS_WITH_TAG(aFlag, aTag, frmt, ...) \ 37 | [DDLog log : LOG_ASYNC_ENABLED \ 38 | level : LOG_LEVEL_DEF \ 39 | flag : aFlag \ 40 | context : 0 \ 41 | file : __FILE__ \ 42 | function : __PRETTY_FUNCTION__ \ 43 | line : __LINE__ \ 44 | tag : aTag \ 45 | format : (frmt), ## __VA_ARGS__] 46 | 47 | #define SMLRLogLevel DDLogFlag 48 | #define SMLRVerbose DDLogFlagVerbose 49 | #define SMLRDebug DDLogFlagDebug 50 | #define SMLRInfo DDLogFlagInfo 51 | #define SMLRWarning DDLogFlagWarning 52 | #define SMLRError DDLogFlagError 53 | 54 | @interface SMLRLog : NSObject 55 | 56 | + (void)enableLogging:(BOOL)enabled; 57 | + (NSString *)getLogFilePath; 58 | 59 | @end 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /Simlar/src/SMLRLinphoneHandler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | #import "SMLRLinphoneHandlerStatus.h" 24 | 25 | @protocol SMLRPhoneManagerDelegate; 26 | @protocol SMLRPhoneManagerCallStatusDelegate; 27 | 28 | @class SMLRCallStatus; 29 | enum SMLRNetworkQuality : NSUInteger; 30 | 31 | @protocol SMLRLinphoneHandlerDelegate 32 | 33 | - (void)onIncomingCall; 34 | - (void)onCallEnded:(NSString *const)missedCaller; 35 | - (void)onLinphoneHandlerStatusChanged:(SMLRLinphoneHandlerStatus)status; 36 | 37 | @end 38 | 39 | @interface SMLRLinphoneHandler : NSObject 40 | 41 | @property (weak, nonatomic) id delegate; 42 | @property (weak, nonatomic) id phoneManagerDelegate; 43 | @property (weak, nonatomic) id phoneManagerCallStatusDelegate; 44 | 45 | - (void)initLibLinphone; 46 | 47 | - (void)setCurrentCallPause:(const BOOL)pause; 48 | - (void)call:(NSString *const)callee; 49 | - (void)terminateAllCalls; 50 | - (void)acceptCall; 51 | - (void)configureAudioSession; 52 | - (void)activateAudioSession:(const BOOL)activate; 53 | - (void)saveSasVerified; 54 | - (void)toggleMicrophoneMuted; 55 | + (void)toggleExternalSpeaker; 56 | 57 | - (SMLRLinphoneHandlerStatus)getLinphoneHandlerStatus; 58 | - (SMLRCallStatus *)getCallStatus; 59 | - (NSDate *)getCallStatusChangedDate; 60 | - (enum SMLRNetworkQuality)getCallNetworkQuality; 61 | - (BOOL)hasIncomingCall; 62 | - (NSString *)getCurrentCallRemoteUser; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Simlar/src/SMLRPhoneManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import 22 | 23 | @protocol SMLRPhoneManagerDelegate; 24 | @protocol SMLRPhoneManagerCallStatusDelegate; 25 | @protocol SMLRPhoneManagerRootViewControllerDelegate; 26 | 27 | @class SMLRCallStatus; 28 | enum SMLRNetworkQuality : NSUInteger; 29 | 30 | @interface SMLRPhoneManager : NSObject 31 | 32 | - (void)setDelegate:(id)delegate; 33 | - (void)setCallStatusDelegate:(id)callStatusDelegate; 34 | - (void)setDelegateRootViewController:(id)delegateRootViewController; 35 | 36 | - (NSUUID *)newCallUuid; 37 | - (NSUUID *)getCallUuid; 38 | - (void)checkForIncomingCall; 39 | - (void)requestCallWithSimlarId:(NSString *const)simlarId guiTelephoneNumber:(NSString *const)guiTelephoneNumber completion:(void (^)(NSError *error))completion; 40 | - (void)callWithSimlarId:(NSString *const)simlarId; 41 | - (void)endCallkitCall; 42 | 43 | - (void)setCallWithUuid:(NSUUID *const)uuid pause:(const BOOL)pause; 44 | - (void)terminateAllCalls; 45 | - (void)acceptCall; 46 | - (void)configureAudioSession; 47 | - (void)activateAudioSession:(const BOOL)activate; 48 | - (void)saveSasVerified; 49 | - (void)toggleMicrophoneMuted; 50 | + (void)toggleExternalSpeaker; 51 | 52 | - (SMLRCallStatus *)getCallStatus; 53 | - (NSDate *)getCallStatusChangedDate; 54 | - (NSString *)getCurrentCallSimlarId; 55 | - (BOOL)hasIncomingCall; 56 | - (enum SMLRNetworkQuality)getCallNetworkQuality; 57 | @end 58 | -------------------------------------------------------------------------------- /Simlar/Simlar-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 0.0.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 0.0.0 25 | ITSAppUsesNonExemptEncryption 26 | 27 | LSRequiresIPhoneOS 28 | 29 | NSBluetoothPeripheralUsageDescription 30 | Simlar lets you talk to the person you are calling via your Bluetooth headset. 31 | NSCameraUsageDescription 32 | Simlar uses your camera during Simlar video calls so that the person you are calling can see you. 33 | NSContactsUsageDescription 34 | Simlar reads your contacts data to show the contacts you can talk to privately. 35 | NSMicrophoneUsageDescription 36 | Simlar uses your microphone during Simlar calls so that the person you are talking to can hear you. 37 | UIBackgroundModes 38 | 39 | audio 40 | remote-notification 41 | voip 42 | 43 | UILaunchStoryboardName 44 | LaunchScreen 45 | UIMainStoryboardFile 46 | Main 47 | UIRequiredDeviceCapabilities 48 | 49 | armv7 50 | 51 | UIRequiresFullScreen 52 | 53 | UISupportedInterfaceOrientations 54 | 55 | UIInterfaceOrientationPortrait 56 | 57 | UISupportedInterfaceOrientations~ipad 58 | 59 | UIInterfaceOrientationPortrait 60 | 61 | UIUserInterfaceStyle 62 | Light 63 | UIViewControllerBasedStatusBarAppearance 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /Simlar/src/SMLRNetworkQuality.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRNetworkQuality.h" 22 | 23 | SMLRNetworkQuality createNetworkQualityWithFloat(const float quality) 24 | { 25 | if (4 <= quality && quality <= 5) { 26 | return SMLRNetworkQualityGood; 27 | } 28 | 29 | if (3 <= quality && quality < 4) { 30 | return SMLRNetworkQualityAverage; 31 | } 32 | 33 | if (2 <= quality && quality < 3) { 34 | return SMLRNetworkQualityPoor; 35 | } 36 | 37 | if (1 <= quality && quality < 2) { 38 | return SMLRNetworkQualityVeryPoor; 39 | } 40 | 41 | if (0 <= quality && quality < 1) { 42 | return SMLRNetworkQualityUnusable; 43 | } 44 | 45 | return SMLRNetworkQualityUnknown; 46 | } 47 | 48 | NSString *nameForSMLRNetworkQuality(const SMLRNetworkQuality quality) 49 | { 50 | switch (quality) { 51 | case SMLRNetworkQualityGood: return @"GOOD"; 52 | case SMLRNetworkQualityAverage: return @"AVERAGE"; 53 | case SMLRNetworkQualityPoor: return @"POOR"; 54 | case SMLRNetworkQualityVeryPoor: return @"VERY_POOR"; 55 | case SMLRNetworkQualityUnusable: return @"UNUSABLE"; 56 | case SMLRNetworkQualityUnknown: return @"UNKNOWN"; 57 | } 58 | } 59 | 60 | NSString *guiTextForSMLRNetworkQuality(const SMLRNetworkQuality quality) 61 | { 62 | switch (quality) { 63 | case SMLRNetworkQualityGood: return @"good"; 64 | case SMLRNetworkQualityAverage: return @"average"; 65 | case SMLRNetworkQualityPoor: return @"poor"; 66 | case SMLRNetworkQualityVeryPoor: return @"very poor"; 67 | case SMLRNetworkQualityUnusable: return @"unusable"; 68 | case SMLRNetworkQualityUnknown: return @"unknown"; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCallSoundManager.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRCallSoundManager.h" 22 | 23 | #import "SMLRCallStatus.h" 24 | #import "SMLRLog.h" 25 | 26 | #import 27 | 28 | @interface SMLRCallSoundManager () 29 | 30 | @property (nonatomic) AVAudioPlayer *player; 31 | 32 | @end 33 | 34 | 35 | @implementation SMLRCallSoundManager 36 | 37 | - (void)onCallStatusChanged:(SMLRCallStatus *const)callStatus 38 | { 39 | [self stopPlaying]; 40 | 41 | switch (callStatus.enumValue) { 42 | case SMLRCallStatusNone: break; 43 | case SMLRCallStatusConnectingToServer: break; 44 | case SMLRCallStatusWaitingForContact: 45 | [self playFile:@"waiting_for_contact.wav"]; 46 | break; 47 | case SMLRCallStatusRemoteRinging: break; 48 | case SMLRCallStatusIncomingCall: break; 49 | case SMLRCallStatusEncrypting: 50 | [self playFile:@"encryption_handshake.wav"]; 51 | break; 52 | case SMLRCallStatusTalking: break; 53 | case SMLRCallStatusEnded: break; 54 | } 55 | } 56 | 57 | - (void)stopPlaying 58 | { 59 | if (_player && [_player isPlaying]) { 60 | SMLRLogI(@"stop playing sound"); 61 | [_player stop]; 62 | self.player = nil; 63 | } 64 | } 65 | 66 | - (void)playFile:(NSString *const)file 67 | { 68 | SMLRLogI(@"start playing sound: %@", file); 69 | NSURL *const url = [[NSBundle mainBundle] URLForResource:file withExtension:nil]; 70 | self.player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil]; 71 | if (_player == nil) { 72 | SMLRLogE(@"unable to create audio player with file: %@", file); 73 | return; 74 | } 75 | [_player setNumberOfLoops:-1]; // infinite repeat 76 | [_player play]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Simlar/src/SMLRLog.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRLog.h" 22 | 23 | #import "SMLRLogFormatter.h" 24 | 25 | #if DEBUG 26 | const int ddLogLevel = DDLogLevelVerbose; 27 | #else 28 | const int ddLogLevel = DDLogLevelInfo; 29 | #endif 30 | 31 | @implementation SMLRLog 32 | 33 | + (void)enableLogging:(BOOL)enabled 34 | { 35 | if ([self isLogging] == enabled) { 36 | return; 37 | } 38 | 39 | if (enabled) { 40 | [self startLogging]; 41 | } else { 42 | [self stopLogging]; 43 | } 44 | } 45 | 46 | + (BOOL)isLogging 47 | { 48 | return [[DDLog allLoggers] count] > 0; 49 | } 50 | 51 | + (void)startLogging 52 | { 53 | DDFileLogger *const fileLogger = [[DDFileLogger alloc] init]; 54 | fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling 55 | fileLogger.logFileManager.maximumNumberOfLogFiles = 7; 56 | fileLogger.logFormatter = [[SMLRLogFormatter alloc] init]; 57 | [DDLog addLogger:fileLogger]; 58 | 59 | /// system log 60 | DDOSLogger *const systemLogger = [DDOSLogger sharedInstance]; 61 | [systemLogger setLogFormatter:[[SMLRLogFormatter alloc] initWithoutDate]]; 62 | [DDLog addLogger:systemLogger]; 63 | } 64 | 65 | + (void)stopLogging 66 | { 67 | [DDLog removeAllLoggers]; 68 | } 69 | 70 | + (NSString *)getLogFilePath 71 | { 72 | if (![self isLogging]) { 73 | return nil; 74 | } 75 | 76 | DDFileLogger *const fileLogger = (DDFileLogger *)[DDLog allLoggers][0]; 77 | if (![fileLogger isKindOfClass:DDFileLogger.class]) { 78 | return nil; 79 | } 80 | 81 | if (fileLogger.logFileManager == nil) { 82 | return nil; 83 | } 84 | 85 | if ([fileLogger.logFileManager.sortedLogFilePaths count] == 0) { 86 | return nil; 87 | } 88 | 89 | return fileLogger.logFileManager.sortedLogFilePaths[0]; 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /Simlar/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "app-icon-58x58.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "iphone", 22 | "filename" : "app-icon-87x87.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "iphone", 28 | "filename" : "app-icon-80x80.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "iphone", 34 | "filename" : "app-icon-120x120.png", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "size" : "60x60", 39 | "idiom" : "iphone", 40 | "filename" : "app-icon-120x120-1.png", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "size" : "60x60", 45 | "idiom" : "iphone", 46 | "filename" : "app-icon-180x180.png", 47 | "scale" : "3x" 48 | }, 49 | { 50 | "idiom" : "ipad", 51 | "size" : "20x20", 52 | "scale" : "1x" 53 | }, 54 | { 55 | "idiom" : "ipad", 56 | "size" : "20x20", 57 | "scale" : "2x" 58 | }, 59 | { 60 | "size" : "29x29", 61 | "idiom" : "ipad", 62 | "filename" : "app-icon-29x29.png", 63 | "scale" : "1x" 64 | }, 65 | { 66 | "size" : "29x29", 67 | "idiom" : "ipad", 68 | "filename" : "app-icon-58x58-1.png", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "size" : "40x40", 73 | "idiom" : "ipad", 74 | "filename" : "app-icon-40x40.png", 75 | "scale" : "1x" 76 | }, 77 | { 78 | "size" : "40x40", 79 | "idiom" : "ipad", 80 | "filename" : "app-icon-80x80-1.png", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "size" : "76x76", 85 | "idiom" : "ipad", 86 | "filename" : "app-icon-76x76.png", 87 | "scale" : "1x" 88 | }, 89 | { 90 | "size" : "76x76", 91 | "idiom" : "ipad", 92 | "filename" : "app-icon-152x152.png", 93 | "scale" : "2x" 94 | }, 95 | { 96 | "size" : "83.5x83.5", 97 | "idiom" : "ipad", 98 | "filename" : "app-icon-167x167.png", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "size" : "1024x1024", 103 | "idiom" : "ios-marketing", 104 | "filename" : "app-icon-1024x1024.png", 105 | "scale" : "1x" 106 | } 107 | ], 108 | "info" : { 109 | "version" : 1, 110 | "author" : "xcode" 111 | } 112 | } -------------------------------------------------------------------------------- /Simlar/src/SMLRSettings.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRSettings.h" 22 | 23 | @implementation SMLRSettings 24 | 25 | static NSString *const kKeyDefaultRegion = @"defaultRegion"; 26 | static NSString *const kKeyCreateAccountStatus = @"createAccountStatus"; 27 | static NSString *const kKeyReregisterNextStart = @"reregister_next_start_preference"; 28 | static NSString *const kKeyLogEnabled = @"log_enabled_preference"; 29 | static NSString *const kKeyReportBugNextStart = @"report_bug_next_start_preference"; 30 | 31 | 32 | + (void)saveDefaultRegion:(NSString *const)region 33 | { 34 | [[NSUserDefaults standardUserDefaults] setValue:region forKey:kKeyDefaultRegion]; 35 | } 36 | 37 | + (NSString *)getDefaultRegion 38 | { 39 | return [[NSUserDefaults standardUserDefaults] stringForKey:kKeyDefaultRegion]; 40 | } 41 | 42 | + (void)saveCreateAccountStatus:(const SMLRCreateAccountStatus)status 43 | { 44 | NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 45 | 46 | [defaults setInteger:status forKey:kKeyCreateAccountStatus]; 47 | 48 | [defaults synchronize]; 49 | } 50 | 51 | + (SMLRCreateAccountStatus)getCreateAccountStatus 52 | { 53 | return [[NSUserDefaults standardUserDefaults] integerForKey:kKeyCreateAccountStatus]; 54 | } 55 | 56 | + (BOOL)getReregisterNextStart 57 | { 58 | return [[NSUserDefaults standardUserDefaults] boolForKey:kKeyReregisterNextStart]; 59 | } 60 | 61 | + (BOOL)getLogEnabled 62 | { 63 | return [[NSUserDefaults standardUserDefaults] boolForKey:kKeyLogEnabled]; 64 | } 65 | 66 | + (void)resetReportBugNextStart 67 | { 68 | [[NSUserDefaults standardUserDefaults] setBool:NO forKey:kKeyReportBugNextStart]; 69 | } 70 | 71 | + (BOOL)getReportBugNextStart 72 | { 73 | return [[NSUserDefaults standardUserDefaults] boolForKey:kKeyReportBugNextStart]; 74 | } 75 | 76 | 77 | + (void)reset 78 | { 79 | [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:[[NSBundle mainBundle] bundleIdentifier]]; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCredentials.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRCredentials.h" 22 | 23 | #import "SMLRKeychain.h" 24 | #import "SMLRServerSettings.h" 25 | 26 | #include 27 | 28 | @implementation SMLRCredentials 29 | 30 | static NSString *const kKeyTelephoneNumber = @"telephoneNumber"; 31 | static NSString *const kKeySimlarId = @"simlarId"; 32 | static NSString *const kKeyPassword = @"password"; 33 | 34 | 35 | + (BOOL)saveWithTelephoneNumber:(NSString *const)telephoneNumber simlarId:(NSString *const)simlarId password:(NSString *const)password 36 | { 37 | return [SMLRKeychain storeWithKey:kKeyTelephoneNumber value:telephoneNumber] && 38 | [SMLRKeychain storeWithKey:kKeySimlarId value:simlarId] && 39 | [SMLRKeychain storeWithKey:kKeyPassword value:password]; 40 | } 41 | 42 | + (NSString *)getTelephoneNumber 43 | { 44 | return [SMLRKeychain getWithKey:kKeyTelephoneNumber]; 45 | } 46 | 47 | + (NSString *)getSimlarId 48 | { 49 | return [SMLRKeychain getWithKey:kKeySimlarId]; 50 | } 51 | 52 | + (NSString *)getPassword 53 | { 54 | return [SMLRKeychain getWithKey:kKeyPassword]; 55 | } 56 | 57 | + (NSString *)getPasswordHash 58 | { 59 | // kamailio password hash md5(username:realm:password) 60 | return [self md5:[NSString stringWithFormat:@"%@:%@:%@", [self getSimlarId], SIMLAR_DOMAIN, [self getPassword]]]; 61 | } 62 | 63 | + (BOOL)isInitialized 64 | { 65 | return [[self getSimlarId] length] > 0 && [[self getPassword] length] > 0 && [[self getTelephoneNumber] length] > 0; 66 | } 67 | 68 | + (void) delete 69 | { 70 | [SMLRKeychain deleteWithKey:kKeyTelephoneNumber]; 71 | [SMLRKeychain deleteWithKey:kKeySimlarId]; 72 | [SMLRKeychain deleteWithKey:kKeyPassword]; 73 | } 74 | 75 | + (NSString *)md5:(NSString *const)string 76 | { 77 | const char *cString = [string UTF8String]; 78 | unsigned char hash[CC_MD5_DIGEST_LENGTH]; 79 | CC_MD5(cString, (CC_LONG)strlen(cString), hash); 80 | 81 | /// convert to hex format 82 | NSMutableString *const retval = [NSMutableString string]; 83 | for (int i = 0; i < CC_MD5_DIGEST_LENGTH; i++) { 84 | [retval appendFormat:@"%02x", hash[i]]; 85 | } 86 | 87 | return retval; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /Simlar/src/SMLRMissedCallUserNotification.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 - 2016 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRMissedCallUserNotification.h" 22 | 23 | #import "SMLRContact.h" 24 | #import "SMLRLog.h" 25 | 26 | #import 27 | 28 | @implementation SMLRMissedCallUserNotification 29 | 30 | static NSString *const kCategoryIdentifier = @"MISSED_CALL_CATEGORY"; 31 | static NSString *const kRequestIdentifier = @"MISSED_CALL_REQUEST"; 32 | static NSString *const kActionIdentifierCall = @"CALL_MISSED_CALL"; 33 | 34 | + (UNNotificationCategory *)createCategory 35 | { 36 | UNNotificationAction *const actionCall = [UNNotificationAction actionWithIdentifier:kActionIdentifierCall 37 | title:@"Call back" 38 | options:UNNotificationActionOptionForeground]; 39 | 40 | return [UNNotificationCategory categoryWithIdentifier:kCategoryIdentifier 41 | actions:@[actionCall] 42 | intentIdentifiers:@[] 43 | options:UNNotificationCategoryOptionNone]; 44 | } 45 | 46 | + (void)presentWithContact:(SMLRContact *const)contact 47 | { 48 | SMLRLogI(@"showing missed call notification"); 49 | 50 | UNMutableNotificationContent *const content = [[UNMutableNotificationContent alloc] init]; 51 | content.body = [NSString stringWithFormat:@"%@ tried to call you", contact.name]; 52 | content.userInfo = contact.toDictonary; 53 | content.categoryIdentifier = kCategoryIdentifier; 54 | 55 | UNNotificationRequest *const notificationRequest = [UNNotificationRequest requestWithIdentifier:kRequestIdentifier content:content trigger:nil]; 56 | [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:notificationRequest 57 | withCompletionHandler:^(NSError *const _Nullable error) { 58 | if (error != nil) { 59 | SMLRLogE(@"Error while requesting missed call UserNotification: %@", error); 60 | } else { 61 | SMLRLogI(@"requested missed call UserNotification"); 62 | } 63 | }]; 64 | } 65 | 66 | + (BOOL)isActionCall:(UNNotificationResponse *const)response 67 | { 68 | return [response.actionIdentifier isEqualToString:kActionIdentifierCall]; 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Simlar/src/SMLRAesUtil.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2020 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRAesUtil.h" 22 | 23 | #import "SMLRLog.h" 24 | 25 | #import 26 | #import 27 | 28 | @implementation SMLRAesUtil 29 | 30 | + (NSData *)sha256:(NSString *const)input 31 | { 32 | NSData *const inputData = [input dataUsingEncoding:NSUTF8StringEncoding]; 33 | NSMutableData *const sha256Data = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH]; 34 | CC_SHA256([inputData bytes], (CC_LONG)[inputData length], [sha256Data mutableBytes]); 35 | return sha256Data; 36 | } 37 | 38 | + (NSString *)decryptMessage:(NSString *const)message withInitializationVector:(NSString *const)initializationVector withPassword:(NSString *const)password 39 | { 40 | if ([message length] == 0 || [initializationVector length] == 0) { 41 | SMLRLogW(@"decryptMessage with invalid parameters: message=%@ initializationVector=%@", message, initializationVector); 42 | return @""; 43 | } 44 | 45 | NSData *const encryptedData = [[NSData alloc] initWithBase64EncodedString:message options:0]; 46 | const NSUInteger encryptedDataSize = [encryptedData length]; 47 | 48 | NSData *const ivData = [[NSData alloc] initWithBase64EncodedString:initializationVector options:0]; 49 | NSData *const keyData = [SMLRAesUtil sha256:password]; 50 | 51 | const size_t outputSize = encryptedDataSize + kCCBlockSizeAES128; 52 | void *const output = malloc(outputSize); 53 | 54 | size_t decryptedBytes = 0; 55 | const CCCryptorStatus cryptStatus = CCCrypt(kCCDecrypt, 56 | kCCAlgorithmAES128, 57 | kCCOptionPKCS7Padding, 58 | [keyData bytes], kCCKeySizeAES256, 59 | [ivData bytes], 60 | [encryptedData bytes], encryptedDataSize, 61 | output, outputSize, 62 | &decryptedBytes); 63 | 64 | if (cryptStatus == kCCSuccess) { 65 | return [[NSString alloc] initWithData:[NSData dataWithBytesNoCopy:output 66 | length:decryptedBytes 67 | freeWhenDone:YES] 68 | encoding:NSUTF8StringEncoding]; 69 | } 70 | 71 | SMLRLogW(@"unable to decrypt: message=%@ initializationVector=%@", message, initializationVector); 72 | free(output); 73 | return @""; 74 | } 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Simlar/src/SMLRSettingsChecker.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2017 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRSettingsChecker.h" 22 | 23 | #import "SMLRLog.h" 24 | #import "SMLRCredentials.h" 25 | #import "SMLRReportBug.h" 26 | #import "SMLRSettings.h" 27 | 28 | @implementation SMLRSettingsChecker 29 | 30 | + (void)checkStatus:(UIViewController *const)parentViewController completionHandler:(void (^)())handler 31 | { 32 | [SMLRReportBug checkAndReportBugWithViewController:parentViewController completionHandler:^{ 33 | [SMLRSettingsChecker checkCreateAccountStatus:parentViewController completionHandler:handler]; 34 | }]; 35 | } 36 | 37 | + (void)checkCreateAccountStatus:(UIViewController *const)parentViewController completionHandler:(void (^)())handler 38 | { 39 | SMLRLogFunc; 40 | NSString *const viewControllerName = [SMLRSettingsChecker getViewControllerNameBasedOnCreateAccountStatus]; 41 | if (viewControllerName != nil) { 42 | UIViewController *viewController = [[parentViewController storyboard] instantiateViewControllerWithIdentifier:viewControllerName]; 43 | [parentViewController presentViewController:viewController animated:NO completion:nil]; 44 | } else { 45 | if (handler != nil) { 46 | handler(); 47 | } 48 | } 49 | } 50 | 51 | + (NSString *)getViewControllerNameBasedOnCreateAccountStatus 52 | { 53 | if ([SMLRSettings getReregisterNextStart]) { 54 | SMLRLogI(@"user triggered reregistration => deleting credentials and settings => starting AgreeViewController"); 55 | [SMLRSettings reset]; 56 | [SMLRCredentials delete]; 57 | return @"SMLRAgreeViewController"; 58 | } 59 | 60 | switch ([SMLRSettings getCreateAccountStatus]) { 61 | case SMLRCreateAccountStatusSuccess: 62 | if (![SMLRCredentials isInitialized]) { 63 | SMLRLogE(@"CreateAccountStatusSuccess but simlarId or password not set => starting AgreeViewController"); 64 | return @"SMLRAgreeViewController"; 65 | } 66 | SMLRLogI(@"CreateAccountStatusSuccess"); 67 | return nil; 68 | case SMLRCreateAccountStatusWaitingForSms: 69 | SMLRLogI(@"CreateAccountStatusWaitingForSms => starting CreateAccountViewController"); 70 | return @"SMLRCreateAccountViewController"; 71 | case SMLRCreateAccountStatusAgreed: 72 | SMLRLogI(@"CreateAccountStatusAgreed => starting VerifyNumberViewController"); 73 | return @"SMLRVerifyNumberViewController"; 74 | case SMLRCreateAccountStatusNone: 75 | default: 76 | SMLRLogI(@"CreateAccountStatusNone => starting AgreeViewController"); 77 | return @"SMLRAgreeViewController"; 78 | } 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Simlar/src/SMLRCallStatus.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRCallStatus.h" 22 | 23 | #import "SMLRLog.h" 24 | 25 | @implementation SMLRCallStatus 26 | 27 | - (instancetype)initWithStatus:(const SMLRCallStatusEnum)status 28 | { 29 | if (status == SMLRCallStatusEnded) { 30 | SMLRLogE(@"Error: use initWithEndReason"); 31 | return nil; 32 | } 33 | 34 | return [self initWithStatus:status 35 | endReason:nil 36 | wantsDismiss:NO]; 37 | } 38 | 39 | - (instancetype)initWithEndReason:(NSString *const)reason wantsDismiss:(const BOOL)wantsDismiss 40 | { 41 | return [self initWithStatus:SMLRCallStatusEnded 42 | endReason:reason 43 | wantsDismiss:wantsDismiss]; 44 | } 45 | 46 | - (instancetype)initWithStatus:(const SMLRCallStatusEnum)status endReason:(NSString *const)reason wantsDismiss:(const BOOL)wantsDismiss 47 | { 48 | self = [super init]; 49 | if (self == nil) { 50 | SMLRLogE(@"unable to create SMLRCallStatus"); 51 | return nil; 52 | } 53 | 54 | _enumValue = status; 55 | _endReason = reason; 56 | _wantsDismiss = wantsDismiss; 57 | 58 | return self; 59 | } 60 | 61 | - (BOOL)isEqualToCallStatus:(SMLRCallStatus *const)callStatus 62 | { 63 | return _enumValue == callStatus.enumValue && 64 | _wantsDismiss == callStatus.wantsDismiss && 65 | ((_endReason == nil && callStatus.endReason == nil) || [_endReason isEqualToString:callStatus.endReason]); 66 | } 67 | 68 | - (NSString *)description 69 | { 70 | switch (_enumValue) { 71 | case SMLRCallStatusNone: return @"NONE"; 72 | case SMLRCallStatusConnectingToServer: return @"CONNECTING_TO_SERVER"; 73 | case SMLRCallStatusWaitingForContact: return @"WAITING_FOR_CONTACT"; 74 | case SMLRCallStatusRemoteRinging: return @"REMOTE RINGING"; 75 | case SMLRCallStatusIncomingCall: return @"INCOMING CALL"; 76 | case SMLRCallStatusEncrypting: return @"ENCRYPTING"; 77 | case SMLRCallStatusTalking: return @"TALKING"; 78 | case SMLRCallStatusEnded: return @"ENDED"; 79 | } 80 | } 81 | 82 | - (NSString *)guiText 83 | { 84 | switch (_enumValue) { 85 | case SMLRCallStatusNone: return @""; 86 | case SMLRCallStatusConnectingToServer: return @"Connecting to server..."; 87 | case SMLRCallStatusWaitingForContact: return @"Waiting for contact..."; 88 | case SMLRCallStatusRemoteRinging: return @"Ringing..."; 89 | case SMLRCallStatusIncomingCall: return @"is calling you..."; 90 | case SMLRCallStatusEncrypting: return @"Encrypting..."; 91 | case SMLRCallStatusTalking: return @"Talking..."; 92 | case SMLRCallStatusEnded: return @"Call ended"; 93 | } 94 | } 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /Simlar/src/SMLRPhoneNumber.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRPhoneNumber.h" 22 | 23 | #import "SMLRLog.h" 24 | #import "SMLRStringCategory.h" 25 | #import "SMLRSettings.h" 26 | 27 | #import "NBMetadataHelper.h" 28 | #import "NBPhoneNumberUtil.h" 29 | 30 | @interface SMLRPhoneNumber () 31 | 32 | @property (nonatomic, readonly) NBPhoneNumber *phoneNumber; 33 | 34 | @end 35 | 36 | @implementation SMLRPhoneNumber 37 | 38 | - (instancetype)initWithNumber:(NSString *const)number 39 | { 40 | self = [super init]; 41 | if (self == nil) { 42 | SMLRLogE(@"unable to create SMLRPhoneNumber"); 43 | return nil; 44 | } 45 | 46 | NSError *error = nil; 47 | _phoneNumber = [[NBPhoneNumberUtil sharedInstance] parse:number defaultRegion:[SMLRSettings getDefaultRegion] error:&error]; 48 | 49 | if (error != nil) { 50 | SMLRLogI(@"unparsable telephone number=%@ error=%@", number, error); 51 | return nil; 52 | } 53 | 54 | return self; 55 | } 56 | 57 | - (BOOL)isValid 58 | { 59 | return [[NBPhoneNumberUtil sharedInstance] isValidNumber:_phoneNumber]; 60 | } 61 | 62 | - (NSString *)getRegistrationNumber 63 | { 64 | return [[NBPhoneNumberUtil sharedInstance] format:_phoneNumber numberFormat:NBEPhoneNumberFormatE164 error:nil]; 65 | } 66 | 67 | - (NSString *)getGuiNumber 68 | { 69 | return [[NBPhoneNumberUtil sharedInstance] format:_phoneNumber numberFormat:NBEPhoneNumberFormatINTERNATIONAL error:nil]; 70 | } 71 | 72 | - (NSString *)getSimlarId 73 | { 74 | NBPhoneNumberUtil *const util = [NBPhoneNumberUtil sharedInstance]; 75 | return [NSString stringWithFormat:@"*%@%@*", 76 | [util getCountryCodeForRegion:[util getRegionCodeForNumber:_phoneNumber]], 77 | [util getNationalSignificantNumber:_phoneNumber]]; 78 | } 79 | 80 | + (NSString *)getRegionWithNumber:(NSString *)countryNumber 81 | { 82 | return [[NBPhoneNumberUtil sharedInstance] getRegionCodeForCountryCode:@([countryNumber intValue])]; 83 | } 84 | 85 | + (BOOL)isSimlarId:(NSString *const)simlarId 86 | { 87 | return [simlarId matchesPattern:@"^\\*\\d+\\*$"]; 88 | } 89 | 90 | + (NSString *)getCountryNumberBasedOnCurrentLocale 91 | { 92 | return [[[NBPhoneNumberUtil sharedInstance] getCountryCodeForRegion:[NSLocale.currentLocale objectForKey:NSLocaleCountryCode]] stringValue]; 93 | } 94 | 95 | + (NSArray *)getAllSupportedCountryNumbers 96 | { 97 | NSMutableOrderedSet *const supportedCountryNumbers = [NSMutableOrderedSet orderedSet]; 98 | 99 | for (NSDictionary *const data in [[[NBMetadataHelper alloc] init] getAllMetadata]) { 100 | [supportedCountryNumbers addObject:[[NBPhoneNumberUtil sharedInstance] getCountryCodeForRegion:data[@"code"]]]; 101 | } 102 | 103 | [supportedCountryNumbers sortUsingComparator:^NSComparisonResult(NSNumber *const obj1, NSNumber *const obj2) { 104 | return [obj1 compare:obj2]; 105 | }]; 106 | 107 | return [supportedCountryNumbers array]; 108 | } 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /Simlar.xcodeproj/xcuserdata/bensartor.xcuserdatad/xcschemes/Simlar.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 63 | 69 | 70 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Simlar/src/SMLRContact.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRContact.h" 22 | 23 | #import "SMLRLog.h" 24 | #import "SMLRPhoneNumber.h" 25 | 26 | #import 27 | 28 | @implementation SMLRContact 29 | 30 | static NSString *const kSimlarId = @"CONTACT_SIMLAR_ID"; 31 | static NSString *const kGuiTelephoneNumber = @"CONTACT_GUI_TELEPHONE_NUMBER"; 32 | static NSString *const kName = @"CONTACT_NAME"; 33 | 34 | - (instancetype)initWithSimlarId:(NSString *const)simlarId guiTelephoneNumber:(NSString *const)guiTelephoneNumber name:(NSString *const)name 35 | { 36 | self = [super init]; 37 | if (self == nil) { 38 | SMLRLogE(@"unable to create SMLRContact"); 39 | return nil; 40 | } 41 | 42 | if ([simlarId length] == 0) { 43 | SMLRLogE(@"Error contact with no simlarId"); 44 | } 45 | _simlarId = simlarId; 46 | _guiTelephoneNumber = [guiTelephoneNumber length] > 0 ? guiTelephoneNumber : simlarId; 47 | _name = [name length] > 0 ? name : _guiTelephoneNumber; 48 | _registered = NO; 49 | 50 | return self; 51 | } 52 | 53 | - (instancetype)initWithSimlarId:(NSString *const)simlarId 54 | { 55 | return [self initWithSimlarId:simlarId 56 | guiTelephoneNumber:simlarId 57 | name:simlarId]; 58 | } 59 | 60 | - (instancetype)initWithDictionary:(NSDictionary *const)dictonary 61 | { 62 | if ([[dictonary objectForKey:kSimlarId] length] == 0) { 63 | return nil; 64 | } 65 | 66 | return [self initWithSimlarId:[dictonary objectForKey:kSimlarId] 67 | guiTelephoneNumber:[dictonary objectForKey:kGuiTelephoneNumber] 68 | name:[dictonary objectForKey:kName]]; 69 | } 70 | 71 | - (instancetype)initWithContact:(CNContact *const)contact phoneNumber:(NSString *const)phoneNumber 72 | { 73 | if ([phoneNumber length] <= 0) { 74 | return nil; 75 | } 76 | 77 | NSString *const name = [CNContactFormatter stringFromContact:contact style:CNContactFormatterStyleFullName]; 78 | 79 | if ([SMLRPhoneNumber isSimlarId:phoneNumber]) { 80 | return [self initWithSimlarId:phoneNumber 81 | guiTelephoneNumber:phoneNumber 82 | name:name]; 83 | } 84 | 85 | SMLRPhoneNumber *const smlrPhoneNumber = [[SMLRPhoneNumber alloc] initWithNumber:phoneNumber]; 86 | if (!smlrPhoneNumber) { 87 | return nil; 88 | } 89 | 90 | return [self initWithSimlarId:[smlrPhoneNumber getSimlarId] 91 | guiTelephoneNumber:[smlrPhoneNumber getGuiNumber] 92 | name:name]; 93 | } 94 | 95 | - (NSString *)toString 96 | { 97 | return [NSString stringWithFormat:@"name='%@' simlarId='%@' number='%@'", _name, _simlarId, _guiTelephoneNumber]; 98 | } 99 | 100 | - (NSDictionary *)toDictonary 101 | { 102 | return @{ 103 | kSimlarId: _simlarId, 104 | kGuiTelephoneNumber: _guiTelephoneNumber, 105 | kName: _name 106 | }; 107 | } 108 | 109 | @end 110 | -------------------------------------------------------------------------------- /Simlar/src/SMLRUploadLogFile.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRUploadLogFile.h" 22 | 23 | #import "SMLRCredentials.h" 24 | #import "SMLRHttpsPost.h" 25 | #import "SMLRLog.h" 26 | #import "SMLRStringCategory.h" 27 | 28 | @implementation SMLRUploadLogFile 29 | 30 | static NSString *const kCommand = @"upload-logfile.php"; 31 | static NSString *const kDataBoundary = @"*****"; 32 | static NSString *const kLineEnd = @"\r\n"; 33 | static NSString *const kTwoHyphens = @"--"; 34 | 35 | + (NSString *)createRemoteFileName 36 | { 37 | NSDateFormatter *const dateFormatter = [[NSDateFormatter alloc] init]; 38 | [dateFormatter setDateFormat:@"yyyy-MM-dd_HHmmss"]; 39 | NSString *const currentDate = [dateFormatter stringFromDate:[[NSDate alloc] init]]; 40 | 41 | return [NSString stringWithFormat:@"simlar_%@_%@.log", [SMLRCredentials getSimlarId], currentDate]; 42 | } 43 | 44 | + (NSString *)readLogFile 45 | { 46 | NSString *const filePath = [SMLRLog getLogFilePath]; 47 | SMLRLogI(@"Uploading logfile: %@", filePath); 48 | return [[NSString alloc] initWithData:[NSData dataWithContentsOfFile:filePath] encoding:NSUTF8StringEncoding]; 49 | } 50 | 51 | + (void)uploadWithCompletionHandler:(void (^)(NSString *const logFileName, NSError *const error))handler 52 | { 53 | SMLRLogFunc; 54 | 55 | NSString *const logFileContent = [self readLogFile]; 56 | if ([logFileContent length] == 0) { 57 | SMLRLogE(@"Error: no log file content found"); 58 | handler(nil, [NSError errorWithDomain:@"org.simlar.uploadLogFile" code:3 userInfo:@{ NSLocalizedDescriptionKey:@"No log file content found" }]); 59 | return; 60 | } 61 | 62 | NSString *const remoteFileName = [self createRemoteFileName]; 63 | 64 | NSData *const body = [[NSString stringWithFormat:@"%@%@%@%@%@", 65 | [NSString stringWithFormat:@"%@%@%@", kTwoHyphens, kDataBoundary, kLineEnd], 66 | [NSString stringWithFormat:@"Content-Disposition: form-data; name=\"file\";filename=\"%@\"", remoteFileName], 67 | [NSString stringWithFormat:@"%@%@", kLineEnd, kLineEnd], 68 | logFileContent, 69 | [NSString stringWithFormat:@"%@%@%@%@%@", kLineEnd, kTwoHyphens, kDataBoundary, kTwoHyphens, kLineEnd] 70 | ] dataUsingEncoding:NSUTF8StringEncoding]; 71 | 72 | NSString *const contentType = [NSString stringWithFormat:@"multipart/form-data;boundary=%@", kDataBoundary]; 73 | 74 | [SMLRHttpsPost postAsynchronousCommand:kCommand contentType:contentType body:body completionHandler:^(NSData *const data, NSError *const connectionError) { 75 | if (connectionError != nil) { 76 | SMLRLogW(@"Connection Error while uploading logfile: %@", connectionError); 77 | handler(nil, connectionError); 78 | return; 79 | } 80 | 81 | NSString *const response = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 82 | if (![response matchesPattern:@"^OK \\d+$"]) { 83 | SMLRLogE(@"Error in response of log file upload: %@", response); 84 | handler(nil, [NSError errorWithDomain:@"org.simlar.uploadLogFile" code:2 userInfo:@{ NSLocalizedDescriptionKey :response }]); 85 | return; 86 | } 87 | 88 | SMLRLogI(@"uploaded log file successfully"); 89 | handler(remoteFileName, nil); 90 | }]; 91 | } 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /Simlar/src/SMLRKeychain.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2014 The Simlar Authors. 3 | * 4 | * This file is part of Simlar. (https://www.simlar.org) 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License 8 | * as published by the Free Software Foundation; either version 2 9 | * of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #import "SMLRKeychain.h" 22 | 23 | #import "SMLRLog.h" 24 | 25 | #import 26 | 27 | @implementation SMLRKeychain 28 | 29 | static NSString *const kServiceName = @"org.simlar"; 30 | 31 | + (BOOL)storeWithKey:(NSString *const)key value:(NSString *const)value 32 | { 33 | if ([key length] == 0) { 34 | SMLRLogE(@"No key given"); 35 | return NO; 36 | } 37 | 38 | if ([value length] == 0) { 39 | SMLRLogE(@"No value given with key=%@", key); 40 | return NO; 41 | } 42 | 43 | NSMutableDictionary *const searchDictionary = [self createSearchDictionaryWithKey:key]; 44 | NSData *const data = [value dataUsingEncoding:NSUTF8StringEncoding]; 45 | searchDictionary[(__bridge id)kSecValueData] = data; 46 | 47 | // Access the entry only if the device was unlocked at least once. 48 | searchDictionary[(__bridge id)kSecAttrAccessible] = (__bridge id)kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly; 49 | 50 | const OSStatus status = SecItemAdd((__bridge CFDictionaryRef)searchDictionary, NULL); 51 | if (status == errSecSuccess) { 52 | return YES; 53 | } 54 | 55 | if (status == errSecDuplicateItem) { 56 | // Update entry 57 | NSMutableDictionary *const updateDictionary = [[NSMutableDictionary alloc] init]; 58 | updateDictionary[(__bridge id)kSecValueData] = data; 59 | 60 | const OSStatus updateStatus = SecItemUpdate((__bridge CFDictionaryRef)searchDictionary, 61 | (__bridge CFDictionaryRef)updateDictionary); 62 | 63 | return (updateStatus == errSecSuccess) ? YES : NO; 64 | } 65 | 66 | return NO; 67 | } 68 | 69 | + (NSString *)getWithKey:(NSString *const)key 70 | { 71 | if ([key length] == 0) { 72 | SMLRLogE(@"No key given"); 73 | return nil; 74 | } 75 | 76 | NSMutableDictionary *const searchDictionary = [self createSearchDictionaryWithKey:key]; 77 | searchDictionary[(__bridge id)kSecMatchLimit] = (__bridge id)kSecMatchLimitOne; 78 | searchDictionary[(__bridge id)kSecReturnData] = (__bridge id)kCFBooleanTrue; 79 | 80 | CFTypeRef foundData = NULL; 81 | const OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)searchDictionary, &foundData); 82 | 83 | if (status != noErr) { 84 | return nil; 85 | } 86 | 87 | NSData *const data = (__bridge_transfer NSData *)foundData; 88 | return (data == nil) ? nil : [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 89 | } 90 | 91 | + (void)deleteWithKey:(NSString *const)key 92 | { 93 | if ([key length] == 0) { 94 | SMLRLogE(@"No key given"); 95 | return; 96 | } 97 | 98 | SecItemDelete((__bridge CFDictionaryRef)[self createSearchDictionaryWithKey : key]); 99 | } 100 | 101 | + (NSMutableDictionary *)createSearchDictionaryWithKey:(NSString *const)key 102 | { 103 | NSData *const encodedKey = [key dataUsingEncoding:NSUTF8StringEncoding]; 104 | NSMutableDictionary *const searchDictionary = [[NSMutableDictionary alloc] init]; 105 | searchDictionary[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword; 106 | searchDictionary[(__bridge id)kSecAttrService] = kServiceName; 107 | searchDictionary[(__bridge id)kSecAttrGeneric] = encodedKey; 108 | searchDictionary[(__bridge id)kSecAttrAccount] = encodedKey; 109 | 110 | return searchDictionary; 111 | } 112 | 113 | @end 114 | --------------------------------------------------------------------------------