问题:在上传到 github 之前,我应该隐藏我的 iOS Xcode 项目中的哪些文件?

Ruby on Rails中,我知道有一个config/secrets.yml文件我不应该上传到github

iOS应用程序中是否有任何等价物?我正在考虑在将我的应用程序提交到 Apple 应用商店之前将其上传到github,并且我不想意外共享任何密钥或其他任何应该保持私密的内容。

解答

GitHub 维护一个公共项目,其中包含.gitignore对多种语言的建议:https://github.com/github/gitignore

对于 XCode,这是文件的外观:

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata

## Other
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
#Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build
Logo

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!

更多推荐