Fwd: [vwnc] Publishing an app to apple store : the full script !
Hello! Here is a procedure to submit a VisualWorks application on AppStore. Maybe it can be adapted for Pharo? Cheers, Alexandre
Begin forwarded message:
From: Annick Fron <annick.fron@afceurope.com> Subject: [vwnc] Publishing an app to apple store : the full script ! Date: July 15, 2016 at 3:30:20 PM GMT+2 To: vwnc NC <vwnc@cs.uiuc.edu> Cc: Annick Fron <info@afceurope.com> Reply-To: Annick Fron <annick.fron@afceurope.com>
Hi,
Besides Maartenâs package to publish on applestore, here is a more condensed procedure describing the process.
Summary of needed actions to publish an application to applestore
Note : You can use the nano editor to edit system files using « nano" my file to ensure you stick to pure text format
- 1) Enroll as a developer on developer.apple.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__developer.apple.com&d=Cw...> - 2) Generate certificates : Developer id; 3rd party application installer - 3) Download certificates together with middle certificates from Apple (to complete the CA chain) - 4) Check availability of certificates in keychain utility, and avoid certificates duplicated in session and system tabs - 5) Generate one or more application ids in apple developer web site (in the following the app id will be com.fencingfox.saintgeorges)
- 6) Copy visual.app in a directory and rename it - 7) Thin visual and its Frameworks components to architecture i386
cd myapp.app/Contents cd MacOS lipo visual -thin i386 -output visual cd ../Frameworks lipo libcairo.2.dylib -thin i386 -output libcairo.2.dylib lipo libpixman-1.0.dylib -thin i386 -output libpixman-1.0.dylib lipo libpng15.0.dylib -thin i386 -output libpng15.0.dylib
Check it lipo - info visual
- 8) Edit myapp.app/Contents/Info.plist . To do that download Xcode, create a workspace, import the file myapp.app. Modify Bundle identifier with one of the application ids you have crated on Apple Developersâ site, define application category, bundle version without any letter
- 9) Edit localizations subdirectories under Contents/Resources/English.lproj (resp. French.lproj), etc. Modify the MainMenu.nib under Xcode.
- 10) Modify the icons MainIcons.icns in Contents/Resources using various tools. In case of problems you may use the following trick : ICON_OLD=icon.icns ICON_NEW=icon_new.icns iconutil -c iconset -o "${ICON_OLD%.icns}.iconset" "$ICON_OLD" iconutil -c icns -o "$ICON_NEW" "${ICON_OLD%.icns}.iconset"
-11) Copy your image.im to myapp.app/Contents/Resources/resource.im
- 12) Ensure everything is readable by all : chmod -R a+r myapp.app - 13) Ensure dylibs and visual have executable rights for all (chmod 555 visual).
- 14) Optional step : sign the components located in myapp.app/Contents/Frameworks with your developer Id certificate
codesign -s "Developer ID Application: Annick Fron (XXXXXXXXXX)" -v ./SaintGeorges.app/Contents/Frameworks/libcairo.2.dylib codesign -s "Developer ID Application: Annick Fron (XXXXXXXXXX)" -v ./SaintGeorges.app/Contents/Frameworks/libpixman-1.0.dylib codesign -s "Developer ID Application: Annick Fron (XXXXXXXXXX)" -v ./SaintGeorges.app/Contents/Frameworks/libpng15.0.dylib
- 15) Sign the app
codesign --entitlements ./sg.entitlements -s "Developer ID Application: Annick Fron (XXXXXXXXXX)" -v ./SaintGeorges.app
with for instance the following entitlements file (allows for networking) sg.entitlements <?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 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.apple.com_DTDs_PropertyList-2D1.0.dtd&d=CwMF-g&c=8hUWFZcy2Z-Za5rBPlktOQ&r=oQmY7z9BeClneFUFwUmfhw&m=QjkjlI7SzG9jxsr5Dyo16yT_L_enoNSP-Ix7Lg9GdS0&s=suq_Rm8s6qwyG970Q4m5zNZySs7tQXWWOcacUDBeKuY&e=>"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.device.usb</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.network.server</key> <true/> <key>com.apple.security.print</key> <true/> </dict> </plist>
- 16) Create an installer Create a component list :
pkgbuild --analyze --root ./SaintGeorges.app SaintGeorgesComponents.plist
Then use it pkgbuild --root ./SaintGeorges.app --component-plist SaintGeorgesComponents.plist --identifier "com.fencingfox.saintgeorges" --install-location "/" ./SaintGeorges.pkg
You can also use Packages http://s.sudre.free.fr/Software/Packages/about.html <https://urldefense.proofpoint.com/v2/url?u=http-3A__s.sudre.free.fr_Software...> http://thegreyblog.blogspot.fr/2014/06/os-x-creating-packages-from-command_2... <https://urldefense.proofpoint.com/v2/url?u=http-3A__thegreyblog.blogspot.fr_...>
- 17) Create and sign an archive productbuild \ --distribution distribution.plist \ --resources . \ --sign "3rd Party Mac Developer Installer: Annick Fron (XXXXXXXXXX)" \ --package-path ./SaintGeorges.pkg \ SaintGeorgesFinal.pkg
using for instance the following distribution.plist file <?xml version="1.0" encoding="utf-8" standalone="no"?> <installer-gui-script minSpecVersion="2"> <pkg-ref id="com.fencingfox.saintgeorges"/> <options customize="never" require-scripts="false"/> <volume-check> <allowed-os-versions> <os-version min="10.9"/> </allowed-os-versions> </volume-check> <choices-outline> <line choice="default"> <line choice="com.fencingfox.saintgeorges"/> </line> </choices-outline> <choice id="default"/> <choice id="com.fencingfox.saintgeorges" visible="false"> <pkg-ref id="com.fencingfox.saintgeorges"/> </choice> <pkg-ref id="com.fencingfox.saintgeorges" version="0" onConclusion="none">SaintGeorges.pkg</pkg-ref>
- 18) Generate the product productbuild --sign "3rd Party Mac Developer Installer: Annick Fron (XXXXXXXXXX)" --component SaintGeorges.app /Applications SaintGeorgesFinal.pkg --product ./requirements.plist
using for instance the following empty requirements.plist <?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 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.apple.com_DTDs_PropertyList-2D1.0.dtd&d=CwMF-g&c=8hUWFZcy2Z-Za5rBPlktOQ&r=oQmY7z9BeClneFUFwUmfhw&m=QjkjlI7SzG9jxsr5Dyo16yT_L_enoNSP-Ix7Lg9GdS0&s=suq_Rm8s6qwyG970Q4m5zNZySs7tQXWWOcacUDBeKuY&e=>"> <plist version="1.0"> <dict> <key>os</key> <array> </array> </dict> </plist>
- 19) From you Apple developer account connect to itunesconnect and describe your product
- 20) Upload your final package.pkg using ApplicationLoader launched from Xcode menu/Open Developer Tool (double click on the empty zone to upload)
Enjoy !
Annick Fron
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (1)
-
Alexandre Bergel