繁体   English   中英

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

[英]Which files in my iOS Xcode project should I hide before uploading to github?

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

这是我在一些项目中一直使用的.gitignore文件:

# Exclude temp nibs and swap files
*~.nib
*.swp

# Exclude OS X folder attributes
.DS_Store
.svn

# Exclude user-specific XCode 3 and 4 files
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
xcuserdata

我认为它可以处理Xcode的用户特定的本地项目文件和OS X临时文件,同时保留您从存储库直接构建项目所需的一切。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM