{"action":"opened","issue":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/1422","repository_url":"https://api.github.com/repos/fastlane/fastlane","labels_url":"https://api.github.com/repos/fastlane/fastlane/issues/1422/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/1422/comments","events_url":"https://api.github.com/repos/fastlane/fastlane/issues/1422/events","html_url":"https://github.com/fastlane/fastlane/issues/1422","id":136570202,"number":1422,"title":"set_info_plist_value changes Info.plist XML header to \"... Apple Computer\"; PlistBuddy changes it to \"Apple\" = diff hell","user":{"login":"fatuhoku","id":430233,"avatar_url":"https://avatars.githubusercontent.com/u/430233?v=3","gravatar_id":"","url":"https://api.github.com/users/fatuhoku","html_url":"https://github.com/fatuhoku","followers_url":"https://api.github.com/users/fatuhoku/followers","following_url":"https://api.github.com/users/fatuhoku/following{/other_user}","gists_url":"https://api.github.com/users/fatuhoku/gists{/gist_id}","starred_url":"https://api.github.com/users/fatuhoku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatuhoku/subscriptions","organizations_url":"https://api.github.com/users/fatuhoku/orgs","repos_url":"https://api.github.com/users/fatuhoku/repos","events_url":"https://api.github.com/users/fatuhoku/events{/privacy}","received_events_url":"https://api.github.com/users/fatuhoku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-26T01:41:07Z","updated_at":"2016-02-26T01:41:07Z","closed_at":null,"body":"I use the [GIT_COMMIT_COUNT trick for build numbers](http://stackoverflow.com/a/9294933/590767) powered by `PlistBuddy` in the Xcode build phases normally.\r\n\r\nBut I found the version doesn't stick around if I run `gym`.\r\n\r\nSo I resort to wrapping another pair of  `set_info_plist_value` steps around `gym` in my Fastfile like so:\r\n\r\n```\r\n  # Set build version  (A)\r\n  build_number = number_of_commits\r\n  set_info_plist_value(path: 'MakeEatSeeApp/Info.plist', key: 'CFBundleVersion', value: build_number.to_s)\r\n\r\n  gym(\r\n    workspace: workspace,\r\n    scheme: scheme,\r\n    configuration: configuration,\r\n    output_directory: '/tmp',\r\n    output_name: output_name\r\n  )\r\n\r\n  # Reset the build version  (B)\r\n  set_info_plist_value(path: 'MakeEatSeeApp/Info.plist', key: 'CFBundleVersion', value: \"GIT_COMMIT_COUNT\")\r\n```\r\n\r\nWhen I run this, the value of `CFBundleVersion` sure enough gets updated as I desired:\r\n\r\n```\r\nGIT_COMMIT_COUNT    # this value is checked into Git\r\n12345                               # Xcode Build Phase replaces GIT_COMMIT_COUNT with `git rev-list --count HEAD`\r\nGIT_COMMIT_COUNT    # end of Xcode Build Phases, sets the value back\r\n12345                               # Fastlane's set_info_plist_value doing its magic (A) above\r\nGIT_COMMIT_COUNT    # end of lane: set_info_plist_value sets it back again.\r\n```\r\n\r\nSo all is well, except I get this undesired diff as a side-effect:\r\n\r\n```diff\r\n-<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\r\n+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\r\n```\r\n\r\nWhat can I do here? :("}}