Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@nativescript/types-android
Advanced tools
NativeScript Types for Android
8.5.0 (2023-03-28)
Potential issue:
error TS2339: Property 'newValue' does not exist on type 'EventData'.
2611 if (e.newValue) {
Possible causes:
Application.on(Application.orientationChangedEvent, (event) => {
Solution:
Application.on(Application.orientationChangedEvent, (event: OrientationChangedEventData) => {
This means that potentially if you were using margins to position, for example on font icon labels, they may appear mis-positioned intially after updating. You should be able to remove custom margin handling to simplify.
Transition
class:animateIOSTransition(containerView: UIView, fromView: UIView, toView: UIView, operation: UINavigationControllerOperation, completion: (finished: boolean) => void): void {
toView.transform = CGAffineTransformMakeScale(0, 0);
fromView.transform = CGAffineTransformIdentity;
switch (operation) {
case UINavigationControllerOperation.Push:
containerView.insertSubviewAboveSubview(toView, fromView);
break;
case UINavigationControllerOperation.Pop:
containerView.insertSubviewBelowSubview(toView, fromView);
break;
}
var duration = this.getDuration();
var curve = this.getCurve();
UIView.animateWithDurationAnimationsCompletion(
duration,
() => {
UIView.setAnimationCurve(curve);
toView.transform = CGAffineTransformIdentity;
fromView.transform = CGAffineTransformMakeScale(0, 0);
},
completion
);
}
animateIOSTransition(transitionContext: UIViewControllerContextTransitioning, fromViewCtrl: UIViewController, toViewCtrl: UIViewController, operation: UINavigationControllerOperation): void {
const toView = toViewCtrl.view;
const fromView = fromViewCtrl.view;
toView.transform = CGAffineTransformMakeScale(0, 0);
fromView.transform = CGAffineTransformIdentity;
switch (operation) {
case UINavigationControllerOperation.Push:
transitionContext.containerView.insertSubviewAboveSubview(toView, fromView);
break;
case UINavigationControllerOperation.Pop:
transitionContext.containerView.insertSubviewBelowSubview(toView, fromView);
break;
}
var duration = this.getDuration();
var curve = this.getCurve();
UIView.animateWithDurationAnimationsCompletion(
duration,
() => {
UIView.setAnimationCurve(curve);
toView.transform = CGAffineTransformIdentity;
fromView.transform = CGAffineTransformMakeScale(0, 0);
},
(finished) => {
transitionContext.completeTransition(finished);
}
);
}
deref
instead of the deprecated get
API. In 8.4, iOS allowed usage of deref
but Android still required get
. With 8.5 you can now use deref
the same everywhere.Incorrect:
// collection: NSArray
for (var i = 0; i < collection.count; i++) {
const obj = collection[i];
Correct:
// collection: NSArray
for (var i = 0; i < collection.count; i++) {
const obj = collection.objectAtIndex(i);
FAQs
NativeScript Types for Android.
The npm package @nativescript/types-android receives a total of 1,329 weekly downloads. As such, @nativescript/types-android popularity was classified as popular.
We found that @nativescript/types-android demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 18 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.