Ionic Transition Glitch in iOS 9 - ionic-framework

I'm encountering some transition glitch w/ my App, it only appears in iOS 9 and the app is compiled through Phonegap build.
Here's a sample video showing the transition glitch. link
I don't know if this would help but here's my gist for the config
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="au.gov.nal.hearing.myhearing" version="0.7.9" versionCode="607" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:gap="http://phonegap.com/ns/1.0">
<gap:platform name="ios"/>
<gap:platform name="android"/>
<name>My Hearing</name>
<description>My Hearing App</description>
<author email="rene#bywave.com.au" href="http://bywave.com.au/">Renemari Padillo</author>
<content src="index.html"/>
<preference name="AutoHideSplashScreen" value="true"/>
<preference name="SplashScreenDelay" value="5000"/>
<preference name="ShowSplashScreenSpinner" value="false"/>
<preference name="FadeSplashScreen" value="true"/>
<preference name="FadeSplashScreenDuration" value="1.0"/>
<preference name="SplashScreen" value="screen"/>
<preference name="detect-data-types" value="true" />
<preference name="target-device" value="handset" />
<feature name="http://api.phonegap.com/1.0/notification" />
<feature name="http://api.phonegap.com/1.0/geolocation" />
<feature name="http://api.phonegap.com/1.0/network"/>
<!-- Whitelist URLs -->
<access origin="*" />
<access origin="*.google.com" />
<access origin="*.parse.com" />
<access origin="*.googleapis.com" />
<access origin="*.gstatic.com" />
<access origin="*.googleusercontent.com" />
<access origin="google.com" subdomains="true"/>
<access origin="googleapis.com" subdomains="true"/>
<access origin="gstatic.com" subdomains="true"/>
<access origin="googleusercontent.com" subdomains="true"/>
<access origin="parse.com" subdomains="true"/>
<allow-navigation href="*" />
<allow-intent href="tel:*" launch-external="yes" />
<allow-intent href="geo:*" launch-external="yes" />
<allow-intent href="*" launch-external="yes" />
<feature name="Device">
<param name="android-package" value="org.apache.cordova.device.Device" />
<param name="ios-package" value="CDVDevice" />
</feature>
<feature name="debug-server" required="true">
<param name="domain" value="http://192.168.15.130:8080"/>
<param name="key" value="key1"/>
</feature>
<feature name="Geolocation">
<param name="android-package" value="org.apache.cordova.GeoBroker"/>
<param name="ios-package" value="CDVLocation"/>
</feature>
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser"/>
<param name="android-package" value="org.apache.cordova.InAppBrowser"/>
</feature>
<feature name="SplashScreen">
<param name="android-package" value="org.apache.cordova.SplashScreen"/>
<param name="ios-package" value="CDVSplashScreen"/>
</feature>
<gap:plugin name="com.ionic.keyboard" version="1.0.3"/>
<gap:plugin name="uk.co.whiteoctober.cordova.appversion" version="0.1.4"/>
<gap:plugin name="org.apache.cordova.splashscreen" version="0.3.4"/>
<gap:plugin name="cordova-plugin-inappbrowser" source="npm"/>
<gap:plugin name="cordova-plugin-whitelist" source="npm"/>
<gap:plugin name="org.apache.cordova.core.geolocation" version="0.3.10"/>
<gap:plugin name="com.medlei.pushplugin" version="0.1.2">
<param name="APP_ID" value="Bd8dbfMRwToBaB8UP0SWZ0ZlgYJ2o1CqMtFqzkuh"/>
<param name="CLIENT_KEY" value="0ev2Je3JX3ln5XJHTsFTbJwNpG7k5eXpt5l83CVs"/>
</gap:plugin>
<icon src="resources/icon.png" />
<gap:splash src="resources/splash.png" />
<icon gap:platform="android" src="resources/android/icon/drawable-ldpi-icon.png" gap:density="ldpi"/>
<icon gap:platform="android" src="resources/android/icon/drawable-mdpi-icon.png" gap:density="mdpi"/>
<icon gap:platform="android" src="resources/android/icon/drawable-hdpi-icon.png" gap:density="hdpi"/>
<icon gap:platform="android" src="resources/android/icon/drawable-xhdpi-icon.png" gap:density="xhdpi"/>
<icon gap:platform="android" src="resources/android/icon/drawable-xxhdpi-icon.png" gap:density="xxhdpi"/>
<icon gap:platform="android" src="resources/android/icon/drawable-xxxhdpi-icon.png" gap:density="xxxhdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-land-ldpi-screen.png" gap:qualifier="land-ldpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-land-mdpi-screen.png" gap:qualifier="land-mdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-land-hdpi-screen.png" gap:qualifier="land-hdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-land-xhdpi-screen.png" gap:qualifier="land-xhdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-land-xxhdpi-screen.png" gap:qualifier="land-xxhdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" gap:qualifier="land-xxxhdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-port-ldpi-screen.png" gap:qualifier="port-ldpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-port-mdpi-screen.png" gap:qualifier="port-mdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-port-hdpi-screen.png" gap:qualifier="port-hdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-port-xhdpi-screen.png" gap:qualifier="port-xhdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-port-xxhdpi-screen.png" gap:qualifier="port-xxhdpi"/>
<gap:splash gap:platform="android" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" gap:qualifier="port-xxxhdpi"/>
<icon gap:platform="ios" src="resources/ios/icon/icon.png" width="57" height="57"/>
<icon gap:platform="ios" src="resources/ios/icon/icon#2x.png" width="114" height="114"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-40.png" width="40" height="40"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-40#2x.png" width="80" height="80"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-50.png" width="50" height="50"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-50#2x.png" width="100" height="100"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-60.png" width="60" height="60"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-60#2x.png" width="120" height="120"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-60#3x.png" width="180" height="180"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-72.png" width="72" height="72"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-72#2x.png" width="144" height="144"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-76.png" width="76" height="76"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-76#2x.png" width="152" height="152"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-small.png" width="29" height="29"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-small#2x.png" width="58" height="58"/>
<icon gap:platform="ios" src="resources/ios/icon/icon-small#3x.png" width="87" height="87"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-568h#2x~iphone.png" height="1136" width="640"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-667h#2x.png" height="1334" width="750"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-736h.png" height="2208" width="1242"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-Landscape-736h.png" height="1242" width="2208"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-Portrait-736h#3x.png" width="1242" height="2208"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-Landscape-736h#3x.png" width="2208" height="1242"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-Landscape#2x~ipad.png" height="1536" width="2048"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-Landscape~ipad.png" height="768" width="1024"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-Portrait#2x~ipad.png" height="2048" width="1536"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default-Portrait~ipad.png" height="1024" width="768"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default#2x~iphone.png" height="960" width="640"/>
<gap:splash gap:platform="ios" src="resources/ios/splash/Default~iphone.png" height="480" width="320"/>
</widget>
I've found some related articles, but it doesn't sovle my problem.
iOS version - 9.0.1
Does anyone also encountered this issue? Thanks

Here's a temporary patch fix for this issue:
https://gist.github.com/IgorMinar/863acd413e3925bf282c
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
* dependency on the "ngIOS9UIWebViewPatch" module to your main app module.
*
* For example:
*
* ```
* angular.module('myApp', ['ngRoute'])`
* ```
*
* becomes
*
* ```
* angular.module('myApp', ['ngRoute', 'ngIOS9UIWebViewPatch'])
* ```
*
*
* More info:
* - https://openradar.appspot.com/22186109
* - https://github.com/angular/angular.js/issues/12241
* - https://github.com/driftyco/ionic/issues/4082
*
*
* #license AngularJS
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
angular.module('ngIOS9UIWebViewPatch', ['ng']).config(['$provide', function($provide) {
'use strict';
$provide.decorator('$browser', ['$delegate', '$window', function($delegate, $window) {
if (isIOS9UIWebView($window.navigator.userAgent)) {
return applyIOS9Shim($delegate);
}
return $delegate;
function isIOS9UIWebView(userAgent) {
return /(iPhone|iPad|iPod).* OS 9_\d/.test(userAgent) && !/Version\/9\./.test(userAgent);
}
function applyIOS9Shim(browser) {
var pendingLocationUrl = null;
var originalUrlFn= browser.url;
browser.url = function() {
if (arguments.length) {
pendingLocationUrl = arguments[0];
return originalUrlFn.apply(browser, arguments);
}
return pendingLocationUrl || originalUrlFn.apply(browser, arguments);
};
window.addEventListener('popstate', clearPendingLocationUrl, false);
window.addEventListener('hashchange', clearPendingLocationUrl, false);
function clearPendingLocationUrl() {
pendingLocationUrl = null;
}
return browser;
}
}]);
}]);

In the version of 1.1.1 this bug is fixed:
Check out CHANGELOG.md and related commit: #e5b85df on Github.

Related

Unsure how to fix the error in the Azure Devops Migration Tool for very old TFS collections

We've been asked to migrate some very old legacy projects (i.e. from TFS 2010 days) onto Azure Devops Services. These very old projects have almost nothing in their Process Configuration and only have one error line in the logs from the migration tool for all project types (Scrum, Agile, Basic etc...).
[Info #15:27:48.998] === Found 1 error(s) when compared against process TFS 2019 Update 1 Scrum ===
[Error #15:27:48.998] Custom processConfiguration typeField count '0' is different than system '8'.
[Info #15:27:48.998] === End of error(s) when compared against process TFS 2019 Update 1 Scrum ===
When looking at their Process Configuation it is only a few lines:
<?xml version="1.0" encoding="utf-16"?>
<ProjectProcessConfiguration>
<RequirementBacklog workItemCountLimit="1000">
<AddPanel />
</RequirementBacklog>
<TaskBacklog workItemCountLimit="1000">
<AddPanel />
</TaskBacklog>
<Properties>
<Property name="BugsBehavior" value="Off" />
</Properties>
</ProjectProcessConfiguration>
The only project that has no errors was a project added much later on TFS 2015:
<?xml version="1.0" encoding="utf-16"?>
<ProjectProcessConfiguration>
<BugWorkItems category="Microsoft.BugCategory" pluralName="Bugs" singularName="Bug">
<States>
<State type="Proposed" value="New" />
<State type="InProgress" value="Active" />
<State type="Complete" value="Closed" />
<State type="Resolved" value="Resolved" />
</States>
</BugWorkItems>
<FeedbackRequestWorkItems category="Microsoft.FeedbackRequestCategory" pluralName="Feedback Requests" singularName="Feedback Request">
<States>
<State type="InProgress" value="Active" />
<State type="Complete" value="Closed" />
</States>
</FeedbackRequestWorkItems>
<FeedbackResponseWorkItems category="Microsoft.FeedbackResponseCategory" pluralName="Feedback Responses" singularName="Feedback Response">
<States>
<State type="InProgress" value="Active" />
<State type="Complete" value="Closed" />
</States>
</FeedbackResponseWorkItems>
<PortfolioBacklogs>
<PortfolioBacklog category="Microsoft.EpicCategory" pluralName="Epics" singularName="Epic" workItemCountLimit="1000">
<AddPanel>
<Fields>
<Field refname="System.Title" />
</Fields>
</AddPanel>
<Columns>
<Column width="100" refname="System.WorkItemType" />
<Column width="400" refname="System.Title" />
<Column width="100" refname="System.State" />
<Column width="50" refname="Microsoft.VSTS.Scheduling.Effort" />
<Column width="50" refname="Microsoft.VSTS.Common.BusinessValue" />
<Column width="100" refname="Microsoft.VSTS.Common.ValueArea" />
<Column width="200" refname="System.Tags" />
</Columns>
<States>
<State type="Proposed" value="New" />
<State type="InProgress" value="Active" />
<State type="InProgress" value="Resolved" />
<State type="Complete" value="Closed" />
</States>
</PortfolioBacklog>
<PortfolioBacklog category="Microsoft.FeatureCategory" parent="Microsoft.EpicCategory" pluralName="Features" singularName="Feature" workItemCountLimit="1000">
<AddPanel>
<Fields>
<Field refname="System.Title" />
</Fields>
</AddPanel>
<Columns>
<Column width="100" refname="System.WorkItemType" />
<Column width="400" refname="System.Title" />
<Column width="100" refname="System.State" />
<Column width="50" refname="Microsoft.VSTS.Scheduling.Effort" />
<Column width="50" refname="Microsoft.VSTS.Common.BusinessValue" />
<Column width="100" refname="Microsoft.VSTS.Common.ValueArea" />
<Column width="200" refname="System.Tags" />
</Columns>
<States>
<State type="Proposed" value="New" />
<State type="InProgress" value="Active" />
<State type="InProgress" value="Resolved" />
<State type="Complete" value="Closed" />
</States>
</PortfolioBacklog>
</PortfolioBacklogs>
<RequirementBacklog category="Microsoft.RequirementCategory" parent="Microsoft.FeatureCategory" pluralName="Stories" singularName="User Story" workItemCountLimit="1000">
<AddPanel>
<Fields>
<Field refname="System.Title" />
</Fields>
</AddPanel>
<Columns>
<Column width="100" refname="System.WorkItemType" />
<Column width="400" refname="System.Title" />
<Column width="100" refname="System.State" />
<Column width="50" refname="Microsoft.VSTS.Scheduling.StoryPoints" />
<Column width="100" refname="Microsoft.VSTS.Common.ValueArea" />
<Column width="200" refname="System.IterationPath" />
<Column width="200" refname="System.Tags" />
</Columns>
<States>
<State type="Proposed" value="New" />
<State type="InProgress" value="Active" />
<State type="InProgress" value="Resolved" />
<State type="Complete" value="Closed" />
</States>
</RequirementBacklog>
<TaskBacklog category="Microsoft.TaskCategory" parent="Microsoft.RequirementCategory" pluralName="Tasks" singularName="Task" workItemCountLimit="1000">
<AddPanel>
<Fields>
<Field refname="System.Title" />
</Fields>
</AddPanel>
<Columns>
<Column width="400" refname="System.Title" />
<Column width="100" refname="System.State" />
<Column width="100" refname="System.AssignedTo" />
<Column width="50" refname="Microsoft.VSTS.Scheduling.RemainingWork" />
</Columns>
<States>
<State type="Proposed" value="New" />
<State type="InProgress" value="Active" />
<State type="Complete" value="Closed" />
</States>
</TaskBacklog>
<TypeFields>
<TypeField refname="Microsoft.VSTS.Common.Activity" type="Activity" />
<TypeField refname="Microsoft.VSTS.Common.StackRank" type="Order" />
<TypeField refname="Microsoft.VSTS.Feedback.ApplicationLaunchInstructions" type="ApplicationLaunchInstructions" />
<TypeField refname="Microsoft.VSTS.Feedback.ApplicationStartInformation" type="ApplicationStartInformation" />
<TypeField refname="Microsoft.VSTS.Feedback.ApplicationType" type="ApplicationType">
<TypeFieldValues>
<TypeFieldValue type="ClientApp" value="Client application" />
<TypeFieldValue type="RemoteMachine" value="Remote machine" />
<TypeFieldValue type="WebApp" value="Web application" />
</TypeFieldValues>
</TypeField>
<TypeField format="{0} h" refname="Microsoft.VSTS.Scheduling.RemainingWork" type="RemainingWork" />
<TypeField refname="Microsoft.VSTS.Scheduling.StoryPoints" type="Effort" />
<TypeField refname="System.AreaPath" type="Team" />
</TypeFields>
<Weekends>
<DayOfWeek>Sunday</DayOfWeek>
<DayOfWeek>Saturday</DayOfWeek>
</Weekends>
<Properties>
<Property name="HiddenBacklogs" value="Microsoft.EpicCategory" />
<Property name="BugsBehavior" value="AsTasks" />
</Properties>
<WorkItemColors>
<WorkItemColor primary="FFCC293D" secondary="FFFAEAE5" name="Bug" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Code Review Request" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Code Review Response" />
<WorkItemColor primary="FFFF7B00" secondary="FFFFD7B5" name="Epic" />
<WorkItemColor primary="FF773B93" secondary="FFEEE2F2" name="Feature" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Feedback Request" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Feedback Response" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Issue" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Shared Parameter" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Shared Steps" />
<WorkItemColor primary="FFF2CB1D" secondary="FFF6F5D2" name="Task" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Test Case" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Test Plan" />
<WorkItemColor primary="FFFF9D00" secondary="FFFCEECF" name="Test Suite" />
<WorkItemColor primary="FF009CCC" secondary="FFD6ECF2" name="User Story" />
</WorkItemColors>
</ProjectProcessConfiguration>
Anyone know of a easy way to fix the older projects? We want to import the code with changeset histories into Azure Devop Services and none of them have actually have work items (was managed externally on JIRA), build and release configs etc... We just want to get them onto the cloud to retire the legacy onpremise TFS servers (which are now running Azure Devops Server 2020.1.1 as per the migration suggestions).
Thanks for any help.
Edit: we're using TFS Team Project Manager from Jelle Druyts to help do some of the analysis, and am wondering if we can use the Transform function under Process Configuration to import the working projects config into the other projects.
Mark.
Sorry for the late reply on this. Since we didn't need to preserve templates and work items/ task history, we ended up abandoning full migrations. Ended up using the git-tfs (https://git-tfs.com/) tool to convert the TFS projects to a local git repository, then attaching that to a new Azure git project. Preserved all our history which was great.

Ionic v2 Download and display Image

I am trying to develop an application where I have to download and display an image from a website. THis is the code snippet which I have used:-
LoadImage(){
const transfer = new Transfer();
var url = "http://demo.observerjobs.lk/storage/public/uploads/vacancies/"+this.hash+"/"+this.attachment;
var uri = encodeURI(url);
var filepath = cordova.file.cacheDirectory+ '/' + this.vacancy.attachment;//("/"+this.vacancy.attachment);
transfer.download(uri, filepath, true ).then((entry) => {
console.log('download complete: ' + entry );
this.image = "<ion-img src= '"+ entry.toURL() + "'/>";
console.log(this.image);
}).catch(error => {
console.log(JSON.stringify(error));
});
}
I create the img tag in the following format:-
"<ion-img src= 'file:///data/user/0/package_name/cache/suo-01-29-012588-12x3-kbd.jpg'/>"
However, I am unable to retrieve this file to be displayed. What Have I done wrong, and what can I do to remedy this?
Edit:- Here is the config.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="OBSCURED FOR IDENTITY" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>OBSCURED</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi#ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html"/>
<access origin="*"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
<platform name="android">
<allow-intent href="market:*"/>
<icon src="resources\android\icon\drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources\android\icon\drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources\android\icon\drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources\android\icon\drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources\android\icon\drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="resources\android\icon\drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources\android\splash\drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources\android\splash\drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources\android\splash\drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources\android\splash\drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources\android\splash\drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources\android\splash\drawable-port-hdpi-screen.png" density="port-hdpi"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
</platform>
<platform name="windows">
<preference name="windows-target-version" value="10.0"/>
</platform>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="FadeSplashScreenDuration" value="300"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
<plugin name="cordova-plugin-console" spec="1.0.5"/>
<plugin name="cordova-plugin-statusbar" spec="2.2.1"/>
<plugin name="cordova-plugin-device" spec="1.1.4"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
<icon src="resources\android\icon\drawable-xhdpi-icon.png"/>
<allow-navigation href="http://192.168.1.3:8100"/>
<allow-navigation href="http://192.168.1.3:8101"/>
<allow-navigation href="http://192.168.1.2:8100"/>
<allow-navigation href="http://192.168.8.105:8100"/>
</widget>
Here is the http file of the relevant page:-
<!--
Generated template for the Vacancy page.
See http://ionicframework.com/docs/v2/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>Vacancy</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-list no-lines *ngIf="vacancy">
<ion-item >Contract Type : {{vacancy.value}}</ion-item>
<ion-item >Company : {{item.company_name}}</ion-item>
<ion-item >Deadline : {{ deadlinetime }}</ion-item>
<ion-item >Job ID : #JD{{ item.id }}</ion-item>
</ion-list>
<h2 *ngIf="vacancy" orientation="center">{{item.job_title}}</h2>
<div *ngIf="image" [innerHtml]="image"></div>
</ion-content>
I would try:
Component:
imageSrc:string//class variable
LoadImage(){
const transfer = new Transfer();
var url = "http://demo.observerjobs.lk/storage/public/uploads/vacancies/"+this.hash+"/"+this.attachment;
var uri = encodeURI(url);
var filepath = cordova.file.cacheDirectory+ '/' + this.vacancy.attachment;//("/"+this.vacancy.attachment);
transfer.download(uri, filepath, true ).then((entry) => {
console.log('download complete: ' + entry );
this.imageSrc = entry.toUrl();
console.log(this.imageSrc);
}).catch(error => {
console.log(JSON.stringify(error));
});
}
HTML:
<img *ngIf="imageSrc" [src]="imageSrc"></img>

File Fuzzing with Peach

I am a beginner in file fuzzing.I want to fuzz Adrenalin Player 2.2.5.3 with peach 3 and during compile got a problem. when I enter this command c:\peach\peach.exe wav.xml receive this error: unable to locate test named "Default".
and here is my code in xml :
<!-- Defines the common wave chunk -->
<DataModel name="Chunk">
<String name="ID" length="4" padCharacter=" " />
<Number name="Size" size="32" >
<Relation type="size" of="Data" />
</Number>
<Blob name="Data" />
<Padding alignment="16" />
</DataModel>
<DataModel name="ChunkData" ref="Chunk">
<String name="ID" value="data" token="true"/>
</DataModel>
<DataModel name="ChunkFact" ref="Chunk">
<String name="ID" value="fact" token="true"/>
<Block name="Data">
<Number size="32" />
<Blob/>
</Block>
</DataModel>
<DataModel name="ChunkSint" ref="Chunk">
<String name="ID" value="sInt" token="true"/>
<Block name="Data">
<Number size="32" />
</Block>
</DataModel>
<DataModel name="ChunkWavl" ref="Chunk">
<String name="ID" value="wavl" token="true"/>
<Block name="Data">
<Block name="ArrayOfChunks" maxOccurs="3000">
<Block ref="ChunkSint"/>
<Block ref="ChunkData" />
</Block>
</Block>
</DataModel>
<DataModel name="ChunkCue" ref="Chunk">
<String name="ID" value="cue " token="true"/>
<Block name="Data">
<Block name="ArrayOfCues" maxOccurs="3000">
<String length="4" />
<Number size="32" />
<String length="4" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
</Block>
</Block>
</DataModel>
<DataModel name="ChunkFmt" ref="Chunk">
<String name="ID" value="fmt " token="true"/>
<Block name="Data">
<Number name="CompressionCode" size="16" />
<Number name="NumberOfChannels" size="16" />
<Number name="SampleRate" size="32" />
<Number name="AverageBytesPerSecond" size="32" />
<Number name="BlockAlign" size="16" />
<Number name="SignificantBitsPerSample" size="16" />
<Number name="ExtraFormatBytes" size="16" />
<Blob name="ExtraData" />
</Block>
</DataModel>
<DataModel name="ChunkPlst" ref="Chunk">
<String name="ID" value="plst" token="true"/>
<Block name="Data">
<Number name="NumberOfSegments" size="32" >
<Relation type="count" of="ArrayOfSegments"/>
</Number>
<Block name="ArrayOfSegments" maxOccurs="3000">
<String length="4" />
<Number size="32" />
<Number size="32" />
</Block>
</Block>
</DataModel>
<DataModel name="ChunkLtxt" ref="Chunk">
<String name="ID" value="ltxt" token="true"/>
<Block name="Data">
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="16" />
<Number size="16" />
<Number size="16" />
<Number size="16" />
<String nullTerminated="true" />
</Block>
</DataModel>
<DataModel name="ChunkSmpl" ref="Chunk">
<String name="ID" value="smpl" token="true"/>
<Block name="Data">
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Block maxOccurs="3000">
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
<Number size="32" />
</Block>
</Block>
</DataModel>
<DataModel name="ChunkInst" ref="Chunk">
<String name="ID" value="inst" token="true"/>
<Block name="Data">
<Number size="8"/>
<Number size="8"/>
<Number size="8"/>
<Number size="8"/>
<Number size="8"/>
<Number size="8"/>
<Number size="8"/>
</Block>
</DataModel>
<!-- Defines the format of a WAV file -->
<DataModel name="Wav">
<!-- wave header -->
<String value="RIFF" token="true" />
<Number size="32" />
<String value="WAVE" token="true"/>
<Choice maxOccurs="30000">
<Block ref="ChunkFmt"/>
<Block ref="ChunkData"/>
<Block ref="ChunkFact"/>
<Block ref="ChunkSint"/>
<Block ref="ChunkWavl"/>
<Block ref="ChunkCue"/>
<Block ref="ChunkPlst"/>
<Block ref="ChunkLtxt"/>
<Block ref="ChunkSmpl"/>
<Block ref="ChunkInst"/>
<Block ref="Chunk"/>
</Choice>
</DataModel>
<!-- This is our simple wave state model -->
<StateModel name="TheState" initialState="Initial">
<State name="Initial">
<!-- Write out our wave file -->
<Action type="output">
<DataModel ref="Wav"/>
<!-- This is our sample file to read in -->
<Data fileName="sample.wav"/>
</Action>
<Action type="close"/>
<!-- Launch the target process -->
<Action type="call" method="StartMPlayer" publisher="Peach.Agent" />
</State>
</StateModel>
<Agent name="WinAgent">
<Monitor class="WindowsDebugger">
<!-- The command line to run. Notice the filename provided matched up
to what is provided below in the Publisher configuration -->
<Param name="CommandLine" value="c:\\Program Files (x86)\\adrenalin\\play.exe fuzzed.wav" />
<!-- This parameter will cause the debugger to wait for an action-call in
the state model with a method="StartMPlayer" before running
program.
-->
<Param name="StartOnCall" value="StartMPlayer" />
<!-- This parameter will cause the monitor to terminate the process
once the CPU usage reaches zero.
-->
<Param name="CpuKill" value="true"/>
</Monitor>
<!-- Enable heap debugging on our process as well. -->
<Monitor class="PageHeap">
<Param name="Executable" value="c:\\Program Files (x86)\\adrenalin\\play.exe"/>
</Monitor>
</Agent>
<Agent name="LinAgent">
<!-- Register for core file notifications. -->
<Monitor class="LinuxCrashMonitor"/>
<Monitor class="Process">
<!-- The executable to run. -->
<Param name="Executable" value="mplayer"/>
<!-- This parameter will cause the monitor to wait for an action-call in
the state model with a method="StartMPlayer" before running
program.
-->
<Param name="StartOnCall" value="StartMPlayer"/>
<!-- The program arguments. Notice the filename provided matched up
to what is provided below in the Publisher configuration -->
<Param name="Arguments" value="fuzzed.wav"/>
<!-- This parameter will cause the monitor to terminate the process
once the CPU usage reaches zero.
-->
<Param name="CpuKill" value="true"/>
</Monitor>
</Agent>
<Agent name="OsxAgent">
<Monitor class="CrashWrangler">
<!-- The executable to run. -->
<Param name="Command" value="mplayer" />
<!-- The program arguments. Notice the filename provided matched up
to what is provided below in the Publisher configuration -->
<Param name="Arguments" value="fuzzed.wav" />
<!-- Do not use debug malloc. -->
<Param name="UseDebugMalloc" value="false" />
<!-- Treat read access violations as exploitable. -->
<Param name="ExploitableReads" value="true" />
<!-- Path to Crash Wrangler Execution Handler program. -->
<Param name="ExecHandler" value="/usr/local/bin/exc_handler" />
<!-- This parameter will cause the monitor to wait for an action-call in
the state model with a method="StartMPlayer" before running
program.
-->
<Param name="StartOnCall" value="StartMPlayer" />
</Monitor>
</Agent>
<Test name="Default">
<Agent ref="WinAgent" platform="windows"/>
<Agent ref="LinAgent" platform="linux"/>
<Agent ref="OsxAgent" platform="osx"/>
<StateModel ref="TheState"/>
<Publisher class="File">
<Param name="FileName" value="fuzzed.wav"/>
</Publisher>
<Logger class="Filesystem">
<Param name="Path" value="logs" />
</Logger>
</Test>
When you use the Peach Framework, your pit files(the xml file you have included) must be completed encapsulated by a <Peach>.........</Peach> tag. Try this and see what happens!

Download image from url in ios phonegap

I am trying to download an image from a url and was not successful in ios but in android it was succesfully done.
var url = "http://www.intelligrape.com/images/logo.png"; // image url
try{
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) {
var imagePath = fs.root.fullPath + "/logo.png"; // full file path
var fileTransfer = new FileTransfer();
fileTransfer.download(url, imagePath, function (entry) {
alert(entry.fullPath); // entry is fileEntry object
}, function (error) {
alert("Some error");
});
})
}catch(e){
alert(e);
}
I am getting error of LocalFileSystem is not defined. i am including cordova2.5.0.js with this.
My Config.xml is below.
<?xml version="1.0" encoding="UTF-8"?>
<cordova>
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="UIWebViewBounce" value="true" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="EnableLocation" value="false" />
<preference name="EnableViewportScale" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="OpenAllWhitelistURLsInWebView" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<plugins>
<plugin name="Device" value="CDVDevice" />
<plugin name="Logger" value="CDVLogger" />
<plugin name="Compass" value="CDVLocation" />
<plugin name="Accelerometer" value="CDVAccelerometer" />
<plugin name="Camera" value="CDVCamera" />
<plugin name="NetworkStatus" value="CDVConnection" />
<plugin name="Contacts" value="CDVContacts" />
<plugin name="Debug Console" value="CDVDebugConsole" />
<plugin name="Echo" value="CDVEcho" />
<plugin name="File" value="CDVFile" />
<plugin name="FileTransfer" value="CDVFileTransfer" />
<plugin name="Geolocation" value="CDVLocation" />
<plugin name="Notification" value="CDVNotification" />
<plugin name="Media" value="CDVSound" />
<plugin name="Capture" value="CDVCapture" />
<plugin name="SplashScreen" value="CDVSplashScreen" />
<plugin name="Battery" value="CDVBattery" />
<plugin name="Globalization" value="CDVGlobalization" />
<plugin name="InAppBrowser" value="CDVInAppBrowser" />
</plugins>
<access origin="*" />
</cordova>
include cordova2.5.0.js file prior than all custom js files . you might be including it after your code

WPF Toolkit Charts don't show if I change the ControlTemplate of a DataPoint in .NET 4

I am experiencing a very weird problem with the WPF Toolkit Charts in a .NET 4 environment.
Basically, I just want to customize the ToolTip template for ColumnDataPoints. To accomplish that, I copied the default style for a ColumnDataPoint from the toolkit source code (generic.xaml) into my control resources and changed the TooltipService part like this:
<UserControl.Resources>
<Style TargetType="charts:ColumnDataPoint" x:Key="CustomDataPointStyle">
<Setter Property="Background" Value="Orange" />
<Setter Property="BorderBrush" Value="Black" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="charts:ColumnDataPoint">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" x:Name="Root">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.1" />
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="Opacity" To="0.6" Duration="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.1" />
</VisualStateGroup.Transitions>
<VisualState x:Name="Unselected" />
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="SelectionHighlight" Storyboard.TargetProperty="Opacity" To="0.6" Duration="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="RevealStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.5" />
</VisualStateGroup.Transitions>
<VisualState x:Name="Shown">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
</Storyboard>
</VisualState>
<VisualState x:Name="Hidden">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid Background="{TemplateBinding Background}">
<Rectangle>
<Rectangle.Fill>
<LinearGradientBrush>
<GradientStop Color="#77ffffff" Offset="0" />
<GradientStop Color="#00ffffff" Offset="1" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Border BorderBrush="#ccffffff" BorderThickness="1">
<Border BorderBrush="#77ffffff" BorderThickness="1" />
</Border>
<Rectangle x:Name="SelectionHighlight" Fill="Red" Opacity="0" />
<Rectangle x:Name="MouseOverHighlight" Fill="White" Opacity="0" />
</Grid>
<ToolTipService.ToolTip>
<StackPanel>
<ContentControl Content="Custom ToolTip" FontWeight="Bold"/>
<ContentControl Content="{TemplateBinding FormattedDependentValue}"/>
</StackPanel>
</ToolTipService.ToolTip>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Now, the problem is that as soon as I apply my CustomDataPointStyle (even if I don't change anything!), the ColumnSeries doesn't show at all in my chart.
<Grid x:Name="ChartGrid" DataContext="{Binding}">
<charts:Chart x:Name="Chart1" Margin="5,0,0,0"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
Title="{Binding Path=Title}">
<charts:Chart.Axes>
<charts:CategoryAxis Orientation="X" Title="{Binding Path=XAxisTitle}" Location="Bottom" />
<charts:CategoryAxis Orientation="Y" Title="{Binding Path=YAxisTitle}" Location="Right" ShowGridLines="True" />
</charts:Chart.Axes>
<charts:ColumnSeries x:Name="ColumnSeries" Title="{Binding Path=SeriesTitle}"
ItemsSource="{Binding Path=Data}" DataPointStyle="{StaticResource CustomDataPointStyle}"
DependentValueBinding="{Binding Path=Value}" IndependentValueBinding="{Binding Path=Key}">
</charts:ColumnSeries>
</charts:Chart>
results in this:
I guess that I am missing a VisualState or something that actually renders the chart but how can that be, given that I copied(!) the original style? The Toolkit is made for .NET 3.5 and I have to use .NET 4 in my application - could that be the reason?
Oh dear, I found the answer: I replaced the System.Windows.DataVisualization.Toolkit.dll for .NET 3.5 with the 4.0 version of this one and now it's working!
You could also try setting Opacity="1" in your Border style block:
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" x:Name="Root">