On macOS, I made a *.app which is signed, then I used the following commands to generate a *.pkg:
pkgbuild --root a.app --install-location /Applications/a.app --version "1.0" --identifier org.a.a a1.pkg
productsign --timestamp --sign "*" a1.pkg a2.pkg
productbuild --package a2.pkg a3.pkg
productsign --timestamp --sign "*" a3.pkg a.pkg
a.pkg was able to install and run. But when I uploaded it to Apple Store via Transpoter, Transpoter said it couldn’t be decompressed.
If I use another commands to generate a *.pkg:
pkgbuild --component a.app --install-location /Applications/a.app --version "1.0" --identifier org.a.a a1.pkg
productsign --timestamp --sign "*" a1.pkg a2.pkg
productbuild --package a2.pkg a3.pkg
productsign --timestamp --sign "*" a3.pkg a.pkg
I could upload it to Apple Store without errors. But after this a.pkg is installed, there is no app icon in LanchPad and no app directory in “/Applications/”.
So I want a pkg which is able to install, run and can be uploaded to Apple Store. What errors in my commands? How should I accomplish this?