Sencha Cmd 126.96.36.199 fails to build navite iOS apps on Windows
Ext version tested:
Sencha Cmd 188.8.131.52 (Windows version)
Sencha Touch 2.0.1-b3
Windows XP 32-bit (SP3)
Sencha Cmd 184.108.40.206 fails to build navite iOS apps on Windows
The issue seems to appear when the native app package needs to be appropriately signed with the given certificate and developer credentials
Steps to reproduce the problem:
Install Sencha Cmd 220.127.116.11 and Sencha Touch 2.0.1-b3 on the PC (in my case Sencha Cmd is installed in "C:\Program Files\")
Go to the Sencha Touch directory and issue sencha generate app with some name and path to create the code base for a new ST app
With an appropriate iOS developer and app's credentials and a certificate available (where those same credentials and certificate were successfully used to generate native apps with Sencha SDK 3.0.0 Beta 3 many times): Edit the applicationName, applicationId, bundleSeedId, and certificatePath in the packager.json file. Also change platform to "iOS".
Build the native iOS app with sencha app build native.
The result that was expected:
The native iOS app package is successfully built, like it was with Sencha SDK Tools in the past
The result that occurs instead:
After the building sequence comes to "Packaging your application as a native app...", the stbuild.exe is aborted due to referencing a wrong memory address. (See the screenshot attached.)
Building the native iOS app package is not finished
Screenshot or Video:
See the screenshot attached
Using sencha package build does not make any difference; the same application error.
It is important to note that the issue does not appear when packager.json has platform set to "iOSSimulator". Thus I guess that the bug is related to signing the generated iOS app package with the given certificate.
There is a recent report on Sencha Cmd 18.104.22.168 crashing on linux64 [TOUCH-3454]. I am not sure if these two issue have the same root cause or not. But based on that other report, from how I read it, they may potentially be related in some way.
Temporary workaround for this bug, for those who can't wait for permanent fix
Here is a workaround that I have found and successfully used: The stbuild.exe utility coming with Sencha SDK Tools 2.0.0 Beta3 appears to remain fully-functional and to keep working well with Sencha Cmd 22.214.171.124. In other words, you just need to replace the stbuild.exe coming with Sencha Cmd with its previous version from Sencha SDK Tools -- see the exact steps below.
Please, note: I cannot know for sure if this workaround is free of any side effects and limitations. Sencha developers are in a position to comment on that -- and I would be really glad to see their notes and comments here. The only thing that I can now state for sure is that I have successfully used the following steps on my Windows XP (32-bit, SP3) with Sencha Cmd 126.96.36.199 and Sencha Touch 2.1.0 beta3. And then I have successfully built several native iOS apps using my iOS developer's certificate and credetinals, uploaded the apps on my iPhone and everything works great to me so far.
For those who are eager to try -- with my note above taken into account -- here are the steps you need to do:
If you have Sencha Cmd package installed, then temporary uninstall it (just in case).
Temporary install the "famous stbuild fix" for Sencha SDK Tools (if you don't have it installed). It is available at: https://dl.dropbox.com/u/8793605/stbuild.msi (Note that you don't really need to also install back the Sencha SDK Tools package, to apply this workaround. But if you have it installed, it's fine.)
Go to the directory where Windows is installed on your system (usually it is C:\WINDOWS) and find the stbuild.exe file inside it. Copy the file to some temporary location, to preserve it.
Now you can uninstall the "stbuild fix". You can find it under the "stbuild" name in the "Add or Remove Programs" list. (If you had Sencha SDK Tools installed, you can uninstall them too at this step.)
Install Sencha Cmd 188.8.131.52. Go the directory where it has been installed and then to ./Cmd/184.108.40.206/stbuild/ directory inside it. You should see the stbuild.exe file inside that directory.
Replace that new version of stbuild.exe with the earlier version of the utility -- the one that you temporary saved on a previous step.
(It may be wise if you don't just overwrite the new version of utility, but rename it into something like stbuild.exe.new. This way you can later quickly unroll the change, shall you need to do so.)
Besides the stbuild.exe file, which you have just replaced, you should also note the st-res folder inside that same directory. Remember about this folder -- you will need to copy it in just a minute.
Create a new sub-folder named stbuild inside the directory where Windows is installed on your PC. (Again, usually that is C:\WINDOWS, in which case you will need to create C:\WINDOWS\stbuild)
Now copy the previously-noted folder st-res, with all its sub-folders and files, into the stbuild sub-directory which you have just created. (That is, for a usual Windows OS setup, after completing this step, you should have C:\WINDOWS\stbuild\st-res, with some nested folders and files in it.)
Congrats! You have applied the workaround allowing to build the native iOS apps on your system with Sencha Cmd 220.127.116.11 and Sencha Touch 2.1.0 beta3!
In addition you will also need to fix two more of the known issues before you try building your apps (at least, double-check on those two below):
After using sencha generate app, don't forget to manually set Ext.path for your application to "touch/src" (that issue has already been reported several times on the forum over the last few days);
Also, manually replace the contents of ./resources/icons/, ./resources/loading/, and ./resources/startup/ in your application's folder with the contents of sub-directories with same names inside the ./cmd/templates/App/resources/ sub-directory that is located inside where your Sencha Touch 2.1.0 beta 3 is installed. This is required because the graphic files in those resource directories somehow get damaged when using sencha generate app with Sencha Cmd 18.104.22.168. (That issue has also been reported and discussed on the forum recently. And I can just confirm that it does appear on my system as well.)
Now edit your package.json as appropriate and you should be able to use sencha app build native successfully. Good luck!
I hope the above will work, at least, with the other Windows-based installations (not only on XP). Maybe that same fix can also be applied on Linux systems too. Those interested are welcome to try and report if the steps provided helped them as well (or if some extra details or instructions need to be added, esp. for Linux-based installations, where the system directory names will obviously be different).
A word from the Sencha team will also be appreciated!
Unfortunately, the bug is still here with just-released Sencha Cmd 22.214.171.124 (for Windows). Checked it this morning. Fortunately, the above workaround is still working to me.
What is the real (biggest) issue to me, at the moment, is how native iOS apps built with Sencha Cmd 126.96.36.199 and 188.8.131.52 cannot run on iOS 6 -- they just immediately fail when starting (where on iOS 5 they run just fine). For that one I don't know any real workaround (yet) and do hope that Sencha team will react on that very soon...
Thank you VladimirTechMan - this workaround worked perfectly for me after following your comprehensive steps precisely. Unfortunately I too have the problem on iOS 6 where my app opens up and immediately closes down. If anybody can contribute a clue as to what the problem might be it would be much appreciated.
You're very welcome! I am glad the workaround helped you too.
As for the issue on iOS 6, I was really excited to note that Sencha guys have marked my report with status "fixed" (in RC1) -- hopefully RC1 will be released soon and will make that issue (as well as this one) a thing of the past. Fingers crossed.
After doing a quick test this morning, I am absolutely glad to state that the issue is now eliminated (on Windows) with Sencha Cmd 184.108.40.206: The native builds are successfully signed and they also run fine on iOS 6!
All those who's been waiting for the fix during the recent weeks should be very happy now. I certainly am.
Many thanks to Sencha developers (and I'd like to say special thanks to Alexander Voloshyn) who worked to eliminate the issues with signing on Windows and running the packages on iOS 6.