{"id":2808,"date":"2026-04-05T13:59:00","date_gmt":"2026-04-05T13:59:00","guid":{"rendered":"https:\/\/adjoe.io\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/"},"modified":"2026-11-24T17:48:49","modified_gmt":"2026-11-24T17:48:49","slug":"prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest","status":"publish","type":"engineer_blog","link":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/","title":{"rendered":"Fighting fraud on iOS with Apple DeviceCheck"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We use Apple\u2019s DeviceCheck to ensure that users engaging with <a href=\"https:\/\/adjoe.io\/solutions\/advertise-your-app\/playtime\/\" target=\"_blank\" rel=\"noreferrer noopener\">adjoe&#8217;s technology<\/a> are genuine and not attempting to spoof activity or manipulate rewards.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This matters because once an iOS app is released, it can be reverse-engineered or modified to bypass ads, unlock premium features, or cheat in gameplay.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article gives an overview of the client-side protections we use to combat fraudulent behavior on iOS.\u00a0 We\u2019ll walk you through how we use Apple\u2019s DeviceCheck, both Device Identification and App Attest to verify real devices. You can detect manipulation and strengthen your iOS fraud defenses. Let\u2019s briefly cover DeviceCheck before diving into implementation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is DeviceCheck?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First introduced with iOS 11, it consists of a mobile framework and Apple server interface that&nbsp; developers need to access from their own server, which can make integration harder as it requires both client- and backend-side work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article provides code samples for both the client and the server, implemented in Swift; these samples can be used as a helpful starting point. You can download the whole source code<a href=\"https:\/\/github.com\/qstrnd\/DeviceCheck\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> here<\/a>. Refer to the README to set up the project locally. The code snippets used in this article are simplified excerpts from this sample project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DeviceCheck consists of two independent components:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A device identification mechanism, which enables developers to associate two bits of data with a particular device.<\/li>\n\n\n\n<li>App Attest, which allows for verifying an app\u2019s integrity, preventing access for compromised app instances.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Device identification<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can associate two bits of data with a particular device in a privacy-respectful way. It means there\u2019s no need to receive any identifiers that could expose a user\u2019s identity outside your apps, or Apple isn\u2019t aware of exactly how you use these bits.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s up to you to decide what those bits mean. Here are a few possible examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A free trial has been used on this device.<\/li>\n\n\n\n<li>The user has already received a promotional gift.<\/li>\n\n\n\n<li>Check if the same device has been used to register multiple accounts.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The bits are unique per device per Apple developer team. Meaning all your apps installed on a device will share the same bit of info.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Changing an account on the device or wiping the device\u2019s data won\u2019t reset the bits you associated with it. Users who resell their devices might as well transfer their data, so design your business logic accordingly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">How does it work?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The mechanism works through an encrypted token that must be generated on the device and should be communicated to your server. Here, Apple\u2019s DeviceCheck web API must be called with the token in the request. The article covers the integration in both the client and server code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s look into the integration in both the client and server code.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Register API Key to support DeviceCheck<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You need to provide the authentication key to interact with Apple\u2019s API. You can create that in<a href=\"https:\/\/developer.apple.com\/account\/resources\/authkeys\/list\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> Certificates, Identifiers &amp; Profiles<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On the page, click the Add button (+).<\/li>\n\n\n\n<li>Type in a name and optionally a description for your key.<\/li>\n\n\n\n<li>Select Key Services. You need to select at least DeviceCheck for this feature to work with the key.<\/li>\n\n\n\n<li>After confirming the configuration, download the key. It\u2019s saved as a .p8 file that can be opened with any text editor. Save it in a secure place, as you won\u2019t be able to re-download it.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" height=\"809\" width=\"1600\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2025\/12\/image-1.png\" alt=\"Prevent Fraud on iOS with Apple DeviceCheck and App Attest\n\" class=\"wp-image-2972\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Each HTTP request to Apple\u2019s server must include an authorization header.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The value of this header should be a Base 64 URL-encoded JSON web token (JWT). You can find the sample code to generate this token later in the article.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implement device identification on iOS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The client API to support this feature is simple. Take a look at the code snippet below.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">import DeviceCheck \/\/ 1\n\nif DCDevice.current.isSupported { \/\/ 2\n\n\u00a0\u00a0\u00a0\u00a0do {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0let tokenData = try await DCDevice.current.generateToken() \/\/ 3\n\n\u00a0\u00a0\u00a0\u00a0} catch {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ 4\n\n\u00a0\u00a0\u00a0\u00a0}\n\n} else {\n\n\u00a0\u00a0\u00a0\/\/ 5\n\n}<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">1. <strong>Import DeviceCheck<\/strong> to the files that use the API of this framework.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. <strong>Check if the API is available<\/strong>. Not every target or destination supports this API.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Xcode, a target is the specific product your project builds, such as an iOS\/iPadOS app, or app extensions (iMessage, App Intents, etc.).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A destination is the device or environment where the built target can run, such as a physical iPhone, iPad, Mac (via Mac Catalyst), or a simulator.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">According to <a href=\"https:\/\/developer.apple.com\/documentation\/devicecheck\/dcappattestservice\/issupported?utm_source=chatgpt.com\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Apple\u2019s documentation<\/a>, only iOS\/iPadOS app targets (excluding simulator and Mac Catalyst) and watchOS extension targets are supported for the DeviceCheck API.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. <strong>Generate the token data<\/strong>. This operation is performed locally and can succeed even without the internet. Note that the token is ephemeral and you shouldn\u2019t store it once it\u2019s sent to your server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. <strong>Handle potential errors<\/strong> through the <a href=\"https:\/\/developer.apple.com\/documentation\/devicecheck\/dcerror-swift.struct\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">DCError<\/a> type. For device identification, you may encounter either featureUnsupported or unknownSystemFailure. In the latter case, the recommended approach is to retry after some time and log the error for diagnostic purposes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5.<strong> Implement a fallback strategy<\/strong> if DeviceCheck is completely not supported. A recommendation from Apple is that you don\u2019t block the critical functionality of your app for such failures, but only possibly limit some sensitive features.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Send the token to your server once it\u2019s generated. Here\u2019s a simplified code snippet to send it in an HTTP request:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">struct DeviceCheckRequest: Codable { let deviceToken: String }\n\nlet body = try JSONEncoder().encode(DeviceCheckRequest(deviceToken: token.base64EncodedString()))\n\nvar req = URLRequest(url: URL(string: &quot;https:\/\/yourserver.com\/devicecheck\/verify&quot;)!)\n\nreq.setValue(&quot;application\/json; charset=utf-8&quot;, forHTTPHeaderField: &quot;Content-Type&quot;)\n\nreq.httpMethod = &quot;POST&quot;\n\nreq.httpBody = body\n\n_ = try await URLSession.shared.data(for: req)<\/code><\/pre>\n\t<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Implement device identification on the backend<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On your server, you should receive the token and provide it further to Apple\u2019s endpoints as HTTP Post commands.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are three endpoints available; they are well-explained in the<a href=\"https:\/\/developer.apple.com\/documentation\/devicecheck\/accessing-and-modifying-per-device-data\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> official documentation<\/a>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article only provides a general overview. Use the sample project to explore a possible server implementation with Swift and VAPOR.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For development, use the test base URL which is https:\/\/api.development.devicecheck.apple.com.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For production, use https:\/\/api.devicecheck.apple.com.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">JWT authentication<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before we start with the actual requests, it\u2019s important to understand the authentication mechanism for Apple\u2019s API endpoints which is<a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc7519\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> JSON web token (JWT)<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each request must include an authorization header containing the authentication key.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It must use the ES256 algorithm and be in the Base 64 URL\u2013encoded JSON web token format. Failure to provide the correct token will lead to the error BAD_AUTHENTICATION_TOKEN.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code samples below use<a href=\"https:\/\/github.com\/vapor\/jwt-kit\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> JWTKit<\/a> to generate a token.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a payload. You need to provide your<a href=\"https:\/\/developer.apple.com\/help\/glossary\/team-id\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> Team ID<\/a> as the Issuer (iss) and<a href=\"https:\/\/developer.apple.com\/help\/glossary\/bundle-id\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> Bundle ID<\/a> as the Subject (sub), as well as dates of issue and expiration of the token.<\/li>\n<\/ol>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">import Foundation\n\nimport JWT\n\nstruct AppleJWT: JWTPayload {\n\n\u00a0\u00a0\u00a0\u00a0let iss: IssuerClaim\u00a0 \u00a0 \u00a0 \u00a0 \/\/ Your Apple Team ID\n\n\u00a0\u00a0\u00a0\u00a0let iat: IssuedAtClaim\u00a0 \u00a0 \u00a0 \/\/ Token issued at\n\n\u00a0\u00a0\u00a0\u00a0let exp: ExpirationClaim\u00a0 \u00a0 \/\/ Token expiry\n\n\u00a0\u00a0\u00a0\u00a0let sub: SubjectClaim \u00a0 \u00a0 \u00a0 \/\/ Your App&#039;s bundle ID\n\n\u00a0\u00a0\u00a0\u00a0func verify(using signer: JWTSigner) throws {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0try exp.verifyNotExpired()\n\n\u00a0\u00a0\u00a0\u00a0}\n\n}\n\nlet now = Date()\n\nlet expiry = now.addingTimeInterval(10 * 60)\n\nlet teamId = &quot;YOUR_TEAM_ID&quot;\n\nlet bundleId = &quot;YOUR_BUNDLE_ID&quot;\n\n\/\/ Create JWT payload\n\nlet payload = AppleJWT(\n\n\u00a0\u00a0\u00a0\u00a0iss: IssuerClaim(value: teamId),\n\n\u00a0\u00a0\u00a0\u00a0iat: IssuedAtClaim(value: now),\n\n\u00a0\u00a0\u00a0\u00a0exp: ExpirationClaim(value: expiry),\n\n\u00a0\u00a0\u00a0\u00a0sub: SubjectClaim(value: bundleId)\n\n)<\/code><\/pre>\n\t<\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create headers. Include your<a href=\"https:\/\/developer.apple.com\/help\/account\/keys\/get-a-key-identifier\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> Key ID<\/a> that you created earlier:<\/li>\n<\/ol>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">let keyId = &quot;YOUR_KEY_ID&quot;\n\nvar headers = JWTHeader()\n\nheaders.kid = JWKIdentifier(string: keyId)<\/code><\/pre>\n\t<\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a signer using the private key you obtained earlier and specify ES256 encryption. Then generate a JWT with the payloads and headers created above.<\/li>\n<\/ol>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">let privateKey = &quot;YOUR_PRIVATE KEY&quot;\n\nlet signer = try JWTSigner.es256(privateKey: Data(privateKey.utf8))\n\nlet jwt = try signer.sign(payload, headers: headers)\n\nInclude the generated token in the following header in all your HTTP requests to Apple&#039;s API endpoints:\n\nauthorization: bearer &lt;TOKEN&gt;<\/code><\/pre>\n\t<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">DeviceCheck API endpoints<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">1. Query the bits<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The request allows you to receive the bits associated with a given token.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Share the device token along with a transaction ID that your server should generate and a timestamp. You must provide the last two fields as that\u2019s how Apple implements its infrastructure to process developers\u2019 API requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s flexibility in how you generate the transaction ID: some teams debate whether to reuse the same ID for all requests associated with a given token or to generate a new one for each call.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In practice, Apple doesn\u2019t enforce a specific approach, so you can choose whichever strategy best fits your system\u2019s design.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s an example of a payload for the request which you send to the path v1\/query_two_bits:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">{\n\n\u00a0\u00a0\u00a0\u00a0&quot;device_token&quot; : &quot;wlkCDA2Hy\/CfrMqVAShs1BAR\/0sAiuRIUm5jQg0a...&quot;,\n\n\u00a0\u00a0\u00a0\u00a0&quot;transaction_id&quot; : &quot;5b737ca6-a4c7-488e-b928-8452960c4be9&quot;,\n\n\u00a0\u00a0\u00a0\u00a0&quot;timestamp&quot; : 1487716472000\n\n}\n\nAnd that&#039;s the response you&#039;d expect:\n\n{\n\n&quot;bit0&quot;: false,\n\n&quot;bit1&quot;: false,\n\n&quot;last_update_time&quot;: &quot;2025-10&quot;\n\n}<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Pay attention that the value format for the field last_update_time is YYYY_MM, is different from the timestamp you must provide in the request. It should be UTC timestamp in milliseconds since the Unix epoch.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the bits have never been updated for the provided device token, you\u2019ll get a 200 status code response and the following string body:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Failed to find bit state<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Update the bits<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The request to update the bits (v1\/update_two_bits) is very similar and only contains the bit information in addition:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">{\n\n\u00a0\u00a0\u00a0\u00a0&quot;bit0&quot;: true,\n\n\u00a0\u00a0\u00a0\u00a0&quot;bit1&quot;: true,\n\n\u00a0\u00a0\u00a0\u00a0&quot;device_token&quot; : &quot;wlkCDA2Hy\/CfrMqVAShs1BAR\/0sAiuRIUm5jQg0a...&quot;,\n\n\u00a0\u00a0\u00a0\u00a0&quot;transaction_id&quot; : &quot;5b737ca6-a4c7-488e-b928-8452960c4be9&quot;,\n\n\u00a0\u00a0\u00a0\u00a0&quot;timestamp&quot; : 1487716472000\n\n}<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If the response is 200, the bits are updated. So the next time you query them, you\u2019ll see the date when you performed the update last time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Validate device<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Apple provides an endpoint (v1\/validate_device_token) that verifies whether a given device token is still valid.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This request uses the same payload structure as the \u201cquery bits\u201d request. A successful 200 response confirms that Apple recognizes the token and that it can be used with the DeviceCheck service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A device token might become invalid if it was never issued by Apple, if it has expired, or if its signature no longer matches the app\u2019s current signing identity. Validation can also fail if the device is using an improperly configured runtime environment (for example, a tampered or revoked app installation).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Although this endpoint is still available, Apple now recommends using <strong>App Attest<\/strong> for stronger device integrity guarantees. Let\u2019s cover App Attest in the next section.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">App Attest in the DeviceCheck framework<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">App Attest is a feature introduced as part of DeviceCheck framework with iOS 14. It enables you to verify that the requests to your server are sent from a legitimate version of the application.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">How does the App Attest mechanism work?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The mechanism is powered by a cryptographic key-pair with the private key stored in the Secure Enclave. Apple servers are used to verify the validity of the key (once per app install), and then you can use it to generate assertions for all sensitive requests to your backend.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Reliability considerations<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Note that sometimes a client\u2019s request to Apple\u2019s servers might fail, that\u2019s why it\u2019s recommended only as an optional security measure that doesn\u2019t block users from the main functionality of the app.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You might want to restrict certain features of your app, like downloading premium content, or silently collect data, like the user\u2019s achievements, but only sync it with the server once App Attest succeeds.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">App Attest limitations<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">App Attest ensures that the application that generates the request is signed by you and hasn\u2019t been modified in any way. But it has some limits.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, the mechanism can\u2019t guarantee that a legitimate version of your app is run on a system that is not jailbroken, which could enable attackers to circumvent your restrictions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting up App Attest\u00a0\u00a0<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The following steps guide you through setting up App Attest in your project and preparing your app for secure communication.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to implement App Attest on iOS?<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">1. Add App attest capability<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As the first step, you need to enable App Attest in the capabilities of your project:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select your project in Project Navigator.<\/li>\n\n\n\n<li>Select your app\u2019s target.<\/li>\n\n\n\n<li>Navigate to the Signing &amp; Capabilities tab.<\/li>\n\n\n\n<li>Click on the Plus button and add App Attest.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" height=\"838\" width=\"1600\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2025\/12\/image.png\" alt=\"How to Mitigate Fraud on iOS with Apple DeviceCheck and App Attest\n\" class=\"wp-image-2971\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Adding this capability will automatically create an Entitlements File if your project doesn\u2019t have any.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this file, you can specify App Attest Environment, which could be either production or development.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that after distributing your app through TestFlight, the App Store, or the Apple Developer Enterprise Program, your app ignores the entitlement you set and uses the production environment. Ensure that your backend corresponds to the selected environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, when sending a sandbox-generated attestation object to your server, the verification procedure differs slightly.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The authenticator data\u2019s aaguid field will contain appattestsandbox instead of appattest.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your server-to-server call to obtain the fraud metric must use https:\/\/data-development.appattest.apple.com as the base URL, instead of the production URL https:\/\/data.appattest.apple.com.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. Generate a key pair<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After enabling the capability for App Attest, use the following method to generate a key pair.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use both completion-handler or async method versions.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">import DeviceCheck \/\/ 1\n\nif DCDevice.current.isSupported { \/\/ 2\n\n\u00a0\u00a0\u00a0\u00a0do {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0let keyID = try await DCAppAttestService.shared.generateKey() \/\/ 3\n\n\u00a0\u00a0\u00a0\u00a0} catch {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ 4\n\n\u00a0\u00a0\u00a0\u00a0}\n\n} else {\n\n\u00a0\u00a0\u00a0\/\/ 4\n\n}<\/code><\/pre>\n\t<\/div>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Import DeviceCheck, as the feature is part of the same framework.<\/li>\n\n\n\n<li>Check that DeviceCheck is supported, the same as for Device Identification.<\/li>\n\n\n\n<li>Use the API to generate a cryptographic key pair. This operation is performed on the device, and you get a key ID as a successful response.&nbsp;<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This ID is a hash of your private key, you store it and reuse it for the same user unless they reinstall the app. The private key itself is stored in Secure Enclave and is never exposed to you directly.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Handle cases when DeviceCheck is not supported or an error during key generation occurred.&nbsp;<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">3. Attest the key<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before calling the client API, your server should issue a challenge to prevent man-in-the-middle and replay attacks. It can be any unique, random, one-time value. You can combine it with other data available on the client to generate a nonce hash that will be provided to App Attest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following method to attest the key:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">let challenge = try await myServer.getChallenge()\n\nlet nonceHash = Data(SHA256.hash(data: challenge))\n\nlet attestation = try await DCAppAttestService.shared.attestKey(keyID, clientDataHash: nonceHash)<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This method will use the private key to create a hardware attestation request for the device. It will submit the request to Apple servers for verification, which means it can fail if there\u2019s no internet connection (error DCError.serverUnavailable).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s also the reason why Apple recommends gradual roll out of this feature in your app. From within a day for a few million users up to 30 days for a billion.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once verified, Apple will return an anonymous attestation object to your app. You need to send this object to your server for further validation. The structure of this object and the ways to validate it are described in the Backend implementation section below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should call this method once per app installation, unless another account is used on the same app. In which case a new key should be re-generated and re-attested.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s possible that you get DCError.invalidInput or DCError.invalidKey thrown. It might happen, among other reasons, if you attest the same key twice. The possible solution for such cases is to regenerate the key.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Generate an assertion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have the attested key, you can call the generateAssertion API to secure communication between your app and server.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All assertions are generated on-device and validated on your server, so Apple servers are no longer involved.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Assertions allow to verify that the app possesses the private key that was previously attested when performing a sensitive request to your server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s how you\u2019d call this method:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">let challenge = try await myServer.getChallenge()\n\nlet nonceHash = Data(SHA256.hash(data: challenge))\n\nlet assertion = try await DCAppAttestService.shared.generateAssertion(keyId, clientDataHash: nonceHash)<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">It is essential to know the meaning of nonce here. It might be a challenge that your app requests from your server before each sensitive request. It might be some predictably built data, like the timestamp of the request or the digest of the payload.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What\u2019s important is that your server\u2019s able to reconstruct it for a particular request to verify the assertion. It makes you know when and why the assertion was created, eliminating room for replay attacks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Take into account that since assertion is a cryptographic operation, it will add some latency to the server requests that your app performs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Implement App Attest on backend<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The challenging part about App Attest is that it requires some backend work that may not be familiar to a regular iOS developer. You should:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Be familiar with the CBOR data format which is used for attestation and assertion objects.<\/li>\n\n\n\n<li>Know the Web Authentication specification and recognize where Apple deviates from it.<\/li>\n\n\n\n<li>Particularly, have a solid understanding of X.509 certificates and how to verify the validity of a certificate chain.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s up to you how exactly you verify attestations and assertions, there\u2019s no Apple backend API for that. As is the case with the DeviceCheck mechanism for Device Identification that was covered earlier in this article. However, this allows you to have more control on your side.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article outlines backend concepts at a high-level. Check the sample project if you want to explore a full implementation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Generate challenge<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The ideal way is that your client can request a challenge before key attestation and every assertion generation. A basic challenge is a random and unique byte sequence that is incorporated into attestation and assertion objects to prevent several attacks like a replay attack.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s how you can generate a challenge using CryptoKit to guarantee that the result is cryptographically secure random data:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">import Foundation\n\nimport CryptoKit\n\nfunc generateChallengeData() -&gt; Data {\n\n\u00a0\u00a0\u00a0\u00a0var data = Data(count: 32)\n\n\u00a0\u00a0\u00a0\u00a0let _ = data.withUnsafeMutableBytes {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SecRandomCopyBytes(kSecRandomDefault, 32, $0.baseAddress!)\n\n\u00a0\u00a0\u00a0\u00a0}\n\n\u00a0\u00a0\u00a0\u00a0return data\n\n}<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Store the challenge on your server. It\u2019s a good practice to make it short-lived as well, so that it\u2019ll expire in, say, 5 minutes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Verify attestation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When the client attests the key pair it has generated, it should send the resulting attestation object along with a key identifier to your server. Here are the most important components of that object:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" height=\"705\" width=\"845\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2025\/12\/image-2.png\" alt=\"Reduce Fraud on iOS with App Attest - Apple DeviceCheck Complete Guide 2026\n\" class=\"wp-image-2973\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Verifying the certificates ensures that the public key has been attested by Apple. So it\u2019s a cryptographic confirmation that the key pair was created on a real device and as a response to your challenge.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should verify the validity of both certificates using<a href=\"https:\/\/www.apple.com\/certificateauthority\/private\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> Apple\u2019s App Attest root certificate<\/a>. Using the challenge you provided, reconstruct the nonce and verify that it corresponds to the one in the leaf certificate.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Extract and store the public key from the credCert field of the leaf certificate and verify that its hash matches the key ID provided along with the attestation object from your client.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Authenticator data contains a field RP ID, whose value is a hash for your app\u2019s ID (a 10-digit team ID and bundle ID separated by a dot). It guarantees that the app instance was signed by you.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The field credentialId should contain the hash of the public key, and you need to compare it to the key ID.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Risk metric receipt could be additionally used to retrieve the number of key attests performed on a given device for your app in the last 30 days.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use a specific Apple API endpoint to retrieve the metric from the receipt, and periodically refresh the metric by submitting the most recent receipt.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/\/ Note that a number of attests could be more than 1 in harmless cases, because App Attest key pair doesn\u2019t survive over an app re-installation. But a higher number could indicate that the same device is used for multiple app-installations, possibly serving modified versions of your app if the operating system is jailbroken. Evaluate the risk based on your case.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find the code that parses the attestation object in the sample project.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Verify assertion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The structure of an assertion object is more lightweight:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" height=\"600\" width=\"780\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2025\/12\/image-3.png\" alt=\" Fraud on iOS with DeviceCheck and App Attest - Apple DeviceCheck Complete Guide 2026\" class=\"wp-image-2974\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Use the public key extracted from the attestation object to verify the signature in the assertion. Reconstruct the nonce that you provided for assertion on device and compare it with the one in the signature. Check that authenticator data contains the hash of your app ID.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Limitations of Apple\u2019s anti-fraud solutions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Even though DeviceCheck offers solid protection, it has important limitations.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Specifically, it cannot:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Determine the integrity of the device and the OS running on it. If a device is jailbroken, DeviceCheck functionality might be circumvented.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Completely protect you from man-in-the-middle attacks. Implement techniques like an SSL certificate pinning to make it harder to spoof the network requests that your app performs.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prevent the app from being debugged, and parts of it substituted with techniques like method swizzling.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hide secrets that your app stores. Always use techniques to obfuscate secure data like API access tokens or premium resources. Take into account that they might be compromised and extracted.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Another thing to keep in mind is that this integration isn\u2019t free from an engineering perspective. It requires backend work, and the effort your team invests will only protect clients on iOS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Endnote<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While no solution can provide complete client protection, DeviceCheck significantly raises the barrier for attackers and is a valuable addition to any mobile fraud-prevention stack. Its native iOS support and proven impact make it well worth considering for strengthening the security of your mobile clients.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our team relies on Apple\u2019s DeviceCheck to block thousands of fraudulent attempts daily, from simple reinstall abuse to illegitimate app traffic.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Want more in-depth technical insights? Check out the <a href=\"https:\/\/adjoe.io\/company\/engineer-blog\/\" target=\"_blank\" rel=\"noreferrer noopener\">adjoe engineer\u2019s blog<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:32px\">Build products that move markets<\/h2>\n\n\n<section class=\"l-section l-section--jobs-include is-light l-pt-lg l-pb-lg\" data-block=\"jobs-include\">\n\t<div class=\"l-wrapper\">\n\t\t<div class=\"jobs-include\">\n\t\t\t\n\t\t\t<div class=\"jobs-include__table-wrap\" tabindex=\"0\">\n\t\t\t\t<table id=\"jobs-include-table-1\" class=\"jobs-include__table\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"col\">Role<\/th>\n\t\t\t\t\t\t\t<th scope=\"col\">Team<\/th>\n\t\t\t\t\t\t\t<th scope=\"col\">Location<\/th>\n\t\t\t\t\t\t<\/tr>\n\t\t\t\t\t<\/thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\" data-label=\"Role\">\n\t\t\t\t\t\t\t\t\t<a class=\"jobs-include__role\" href=\"https:\/\/adjoe.io\/ja\/careers\/open-positions\/b26b0a1d-076f-4b26-82d5-90c7a9377c64\/\">\n\t\t\t\t\t\t\t\t\t\tProduct Analyst (f\/m\/d)\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/th>\n\t\t\t\t\t\t\t\t<td data-label=\"Team\">\n\t\t\t\t\t\t\t\t\tProgrammatic Solutions\t\t\t\t\t\t\t\t<\/td>\n\t\t\t\t\t\t\t\t<td data-label=\"Location\">\n\t\t\t\t\t\t\t\t\tHamburg\t\t\t\t\t\t\t\t<\/td>\n\t\t\t\t\t\t\t<\/tr>\n\t\t\t\t\t\t\t\t\t\t\t<\/tbody>\n\t\t\t\t<\/table>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>We use Apple\u2019s Devic&#8230;<\/p>\n","protected":false},"author":21,"featured_media":6213,"template":"","engineer_blog_category":[74],"class_list":["post-2808","engineer_blog","type-engineer_blog","status-publish","has-post-thumbnail","hentry","engineer_blog_category-ios"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apple DeviceCheck &amp; App Attest: Prevent Fraud on iOS<\/title>\n<meta name=\"description\" content=\"Learn how Apple\u2019s DeviceCheck and App Attest protect iOS apps from fraud. Get Devicecheck setup steps, Swift examples, and backend guidance.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apple DeviceCheck &amp; App Attest: Prevent Fraud on iOS\" \/>\n<meta property=\"og:description\" content=\"Learn how Apple\u2019s DeviceCheck and App Attest protect iOS apps from fraud. Get Devicecheck setup steps, Swift examples, and backend guidance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/\" \/>\n<meta property=\"og:site_name\" content=\"adjoe | Making every interaction the start of lasting value\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-24T17:48:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/01\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"1190\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/\",\"name\":\"Apple DeviceCheck & App Attest: Prevent Fraud on iOS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png\",\"datePublished\":\"2026-04-05T13:59:00+00:00\",\"dateModified\":\"2026-11-24T17:48:49+00:00\",\"description\":\"Learn how Apple\u2019s DeviceCheck and App Attest protect iOS apps from fraud. Get Devicecheck setup steps, Swift examples, and backend guidance.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/#primaryimage\",\"url\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png\",\"contentUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png\",\"width\":1800,\"height\":1190},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/company\\\/engineer-blog\\\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fighting fraud on iOS with Apple DeviceCheck\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/#website\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/\",\"name\":\"adjoe | Making every interaction the start of lasting value\",\"description\":\"adjoe is a global tech company powering user acquisition, monetization and audience engagement across the app economy \u2013 making every interaction the start of lasting value.\",\"publisher\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/#organization\",\"name\":\"adjoe | Making every interaction the start of lasting value\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/OG-img-1200x630-1.jpg\",\"contentUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/OG-img-1200x630-1.jpg\",\"width\":1200,\"height\":630,\"caption\":\"adjoe | Making every interaction the start of lasting value\"},\"image\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ja\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/people\\\/Adjoe\\\/100076450974671\\\/\",\"https:\\\/\\\/www.instagram.com\\\/adjoe.io\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/adjoe\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apple DeviceCheck & App Attest: Prevent Fraud on iOS","description":"Learn how Apple\u2019s DeviceCheck and App Attest protect iOS apps from fraud. Get Devicecheck setup steps, Swift examples, and backend guidance.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/","og_locale":"ja_JP","og_type":"article","og_title":"Apple DeviceCheck & App Attest: Prevent Fraud on iOS","og_description":"Learn how Apple\u2019s DeviceCheck and App Attest protect iOS apps from fraud. Get Devicecheck setup steps, Swift examples, and backend guidance.","og_url":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/","og_site_name":"adjoe | Making every interaction the start of lasting value","article_publisher":"https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/","article_modified_time":"2026-11-24T17:48:49+00:00","og_image":[{"width":1800,"height":1190,"url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/01\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/","url":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/","name":"Apple DeviceCheck & App Attest: Prevent Fraud on iOS","isPartOf":{"@id":"https:\/\/adjoe.io\/ja\/#website"},"primaryImageOfPage":{"@id":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/#primaryimage"},"image":{"@id":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/#primaryimage"},"thumbnailUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/01\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png","datePublished":"2026-04-05T13:59:00+00:00","dateModified":"2026-11-24T17:48:49+00:00","description":"Learn how Apple\u2019s DeviceCheck and App Attest protect iOS apps from fraud. Get Devicecheck setup steps, Swift examples, and backend guidance.","breadcrumb":{"@id":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/#primaryimage","url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/01\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png","contentUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/01\/Fighting-Fraud-on-iOS-with-Apple-DeviceCheck.png","width":1800,"height":1190},{"@type":"BreadcrumbList","@id":"https:\/\/adjoe.io\/ja\/company\/engineer-blog\/prevent-fraud-on-ios-with-apple-devicecheck-and-app-attest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/adjoe.io\/ja\/"},{"@type":"ListItem","position":2,"name":"Fighting fraud on iOS with Apple DeviceCheck"}]},{"@type":"WebSite","@id":"https:\/\/adjoe.io\/ja\/#website","url":"https:\/\/adjoe.io\/ja\/","name":"adjoe | Making every interaction the start of lasting value","description":"adjoe is a global tech company powering user acquisition, monetization and audience engagement across the app economy \u2013 making every interaction the start of lasting value.","publisher":{"@id":"https:\/\/adjoe.io\/ja\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/adjoe.io\/ja\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/adjoe.io\/ja\/#organization","name":"adjoe | Making every interaction the start of lasting value","url":"https:\/\/adjoe.io\/ja\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/adjoe.io\/ja\/#\/schema\/logo\/image\/","url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/11\/OG-img-1200x630-1.jpg","contentUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/11\/OG-img-1200x630-1.jpg","width":1200,"height":630,"caption":"adjoe | Making every interaction the start of lasting value"},"image":{"@id":"https:\/\/adjoe.io\/ja\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/","https:\/\/www.instagram.com\/adjoe.io\/","https:\/\/www.linkedin.com\/company\/adjoe"]}]}},"_links":{"self":[{"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/engineer_blog\/2808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/engineer_blog"}],"about":[{"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/types\/engineer_blog"}],"author":[{"embeddable":true,"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/users\/21"}],"version-history":[{"count":8,"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/engineer_blog\/2808\/revisions"}],"predecessor-version":[{"id":5487,"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/engineer_blog\/2808\/revisions\/5487"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/media\/6213"}],"wp:attachment":[{"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/media?parent=2808"}],"wp:term":[{"taxonomy":"engineer_blog_category","embeddable":true,"href":"https:\/\/adjoe.io\/ja\/wp-json\/wp\/v2\/engineer_blog_category?post=2808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}