{"id":21065068,"url":"https://github.com/prolificinteractive/sammitiar-ios","last_synced_at":"2025-06-26T01:04:17.222Z","repository":{"id":62454880,"uuid":"123160986","full_name":"prolificinteractive/SamMitiAR-iOS","owner":"prolificinteractive","description":"Ready-and-easy-to-use ARKit framework for the best user experience.","archived":false,"fork":false,"pushed_at":"2019-08-14T14:44:08.000Z","size":45974,"stargazers_count":120,"open_issues_count":2,"forks_count":17,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-01T08:16:32.332Z","etag":null,"topics":["arkit","ios"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/prolificinteractive.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}},"created_at":"2018-02-27T17:02:51.000Z","updated_at":"2025-03-30T01:22:30.000Z","dependencies_parsed_at":"2022-11-02T00:16:37.668Z","dependency_job_id":null,"html_url":"https://github.com/prolificinteractive/SamMitiAR-iOS","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/prolificinteractive/SamMitiAR-iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FSamMitiAR-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FSamMitiAR-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FSamMitiAR-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FSamMitiAR-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prolificinteractive","download_url":"https://codeload.github.com/prolificinteractive/SamMitiAR-iOS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FSamMitiAR-iOS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261978910,"owners_count":23239417,"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","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":["arkit","ios"],"created_at":"2024-11-19T17:53:22.355Z","updated_at":"2025-06-26T01:04:17.163Z","avatar_url":"https://github.com/prolificinteractive.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"/images/hero.png\"/\u003e\n\n[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/SamMitiAR.svg?style=flat)](https://img.shields.io/cocoapods/v/SamMitiAR.svg)\n[![Platform](https://img.shields.io/cocoapods/p/SamMitiAR.svg?style=flat-square)](http://cocoadocs.org/docsets/SamMitiAR)\n\n# SamMiti AR on iOS\n\nReady-and-easy-to-use ARKit framework for the best user experience.\n\n## Overview\n\nAugmented Reality in iOS has been a very big topic since Apple announced ARKit in WWDC 2017. The API has widely used to leverage 3D immersive user experience; however, in order to implement a good ARKit experience, there are a lot of small components to consider, and it takes a lot of time and effort. SamMiti-AR on iOS is an ARKit framework that has been made based on most of the basic user experiences aligning to Apple human interface guidelines and common functions ready for engineers to use.\n\n## Notable Features\n\n### Placing Multiple Virtual Objects\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"/images/screenshot_multiple_place_3_2.gif\" alt=\"Placing Multiple Virtual Objects\" width=\"67%\"/\u003e\n\u003c/p\u003e\n\nThe framework comes with the multiple-virtual-object handler that is ready to use with the SamMiti AR placing  feature right away.\n\n### Quick Drop, Preview in AR with No Effort\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"/images/screenshot_quick_drop_3_2.gif\" alt=\"Quick Drop, Preview in AR with No Effort\" width=\"67%\"/\u003e\n\u003c/p\u003e\n\nInfluenced by AR Quick Look feature in iOS 12, with this feature, the virtual object can be placed without tapping anything on screen. When previewing one virtual object in AR, this would be the ideal way that most minimize all steps into one.\n\n### Interaction with Fluidity\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"/images/screenshot_reposition_4_3.gif\" alt=\"Interaction with Fluidity\" width=\"67%\"/\u003e\n\u003c/p\u003e\n\nNo more jumpy effect when virtual objects dragged. There is a smooth transition for all interactions even if the object gets dragged from the table to the floor.\n\n### Interaction with Snapy Zoom\n\n### All-in-one Virtual Objects Manipulating Interaction \n\n### Customizable AR Focus Point\n\n### Debug Mode, Really Know What’s Going on\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"/images/screenshot_debug_mode.gif\" alt=\"Debug Mode, Really Know What’s Going on\" width=\"67%\"/\u003e\n\u003c/p\u003e\n\n### Support All Open 3D Content Formats (glTF-ready)\n\n### ARKit2-ready\n\n### And A Lot More to Play with\n\n\n## Description\n\nSamMiti-AR on iOS has wrapped most of AR-and-3D-related functionalities in one place. That means a lot of time that needs to be spent on the basic structure will be reduced by using this framework. \n\nFor you information, the framework was made on top of ARSCNView (ARKit SceneView) which use SceneKit as an engine to render images, so you can expect a lot of sceneKit functions are referred in this framework.\n\n## Requirement\n\n* iOS 11.3+\n* Xcode 9.0+\n\n## Installation\n\n### CocoaPods\nSamMitiAR is available through CocoaPods. To install it, simply add the following line to your Podfile:\n\n```ruby\n#for Xcode9 (iOS 11.3+)\npod 'SamMitiAR', '~\u003e 1.0'\n\n#for Xcode10 Beta\npod 'SamMitiAR', :git =\u003e 'https://github.com/prolificinteractive/SamMitiAR-iOS.git', :branch =\u003e 'features/xcode10-compatible'\n```\n\n## Example Projects\n\n## Usage\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quis fringilla lectus. Nullam ornare erat eget ultrices rhoncus. Aenean eleifend euismod dolor, id tempus eros iaculis et. Aenean efficitur mi id nulla egestas mollis. Integer id tincidunt tortor.\n\n### SamMiti-AR for iOS Structure and How it works\n\nThis framework was made on top of ARSCNView which utilizes both functionalities of SceneKit and ARKit. Moreover, the framework has several helper classes to setup the basic necessory augmented reality experience, load and place virtual objects, allow users to interact with the objects. The classes in the framework consist of ......\n\n\u003cImage showing SamMiti structure\u003e\n\n### Setup and Configure\n\nTo Use SamMitiARView, after install SamMiti pod, you can simply create new ARSCNView in the storyboard, change the view to subClass to SamMitiView and create IBOutlet linking to your storyboard, or programatically initialize SamMitiARView in your view controller.\n\n\u003cImage showing subclass ARSCNView in story board to SamMitiARView\u003e\n\nIn your view controller, you will need to import SamMiti framework along with ARKit and SceneKit.\n\n```swift\nimport SamMiti\nimport ARKit\nimport SceneKit\n```\n\nIn order to have SamMitiView be able to call back to your view controller, the delegate method need to be defined, and ViewDidLoad function is a good place for it.\n\n```swift\n// SamMiti AR View Delegate\nsceneView.samMitiARDelegate = self\n```\n\nTo config some behaviors, you can do that in ViewDidLoad function of view controller. There are a few functions that need to be called before the view is initialied ARSession which includes enabling the camera auto focus function `isAutoFocusEnabled`, .... and serveral optional functions that you can change when the ARSession is running.\n\n\n```        \n// SamMiti AR View Configuration\nsceneView.isAutoFocusEnabled = false\n\n// SamMiti AR View Configuration can be changed along the ARSession is running\nsceneView.hitTestPlacingPoint = CGPoint(x: 0.5, y: 0.5)\nsceneView.isLightingIntensityAutomaticallyUpdated = true\nsceneView.baseLightingEnvironmentIntensity = 6\n```\n\nTo have SamMitiAR run, `setup()` need to be called in View Will Appeare. \n\n```swift\nsceneView.setup(withDebugOptions: [])\n```\n\nBesides the `setup()` function, `session.pause()` still needs to be called when view will disappere to stop processing the ARSession when users leave the the view controller.\n\n```swift\n// Pause the view's AR session.\nsceneView.session.pause()\n```\n\nWork in Progress\n\n### Placing Mode\nThere are two modes of placing virtual objects. One is called `quickDrop`. This mode allows users to place virtual objects without tapping anything on screen, but it require users to move their devices to get ARKit initialize plane anchor. The other mode is called `focusNode`. This mode allows users to use Focus Node (indicator focus point) to indicate where the virtual object will be placed, and users need to tap on the screen in order to have the virtual object placed at the desired spot.\n\n\n// WIP image example of quickDrop mode\n\nExample of `quickDrop` mode\n\n\n// WIP image example focusNode mode\n\nExample of `focusNode` mode\n\nTo set placing mode of SamMitiAR View, the property `placingMode` need to be set to the desired mode. The best place to set this property is before function startAR() get called.\n\n```swift\n/// Example of setting SamMitiAR view to *quickDrop* mode\nsceneView.placingMode = .quickDrop\n```\n\n### Placing and Removing Virtual Objects\n\nWork in Progress\n\n```swift\nfunc prepareToPlaceVirtualObject() {\n\nlet virtualObjectScene = SCNReferenceNode(named: \"art.scnassets/stubhub_model/stadium_1223.scn\")!\nlet virtualObjectNode = SamMitiVirtualObject(refferenceNode: refNode, allowedAlignments: .all)\n\n/*\nlet virtualObjectGLTFNode = SamMitiVirtualObject(gltfUrl: URL(string: \"https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Embedded/Duck.gltf\")!, allowedAlignments: [.horizontal])\n*/\n\nSamMitiVitualObjectLoader().loadVirtualObject(virtualObjectNode, loadedHandler: self.handleLoad)\n\n}\n\nfunc handleLoad(virtualNode: SamMitiVirtualObject?) {\n\nguard let virtualNode = virtualNode else { return }\nsamMitiARView.currentVirtualObject = virtualNode\n\n}\n```\n\nWork in Progress\n\n```swift\nfunc remove(virtualNode: SamMitiVirtualObject?) {\n\nguard let virtualNode = virtualNode else { return }\nsamMitiARView.currentVirtualObject = virtualNode\n\nif samMitiARView.placedVirtualObjects.contains(virtualNode) {\nself.virtualObjectLoader.remove(virtualNode)\n}\n\n}\n```\n\nWork in Progress\n\n### Customize Focus Node\n\nWork in Progress\n\n\u003cImage explain how focus node works\u003e\n\nWork in Progress\n\n```swift\nsamMitiARView.focusNode = SamMitiFocusNode(withNotFoundNamed: \"art.scnassets/focus_node_not_found.scn\",\nestimatedNamed: \"art.scnassets/focus_node_estimated.scn\",\nexistingNamed: \"art.scnassets/focus_node_existing.scn\")\n```\n\nWork in Progress\n\n### Leverage SamMiti-AR Callbacks\n\nWork in Progress\n\n```swift\nfunc trackingStateReasonChanged(to trackingStateReason: ARCamera.TrackingState.Reason?) {\nguard let trackingStateReason = trackingStateReason else { return }\nswitch trackingStateReason {\ncase ARCamera.TrackingState.Reason.excessiveMotion:\nmessageLabelDisplay(\"Please move your phone slower\")\ncase ARCamera.TrackingState.Reason.initializing:\nmessageLabelDisplay(\"Initializing AR Experience\")\ncase ARCamera.TrackingState.Reason.insufficientFeatures:\nmessageLabelDisplay(\"Seems like there isn't enough light\")\ncase ARCamera.TrackingState.Reason.relocalizing:\nmessageLabelDisplay(\"Relocalizing AR Experience\")\n}\n}\n```\n\nWork in Progress\n\n```swift\nfunc samMitiViewWillPlace(_ virtualObject: SamMitiVirtualObject, at transform: SCNMatrix4) {\nguard let virtualObjectName = virtualObject.name else { return }\nmessageLabelDisplay(\"SamMiti will place \\(virtualObjectName)\")\nlet generator = UIImpactFeedbackGenerator(style: .heavy)\ngenerator.impactOccurred()\n}\n```\n\nWork in Progress\n\n## Contributing to SamMiti AR\n\nTo report a bug or enhancement request, feel free to file an issue under the respective heading.\n\nIf you wish to contribute to the project, fork this repo and submit a pull request.\n\n## License\n\n![prolific](https://s3.amazonaws.com/prolificsitestaging/logos/Prolific_Logo_Full_Color.png)\n\nCopyright (c) 2017 Prolific Interactive\n\nSamMiti-AR-iOS is maintained and sponsored by Prolific Interactive. It may be redistributed under the terms specified in the [LICENSE] file.\n\n[LICENSE]: ./LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolificinteractive%2Fsammitiar-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprolificinteractive%2Fsammitiar-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolificinteractive%2Fsammitiar-ios/lists"}