others-how to solve Build input file cannot be found error info.plist?

1. Purpose

In this post, I would demonstrate how to solve the following error when trying to build iOS app in xcode with Info.plist localization enabled.

error: Build input file cannot be found: '/Users/bswen/XcodeProjects/myapp/Info.plist' (in target 'myapp' from project 'myapp')



2. Solution

I have done the following steps to try to solve the error, but it did not work.

  • revert changes to {project}/info.plist

  • restart xcode

  • build project again but localization not work

  • remove info.plist from project root again



The above solution did not work, here is the working solution:

  1. backup and then revert changes to last commit by using the following command
     git reset --hard ....
    
  2. Then create a file named InfoPlist.strings in your project. And click ‘localize’ at the right panel of this file.

  3. Then input the localized app names in above files: In InfoPlist.strings(English)
    "CFBundleDisplayName" = "Message\U2007Notifier";
    

    In InfoPlist.strings(French)

    "CFBundleDisplayName" = "Notificateur\U2007de\U2007messages";
    


Now , it’s working fine!

3. Summary

In this post, I demonstrated how to solve the Build input file cannot be found error info.plist when trying to localize the app name in xcode, the key point is to create InfoPlist.strings resource file instead of localize the Info.plist directly. That’s it, thanks for your reading.

backup and reset(hard) to last successful commit.

redo all the changes except the Info.plist localization.

test until it work.

-->