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

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

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

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

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

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

private 信息包括
  • 我的电子邮件
  • 家庭住址
  • 我的电话号码
  • 广告单元ID
  • 我的密码
  • 如果披露其他会给我的生活造成不利影响的事情,例如金钱/收入损失或处于危险之中。例如,如果我公开我的广告单元ID,则人们将发送垃圾广告,并且我的帐户将被禁止。

  • private 信息不包括:
  • 我的真实姓名
  • 我的年龄
  • 最佳答案

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

  • Xcode template
  • Objective-C template
  • Swift template

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

    对于一般的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
    

    关于ios - 我应该在iOS应用程序的git存储库中忽略哪些文件/文件夹?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37479924/

    10-14 18:36
    查看更多