{"id":2116,"date":"2021-07-03T16:44:26","date_gmt":"2021-07-03T16:44:26","guid":{"rendered":"https:\/\/sezeromer.com\/?p=2116"},"modified":"2023-03-04T13:43:11","modified_gmt":"2023-03-04T10:43:11","slug":"arkit-nedir-arkit-ile-nasil-proje-olusturulur","status":"publish","type":"post","link":"https:\/\/sezeromer.com\/en\/arkit-nedir-arkit-ile-nasil-proje-olusturulur\/","title":{"rendered":"What is ARKit? How to create a project with ARKit?"},"content":{"rendered":"<p>Hello friends, in this article, we will create <strong>ARKit<\/strong> projects with Swift and make many examples. I will share many of these in a repository on my Github account. You can check it out <a href=\"https:\/\/github.com\/omersezer\/arkit-samples\">here<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2118\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/arkit-1.jpeg\" alt=\"\" width=\"1000\" height=\"643\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/arkit-1.jpeg 1000w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/arkit-1-300x193.jpeg 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/arkit-1-768x494.jpeg 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/arkit-1-500x322.jpeg 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/arkit-1-800x514.jpeg 800w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p><strong>ARKit<\/strong> was released by <strong>Apple<\/strong> in 2017 as a framework for <strong>iPhone<\/strong> and <strong>iPad<\/strong>. As it can be understood from here, it is supported on devices released after 2017 to use the ARKit library. For this, make sure that your device has a minimum A9 processor. iOS versions are also important, as ARKit is updated every year. For example, the minimum <strong>iOS<\/strong> version for <strong>ARKit<\/strong> is 11, while the minimum iOS version for ARKit 2 is 12.<\/p>\n<p>As the name suggests, ARKit is described as<strong> Augmented Reality Kit<\/strong>. Thanks to this augmented reality library, we can show many two-dimensional and 3-dimensional objects in the real world. Often people confuse <strong>VR<\/strong> with AR, but they are very simply separated. Because while VR takes the user to a virtual world, AR brings virtual objects to the real world.<\/p>\n<p>In this article, we will talk about creating an ARKit project and making the necessary adjustments. First, let&#8217;s create a Swift project. You can create it the same way you create a mobile application project.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2119\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.26.52.png\" alt=\"\" width=\"640\" height=\"401\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.26.52.png 914w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.26.52-300x188.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.26.52-768x481.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.26.52-500x313.png 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.26.52-800x501.png 800w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2120\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23-1024x685.png\" alt=\"\" width=\"640\" height=\"428\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23-1024x685.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23-300x201.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23-768x514.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23-500x335.png 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23-800x535.png 800w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23-1280x857.png 1280w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.23.png 1512w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2121\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30-1024x685.png\" alt=\"\" width=\"640\" height=\"428\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30-1024x685.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30-300x201.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30-768x514.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30-500x335.png 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30-800x535.png 800w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30-1280x857.png 1280w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.27.30.png 1512w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Then let&#8217;s move on to the design part. Here we put a Scene View on the screen and constraint it to cover the entire screen. Then we go to our ViewController and make the necessary adjustments.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2122\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-1024x556.png\" alt=\"\" width=\"640\" height=\"348\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-1024x556.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-300x163.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-768x417.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-1536x834.png 1536w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-2048x1112.png 2048w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-500x271.png 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-800x434.png 800w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-1280x695.png 1280w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-19.34.17-1920x1042.png 1920w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Here I also put the adjustments showing how your device sees the real world and the coordinates. This way you will also be able to see the coordinates on your device.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;swift&quot;,&quot;mime&quot;:&quot;text\/x-swift&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">\/\/\r\n\/\/  ViewController.swift\r\n\/\/  scene-view\r\n\/\/\r\n\/\/  Created by Omer Sezer on 3.07.2021.\r\n\/\/\r\n\r\nimport UIKit\r\nimport ARKit\r\n\r\nclass ViewController: UIViewController {\r\n\r\n    @IBOutlet weak var sceneView: ARSCNView!\r\n    let configuration = ARWorldTrackingConfiguration()\r\n    \r\n    override func viewDidLoad() {\r\n        super.viewDidLoad()\r\n        setUI()\r\n        \r\n    }\r\n    \r\n    func setUI() {\r\n        \/\/ MARK: sceneView\r\n        sceneView.debugOptions = [.showFeaturePoints, .showWorldOrigin]\r\n        sceneView.session.run(configuration)\r\n        sceneView.autoenablesDefaultLighting = true\r\n    }\r\n\r\n\r\n}<\/pre>\n<\/div>\n<p>The screen output of this simple application is as follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2124\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1-473x1024.jpeg\" alt=\"\" width=\"473\" height=\"1024\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1-473x1024.jpeg 473w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1-139x300.jpeg 139w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1-768x1662.jpeg 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1-710x1536.jpeg 710w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1-500x1082.jpeg 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1-800x1731.jpeg 800w, https:\/\/sezeromer.com\/wp-content\/uploads\/2021\/07\/IMG_3020F181E980-1.jpeg 828w\" sizes=\"(max-width: 473px) 100vw, 473px\" \/><\/p>\n<p>If you have questions, you can reach us by sending an e-mail or comment. Good work.<\/p>","protected":false},"excerpt":{"rendered":"<p>Hello friends, in this article, we will create ARKit projects with Swift and make many examples. I will share many of these in a repository on my Github account. You can check it out here. ARKit was released by Apple in 2017 as a framework for iPhone and iPad. As it can be understood from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2117,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[824,327,706],"tags":[421,813,812,818,822,8,819,821,817,816,815,328,820,823,814],"class_list":["post-2116","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arkit","category-swift","category-swiftui","tag-apple","tag-ar","tag-arkit","tag-augmented","tag-augmented-reality","tag-omer","tag-reality","tag-reallity","tag-scene","tag-scene-view","tag-sezeromer-sezere","tag-swift","tag-virtual","tag-virtual-reality","tag-vr"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/2116"}],"collection":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/comments?post=2116"}],"version-history":[{"count":3,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/2116\/revisions"}],"predecessor-version":[{"id":2671,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/2116\/revisions\/2671"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media\/2117"}],"wp:attachment":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media?parent=2116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/categories?post=2116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/tags?post=2116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}