I'm having some issues with Phonegap Build and my Iphone.
At the moment I have the following preferences in my config.xml
<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="UIWebViewBounce" value="false" />
and the following meta tag;
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=medium-dpi" />
The application compiles fine and my app runs off the 'Test flight' system very well, barring this one issue. The application seems to be 'Draggable' (which I believe is the bounce problem).
Things i've tried;
Delete my Phonegap Build Project.
Remove all config.xml files barring my main one located in the project root.
Using only one of the preferences etc.
Does anyone have any idea how I can prevent the app from being dragged down the screen (I have elements that have overflow on them, and they scroll fine, but the whole app scrolls some times which really effects the user experience).
Thanks.
*Edit 1
So i've opened up my .ipa file on a mac and it seems that in the config.xml the "DisallowOverscroll" is being set to false. I'm not quite sure why this would be happening?
Well, actually just the <preference name="DisallowOverscroll" value="true" /> should be enough, your viewport tag looks good enough. Try to completely remove the ios platform, and re-add it again.
Okay, So I figured it out, thanks to dsokurenko who put the idea in my head that the config.xml wasn't actually being read!
So my steps to fix this;
Create a new phonegap project
Copy my files across
Move config.xml to /www/ folder (I believe this was the key to fix the issue, change any config values that have /www/ in them
Create new app on Phonegap Build, re-build and install!
This worked for me and I hope it helps someone else.
Related
We have an umbraco install that just recently started taking forever for the home page to load. Like 5+ minutes. I'm a developer but have never really worked with umbraco. How can I go about trying to debug this?
Edit** So I've pinpointed it to this line. Any ideas why it's making the site so slow?
<xsl:variable name="ContentItem" select="umbraco.library:GetXmlNodeById($itemToDisplay)" />
Unlikely the GetXmlNodeById is so slow. XSLT is outdated,I assume that you also have an old umbraco like 4,5,6
To find the issue use the Debug mode.
In the web.config below <appSettings>
set umbracoDebugMode to true
<add key="umbracoDebugMode" value="true" />
Go to your slow page and add this querystring ?umbDebug=true&umbDebugShowTrace=true to the URL.
Angular $templateCache, $stateProvider and ng-include works beautifully in a web browser, but on native ios using phonegap/cordova it won't load templates or go to states
I've gone through the checklist:
remove <base href="/">
make sure paths are relative "template.html"
vs "/template.html"
make sure html5Mode is false
load templates.js before angular
make sure dependency injections are in place
Here are some examples of what works in a browser but not on native ios.
$stateProvider.state('start', {
url: '',
templateUrl: 'templates/start/start.html'
});
and
$state.go('start');
and
<div ng-include=" 'fileFromTemplatecache.html' "></div>
Any idea? I can't find a solution that works.
Others will come across this issue I'm sure. The solution has to do with the config.xml file at the root of your mobile build. This is what worked for me...
<allow-navigation href="file://*/*"/>
<allow-navigation href="*"/>
<allow-intent href="file://*/*"/>
<allow-intent href="*"/>
<access origin="file://*/*"/>
<access origin="*"/>
I want to create folder inside the internal storage(android/data/com.AppName) in android and similarly for IOS. How to do that using phonegap?
Similarly what is the internal storage path for ios?
On Android: as per official API docs
add one of these two lines to config.xml:
<preference name="AndroidPersistentFileLocation" value="Internal" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
Without this line, the File plugin will use Compatibility as the default. If a preference tag is present, and is not one of these values, the application will not start.
On iOS
add one of these two lines to config.xml:
<preference name="iosPersistentFileLocation" value="Library" />
<preference name="iosPersistentFileLocation" value="Compatibility" />
Without this line, the File plugin will use Compatibility as the default. If a preference tag is present, and is not one of these values, the application will not start.
Strongly recommended to read API docs before starting.
I found other questions about this and I tried the suggested answers which were as follows.
Adjust the config.xml file:
I changed this <content src="index.html" /> to <content src="localhost:3000" />
and also
<access origin="*" /> to </content src="localhost:3000" subdomains="true">
But everytime I launch my application, it is still referring to the index.html file.
I am only trying it on iOS platform.
For testing purposes, I am trying the webpage online everytime, I launch the application using phonegap serve form the CLI, the webpage (localhost:3000), still refers to index.html
Any insights on that?
You cannot point a device to localhost as localhost is an alias of 127.0.0.1 which is not reachable over a network.
You need to point to the actual IP address of the machine that is hosting your code.
Example:
<content src="192.75.64.231:3000" subdomains="true" />
When I deploy my project the help file with the mht extension does not get copied across to the drop folder with the rest of the project.
Why is this, and how do I fix it?
I am using tfs 2010.
I do not know how the problem was caused in the first place, but I found the way to fix it is to edit the .prog file.
The <ItemGroup> was corrected as follows;
<Content Include="Views\Leaver\ConfirmSubmission.cshtml" />
<Content Include="Help\Help.mht" />
<!--<None Include="Help\Help.mht">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>-->
So I replaced the commented out code with the line above, ie <Content Include="Help\Help.mht" />
and now it works.