一、常规ignore配置
详细: GitHub - github/gitignore: A collection of useful .gitignore templates
## User settings
xcuserdata/
## Obj-C/Swift specific
*.hmap
## App packaging
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm
.build/
二、相关问题(SwiftUI 项目project.pbxproj未成功推送远端)
新建的Vision Pro项目提交git仓库后,再下载打开,提示missing it's project.pbxproj file (XXX.xcodeproj cannot be opened because it is missing it)
原因:公司大仓库ignore文件给过滤
排查:
- 确认项目文件完整性(是否包含project.pbxproj)
- 查看Git状态(git status,查看project.pbxproj文件是否被跟踪)
- 若没有,将project.pbxproj文件手动添加到Git仓库(git add提示ignore忽略,强制加入 git add -f )