How to deploy a SenchaTouch App with Cordova? - ios

A friend send me the code of a SenchaTouch App (v2.0) he made. I should make some changes as the performance is not so good. To start, I want to "deploy" the App on my iPad and see where its slow. He told me that he didn't use SenchaCmd and the Cordova version seems a little bit older, too. In the picture below you can see the project structure. How can I deploy the App to my iPad (there are no XCode project files in these folders)? In the future I will do a complete refactoring of the App but for the moment he wants me to do some little performance tweeks with his code... Any suggestions?

Andres commnt was the correct hint. I could just create a new cordova/phonagap project with the command line and then put the contents of the folder in the www directory.

Related

Changes disappearing when building Cordova app for ios

I'm an absolute beginner with Cordova and was following this tutorial when I started experiencing my problem.
The tutorial is more aimed at building the project for android but I applied the same steps to create an ios build on my mac.
danieloram CordovaProject $ cordova run ios
the default project builds and runs fine but whenever I edit either the index.html or cordova.js files in the ios directory of the platforms folder and run the above command (or cordova build ios), all my changes revert back to the default code.. This behaviour isn't mentioned anywhere that I can see in the linked tutorial.
Am I missing something really obvious?
I haven't been able to find anything online about any other users experiencing this issue.. so I'm inclined to think it is trivial.
Seems I found my answer, and a quick one at that.
The tutorial did not explicitly state which index.html file I was to edit so I naturally assumed it was the file nested inside the platforms/ios directory.
These file however should not be edited as they are overwritten using the outermost index.html file in the myapp/www/ folder.
This SO answer sums it up perfectly with more detail.

How can you permanently change iOS app configuration in Meteor Cordova?

