{"id":22356198,"url":"https://github.com/bioid-gmbh/bioidcapture-ios","last_synced_at":"2025-10-14T22:31:03.778Z","repository":{"id":261445324,"uuid":"871177435","full_name":"BioID-GmbH/BioIDCapture-iOS","owner":"BioID-GmbH","description":"BWS 3: Client App iOS for Face Liveness Detection (Passive \u0026 Active liveness detection \u0026 Challenge Response) and Photo ID Verification","archived":false,"fork":false,"pushed_at":"2025-03-04T17:18:32.000Z","size":521,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-07T14:51:25.902Z","etag":null,"topics":["active-liveness-detection","anti-spoofing","biometrics","bws-3","challenge-response","deepfake-detection","face-liveness-detection","face-recognition","ios","liveness-detection","mask-attack","passive-liveness-detection","presentation-attack-detection","replay-attack"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BioID-GmbH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T12:28:16.000Z","updated_at":"2025-03-04T17:18:36.000Z","dependencies_parsed_at":"2025-03-04T18:23:05.421Z","dependency_job_id":"0d3f0eb2-1e31-4b89-962c-f8dfe6d15886","html_url":"https://github.com/BioID-GmbH/BioIDCapture-iOS","commit_stats":null,"previous_names":["bioid-gmbh/bioidcapture-ios"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BioID-GmbH/BioIDCapture-iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBioIDCapture-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBioIDCapture-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBioIDCapture-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBioIDCapture-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BioID-GmbH","download_url":"https://codeload.github.com/BioID-GmbH/BioIDCapture-iOS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBioIDCapture-iOS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021785,"owners_count":26087056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["active-liveness-detection","anti-spoofing","biometrics","bws-3","challenge-response","deepfake-detection","face-liveness-detection","face-recognition","ios","liveness-detection","mask-attack","passive-liveness-detection","presentation-attack-detection","replay-attack"],"created_at":"2024-12-04T14:09:30.926Z","updated_at":"2025-10-14T22:31:03.251Z","avatar_url":"https://github.com/BioID-GmbH.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BioIDCapture iOS App: Liveness Detection \u0026 ID photo verification\n\n## Overview\n\nThe **BioIDCapture** project demonstrates how to capture images on iOS/iPadOS or macOS and send these images to a server via RESTful API.\nOn GitHub, we offer two different “BioID RestGrpcForwarder” server implementations that accept RESTful API calls and forward them to our BWS 3 gRPC endpoint.\n\nA basic distinction must be made between the recording of a single image and generating 2 images during a live recording.\n\n[BioID Liveness Detection][DevLivenessDetection] supports different variants of execution, depending on the number of live images and the tags provided in the call.\nAlso refer to the [Liveness Detection Modes][DevLivenessModes].\n\n**One image**: Only passive liveness detection will be performed.\n\n**Two images**: Passive and active liveness detection will be performed. Beside of the texture based liveness detection on each of the provided \nimages a motion based 3D detection on each two consecutive images is executed. All decisions must indicate a live person to finally declare the entire call as live.\n\n**Two images with tagged second image**: Passive and active liveness detection will be performed. Additionally a challenge-response mechanism \nis applied. As we have a motion direction calculated for the face found in the second image, we can check whether this is the same direction as \ndemanded by the tags, i.e. whether the head moved up, down, left or right as requested. \n\n\n## Technologies\n\n- iOS/iPadOS 12\n- Mac Catalyst 14.2\n- RESTful\n- Objective-C \n- No Third-party libraries\n\n\n## Get Started\n\nFirst of all, you can build and run this application immediately to try out the different image capture workflows available. \n\nIf you want to send the images to the BioID Web Service 3, you need the BioID RestGrpcForwarder project. You can use the GitHub repositories \n[BWSClient-RestGrpc-CSharp][RepoRestGrpcCSharp] or [BWSClient-RestGrpc-Java][RepoRestGrpcJava].\n\nThe iOS app sends the data to the RestGrpcForwarder via a RESTful call. The server is designed to receive requests from REST endpoints and forward them to gRPC services.\n\nPlease follow the instruction in the server repository to configure and start the server.\n\nThe communication between app and RESTGrpcForwarder server works with the API authentication `ApiKey`.\nThe values for the app and the server are already set by default and can be changed if required.\n\nYou must make the following settings in the `BWS3Settings.m` file in order to access the server:\n- `BWS3_REST_GRPC_ENDPOINT`\n\n\u003e ### NOTE \n\u003e Depending on where the server is started, the URL is different. For example, you can make the server publicly available with TLS (different port than without TLS).\n\u003e \n\u003e Or you can host the server directly on the macOS system on which the application is started. For this use case, start the code as a macOS app (Mac Catalyst). The server can then be accessed via http://localhost:5226 (default value).\n\n## How the app works\nThe app offers 4 different biometric functions.\n\n### Passive Liveness Detection\nThe simplest implementation is [Passive Liveness Detection][DevLivenessDetection]. \nFor this, the standard camera controller `UIImagePickerController` is used to capture exactly one live image. \nAfter tapping 'Use Photo', the image is displayed in the image viewer of the controller. \nYou can then send this image to the RestGrpcForwarder. \n\nTo prepare the image data for the request, the BioIDHelper class offers some useful functions. \n\nFirst, use the function `resizeImageForUpload` before sending. \nThen you can use the BioIDHelper function `createJSONRequestBody` to prepare the image data for the request.\n\n\n### Active Liveness Detection\nThe ViewController for [Active Liveness Detection][DevLivenessDetection] uses the BioIDCaptureViewController. \nThe BioIDCaptureViewController uses the live camera and captures the first image. A second image is triggered by Motion Detection. Both images are returned to the ActiveViewController.\n\n[More details about the BioIDCaptureViewController.](BioIDCaptureViewController.md) \n\n\n### Challenge Response\nThe ViewController for [Challenge Response][DevLivenessDetection] uses the BioIDCaptureViewController. \nIn contrast to active liveness detection, a challenge-response mechanism is also used. \nFor this purpose, a `challengeTag` is passed to the BioIDCaptureViewController during initialization. \n\nPossible challenges can be to move the head `up`, `down`, `left` or `right`.\n\nIn the BioIDCaptureViewController, “Follow the blue head” appears as a prompt to the user. \nWhen capturing, the first image is taken and the second image is also triggered with motion detection. \n\nThe BioID Web Service can now check whether the user has performed the same movement that was previously defined.\n\n[More details about the BioIDCaptureViewController.](BioIDCaptureViewController.md) \n\n### PhotoVerify\n\n[PhotoVerify][DevPhotoVerify] is a service, which uses one photo, e.g. a passport image from an ID document, and compares that to one or \ntwo \"live\" images of a person, to find out whether the persons shown are the same. \n\nThe ViewController for PhotoVerify can use either the standard `UIImagePickerController` (for Passive Liveness Detection) \nor the BioIDCaptureViewController (for Active Liveness Detection). \nThe `UIImagePickerController` is also used for capturing the ID photo e.g. passport image. \n\n[More details about the BioIDCaptureViewController.](BioIDCaptureViewController.md) \n\n### Network Data Transfer\n\nThe NSURLSession object checks the [`HTTP Status Codes`][DevLivenessDetection] and evaluates the response from the BioID Web Service and displays it in the ResultViewController.\n\n\n[DevLivenessDetection]: https://developer.bioid.com/bws/restful/livenessdetection \"BioID LivenessDetection - developer.bioid.com\" \n[DevPhotoVerify]: https://developer.bioid.com/bws/restful/photoverify \"BioID PhotoVerify - developer.bioid.com\"\n[DevLivenessModes]: https://developer.bioid.com/bws/livenessmodes \"BioID Liveness Detection Modes - developer.bioi.com\"\n[RepoRestGrpcCSharp]: https://github.com/BioID-GmbH/BWSClient-RestGrpc-CSharp \"GitHub Repository BWSClient-RestGrpc-CSharp\"\n[RepoRestGrpcJava]: https://github.com/BioID-GmbH/BWSClient-RestGrpc-Java  \"GitHub Repository BWSClient-RestGrpc-Java\"\n[ArticleLocalHostAndiPhone]: https://ishwar-rimal.medium.com/accessing-macs-localhost-on-your-iphone-5d564a387f09 \"Accessing your macbook's localhost on your iPhone\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioid-gmbh%2Fbioidcapture-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbioid-gmbh%2Fbioidcapture-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioid-gmbh%2Fbioidcapture-ios/lists"}