Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

github

ios

swift

In Ruby on Rails, I know there's a config/secrets.yml file which I shouldn't upload to github.

Is there anything equivalent in an iOS app? I'm thinking about uploading my app to github before submitting it to the Apple app store, and I don't want to accidentally share any secret keys or anything else that should remain private.

like image 913
m81 Avatar asked Aug 30 '25 16:08

m81


1 Answers

GitHub maintains a public project with the .gitignore recommendations for several languages: https://github.com/github/gitignore

For XCode this is how the file looks:

# 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
like image 191
bitoiu Avatar answered Sep 02 '25 07:09

bitoiu