nativescript-modal-datetimepicker icon indicating copy to clipboard operation
nativescript-modal-datetimepicker copied to clipboard

Modal picker not working on IOS

Open dimitriospafos opened this issue 4 years ago • 3 comments

I'm getting the following error when calling the .pickDate()

Error: TypeError: application.systemAppearance is not a function. (In 'application.systemAppearance()', 'application.systemAppearance' is undefined) Can't end BackgroundTask: no background task exists with identifier 2 (0x2), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.

Which platform(s) does your issue occur on?

  • iOS

Please, provide the following version numbers that your issue occurs with:

{ "nativescript": { "tns-android": { "version": "6.1.2" }, "tns-ios": { "version": "6.1.1" } }, "dependencies": { "@angular/animations": "~8.0.0", "@angular/common": "~8.0.0", "@angular/compiler": "~8.0.0", "@angular/core": "~8.0.0", "@angular/forms": "~8.0.0", "@angular/http": "8.0.0-beta.10", "@angular/platform-browser": "~8.0.0", "@angular/platform-browser-dynamic": "~8.0.0", "@angular/router": "~8.0.0", "@nstudio/nativescript-checkbox": "^1.0.0", "@nstudio/nativescript-loading-indicator": "^1.0.0", "@proplugins/nativescript-cfalert-dialog": "^2.0.1", "@proplugins/nativescript-drop-down": "^7.1.0", "@proplugins/nativescript-keyboardshowing": "^2.1.0", "base-64": "^0.1.0", "moment": "^2.19.1", "nativescript-angular": "8.0.2", "nativescript-background-http": "^3.3.0", "nativescript-barcodescanner": "^3.1.3", "nativescript-bitmap-factory": "^1.8.1", "nativescript-bluetooth": "^2.0.0-beta.27", "nativescript-blur": "^2.0.0", "nativescript-directions": "^1.1.2", "nativescript-drop-down": "^3.2.5", "nativescript-fancyalert": "^3.0.6", "nativescript-feedback": "^1.2.0", "nativescript-fingerprint-auth": "^6.2.0", "nativescript-geolocation": "^5.1.0", "nativescript-google-maps-sdk": "^2.8.1", "nativescript-imagecropper": "^1.0.4", "nativescript-imagepicker": "^7.0.0", "nativescript-iqkeyboardmanager": "^1.5.1", "nativescript-local-notifications": "^4.0.1", "nativescript-location": "^0.1.3", "nativescript-modal-datetimepicker": "^1.2.2", "nativescript-ng-ripple": "^2.0.1", "nativescript-ngx-fonticon": "^4.2.0", "nativescript-oauth": "^2.0.1", "nativescript-permissions": "^1.3.7", "nativescript-secure-storage": "^2.3.0", "nativescript-ssl-pinning": "^1.1.4", "nativescript-theme-core": "^1.0.4", "nativescript-ui-listview": "^8.0.1", "nativescript-ui-sidedrawer": "^8.0.1", "nativescript-websockets": "^1.3.4", "reflect-metadata": "~0.1.8", "rxjs": "^6.3.3", "rxjs-compat": "^6.3.2", "tns-core-modules": "~6.1.0", "zone.js": "^0.9.1" }, "devDependencies": { "@angular/compiler-cli": "8.0.0", "@ngtools/webpack": "8.0.0", "nativescript-dev-webpack": "~1.2.0", "tns-platform-declarations": "^6.0.1", "typescript": "~3.4.5" } }

Is there any code involved?

import * as ModalPicker from 'nativescript-modal-datetimepicker';
...
var picker = new ModalPicker.ModalDatetimepicker();
		picker
		.pickDate({
		  title: "Select Your Birthday",
		  theme: "dark",
		  
		  maxDate: maxDate,
		  minDate: minDate,
		  doneLabelColor: new Color('#FFFFFF')
		})
		.then(result => {
		 ...
		})
		.catch(error => {
		  ...
		});

dimitriospafos avatar Apr 13 '20 00:04 dimitriospafos

@dimitriospafos Did you solve this issue? I have the same problem...

acortino avatar May 28 '20 15:05 acortino

@acortino No, unfortunately I haven’t. Let me know if you get a solution for this issue please. I’m not using this plugin for now.

dimitriospafos avatar May 28 '20 17:05 dimitriospafos

just hit this problem on ios ...

Edit: in my case, i was using tns-core-modules 6.1.0 upgrading the deps solved it for me, the function don't even exist in the previous versions

ouss4m4 avatar Aug 13 '20 11:08 ouss4m4