Compare commits
No commits in common. 'master' and 'SpriteKit' have entirely different histories.
@ -1,153 +0,0 @@
|
||||
//
|
||||
// GameVM.swift
|
||||
// DouShouQiIOS
|
||||
//
|
||||
// Created by Pierre FERREIRA on 12/06/2024.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import DouShouQiModel
|
||||
import SpriteKit
|
||||
import SwiftUI
|
||||
|
||||
/**
|
||||
* GameVM
|
||||
* Cette classe est utilisée pour gérer la logique du jeu
|
||||
*/
|
||||
class GameVM : ObservableObject, Identifiable {
|
||||
|
||||
@Published var game: Game
|
||||
|
||||
@Published var gameScene: GameScene
|
||||
@Published var isGameOver: Bool = false
|
||||
|
||||
///Error
|
||||
@Published var hasError : Bool = false
|
||||
|
||||
///Message
|
||||
@Published var displayMessage : String = ""
|
||||
|
||||
public init(withGame _game : Game, andScene _gameScene : GameScene) {
|
||||
|
||||
self.game = _game
|
||||
self.gameScene = _gameScene
|
||||
|
||||
///Abonnement aux événements
|
||||
self.game.addGameStartedListener(onGameStart)
|
||||
self.game.addPlayerNotifiedListener(onPlayerNotified)
|
||||
self.game.addMoveChosenCallbacksListener(onMoveChosen)
|
||||
self.game.addInvalidMoveCallbacksListener(onInvalidMove)
|
||||
self.game.addBoardChangedListener(onBoardChanged)
|
||||
self.game.addGameOverListener(onGameOver)
|
||||
//self.game?.addGameChangedListener({}) - //? cas persistance
|
||||
|
||||
self.subscribesToMeeple()
|
||||
|
||||
///Lancement du jeu
|
||||
Task{
|
||||
try! await self.game.start()
|
||||
}
|
||||
}
|
||||
|
||||
/// Début du jeu
|
||||
func onGameStart(board : Board){
|
||||
displayMessage = "==>> 🎉 GAME STARTS! 🎉 <<=="
|
||||
self.gameScene.displayBoard(board)
|
||||
}
|
||||
|
||||
/// Notification du joueur
|
||||
func onPlayerNotified(board : Board, player : Player) async{
|
||||
if player is HumanPlayer {
|
||||
displayMessage = "Player \(player.id == .player1 ? "🟡 1" : "🔴 2") - \(player.name), it's your turn!"
|
||||
}
|
||||
else {
|
||||
do{
|
||||
_ = try await player.chooseMove(in: board, with: self.game.rules)
|
||||
}
|
||||
catch{
|
||||
hasError = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Mouvement choisi
|
||||
func onMoveChosen(board : Board, move : Move, player : Player){
|
||||
///Récupération du Meeple :
|
||||
let movedPiece = board.grid[move.rowOrigin][move.columnOrigin]
|
||||
let meeples = gameScene.pieces[move.owner]
|
||||
|
||||
let meeple = meeples?.first(where: {
|
||||
$0.key == movedPiece.piece?.animal
|
||||
})
|
||||
meeple?.value.cellPosition = CGPoint(x: move.rowDestination, y: move.columnDestination)
|
||||
|
||||
}
|
||||
|
||||
///Mouvement invalide
|
||||
func onInvalidMove(board : Board, move : Move, player : Player, result : Bool){
|
||||
displayMessage = "⚠️⚠️⚠️⚠️ Invalid Move detected: \(move) by \(player.name) (\(player.id))"
|
||||
|
||||
if result { ///* invalidité terminante
|
||||
if let piece = board.grid[move.rowDestination][move.columnDestination].piece{
|
||||
let meeples = gameScene.pieces[player.id == .player1 ? .player2 : .player1]
|
||||
let meeple = meeples?.first(where: {
|
||||
$0.key == piece.animal
|
||||
})
|
||||
meeple?.value.parent?.removeChildren(in: [meeple!.value])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///* invalidité non terminante
|
||||
let piece = board.grid[move.rowOrigin][move.columnOrigin]
|
||||
let meeples = gameScene.pieces[move.owner]
|
||||
let meeple = meeples?.first(where: {
|
||||
$0.key == piece.piece?.animal
|
||||
})
|
||||
|
||||
meeple?.value.cellPosition = CGPoint(x: move.rowOrigin, y: move.columnOrigin);
|
||||
}
|
||||
|
||||
///Changement de plateau
|
||||
func onBoardChanged(board : Board){
|
||||
/// Bruit d'un placement de pion ?
|
||||
}
|
||||
|
||||
///Fin du jeu
|
||||
func onGameOver(board : Board, result : Result, winner : Player?){
|
||||
displayMessage = "Game Over!!!"
|
||||
isGameOver = true ///Gestion par l'appelant
|
||||
}
|
||||
|
||||
///*Meeples
|
||||
///Abonnement aux mouvements des Meeples
|
||||
func subscribesToMeeple(){
|
||||
for meeple in gameScene.pieces[.player1]!{
|
||||
meeple.value.observers.append(meepleMoved)
|
||||
}
|
||||
for meeple in gameScene.pieces[.player2]!{
|
||||
meeple.value.observers.append(meepleMoved)
|
||||
}
|
||||
}
|
||||
|
||||
///*Mouvement d'un Meeple
|
||||
func meepleMoved(spriteMeeple: SpriteMeeple, startX: Int, startY: Int, endX: Int, endY: Int) async{
|
||||
let owner : Owner = game.board.grid[startX][startY].piece!.owner
|
||||
let otherPlayer : Owner = self.game.rules.getNextPlayer()
|
||||
|
||||
let move: Move = Move(of: owner, fromRow: startX, andFromColumn: startY, toRow: endX, andToColumn: endY)
|
||||
if(otherPlayer != owner){ ///Mauvais Joueur pour ce jeton
|
||||
onInvalidMove(board: game.board, move: move, player: game.players[otherPlayer]!, result: false)
|
||||
return
|
||||
}
|
||||
|
||||
if let player: HumanPlayer = game.players[owner] as? HumanPlayer{
|
||||
try! await player.chooseMove(move)
|
||||
}
|
||||
// else { ///! IMPOSSIBLE DE CAST LE JOUEUR HUMAIN ==> SIGABRT
|
||||
// let player: HumanPlayer = game.players[.player1] as! HumanPlayer
|
||||
// try! await player.chooseMove(move)
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
//
|
||||
// ImagePicker.swift
|
||||
// DouShouQiIOS
|
||||
//
|
||||
// Created by Pierre FERREIRA on 17/06/2024.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// ImagePicker
|
||||
/// Classe récupéré d'internet pour permettre de choisir une image dans la galerie
|
||||
struct ImagePicker: UIViewControllerRepresentable {
|
||||
@Environment(\.presentationMode) private var presentationMode
|
||||
var sourceType: UIImagePickerController.SourceType = .photoLibrary
|
||||
@Binding var selectedImage: UIImage
|
||||
|
||||
func makeUIViewController(context: UIViewControllerRepresentableContext<ImagePicker>) -> UIImagePickerController {
|
||||
|
||||
let imagePicker = UIImagePickerController()
|
||||
imagePicker.allowsEditing = false
|
||||
imagePicker.sourceType = sourceType
|
||||
imagePicker.delegate = context.coordinator
|
||||
|
||||
return imagePicker
|
||||
}
|
||||
|
||||
func updateUIViewController(_ uiViewController: UIImagePickerController, context: UIViewControllerRepresentableContext<ImagePicker>) {
|
||||
|
||||
}
|
||||
|
||||
func makeCoordinator() -> Coordinator {
|
||||
Coordinator(self)
|
||||
}
|
||||
|
||||
final class Coordinator: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
|
||||
|
||||
var parent: ImagePicker
|
||||
|
||||
init(_ parent: ImagePicker) {
|
||||
self.parent = parent
|
||||
}
|
||||
|
||||
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
|
||||
|
||||
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
|
||||
parent.selectedImage = image
|
||||
}
|
||||
|
||||
parent.presentationMode.wrappedValue.dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
//
|
||||
// PlayerSelect.swift
|
||||
// DouShouQiIOS
|
||||
//
|
||||
// Created by Pierre FERREIRA on 17/06/2024.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// PlayerSelect
|
||||
/// Cette vue est utilisée pour sélectionner un joueur
|
||||
struct PlayerSelect: View {
|
||||
@State private var image = UIImage()
|
||||
@State private var showSheet = false
|
||||
|
||||
|
||||
var versus : Bool
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Rectangle().fill(Color.bgColor).ignoresSafeArea()
|
||||
VStack {
|
||||
VStack{
|
||||
Text("Joueur 1")
|
||||
|
||||
HStack {
|
||||
Image(uiImage: self.image)
|
||||
.resizable()
|
||||
.cornerRadius(50)
|
||||
.frame(width: 100, height: 100)
|
||||
.background(Color.black.opacity(0.2))
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.clipShape(Circle())
|
||||
|
||||
ClassicTextDisplay(text: "Change photo")
|
||||
.onTapGesture {
|
||||
showSheet = true
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
.sheet(isPresented: $showSheet) {
|
||||
ImagePicker(sourceType: .photoLibrary, selectedImage: self.$image)
|
||||
}
|
||||
|
||||
TextField("Entrez un nom ici",text: .constant(""))
|
||||
}.foregroundStyle(.primary)
|
||||
.padding(20)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 16)
|
||||
.stroke(Color.player1, lineWidth: 5)
|
||||
)
|
||||
.padding(40)
|
||||
|
||||
if (versus){
|
||||
|
||||
VStack{
|
||||
Text("Joueur 1")
|
||||
|
||||
HStack {
|
||||
Image(uiImage: self.image)
|
||||
.resizable()
|
||||
.cornerRadius(50)
|
||||
.frame(width: 100, height: 100)
|
||||
.background(Color.black.opacity(0.2))
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.clipShape(Circle())
|
||||
|
||||
ClassicTextDisplay(text: "Change photo")
|
||||
.onTapGesture {
|
||||
showSheet = true
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
.sheet(isPresented: $showSheet) {
|
||||
ImagePicker(sourceType: .photoLibrary, selectedImage: self.$image)
|
||||
}
|
||||
|
||||
TextField("Entrez un nom ici",text: .constant(""))
|
||||
}.foregroundStyle(.primary)
|
||||
.padding(20)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 16)
|
||||
.stroke(Color.player2, lineWidth: 5)
|
||||
)
|
||||
.padding(40)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PlayerSelect_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
PlayerSelect(versus: true)
|
||||
}
|
||||
}
|
@ -1,64 +1,2 @@
|
||||
# SwiftUiTp
|
||||
|
||||
Projet de DouShouQi avec SwiftUI-SpriteKit et ARKit
|
||||
|
||||
## Overview
|
||||
|
||||
Ce projet est une implémentation du jeu de société traditionnel chinois Dou Shou Qi, également connu sous le nom de Jeu de la Jungle, pour les appareils iOS. Il s'agit d'un jeu stratégique à deux joueurs dans lequel chaque joueur contrôle huit pions représentants différents animaux ayant des rangs et des pouvoirs variés. L'objectif est de capturer la tanière de l'adversaire ou d'éliminer toutes les pièces adverses.
|
||||
|
||||
## Technologies utilisées
|
||||
|
||||
- **Swift** : Le principal langage de programmation pour le développement d'applications iOS.
|
||||
- **SpriteKit** : Une puissante infrastructure de rendu graphique et d'animation intégrée à iOS pour la création de jeux en 2D.
|
||||
- **Xcode** : L'environnement de développement intégré (IDE) pour macOS, utilisé pour le développement d'applications iOS.
|
||||
|
||||
## Features
|
||||
- Gestion d'un thème sombre en fonction du thème du device
|
||||
- Menu
|
||||
- Affichage d'une historique dynamique en fonction de données stubées
|
||||
- ARKIT : Affichage d'une component Board dans un WorldPannel, sans la logique de jeu
|
||||
- (SpriteKit) Affichage d'une board dynamique en 2D, mais lié qu'avec une partie des règles de jeu
|
||||
- Jetons personnalisés
|
||||
- Gestion des mouvements invalides
|
||||
|
||||
|
||||
## Featuresn't
|
||||
- L'applications n'a pas d'options multilingue
|
||||
- Aucune persistance de données
|
||||
- Création de joueur non géré
|
||||
- Impossibilité de lancer une partie
|
||||
- Impossibilité de lancer le jeu contre une IA
|
||||
- Modification des joueurs commencée, mais abandonnée car j'ai perdu trop de temps dessus, et qu'il aurait fallu recoder le modèle pour cette simple fonctionnalité (cela m'a permis quand même de toucher au Binding)
|
||||
|
||||
## Erreur
|
||||
Une erreur SIGABRT est levée lors d'une cast d'un ``Player?`` en ``HumainPlayer``, je n'ai pas réussi à régler ce problème.
|
||||
Possible problèmes dû au nettoyage car aucuns test n'a été effectué ensuite.
|
||||
|
||||
|
||||
|
||||
|
||||
# :construction_worker: Développeur
|
||||
|
||||
- Pierre FERREIRA : pierre.ferreira@etu.uca.fr
|
||||
|
||||
<div align="center">
|
||||
<a href = "https://codefirst.iut.uca.fr/git/pierre.ferreira">
|
||||
<img src="https://codefirst.iut.uca.fr/git/avatars/edbacace5f621ae77077f206ebdcee27?size=870" width="50" >
|
||||
</a>
|
||||
|
||||
© IUT - Auvergne
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<p><i><strong>While writing this README, I was listening to...</strong></i></p>
|
||||
<a href="https://www.youtube.com/watch?v=TaRleMb7eH0" target="_blank" style="text-decoration: none;">
|
||||
<img src="https://img.youtube.com/vi/TaRleMb7eH0/0.jpg" alt="YouTube Thumbnail" style="width: 120px; margin-right: 10px;">
|
||||
</a>
|
||||
<div>
|
||||
<p><strong>Pure Vessel - Hollow Knight OST Extended</strong></p>
|
||||
<p><em>Team Cherry - (2017)</em></p>
|
||||
</div>
|
||||
</div>
|
@ -1,632 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 56;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
7B6A02792C18930200877E3F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02782C18930200877E3F /* AppDelegate.swift */; };
|
||||
7B6A027B2C18930200877E3F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A027A2C18930200877E3F /* ContentView.swift */; };
|
||||
7B6A027D2C18930200877E3F /* Experience.rcproject in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A027C2C18930200877E3F /* Experience.rcproject */; };
|
||||
7B6A027F2C18930400877E3F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B6A027E2C18930400877E3F /* Assets.xcassets */; };
|
||||
7B6A02822C18930400877E3F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B6A02812C18930400877E3F /* Preview Assets.xcassets */; };
|
||||
7B6A028C2C18930400877E3F /* SwiftARKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A028B2C18930400877E3F /* SwiftARKitTests.swift */; };
|
||||
7B6A02962C18930400877E3F /* SwiftARKitUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02952C18930400877E3F /* SwiftARKitUITests.swift */; };
|
||||
7B6A02982C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02972C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift */; };
|
||||
7B6A02A82C18966400877E3F /* MySwiftUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02A72C18966400877E3F /* MySwiftUIView.swift */; };
|
||||
7B6A02AC2C18A1B000877E3F /* MyARViewRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02AB2C18A1B000877E3F /* MyARViewRepresentable.swift */; };
|
||||
F0A2577F2C297CDF006C9826 /* board.usdz in Resources */ = {isa = PBXBuildFile; fileRef = F0A2577E2C297CDF006C9826 /* board.usdz */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
7B6A02882C18930400877E3F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 7B6A026D2C18930200877E3F /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 7B6A02742C18930200877E3F;
|
||||
remoteInfo = SwiftARKit;
|
||||
};
|
||||
7B6A02922C18930400877E3F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 7B6A026D2C18930200877E3F /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 7B6A02742C18930200877E3F;
|
||||
remoteInfo = SwiftARKit;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
7B6A02752C18930200877E3F /* SwiftARKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftARKit.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7B6A02782C18930200877E3F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7B6A027A2C18930200877E3F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
||||
7B6A027C2C18930200877E3F /* Experience.rcproject */ = {isa = PBXFileReference; lastKnownFileType = file.rcproject; path = Experience.rcproject; sourceTree = "<group>"; };
|
||||
7B6A027E2C18930400877E3F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
7B6A02812C18930400877E3F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
|
||||
7B6A02872C18930400877E3F /* SwiftARKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftARKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7B6A028B2C18930400877E3F /* SwiftARKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftARKitTests.swift; sourceTree = "<group>"; };
|
||||
7B6A02912C18930400877E3F /* SwiftARKitUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftARKitUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7B6A02952C18930400877E3F /* SwiftARKitUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftARKitUITests.swift; sourceTree = "<group>"; };
|
||||
7B6A02972C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftARKitUITestsLaunchTests.swift; sourceTree = "<group>"; };
|
||||
7B6A02A72C18966400877E3F /* MySwiftUIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySwiftUIView.swift; sourceTree = "<group>"; };
|
||||
7B6A02A92C189ED700877E3F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
7B6A02AB2C18A1B000877E3F /* MyARViewRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyARViewRepresentable.swift; sourceTree = "<group>"; };
|
||||
F0A2577E2C297CDF006C9826 /* board.usdz */ = {isa = PBXFileReference; lastKnownFileType = file.usdz; name = board.usdz; path = objects/board.usdz; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
7B6A02722C18930200877E3F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
7B6A02842C18930400877E3F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
7B6A028E2C18930400877E3F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
7B6A026C2C18930200877E3F = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B6A02772C18930200877E3F /* SwiftARKit */,
|
||||
7B6A028A2C18930400877E3F /* SwiftARKitTests */,
|
||||
7B6A02942C18930400877E3F /* SwiftARKitUITests */,
|
||||
7B6A02762C18930200877E3F /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B6A02762C18930200877E3F /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B6A02752C18930200877E3F /* SwiftARKit.app */,
|
||||
7B6A02872C18930400877E3F /* SwiftARKitTests.xctest */,
|
||||
7B6A02912C18930400877E3F /* SwiftARKitUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B6A02772C18930200877E3F /* SwiftARKit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F0A2577E2C297CDF006C9826 /* board.usdz */,
|
||||
7B6A02AA2C18A19C00877E3F /* Struct */,
|
||||
7B6A02A92C189ED700877E3F /* Info.plist */,
|
||||
7B6A02A62C18964F00877E3F /* View */,
|
||||
7B6A02782C18930200877E3F /* AppDelegate.swift */,
|
||||
7B6A027A2C18930200877E3F /* ContentView.swift */,
|
||||
7B6A027C2C18930200877E3F /* Experience.rcproject */,
|
||||
7B6A027E2C18930400877E3F /* Assets.xcassets */,
|
||||
7B6A02802C18930400877E3F /* Preview Content */,
|
||||
);
|
||||
path = SwiftARKit;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B6A02802C18930400877E3F /* Preview Content */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B6A02812C18930400877E3F /* Preview Assets.xcassets */,
|
||||
);
|
||||
path = "Preview Content";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B6A028A2C18930400877E3F /* SwiftARKitTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B6A028B2C18930400877E3F /* SwiftARKitTests.swift */,
|
||||
);
|
||||
path = SwiftARKitTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B6A02942C18930400877E3F /* SwiftARKitUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B6A02952C18930400877E3F /* SwiftARKitUITests.swift */,
|
||||
7B6A02972C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift */,
|
||||
);
|
||||
path = SwiftARKitUITests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B6A02A62C18964F00877E3F /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B6A02A72C18966400877E3F /* MySwiftUIView.swift */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7B6A02AA2C18A19C00877E3F /* Struct */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7B6A02AB2C18A1B000877E3F /* MyARViewRepresentable.swift */,
|
||||
);
|
||||
path = Struct;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
7B6A02742C18930200877E3F /* SwiftARKit */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 7B6A029B2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKit" */;
|
||||
buildPhases = (
|
||||
7B6A02712C18930200877E3F /* Sources */,
|
||||
7B6A02722C18930200877E3F /* Frameworks */,
|
||||
7B6A02732C18930200877E3F /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = SwiftARKit;
|
||||
productName = SwiftARKit;
|
||||
productReference = 7B6A02752C18930200877E3F /* SwiftARKit.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
7B6A02862C18930400877E3F /* SwiftARKitTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 7B6A029E2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitTests" */;
|
||||
buildPhases = (
|
||||
7B6A02832C18930400877E3F /* Sources */,
|
||||
7B6A02842C18930400877E3F /* Frameworks */,
|
||||
7B6A02852C18930400877E3F /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
7B6A02892C18930400877E3F /* PBXTargetDependency */,
|
||||
);
|
||||
name = SwiftARKitTests;
|
||||
productName = SwiftARKitTests;
|
||||
productReference = 7B6A02872C18930400877E3F /* SwiftARKitTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
7B6A02902C18930400877E3F /* SwiftARKitUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 7B6A02A12C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitUITests" */;
|
||||
buildPhases = (
|
||||
7B6A028D2C18930400877E3F /* Sources */,
|
||||
7B6A028E2C18930400877E3F /* Frameworks */,
|
||||
7B6A028F2C18930400877E3F /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
7B6A02932C18930400877E3F /* PBXTargetDependency */,
|
||||
);
|
||||
name = SwiftARKitUITests;
|
||||
productName = SwiftARKitUITests;
|
||||
productReference = 7B6A02912C18930400877E3F /* SwiftARKitUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
7B6A026D2C18930200877E3F /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 1420;
|
||||
LastUpgradeCheck = 1420;
|
||||
TargetAttributes = {
|
||||
7B6A02742C18930200877E3F = {
|
||||
CreatedOnToolsVersion = 14.2;
|
||||
};
|
||||
7B6A02862C18930400877E3F = {
|
||||
CreatedOnToolsVersion = 14.2;
|
||||
TestTargetID = 7B6A02742C18930200877E3F;
|
||||
};
|
||||
7B6A02902C18930400877E3F = {
|
||||
CreatedOnToolsVersion = 14.2;
|
||||
TestTargetID = 7B6A02742C18930200877E3F;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 7B6A02702C18930200877E3F /* Build configuration list for PBXProject "SwiftARKit" */;
|
||||
compatibilityVersion = "Xcode 14.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 7B6A026C2C18930200877E3F;
|
||||
productRefGroup = 7B6A02762C18930200877E3F /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
7B6A02742C18930200877E3F /* SwiftARKit */,
|
||||
7B6A02862C18930400877E3F /* SwiftARKitTests */,
|
||||
7B6A02902C18930400877E3F /* SwiftARKitUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
7B6A02732C18930200877E3F /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F0A2577F2C297CDF006C9826 /* board.usdz in Resources */,
|
||||
7B6A02822C18930400877E3F /* Preview Assets.xcassets in Resources */,
|
||||
7B6A027F2C18930400877E3F /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
7B6A02852C18930400877E3F /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
7B6A028F2C18930400877E3F /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
7B6A02712C18930200877E3F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B6A027B2C18930200877E3F /* ContentView.swift in Sources */,
|
||||
7B6A02792C18930200877E3F /* AppDelegate.swift in Sources */,
|
||||
7B6A02AC2C18A1B000877E3F /* MyARViewRepresentable.swift in Sources */,
|
||||
7B6A02A82C18966400877E3F /* MySwiftUIView.swift in Sources */,
|
||||
7B6A027D2C18930200877E3F /* Experience.rcproject in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
7B6A02832C18930400877E3F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B6A028C2C18930400877E3F /* SwiftARKitTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
7B6A028D2C18930400877E3F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7B6A02982C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift in Sources */,
|
||||
7B6A02962C18930400877E3F /* SwiftARKitUITests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
7B6A02892C18930400877E3F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 7B6A02742C18930200877E3F /* SwiftARKit */;
|
||||
targetProxy = 7B6A02882C18930400877E3F /* PBXContainerItemProxy */;
|
||||
};
|
||||
7B6A02932C18930400877E3F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 7B6A02742C18930200877E3F /* SwiftARKit */;
|
||||
targetProxy = 7B6A02922C18930400877E3F /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
7B6A02992C18930400877E3F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7B6A029A2C18930400877E3F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
7B6A029C2C18930400877E3F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"SwiftARKit/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 67U885533Q;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = SwiftARKit/Info.plist;
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "Camera needed for AR app";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arkit;
|
||||
INFOPLIST_KEY_UIStatusBarHidden = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = fr.uca.iut.SwiftARKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = tpiOS_2024_06_21_off;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7B6A029D2C18930400877E3F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"SwiftARKit/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 67U885533Q;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = SwiftARKit/Info.plist;
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "Camera needed for AR app";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arkit;
|
||||
INFOPLIST_KEY_UIStatusBarHidden = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = fr.uca.iut.SwiftARKit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = tpiOS_2024_06_21_off;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
7B6A029F2C18930400877E3F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftARKit.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftARKit";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7B6A02A02C18930400877E3F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftARKit.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftARKit";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
7B6A02A22C18930400877E3F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_TARGET_NAME = SwiftARKit;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7B6A02A32C18930400877E3F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_TARGET_NAME = SwiftARKit;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
7B6A02702C18930200877E3F /* Build configuration list for PBXProject "SwiftARKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7B6A02992C18930400877E3F /* Debug */,
|
||||
7B6A029A2C18930400877E3F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
7B6A029B2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKit" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7B6A029C2C18930400877E3F /* Debug */,
|
||||
7B6A029D2C18930400877E3F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
7B6A029E2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7B6A029F2C18930400877E3F /* Debug */,
|
||||
7B6A02A02C18930400877E3F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
7B6A02A12C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7B6A02A22C18930400877E3F /* Debug */,
|
||||
7B6A02A32C18930400877E3F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 7B6A026D2C18930200877E3F /* Project object */;
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1540"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7B6A02742C18930200877E3F"
|
||||
BuildableName = "SwiftARKit.app"
|
||||
BlueprintName = "SwiftARKit"
|
||||
ReferencedContainer = "container:SwiftARKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7B6A02862C18930400877E3F"
|
||||
BuildableName = "SwiftARKitTests.xctest"
|
||||
BlueprintName = "SwiftARKitTests"
|
||||
ReferencedContainer = "container:SwiftARKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7B6A02902C18930400877E3F"
|
||||
BuildableName = "SwiftARKitUITests.xctest"
|
||||
BlueprintName = "SwiftARKitUITests"
|
||||
ReferencedContainer = "container:SwiftARKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7B6A02742C18930200877E3F"
|
||||
BuildableName = "SwiftARKit.app"
|
||||
BlueprintName = "SwiftARKit"
|
||||
ReferencedContainer = "container:SwiftARKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7B6A02742C18930200877E3F"
|
||||
BuildableName = "SwiftARKit.app"
|
||||
BlueprintName = "SwiftARKit"
|
||||
ReferencedContainer = "container:SwiftARKit.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,48 +0,0 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// SwiftARKit
|
||||
//
|
||||
// Created by Pierre FERREIRA on 11/06/2024.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
|
||||
// Create the SwiftUI view that provides the window contents.
|
||||
let contentView = ContentView()
|
||||
|
||||
// Use a UIHostingController as window root view controller.
|
||||
let window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window.rootViewController = UIHostingController(rootView: contentView)
|
||||
self.window = window
|
||||
window.makeKeyAndVisible()
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "tv_retro.usdz",
|
||||
"idiom" : "universal",
|
||||
"universal-type-identifier" : "com.pixar.universal-scene-description-mobile"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "board.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.1 MiB |
@ -1,45 +0,0 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// SwiftARKit
|
||||
//
|
||||
// Created by Pierre FERREIRA on 11/06/2024.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import RealityKit
|
||||
|
||||
struct ContentView : View {
|
||||
var body: some View {
|
||||
//ARViewContainer().edgesIgnoringSafeArea(.all)
|
||||
MyARViewRepresentable().edgesIgnoringSafeArea(.all)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct ARViewContainer: UIViewRepresentable {
|
||||
|
||||
func makeUIView(context: Context) -> ARView {
|
||||
|
||||
let arView = ARView(frame: .zero)
|
||||
|
||||
// Load the "Box" scene from the "Experience" Reality File
|
||||
let boxAnchor = try! Experience.loadBox()
|
||||
|
||||
// Add the box anchor to the scene
|
||||
arView.scene.anchors.append(boxAnchor)
|
||||
|
||||
return arView
|
||||
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: ARView, context: Context) {}
|
||||
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct ContentView_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
#endif
|
@ -1,3 +0,0 @@
|
||||
[
|
||||
|
||||
]
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"LibraryID" : "BBB5EDD2-CBE1-49E5-931D-2C81F724D19D",
|
||||
"Version" : "1.0"
|
||||
}
|
Before Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 180 KiB |
@ -1,155 +0,0 @@
|
||||
{
|
||||
"__version" : 1,
|
||||
"__content" : [
|
||||
{
|
||||
"tags" : {
|
||||
"__version" : 1,
|
||||
"__content" : [
|
||||
{
|
||||
"tagsStore" : {
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"scenes" : [
|
||||
{
|
||||
"__version" : 2,
|
||||
"__content" : [
|
||||
{
|
||||
"hasGroundPlane" : true,
|
||||
"gravity" : [
|
||||
0,
|
||||
-9.8000001907348633,
|
||||
0
|
||||
],
|
||||
"arAnchorSpecification" : {
|
||||
"name" : "surface",
|
||||
"classification" : 0,
|
||||
"alignment" : 1
|
||||
},
|
||||
"title" : "Box",
|
||||
"material" : "concrete",
|
||||
"layoutData" : {
|
||||
"version" : 1,
|
||||
"constraints" : [
|
||||
|
||||
]
|
||||
},
|
||||
"identifier" : "F9610871-0955-494F-A5C3-51D1A281BAB3",
|
||||
"behaviors" : [
|
||||
|
||||
],
|
||||
"overrides" : {
|
||||
"factory" : null,
|
||||
"children" : {
|
||||
"4A213441-135C-450E-8EF8-1A4EAB267C1D" : {
|
||||
"overrides" : {
|
||||
"factory" : {
|
||||
"version" : "1.0",
|
||||
"identifier" : "com.apple.rc.af.CoreAssetFactories.PrimitiveShapeAssetFactory"
|
||||
},
|
||||
"arguments" : [
|
||||
[
|
||||
"material",
|
||||
{
|
||||
"value" : "steel",
|
||||
"typeName" : "String"
|
||||
}
|
||||
],
|
||||
[
|
||||
"type",
|
||||
{
|
||||
"value" : "box",
|
||||
"typeName" : "String"
|
||||
}
|
||||
]
|
||||
],
|
||||
"runtimeAttributes" : [
|
||||
[
|
||||
"RuntimeIdentifier",
|
||||
{
|
||||
"value" : "3788A5B5-0388-488A-8304-7B90FEBA6FAC",
|
||||
"typeName" : "UUID"
|
||||
}
|
||||
],
|
||||
[
|
||||
"entityName",
|
||||
{
|
||||
"value" : "Steel Box",
|
||||
"typeName" : "String"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"transform" : {
|
||||
"matrix" : [
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0.05000000074505806,
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"B91C7CA3-4AB1-4253-9A84-07383168A8A8" : null,
|
||||
"7F5F1ADC-E5E4-4EF5-A5B5-FC43B071FFA5" : null,
|
||||
"632E476F-1E55-4E30-9723-1C51DD2E8B89" : null
|
||||
}
|
||||
},
|
||||
"viewTransform" : {
|
||||
"sceneTransform" : [
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0.99999994039535522,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0.99999994039535522,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"cameraTransform" : [
|
||||
0.99999994039535522,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0.80754852294921875,
|
||||
-0.58980101346969604,
|
||||
0,
|
||||
0,
|
||||
0.58980101346969604,
|
||||
0.80754852294921875,
|
||||
0,
|
||||
0,
|
||||
1.135667085647583,
|
||||
1.5549418926239014,
|
||||
1
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
//
|
||||
// MyARView.swift
|
||||
// SwiftARKit
|
||||
//
|
||||
// Created by Pierre FERREIRA on 11/06/2024.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import ARKit
|
||||
import RealityKit
|
||||
|
||||
struct MyARViewRepresentable : UIViewRepresentable{
|
||||
|
||||
public func makeUIView(context: Context) -> MyARView {
|
||||
//
|
||||
// let arView = MyARView(frame: .zero)
|
||||
// let mesh = MeshResource.generateBox(size: 0.1, cornerRadius: 0.005)
|
||||
//
|
||||
// //let mesh = MeshResource.generateBox(width: 150, height: 500, depth: 50)
|
||||
// let material = SimpleMaterial(color: .red, isMetallic: true)
|
||||
// let model = ModelEntity(mesh: mesh, materials: [material]) //, materials: material
|
||||
// model.transform.translation.y = 0.05
|
||||
//
|
||||
// let anchor = AnchorEntity(.plane(.horizontal, classification: .table, minimumBounds: .zero))
|
||||
//
|
||||
// arView.scene.anchors.append(anchor)
|
||||
// return arView
|
||||
//
|
||||
return MyARView()
|
||||
}
|
||||
|
||||
public func updateUIView(_ uiView: UIViewType, context: Context) { }
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
//
|
||||
// MySwiftUIView.swift
|
||||
// SwiftARKit
|
||||
//
|
||||
// Created by Pierre FERREIRA on 11/06/2024.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import ARKit
|
||||
import RealityKit
|
||||
|
||||
|
||||
class MyARView : ARView{
|
||||
required init (frame frameRect : CGRect){
|
||||
super.init(frame: frameRect)
|
||||
}
|
||||
|
||||
required init?(coder decoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
convenience init() {
|
||||
self.init(frame: UIScreen.main.bounds)
|
||||
addBoardToTheFloor()
|
||||
addMeepleToBoard()
|
||||
}
|
||||
|
||||
|
||||
|
||||
///Repère où attacher le plan
|
||||
func applyRunConfiguration(){
|
||||
//ARWorldTrackingConfiguration.self
|
||||
let conf = ARWorldTrackingConfiguration()
|
||||
//conf.planeDetection = .horizontal
|
||||
session.run(conf)
|
||||
}
|
||||
|
||||
func defineAnchors() {
|
||||
let anchor = AnchorEntity(world: .zero)
|
||||
scene.addAnchor(anchor)
|
||||
}
|
||||
|
||||
func addBoardToTheFloor() {
|
||||
//let configuration = ARWorldTrackingConfiguration()
|
||||
//session.run(configuration)
|
||||
|
||||
let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: SIMD2<Float>(0.2, 0.2)))
|
||||
scene.addAnchor(anchor)
|
||||
|
||||
let board = try? Entity.load(named: "board")
|
||||
if let board {
|
||||
anchor.addChild(board)
|
||||
}
|
||||
}
|
||||
|
||||
func addMeepleToBoard(){ //boardAnchor : AnchorEntity
|
||||
//let configuration = ARWorldTrackingConfiguration()
|
||||
//session.run(configuration)
|
||||
|
||||
let objectsName = [ "rat", "cat", "dog", "wolf", "leopard", "tiger", "lion", "elephant"]
|
||||
var iterator : Int = 0
|
||||
|
||||
let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: SIMD2<Float>(0.3, 0.3))) //Une anchor par case ou une pour tout le plateau ?
|
||||
scene.addAnchor(anchor)
|
||||
|
||||
/// TODO : Lier au model ?
|
||||
for row in 0...7{
|
||||
for col in 0...7{
|
||||
if (col % 2 == row % 2 ){
|
||||
let meeple = try? Entity.load(named: objectsName[iterator % 7]) //miteux
|
||||
iterator += 1
|
||||
if let meeple {
|
||||
|
||||
meeple.position.x += 0.1145 * Float(row)
|
||||
meeple.position.y += 0.1145 * Float(col)
|
||||
|
||||
anchor.addChild(meeple)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// func createAnchor(){
|
||||
// let anchor : AnchorEntity = AnchorEntity(world: .zero)
|
||||
// self.scene.addAnchor(anchor)
|
||||
//
|
||||
// let mesh = MeshResource.generateBox(size: 10)
|
||||
// let material = SimpleMaterial(color: .red, isMetallic: true)
|
||||
// let model = ModelEntity(mesh: mesh, materials: [material])
|
||||
// model.transform.translation.y = 0.05
|
||||
//
|
||||
// anchor.addChild(model)
|
||||
//
|
||||
//// let tv = try? Entity.load(named: "Data")
|
||||
//// anchor.addChild(tv!)
|
||||
//
|
||||
// }
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,36 +0,0 @@
|
||||
//
|
||||
// SwiftARKitTests.swift
|
||||
// SwiftARKitTests
|
||||
//
|
||||
// Created by Pierre FERREIRA on 11/06/2024.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import SwiftARKit
|
||||
|
||||
final class SwiftARKitTests: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDownWithError() throws {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
func testExample() throws {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
// Any test you write for XCTest can be annotated as throws and async.
|
||||
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
|
||||
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
|
||||
}
|
||||
|
||||
func testPerformanceExample() throws {
|
||||
// This is an example of a performance test case.
|
||||
self.measure {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
//
|
||||
// SwiftARKitUITestsLaunchTests.swift
|
||||
// SwiftARKitUITests
|
||||
//
|
||||
// Created by Pierre FERREIRA on 11/06/2024.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class SwiftARKitUITestsLaunchTests: XCTestCase {
|
||||
|
||||
override class var runsForEachTargetApplicationUIConfiguration: Bool {
|
||||
true
|
||||
}
|
||||
|
||||
override func setUpWithError() throws {
|
||||
continueAfterFailure = false
|
||||
}
|
||||
|
||||
func testLaunch() throws {
|
||||
let app = XCUIApplication()
|
||||
app.launch()
|
||||
|
||||
// Insert steps here to perform after app launch but before taking a screenshot,
|
||||
// such as logging into a test account or navigating somewhere in the app
|
||||
|
||||
let attachment = XCTAttachment(screenshot: app.screenshot())
|
||||
attachment.name = "Launch Screen"
|
||||
attachment.lifetime = .keepAlways
|
||||
add(attachment)
|
||||
}
|
||||
}
|
Loading…
Reference in new issue