Modifying Info.plist's CFBundleVersion in Xcode 5 with Asset Library enabled

后端 未结 5 1835
面向向阳花
面向向阳花 2021-01-01 20:02

With Xcode 5\'s new Asset Library, adding images and organizing them has never been easier. However, it seems as if it has broken some scripts I use for creating builds.

相关标签:
5条回答
  • 2021-01-01 20:24

    Search in Build settings for $(SRCROOT) and remove it.

    transform it from $(SRCROOT)/TestProject/Info.plist to TestProject/Info.plist

    0 讨论(0)
  • 2021-01-01 20:26

    I had similar issue once, and here is what finally helped me out:

    buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}")
    buildNumber=$(($buildNumber + 1))
    /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${INFOPLIST_FILE}"
    

    (Use INFOPLIST_FILE directly, not $BUILT_PRODUCTS_DIR/$INFOPLIST_PATH)

    Hope this could be useful .

    0 讨论(0)
  • 2021-01-01 20:35

    If your plist file is Preprocessed-Info.plist, then change the value of "Preprocess Info.plist File" (INFOPLIST_PREPROCESS) to "Yes" (true) like this:

    this

    0 讨论(0)
  • 2021-01-01 20:39

    Figured this one out, and it was a silly one. Turns out you can just move the script phase to the very end. I didn't even know these were movable, or that it mattered! But by dragging the Run Script phase to the bottom as such, the scripts were able to run and modify things as needed.

    Build Phases

    0 讨论(0)
  • 2021-01-01 20:46

    I had the same problem, In my case, I had a wrong file path to the XXX-Info.plist file:

    Build Settings -> Packaging -> Info.plist File

    I changed it it's actual location and start working.

    Description to where to change the wrong settings

    0 讨论(0)
提交回复
热议问题