Search code examples
ibm-mobilefirstmobilefirst-cli

Mobilefirst cli build failed : reading info.plist file 1-byte UTF-8


We have a mobilefirst 7.0 hybrid application project that includes iOS and android native environment.
We want to use mobile first cli 7.0 on windows 7 to build project and generate build-time resources after we checkout this project from git server. And it fails when it began to parse info.plist of iOS project.
The error message below is what I got from mfcli:

[Error: 
BUILD FAILED
D:\programs\IBM\MobileFirst-CLI7\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml:135: The following error occurred while executing this line:
D:\programs\IBM\MobileFirst-CLI7\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml:341: The following error occurred while executing this line:
D:\programs\IBM\MobileFirst-CLI7\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml:351: The following error occurred while executing this line:
D:\programs\IBM\MobileFirst-CLI7\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml:330: Failed building application: com.worklight.builder.exception.WorklightBuildException: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file 1-byte UTF-8 �ǦC���L�Ħ줸�� 1�C Nested exception: 1-byte UTF-8 �ǦC���L�Ħ줸�� 1�C

Total time: 18 seconds
]

What does it mean "Resources Manager -Problem reading info.plist file 1-byte UTF-8"?

Our git local repository on windows 7 was set to core.autocrlf = true.
There are Traditional Chinese characters in info.plist file, therefore this issue could be related to character settings.


Solution

  • After further more investigation, we found out that this issue is definitely related to mfcli.
    Perhapes mfcli on windows does not accept non ascii code characters in Info.plist. We could fix this problem easily by applying Localized strings for info.plist file in ios project.