欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

iOS11上Xcode9 AppIcon 圖標(biāo)不顯示

 更新時(shí)間:2017年11月28日 08:49:00   作者:allentsing  
升級(jí)到iOS11系統(tǒng)下自己的項(xiàng)目桌面app圖標(biāo)不見(jiàn)了,是什么原因呢,經(jīng)過(guò)一番查找,終于發(fā)現(xiàn)問(wèn)題所在,現(xiàn)在分享給大家

實(shí)例一:

打開(kāi)工程目錄下:[工程名]/Pods/Target Support Files/Pods-[工程名]/Pods-[工程名]-resources.sh這個(gè)文件,替換最后一段代碼:

修改前:

printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text 
--notices 
--warnings --platform "${PLATFORM_NAME}" 
--minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} 
--compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi

修改后:

printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${BUILD_DIR}/assetcatalog_generated_info.plist"
fi

然后重新運(yùn)行工程即可

實(shí)例二:

在Xcode9下新建一個(gè)工程看一下, 設(shè)置圖標(biāo)是顯示的, 但是假如CocoaPod就不顯示了. 多方查詢發(fā)現(xiàn)
圖標(biāo)不顯示主要是cocoaPod出現(xiàn)了問(wèn)題, 需要在podfile文件加入以下腳本 [標(biāo)紅的地方]

1.加入腳本

platform :ios, '8.0'

target ‘lqz' do
  pod 'MJRefresh'
  pod 'AFNetworking'
  
post_install do |installer|
  copy_pods_resources_path = "Pods/Target Support Files/Pods-[工程名]/Pods-[工程名]-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

相關(guān)文章

最新評(píng)論