xcode 4 + phonegap + sencha touch … not update JS upon build? - xcode

I have a similar issue to xcode 4 + phonegap ... not update JS upon build? but with the inclusion of Sencha Touch.
The problem is html changes are recognized but changes to javascript files are not seen when running the app in the simulator. Here's a quick list of suggestions made in the post listed above, none of which worked for me:
update and save .plist
touch www
clean project (Command+Shift+K)
clean build folder (Command+Shift+Option+K)
Deleting the app from the ios simulator and relaunching works but that quickly becomes a hassle. Sencha Touch takes care of its own caching using localstorage. Even though they give you the ability to define the caching strategy in app.json, I haven't found a configuration that works.
Here are the versions I'm using.
XCode - 4.3.2
PhoneGap - 1.6.1
Sencha Touch - 2.0.1 FINAL

If i understand your problem correctly i think it has something to do with HTML5 application cache. Take some time to study a little on how HTML5 Application Cache works here.
The reason your changes are not being reflected is maybe because the hash values in the app.cache file is not being changed... For the js file you wish to get changed change the hash value in comments to anything you want... This would ensure that the browser does not read the HTML & JS files from the cache but would rather download the new updated version...
When you are reloading the page in browser open the console you would get an idea of the updating process...
Hope it helps...

Related

Performance issue for ion-tabs

I have created a ionic tabs project using ion-tabs component. But the issue is when user clicks on tab icon, tab is not changed immediately. It takes 1-2 seconds to switch the tabs.
HTML Code:
<ion-tabs class="footer-tabs" selectedIndex="selectedTabIndex"#footerTabs>
<ion-tab tabIcon="list" tabTitle="'Notice'" [root]="noticepage"></ion-tab>
<ion-tab tabIcon="book1" tabTitle="'Homework'" [root]="homeworkpage"></ion-tab>
<ion-tab tabIcon="calendar1" tabTitle="'Event'" [root]="eventpage"></ion-tab>
<ion-tab tabIcon="list-box1" tabTitle="'Attendance'" [root]="attendancepage"></ion-tab>
</ion-tabs>
If I create new tabs project, then the component is working fine. But its giving issues in my project. I also tried by removing methods called on the ionPageDidEnter() for all the pages.
Does anyone know what could be the possible issue ?
I have debugged and tried to find possible issues. The issue was because of ion-list on pages , which was causing delay in tab switch. When I reduced ion-items to 30, performance increased. I implemented infinite scroll to avoid the performance issue.
thats is mostly dependant on how you load your pages and how you compile your project
try to lazy load you pages and compile your apk with ionic cordova run android --aot --minifyjs --minifycss this helps in making you app run much faster.

Duplicated Xcode project issue

I've duplicated my Xcode project - basically I'm creating an app with similar functionality but with different content. I duplicated the main folder and updated the names in the new project for the new app following a guide on Youtube that was on another thread, but when I updated the background of the storyboard for the new app, I've now seen it has changed the storyboard of the original app, so it must be using the same story file, or be linked somehow.
Please can someone suggest what I might have done wrong, or what I need to do when duplicating the project to avoid the same story file being used.
Please check the "Full path" of your file like shown below. Make also sure, that all your other files are linked correctly.

PTC Creo PZV file view in browser?

i have one app installed which is using arbortext ptc isoview /creo plugin to show files, so i wanted to make app to take snapshot of it in my IE, but cant find the way to load pzv file, if you just drag and drop it, does not work, i also tryed loadin via html, but seems my params are wrong?
solved, by ripping 3 java scripts and displaying full screen pvz file in webbrowser and then taking snapshot

slow scrolling when using responsive bootstrap theme

I am using a bootstrap 3 template and have noticed on some that scrolling is not smooth and kind of bumpy. I am not even sure what to look for. This only happens in Chrome. It does NOT happen in Safari or Firefox.
Is this a javascript or css problem? I have never run across this before.
This seems to happen worse in Chrome for mac, but also happens in chrome for windows.
It seems to happen when I make the window smaller and then make it bigger again. If I leave the window the same size, it seems to scroll fine.
Link:
http://demo.phppointofsalestaging.com --> Click Sales then resize the window in Chrome and then scroll down and then up. You will notice it is very bumpy and not smooth
:root { scroll-behavior: auto; }
Add this simple code to your custom CSS file.
"scroll-behavior" declared as "smooth" in bootstrap css/bootstrap.reboot.css.
So we need to overwrite it using our custom css.
The problem is in the jquery.nicescroll plugin that is used with the theme, the function jQuery.fn.scrollTop make the problem, it takes more than 75% from the cpu when run. my solution is :
You are using the jquery.nicescroll plugin version 3.4.0 use the latest version currently version 3.5.0 available.
If not working as expected, downgrade to version 3.2.0 I'm using it with my site without any problem.
Also check that if the hwacceleration in the Configuration parameters of the plugin is set to (default: true).
Update 1:
nicescroll plugin is a solution to have a custom scrollbars compatible with desktop, tablet and phone devices and to override the default scrollbars of the browser " more information her ", "you didn't see the diffrence because the plugin used in your project works when your browser window under 767px" so another solution if you don't need it you can remove the plugin from your files by following this steps:
Delete the plugin file (jquery.nicescroll.js) from your script folder.
Delete the plugin link from all your files.
Delete the plugin function lines (21 to 36), (49 to 66), (149) from (unicorn.js) file.
Update 2:
I made some tweaks for the (unicorn.js), download it from her, then replace your original one.
Hope this will help you.

Phonegap on WP7 does not load images

I'm starting my first PhoneGap project and am developing using Visual Studio and Windows Phone 7, although I intend on ultimately deploying to iOS and Symbian as well.
However, I'm stuck at Step 1. I have added an image to the www/images folder, and put the following code:
<img src="images/login-btn.png" width="103" height="42" style="margin-left:90px;" />
And I get:
It works fine when I preview it in IE9, but I don't have a Mac to test it on iOS yet.
It's worth noting that the JS files and CSS have loaded fine, it's just any image (whether referenced in CSS or an <img> tag) always comes up broken.
My guess would be the Build Action of your image file is incorrect.
According to http://wiki.phonegap.com/w/page/48672055/Getting%20Started%20with%20PhoneGap%20Windows%20Phone%207#4Reviewtheprojectstructure section 4. You should be setting the Build Action of your images etc to Content which simply copies them into the output project when it is built. They are probably currently set to Resource or None.
To change the Build Action right click a file and choose properties to go to the properties window if you do not already have it open. It is probably then the first property. Just click and choose the correct one.
I'm posting this to questions that I found while trying to find my answer to the same problem. The JS framework I use adds a url query to each image when in a debugging mode (in order to force browsers to reload image, instead of using cached). So, my image "image/background.jpg" would be accessed as "image/background.jpg?d=34342233". But, when running on PhoneGAP for Windows Phone, it won't recognize the image, and thus it shows up as broken. So, I had to turn off debugging for the framework I use, and suddenly the images showed up (still, don't forget to set the Build Action to "Content" as mentioned earlier).

Resources