Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] 'UIApplicationState' is not assignable to parameter of type 'Function'. #130

Closed
FranciZ opened this issue Oct 22, 2018 · 4 comments
Closed

Comments

@FranciZ
Copy link

FranciZ commented Oct 22, 2018

Your Environment

  • Plugin version: 1.8.0
  • Platform: iOS
  • OS version: 11
  • Device manufacturer / model: Apple
  • Nativescript version 4.2.0
  • Plugin config

Expected Behavior

iOS should build without errors. I have references.d.ts setup as well as tsconfig as in README.

Actual Behavior

'UIApplicationState' is not assignable to parameter of type 'Function'.

Error happens on line:

BackgroundFetch.performFetchWithCompletionHandler(completionHandler, application.applicationState);

Steps to Reproduce

Create a new project and paste the iOS setup code in it as suggested. Build.

Context

Build for iOS.

Debug logs

app/main.ts(18,76): error TS2345: Argument of type 'UIApplicationState' is not assignable to parameter of type 'Function'.
@christocracy
Copy link
Member

I think your problem is you're following the README instructions from master (which corresponds to version 1.9.0-beta.4) with an older version you're using (1.8.0).

@FranciZ
Copy link
Author

FranciZ commented Oct 25, 2018

Could you point me to a solution maybe? I can't really upgrade the plugin since #121 still persists.

@christocracy
Copy link
Member

If you're going to use a version other than latest, you must select the Tag -> 1.8.0 and browse that tree.

@FranciZ
Copy link
Author

FranciZ commented Oct 29, 2018

Thanks!

@FranciZ FranciZ closed this as completed Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants