PDA

View Full Version : [FIXED] [Sencha Cmd] iTunesArtwork is not correct in native iOS apps if packaging on Windows



VladimirTechMan
29 Oct 2012, 11:42 AM
Ext version tested:

Sencha Cmd 3.0.0.230 for Windows (all previous versions of Sencha Cmd and Sencha SDK also have this problem)
Sencha Touch 2.1.0 RC2
iTunes 10.7 for Windows and MacOS

Description:

Though there is iTunesArtwork.png file in Sencha Touch application resources, the native iOS apps packaged with Sencha Cmd on Windows and installed inside iTunes on PC or Mac don't actually have that artwork image shown in LIBRARY/Apps inside iTunes

Steps to reproduce the problem:

Package a Sencha Touch 2 application with Sencha Cmd as native iOS app
Drag and drop the package into LIBRARY/Apps inside iTunes, to put it into the library and make it ready to be installed on the connected iOS devices (when sync'ed)

The result that was expected:

The application appears inside LIBRARY/Apps in iTunes, with its application name and the provided artwork image shown

The result that occurs instead:

The application does appear inside LIBRARY/Apps in iTunes, with its application name, but without the artwork image that is provided in Sencha Touch application resources

Workaround:

Copy the iTunesArtwork.png file inside the native application package directory that was created with 'sencha app build native'. Rename that copy into iTunesArtwork (i.e. remove the file extension).
Now, when the application package is dragged and dropped into LIBRARY/Apps in iTunes, the application will have the correct artwork image shown, as expected.

Notes:

I see that Sencha Cmd now copies iTunesArtwork.png into the webapp and webapp/resources/icons sub-directories inside the native application package directory. I am wondering if those two copies inside the native package are actually required and ever used. (If not, then removing them would slightly reduce the size of packaged native iOS applications, which is a good thing.)
It is suggested (https://developer.apple.com/library/ios/#qa/qa1686/_index.html) at developer.apple.com that iTunesArtwork has resolution 512x512. Currently the default artwork image coming with Sencha Touch has resolution 500x500. Though iTunes is able to handle that resolution too, it would be great if the Sencha team could also re-size the default artwork image supplied, in accordance to Apple's guidelines.

mitchellsimoens
29 Oct 2012, 1:12 PM
Thanks for the report! I have opened a bug in our bug tracker.

voloshyn
14 Jan 2013, 10:57 AM
OK, fixed, in 2.2. You need to put iTunesArtwork file in resources/images and it will be automatically used by packager.
Apple requirements to iTunesArtwork file is: 512x512, png format, no extension.

VladimirTechMan
15 Jan 2013, 12:27 PM
OK, fixed, in 2.2. You need to put iTunesArtwork file in resources/images and it will be automatically used by packager.
Apple requirements to iTunesArtwork file is: 512x512, png format, no extension.
Cool! Many thanks, Alexander. Truly appreciated! I have one extra question, though:

Currently there is file iTunesArtwork.png inside resources/icons (it is automatically created when using sencha generate app). I am wondering what that file is for? It looks as if it is not used for something really useful now. And it appears, to me, that the file was intended as a default artwork for iTunes for Sencha Touch apps (much like the default Sencha PNG icons in that same folder). If that is correct, may I propose that Sencha developers move that iTunesArtwork.png file inside resources/images in the coming 2.2 version? -- and also remove its extension? (It may also be a good idea to scale it up a little bit, to 512x512 -- right now it is 500x500).

What do you think?

voloshyn
15 Jan 2013, 12:34 PM
Yeah, sorry, it's resources/icons, Apple requires this file without extension but it's no problem, with or without extension packager will rename it automatically, as for 500x500 I will talk to the guys to resize that

VladimirTechMan
15 Jan 2013, 1:01 PM
Great! Thanks for all your help!

huberte
24 Jan 2013, 10:06 AM
Could you explain me the workaround for a packed application please ?

I used
sencha -d app package build ios.json

Have iTunesArtwork.png in resources\icons

Ended with an .app then .ipa without the itunes icon

Thanks

EDIT :


Workaround:

Copy the iTunesArtwork.png file inside the native application package directory that was created with 'sencha app build native'. Rename that copy into iTunesArtwork (i.e. remove the file extension).
Now, when the application package is dragged and dropped into LIBRARY/Apps in iTunes, the application will have the correct artwork image shown, as expected.


I'm confused, you're using native to build package app for iphone ? you're not using sencha cmd after building package ?

VladimirTechMan
25 Jan 2013, 1:17 AM
Hi huberte. Yes, I use 'sencha app build native'. And then just drag and drop the created .app folder into the 'Apps' being opened inside the iTunes window -- and then iTunes will create the corresponding .ipa file on its own...

That said, I think you may keep using your way to create the .ipa files (with the specific sencha command you showed above) --- the fact is that any .ipa file is essentially just a plain ZIP-packaged archive (which just has that "special" extension, .ipa). Thus you may create a native iOS application (as an .ipa file), then re-name that file to change its extension from ".ipa" to ".zip" (temporarily). Then unpackage the contents of that archive into a new (temporary) folder and then copy file iTunesArtwork.png into that folder (important: copy the file into the folder itself, not into any of sub-folders inside it). Remove the .png extension of the copied file. Then repackage the whole contents of the folder into a ZIP-archive (with the same name as the original .ipa file had) -- if required, change its extension back to .ipa manually. That should work.

One extra note, though: When re-packaging the contents of the temporary folder back into a ZIP-archive, please, double-check that the re-created archive contains only the contents inside the folder, and not the folder itself -- otherwise it won't work. Also, you may need to check the parameters of your specific ZIP-archiver, to do that all properly. Anyways, give it a try... And I hope it will work for you -- personally, I found the way of creating an .app folder and then dragging and dropping it into the iTunes window (with 'Apps' opened in it) to be much easier for myself.

huberte
25 Jan 2013, 3:21 AM
Wow, thanks :)

But in your case, you can't sign your app, can you ? Or send it to the app store... ?

You can synchronise your iphone with this procedure ?

VladimirTechMan
25 Jan 2013, 3:28 AM
I do sign it with my iOS developer certificate this way, no problem -- and then I load my apps on my (real :) ) iPhone 5, just fine. I was doing it that way for quite sometime, indeed.

As for officially loading to the app store... -- well, I would possibly suggest using the "longer" procedure, with manually adding iTunesArtwork to the generated .ipa file, just to be on the safe side with their internal reviews and examination of the apps... During the development cycle, either way works fine to me.

huberte
26 Jan 2013, 2:38 PM
Sorry to ask again, but is there a way (with your solution) to test the app on the iphone simulator ?

I'll try your way of adding the Itunes icon, hoping it will not break the signature of the ipa file (it seems, you can't do the same thing iwth an apk file)

Edit : tried your way. build native, put the .app in the application folder from the ios emulator. the app is not launching, don't know why.... :(

VladimirTechMan
28 Jan 2013, 1:43 AM
Hi huberte,

I think there should be a way to test on the simulator provided with XCode. That said, right now I am more focused on (and interesting in) developing navite iOS apps with Sencha Touch using Windows platform; that is my specific interest.

I can check on OS X too. And I may eventually be able to get back to that sometime during this week (possibly -- cannot guarantee, sorry). If the matter is really urgent to you, you may want to make a quick test yourself and report your own results...

huberte
29 Jan 2013, 6:59 PM
I'm developping on windows too.

Here is what I do (just have in your mind that all my builds work on android (Testing/package through server, and apk packed directly on device)

I'm just tired to send ipa files over the net and not be able to test them before on iosSimulator

Build testing, build package, build native : no error

1. try to pu the app folder in the "secret" folder of ios Simulator on MacosX :


/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\Launching the app ends with a return on ios home screen launcher

2. try to launch build testing/package/native and then "add to home screen" launcher from safari. App hangs (I have ext.device.Device in my app.js but I need to), dots are blincking, nothing happens.

EDIT : Works without Ext.device.Device. It's a known bug, when comes the bug free version( and the one with the itunes icon ?) Thanks !

So I don't really know how to ake my app works on iOSSimulator with all my processing build on windows.

thks again...

VladimirTechMan
30 Jan 2013, 2:10 AM
huberte,

While I didn't have a chance to check myself in relation to item 1 from your response above, I think I can quickly help you with item 2: That is a well-known issue introduced just a few beta releases prior to the GA of Sencha Touch 2.1. Please, look at my report about it in the thread below and, specifically, at the workaround that can be applied manually while we are waiting for ST 2.2.

http://www.sencha.com/forum/showthread.php?246668-ST-2.1.0-RC2-iOS-web-apps-get-stuck-on-loading-if-require-classes-from-quot-Ext.device-quot

Note: You will need to check all the files for the Ext.device.Device classes that you use in your app(s). And correct where necessary. (There are several "logical patterns" implemented inside those files and the changes that you will apply to each of them depend on the exact logic inside the file. But that is easy to figure out.)

huberte
30 Jan 2013, 4:05 PM
Strangely I can add my app to iOS homescreen when I launch from the root app on server (with ext.device.Device commented out).

Soon as I build native/ testing/ package/production and I pointed safari there, then adding to home screen, the app does not start and stay by the blinking dots.... :(

gasper87
10 Jan 2014, 8:31 AM
i have one problem, compile the application with "sencha app build native" and install app into ipad. when i start the application into ipad, correctly start, but the images not load. if i test the application with browser the images are loaded.