19

I have old project that is running in Xcode 8 fine but when i am trying to run the project in Xcode 9 beta version I am getting the error

Failed to read file attributes for Images.xcassets

enter image description here

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Arvind Kumar
  • 2,371
  • 1
  • 18
  • 25

5 Answers5

71

Removing the reference of Images.xcassets and adding it again in Project resolved the error.

Arvind Kumar
  • 2,371
  • 1
  • 18
  • 25
0

I did face the same errors what you've but I just fixed it following ways-

  1. Delete the project's derived data
  2. Exit Xcode and open it again
Anindya
  • 351
  • 6
  • 7
0

Check your "Full path" in inspector and path in Finder, probably they are different. I also had this issue. on my pc was ../Development/MyProject/.. and ../development/MyProject/.. so in that was problem

Arkhyp Koshel
  • 175
  • 11
-1

I believe it is related to bug of cocoapods causes compilation error. To solve this, you can try add this to your podfile to the bottom level :

Change the target name according to your target name

post_install do |installer|

copy_pods_resources_path = "Pods/Target Support Files/Pods-XXXTARGETNAMEXXX/Pods-XXXTARGETNAMEXXX-resources.sh"
string_to_replace = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"'
assets_compile_with_app_icon_arguments = '--compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"'
text = File.read(copy_pods_resources_path)
new_contents = text.gsub(string_to_replace, assets_compile_with_app_icon_arguments)
File.open(copy_pods_resources_path, "w") {|file| file.puts new_contents }

end

E. Bakir
  • 11
  • 1
-1

It fixes for me by update to latest Cocoapods:

sudo gem install cocoapods --pre
Yao Li
  • 2,071
  • 1
  • 25
  • 24
  • Make sure Images.xassets path is correct, especially you git clone or copy the project from others, otherwise you have to select correct local path first in storyboard. – Yao Li Dec 04 '17 at 21:59