Every time I meteor build, I have to open XCode and do the following:
remove and add an item from "Link Binary With Libraries" (Facebook SDK)
add a URL Type (custom URL scheme for my app)
add a "Required device capabilities" to "Custom iOS Target Properties"
How can I edit my Meteor project to have these steps done automatically, and to auto add things to AndroidManifest.xml?
In some way use mobile-config.js or cordova-build-override?
I'm happy to see another guy who is trying to build a hybrid application using Meteor / extending a Meteor Cordova iOS app, since I'm facing the very same issues. So I'm very happy to share my experiences and approaches with you. :-)
So far, I ended up with the following approach:
I created a base template for my iOS app using meteor build (not meteor run ios-device, since I did not know if Meteor does some optimizations for production code).
Then, I copied the whole Xcode project under /platforms/ios to another loaction and used this new project as my "master" project from then on. This project is being enriched with native code, e.g. it also includes the Cocoa Pods I'm needing.
Of course, I also did not want to copy files each and every time I trigger a new Meteor build. At least, I would like to have the Staging/www folder updated, as this is happening quite frequently.
So my first (rather naive) approach was
delete the Staging/www folder in the master project
replace it with a relative link (using Xcode's linking functionality) to the Staging/www folder inside the .meteor/local/.../ios/ project
This approach did not work, since the shell script used in the Meteor Xcode project can't handle these links.
My second approach is to create a symlink on the filesystem level instead. This works as it should, and I'm able to build the project in Xcode as it should.
I could have followed the same approach for the Cordova plugins folder, but I've decided to replace the plugins manually in order to get a better control over them, even it means a bit more effort then.
Having the symlink in place also means that Xcode's version management (and also SVN which I am using for everything) will ignore everything below Staging/www, which is good in my opinion, because I'm already versioning the webapp code in the Meteor project itself.
BTW: I've started a discussion thread on hybrid mobile app on the Meteor forums as well, but so far it did not get too much attraction:
https://forums.meteor.com/t/building-a-hybrid-meteor-cordova-app-share-experiences/8212
Maybe we could follow up on Meteor-specific things there, to have the Meteor community participate in the discussion?
EDIT: I would also like to share an approach that failed completely, at least for me, maybe I was too dumb... Before I used Meteor's Xcode template as the starting point, I also tried it "the other way round", i.e. I started with my already existing Xcode app project and tried to include Meteor's / Cordova's part by hand. Using this approach, I never managed to set everything up correctly. I had lots of troubles and also had to tweak a lot of the compiler / linker flags to even get the code compiling. This grew me a lot of gray hairs. But even after I managed to get everything to compile, Meteor hang during startup - and I never figured out why.
One remaining problem I'm still facing is that Meteor's hot code push functionality seems to have some severe issues on iOS, that are also documented as GitHub issues. It can happen that the iOS app gets completely broken and needs to be reinstalled. I tried the mdg:reload-on-resume package, but this did not work as it should and made things even worse. As far as I can tell from the GitHub discussions, one should better disable hot code push until the Meteor team has addressed these issues. Breaking the app completely due to code pushes is not what my users would expect.
Unfortunately plist values (and assumably AndroidManifest.xml as well) can only be changed by a plugin:
Add entry to iOS .plist file via Cordova config.xml

MergJSON LiveCode External for iOS standalone setup

Currently we are only testing LiveCode 7.0.4 to see how it works and if we want to even use it. In our apps we need JSON from our server and have setup the mergJSON library/External in Livecode. So far, this is working very nicely in standalone tests for both MacOS and Windows. Today I started doing some simple tests on iOS and I am having a hard time with it.
I found answers where we need to use the Copy Files section in Standalone Settings, and that we need to copy the *.lcext file for mergJSON. Also watched the youtube how-to video that had mergSettings. There are no .nib files for mergJSON. Only .so, .dylib, and .dll, and the .lcext. I tried to add the .bundle file like the video, but the app will not launch, only black screen. Are other files required for mergJSON? And where do we put them? Do they stay in the same Externals folder structure or in project folder. Also, does an IOS runtime folder need to be created like in Widows/Mac? The app runs, no errors, but no JSON results are returned. I guess I am just a little confused on the Externals setup for iOS.
Just quick notes of our environment. We have Xcode 6.2 and the iOS Sdk 8.2. Live Code is 7.0.4 GPL (just testing and learning this way for now, will purchase commercial once I learn more.) I think the mergJSON I have is 1.0.15, downloaded from mergext.com. (which appears to be offline today) I have only tested on the simulator.
Thanks for any help.
You only need to include the lcext file in the copy files section of standalone settings. No need to setup a runtime folder for iOS etc.

Update and test assets on iPhone without rebuilding the application

We are developing an iPhone game and I would like to know if is possible to copy new or updated assets (images, animations, sounds or whatever) on the device and test them without rebuilding the application in XCode.
We would like to simplify the production pipeline process and we are trying to avoid our artists to rebuild the application every time they modify the assets.
Any advice is much appreciated.
Fede
Yes, I did it in one of my projects.
My strategy was easy, at the start, I stored the new assets in the app documents folder using a wifi tool specially created for that. Then, when the game needed a resource it checked if it was at the documents folder, if there was, it loaded, if not, it loaded the one from the bundle.
No, because any files that are updated in the XCode side will need to be rebundled and rebuilt. I'm surprised that this is an issue because the build process is remarkably faster between cleans. You're probably not rebuilding the entire application from scratch (ie after a Clean) each time, are you? XCode should detect any resource changes and update them on the device.

Can PhoneGap be used in apps built with theos?

I want to use PhoneGap to make a Cydia app, however the iOS instructions on their website only show how to use it with Xcode.
I don't have a Mac, but I'd like to be able to make my app for Cydia, with theos. Is this possible with PhoneGap, or is it only usable with Xcode?
I've never done this, but YES it should be entirely possible. The Xcode instructions set it up for you to have a specific template with all of the phonegap files already in the proper locations. So it's easy to get going. But it doesn't do anything else that is particularly special. Theoretically you could simply setup all of the files in a theos project.
To do this you will need to 'reconstruct' exactly what goes into a phonegap template. I have no experience with theos, but a rough idea of what you will need to be able to do includes the following:
Import PhoneGap.framework
Reconstruct AppDelegate code
Import Supporting Files (PhoneGap.plist)
Additionally you will need to configure the folder structure with the www folder (that the webview loads from) including the index.html file and the phonegap-1.0.0.js file.
So yes, it should be possible. Let me know if you are successful. Good luck!

Resources