This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install do |installer_representation| | |
installer_representation.pods_project.targets.each do |target| | |
if target.name == '_The pod name_' | |
target.build_configurations.each do |config| | |
config.build_settings['OTHER_LDFLAGS'] = ["-weak_framework", "\"_The native framework name_\""] | |
end | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func session(_ session: ARSession, didAdd anchors: [ARAnchor]) { | |
// `ARObjectAnchor` je kotva definovaného referenčního objektu | |
guard let objectAnchor = (anchors.first(where: { $0 is ARObjectAnchor })) as? ARObjectAnchor else { return } | |
let entity = try! Entity.loadScene() | |
// Následujícím přiřazením `AnchoringComponent` (s identifikátorem nalezené kotvy) definujeme pozici přidané entity | |
entity.anchoring = AnchoringComponent(.anchor(identifier: objectAnchor.identifier)) | |
arView.scene.addAnchor(entity) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func session(_ session: ARSession, didAdd anchors: [ARAnchor]) { | |
// `ARObjectAnchor` is the anchor of the defined reference model | |
guard let objectAnchor = (anchors.first(where: { $0 is ARObjectAnchor })) as? ARObjectAnchor else { return } | |
let entity = try! Entity.loadScene() | |
// With the following assignment of the `AnchoringComponent` (with found anchor identifier) we define the position of the added entity | |
entity.anchoring = AnchoringComponent(.anchor(identifier: objectAnchor.identifier)) | |
arView.scene.addAnchor(entity) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Načtení referenčních objektů z assetů | |
guard let referenceObjects = ARReferenceObject.referenceObjects(inGroupNamed: "AppParade33Exhibition", | |
bundle: nil) else { return } | |
config.detectionObjects = referenceObjects | |
// Pro "poslouchání" vývoje scény je nutné přiřadit delegáta session | |
arView.session.delegate = self | |
arView.session.run(config, options: options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Loading reference objects from assets | |
guard let referenceObjects = ARReferenceObject.referenceObjects(inGroupNamed: "AppParade33Exhibition", | |
bundle: nil) else { return } | |
config.detectionObjects = referenceObjects | |
// In order "to listen" to the scene development, there needs to be a session delegate assigned | |
arView.session.delegate = self | |
arView.session.run(config, options: options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let entity = try! Entity.loadScene() | |
arView.scene.anchors.append(entity) | |
arView.session.run(config, options: options) |