ios – What’s the distinction between ICNS and Asset.xcases/AppIcon?

[ad_1]

Is there a distinction between including one icns file to app sources:

    <key>CFBundleIconFile</key>
    <string>photosurface.icns</string>

and including a number of png recordsdata with Asset.xcases/AppIcon folder?

I attempted so as to add separate icons with

set(asset_catalog_path "ios/Belongings.xcassets")
target_sources(${PROJECT_NAME} PRIVATE "${asset_catalog_path}")
set_target_properties(${PROJECT_NAME} PROPERTIES
    MACOSX_BUNDLE TRUE
    XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon)
set_source_files_properties(${asset_catalog_path}
    PROPERTIES MACOSX_PACKAGE_LOCATION Sources)

however and not using a success, however was in a position so as to add icns file with the next code:

set(MACOSX_BUNDLE_ICON_FILE photosurface.icns)

# And the next tells CMake the place to seek out and set up the file itself.
set(app_icon_macos "${CMAKE_CURRENT_SOURCE_DIR}/sources/photosurface.icns")
set_source_files_properties(${app_icon_macos} PROPERTIES
       MACOSX_PACKAGE_LOCATION "Sources")

qt_add_executable(photosurface MACOSX_BUNDLE important.cpp ${app_icon_macos})

and it labored on each MacOS and iOS.

[ad_2]

Leave a Reply