Cocoapods מגרסה 1.4.0 ואילך, אם משתמשים ב-Cocoapods
מכשיר Apple תואם ARKit עם iOS מגרסה 12.0 ואילך (נדרש יעד פריסה עם iOS מגרסה 12.0 ואילך)
שימוש בפנים משופרות
השלבים הבאים מתבססים על אפליקציית Augmented Faces לדוגמה כדי להראות את המשימות הקריטיות להגדרה ולפיתוח של אפליקציה עם יכולות של Augmented Faces.
הורדת אפליקציית הדוגמה Augmented Faces
כדי לקבל את קוד האפליקציה לדוגמה, משכפלים או מורידים את ARCore SDK for iOS מהגרסה האחרונה ב-GitHub.
פותחים חלון Terminal או Finder ועוברים לתיקייה שבה קלונתם או הורדתם את ה-SDK.
קוד האפליקציה לדוגמה מופיע בקובץ /Examples/AugmentedFacesExample.
מריצים את pod install
האפליקציה AugmentedFacesSample מגיעה עם קובץ Podfile שהוגדרה בו מראש הגרסה של ARCore SDK ו-iOS שנדרשות לכם. כדי להתקין את יחסי התלות האלה:
פותחים חלון Terminal ומפעילים את pod install מהתיקייה שבה נמצא פרויקט Xcode. הפעולה הזו יוצרת קובץ *.xcworkspace שבו תשתמשו בהמשך כדי ליצור ולהריץ את האפליקציה.
פיתוח והרצה של האפליקציה
פותחים את הקובץ .xcworkspace (לא את הקובץ .xcodeproj) של הפרויקט ב-Xcode.
פותחים את ההגדרות הכלליות של היעד ומשנים את מזהה החבילה.
מקישים על Cmd+R או לוחצים על 'הפעלה'. כדי לעבוד עם פנים משופרים, צריך להשתמש במכשיר פיזי ולא בסימולטור. המכשיר צריך להיות מחובר למכונת הפיתוח באמצעות USB.
ניסיון באפליקציה לדוגמה
יוצרים ומריצים את אפליקציית הדוגמה מהקובץ .xcworkspace כדי להפעיל אותה במכשיר.
אם מוצגת בקשה, נותנים לאפליקציה הרשאת גישה למצלמה. לאחר מכן, ARCore תתחיל לזהות פנים שגלויים במצלמה. נכון לעכשיו, המערכת מזהה רק פנים אחת בכל פעם.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-05-26 (שעון UTC)."],[[["This guide explains how to set up your development environment for Augmented Faces, apply 2D textures, and attach 3D objects to detected faces in iOS apps."],["It requires Xcode 13.0+, Cocoapods 1.4.0+ (if using), and an ARKit-compatible device running iOS 12.0+ for development."],["The provided sample app demonstrates these capabilities and can be used as a starting point for your own AR experiences."],["To get started, clone the ARCore SDK, run `pod install`, and build/run the sample app on a physical device."],["Further documentation and resources are available for in-depth learning and development."]]],["To utilize Augmented Faces, first, obtain the sample app by downloading the ARCore SDK for iOS. Then, install dependencies using `pod install` in the project directory, generating an `.xcworkspace` file. Open this file in Xcode, change the bundle identifier, and run the app on a physical ARKit-compatible device (not the simulator) with iOS 12.0 or later. Grant camera access to let ARCore detect faces. Finally, use the camera to check if it detects a face.\n"]]