For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 11 replies, 2 voices, and was last updated 14 years, 12 months ago by
support-michael.
-
AuthorPosts
-
SonamGyatoMemberI’ve getting data from a remote server using XMLHttpRequest.
When i test the app within the test environment it works fine.
then when i upload the app to mobi-server and then test in
the test environment (and the iphone) i get a XMLHttpRequest
status result of 0. (see attached image)XMLhttprequest seems to set the status to 0 if there’s a
cross-domain request. that’s why the url that i do an http
GET on, sets the headerAccess-Control-Allow-Origin to *
so that should not be a problem – since i’ve confirmed this when
testing in the test env.the problem is when i package the webapp and then send it
to the iphone and also the test-env. that’s when i get the
status=0 message.Attachments:
You must be logged in to view attached files.August 6, 2011 at 8:15 am #318719
SonamGyatoMemberI ran the same script from a test html file from the
emulator browser and it worked also – i.e. doing
the cross-domain XHR call.The problem seems to occur when the app is packaged
and sent to the phone or the emulator.August 7, 2011 at 2:39 pm #318730
SonamGyatoMemberi think i got this problem solved.
if i test the app using the test-center – the XHR works.
if i package it and send to mobi server or have to sent
to the emulator using the send-to-my-phone feature, the
XHR does not work.i used the Export HTML feature and uploaded all the files
to my server (a different domain than the one the XHR calls)
and now it seems to work.August 8, 2011 at 5:04 am #318743
support-michaelKeymaster@everest
We are investigating this further to see if the Test Center is setting the COR headers correctly. I will follow up with you once we know a bit more.August 8, 2011 at 6:16 pm #318763
SonamGyatoMembercross-domain XHR calls don’t seem to be working.
I’ve added http header on the cross-domain url
Access-Control-Allow-Origin set to asterisk
so the XHR call should work.
Please try to resolve this asap because i’m dead in the
water right now.if you’d like i can send you a sample app.
August 9, 2011 at 4:39 am #318769
support-michaelKeymasterWe did more investigation yesterday. Try the following:
1) goto the Window>Settings>Local Web Server and enable it
– see if COR works2) if you app is configured for offline support then try either disabling AppCache support (temporarily)
– see if COR works3) if #1 and #2 not working then please send me a sample app and we will resolve this at once. You can send it to support at genuitec dot com to my attention
August 9, 2011 at 6:02 am #318772
SonamGyatoMemberi tried #1 and the XHR works.
I like to do the test cycle by clicking on the right green
arrow….the problem with enabling the local server is that
any changes i make to the _custom.js file is not reflected
in the test env.August 9, 2011 at 6:30 am #318774
support-michaelKeymaster> with enabling the local server is that any changes i make to the _custom.js file is not reflected in the test env.
How are you editing the custom.js file? For example are you opening the js using the Test Center’s View Source editor or are you using an external editor such as notepad?
If you use an external editor then you need to reload the web page to pickup recent changes to any of the web files (html, css, js). The Test Center includes a “reload” button on the toolbar and the right-click context menu.
August 9, 2011 at 7:39 am #318777
SonamGyatoMemberyes i do use an external editor…didn’t know there was an internal
editor.i’m pretty sure i refreshed the .html – but i could be wrong.
i’ll keep an eye on this.
fyi, when i use the Export HTML feature – it exports the skeleton
??_custom.js file.I think if the file exists in the exports folder – it should export
that custom file.also, any chance to add an option to obfuscate the custom.js.
August 9, 2011 at 8:28 am #318779
support-michaelKeymaster@everest
>I think if the file exists in the exports folder – it should export that custom file.This is a good pt. I opened a bug for this.
The issue is that Run in Test Center was meant to be a quick test/feedback mechanism with the generated code sort of out of sight and not central to UI mockup process. What we have learned is that working with project_export/ code is more the primary method and Export HTML is used much less that originally envisioned. The plan to address this is to introduce a project concept in the next couple of months that makes it much easier to tie together the UI design process and manual coded resources in a unified environment.
We can also make obfuscation completely configurable as part of the project support.
August 9, 2011 at 3:28 pm #318794
SonamGyatoMember> We can also make obfuscation completely configurable as part of the project support.
please add this ASAP!!!
i’ve found this tool quite useful and plan to create a pay-4-app and do not wish people
to just steal the code.i think many others would also find it useful.
August 11, 2011 at 12:00 pm #318837
support-michaelKeymasterI discussed this feature with dev team. I added it to our enhancement tracking system. Should be doable but will need to get it scheduled for a release.
-
AuthorPosts
