Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

always get Crashlytics is modified when doing git status, objective c, git

I am using Crashlytics framework for crash reporting. After running the project from xcode and doing git status, I always get the message like below

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   Crashlytics.framework/Versions/A/Crashlytics
    modified:   Crashlytics.framework/Versions/A/Resources/Info.plist
    modified:   Crashlytics.framework/run

Please advice me on how to get rid of these modified files from Crashlytics


@Abizem : what I did for .gitignore is following

.DS_Store
#backups
*.swp
*~.nib
*~.xib
*~

*.zip
*.gz

build
*.[oa]
DerivedData
VERSION-FILE
Crashlytics.framework/
#XCode
*.pbxuser
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
project.xcworkspace/
xcuserdata/

but it still does not work.

like image 967
tranvutuan Avatar asked Mar 17 '14 15:03

tranvutuan


2 Answers

You have two choices:

  1. Check the changes into your project, which will stop the cause of the error.
  2. Add the Crashlytics.framework to your .gitignore file which will ignore any changes to the file.
like image 80
Abizern Avatar answered Oct 04 '22 01:10

Abizern


The Crashlytics Mac app used to automatically update instances of its frameworks in your projects, which caused the original confusion. With the newer Fabric app, updates are controlled manually so you shouldn’t see unexpected changes in your working copy.

If you want to be able to able to return to the exact state of your application source at any time, you should add the framework files to your version control system and update them every time the framework updates.

Alternatively, ignore changes to the framework if you want to avoid adding possibly large files to your version control system or save yourself the time it takes to commit the changes — at the expense of having a complete source history. Disk space and network speeds are going up, while discarded history is lost forever. To read more, see the answers to Binaries in source control on Programmers Stack Exchange.

A third option that has some of the advantages of each choice is to use a separate repository for tracking changes to the Crashlytics/Fabric frameworks and add it as a submodule of your main repository. For example, see CrashlyticsFramework by Bogdan Poplauschi.

like image 43
Douglas Hill Avatar answered Oct 03 '22 23:10

Douglas Hill