[Interest] QMAKE_ASSET_CATALOGS

Jake Petroules Jake.Petroules at qt.io
Tue Jan 3 19:53:01 CET 2017


Asset catalogs in QMAKE_BUNDLE_DATA are deprecated in 5.7.1

Simply add the path to your xcassets bundle to QMAKE_ASSET_CATALOGS, like so:

QMAKE_ASSET_CATALOGS += path/to/resources.xcassets

You can also set the name of the app icon and launch image like so:

QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon
QMAKE_ASSET_CATALOGS_LAUNCH_IMAGE = Default

Other variables are documented in assets_catalogs.prf (https://github.com/qt/qtbase/blob/dev/mkspecs/features/mac/asset_catalogs.prf). _BUILD_PATH and _INSTALL_PATH typically do not need to be set.

> On Jan 3, 2017, at 10:32 AM, bralchenko at ics.com wrote:
> 
> 
> While not exactly QMAKE_ASSET_CATALOGS, but that’s how we manage assets, including iOS specific files. This is iOS section  of the pro file.
> 
> # iOS
> ios {
>     deployment.files = $$PWD/assets
>     QMAKE_BUNDLE_DATA += deployment
> 
>     assets_catalogs.files = $$files($$PWD/ios_files/*.xcassets)
>     QMAKE_BUNDLE_DATA += assets_catalogs
> 
>     launch.files = $$PWD/ios_files/Launch-My-App.xib
>     QMAKE_BUNDLE_DATA += launch
> 
>     QMAKE_INFO_PLIST = $$PWD/ios_files/Info.plist
> 
>     OBJECTIVE_SOURCES += \
>         ios_files/nativeiosfunctions.mm
> 
>     OTHER_FILES += \
>         ios_files/my_app.ini
> 
>     DEMO_INI_QRC = ios_files/demo_ini.qrc
> }
> 
> 
> 
> Regards,
>     Boris Ralchenko.
> 
> 
> 
> 
> 
>> On Jan 3, 2017, at 11:55 AM, mark diener <rpzrpzrpz at gmail.com> wrote:
>> 
>> Anybody know how to make QMAKE_ASSET_CATALOGS actually work.
>> 
>> No working example on net.
>> 
>> Qt 5.7.1 OSX building for IOS
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-- 
Jake Petroules - jake.petroules at qt.io
The Qt Company - Silicon Valley
Qbs build tool evangelist - qbs.io



More information about the Interest mailing list