繁体   English   中英

我应该在iOS应用程序的git存储库中忽略哪些文件/文件夹?

[英]What files/folders should I ignore in a git repository of an iOS app?

我发现了有关在Android应用程序中忽略什么的问题以及有关忽略cocoapods的问题。 但是,我一般是在问一个iOS项目。

我有一个iOS应用,可显示AdMob提供的广告,并使用Firebase查看我的应用的分析。 它使用了一些椰壳足纲。

从之前的一个问题中,我了解到我的广告单元ID是不公开的。 因此,我将广告单元ID放在一个单独的文件中,并忽略了它:

// Secret Stuff.swift
let adUnitId = "dianfkebsfiubugb"

我认为这样一来,人们将永远不会知道我的广告单元ID。

但是其他东西呢? cocoapods生成的文件是否包含我的一些私人信息? info.plist文件也包含我的私人物品吗? 另外,当我将Firebase放入应用程序时,我下载了GoogleService-Info.plist。 我也应该忽略它吗? 我应该忽略什么?

私人信息包括

  • 我的电子邮件
  • 家庭地址
  • 我的电话号码
  • 广告单元编号
  • 我的密码
  • 披露时可能会对我的生活造成不利影响的其他事物,例如金钱/收入损失或处于危险之中。 例如,如果我披露我的广告单元ID,则人们将发送垃圾广告,并且我的帐户将被禁止。

私人信息不包括

  • 我的真名
  • 我的年龄

我建议您看看人们创建回购协议时GitHub的用途。 您可以在此处找到所有示例。 这些是您特别感兴趣的:

在下面添加模板,以防将来链接断开。

对于一般的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
*.moved-aside
*.xccheckout
*.xcscmblueprint

对于Objective-C项目:

# 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
*.moved-aside
*.xcuserstate

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

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://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

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

fastlane/report.xml
fastlane/screenshots

#Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

对于Swift项目:

# 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
*.moved-aside
*.xcuserstate

## Obj-C/Swift specific
*.hmap
*.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/
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://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

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

暂无
暂无

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

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