Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Assets.car file through command line for app resigning

Tags:

ios

My app is white labeled by building a generic app and then resigning the app bundle with new images. Before iOS11 I could achieve this by switching in new images into the bundle and resigning. However now that asset catalogs are required for the app icons I'm having trouble creating the Assets.car file.

Here is what I have tried:

Copying Images.xcassets to a working directory (with a build directory next to it). Images.xcassets contains AppIcons.appiconset and LaunchImage.launchimage.

From the command line

xcrun actool Images.xcassets --compile build --platform iphoneos --minimum-deployment-target 9.0

It seems to run but no file is created.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.actool.compilation-results</key>
    <dict>
        <key>output-files</key>
        <array/>
    </dict>
</dict>
</plist>

I hope I'm missing something obvious.

like image 633
AllDayer Avatar asked Nov 19 '17 21:11

AllDayer


2 Answers

Have getting same issues, but after an hour R&D got success with the below code:

 /Applications/Xcode.app/Contents/Developer/usr/bin/actool Assets.xcassets --compile build --platform iphoneos  --minimum-deployment-target 9.0 --app-icon AppIcon --output-partial-info-plist  myfolder/info.plist

or

/usr/bin/xcrun actool Assets.xcassets --compile build --platform iphoneos --minimum-deployment-target 8.0 --app-icon AppIcon --output-partial-info-plist build/partial.plist

Where you can change platform value and output path {such as myfolder/build is folder name}

like image 133
Rawan-25 Avatar answered Oct 22 '22 18:10

Rawan-25


You just need to use the name of your appiconset.

So in this example add:

 --app-icon AppIcons --output-partial-info-plist build/partial.plist
like image 30
fulvio Avatar answered Oct 22 '22 18:10

fulvio