Your location:Tech News>News>Script>Solution goes blank on the issue iOS under 11 app icons

Latest News

Solution goes blank on the issue iOS under 11 app icons

Author:fsadmin

Views:

  Preface:

  With the release of iOS11 first developer preview version of iOS11 Beta1, about the new features on Apple''s WWDC will iOS11 system not mentioned by developers excavated.

  However, recently discovered that running in the simulator icon is missing in doing the project, Apple became the default icon whiteboard.For a start, only appears in the simulator, but also to make sure no one had the icon file, so there is no care, then slowly the problem on the real machine, starting with only iPhone X, then is the iPhone 8, slowly become either simulator or a real machine, all the icons are gone iOS11 system.

  Then more and more affected models and systems.

  try:

  1: In the beginning some people mistakenly think it is possible to change the icon file, and then delete the images.AppIcon file xcassest is from the new generation → Add icon, but still unresolved.(?)

  2: thought to be a problem image format / size, so all the pictures regenerate accordance with the provisions, but still to no avail.(?)

  3: Because of the method in addition to setting icon images.xcassest in AppIcon file can also be set at info.plist settings, or directly in the project which put a icon.png images to set

  Home, so we have examined a discovery was not for this reason (?)

  3: Reset phone.(?)

  solve:

  google the next found a lot of overseas development encountered this problem, and are using xcode9.X.X version, it is believed that Apple BUG

  

  But this problem is not who will appear not all use the device will appear xcode9 + iOS11

  

  Later, after our discussions finally someone said that this is actually cocoapods of BUG, temporarily and can not be resolved by updating cocoapods update, because the latest version of cocoapods

  There are the problem, the solution is as follows:

  

  Add the following code in your podfile on it

  post_install do | installer |

  copy_pods_resources_path = "Pods / Target Support Files / Pods- project name / Pods- project name -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

  like this:

  

  to sum up

  That''s all for this article, I hope the contents of this paper has some reference value of learning for all of us to learn or work, if in doubt you can leave a message exchange, thank you for the support scripts House.

  You may also be interested in the article: iOS11 icon is not displayed on Xcode9 AppIcon IOS App icon and splash screen size details

Recommend article

Relate article