![](/img/trans.png)
[英]Are there any things I should remove from an Xcode project for security purposes when uploading to Github?
[英]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.