plugins: [@nativescript/facebook] iOS login error after redirecting back to Nativescript app

I am getting the following error when using the nativescript/facebook (v2.0.0) package for facebook single sign on (currently just testing iOS).

*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught TypeError: FBSDKApplicationDelegate.sharedInstance.applicationOpenURLOptions is not a function
at
FacebookAppDelegateImpl.applicationOpenURLOptions(file: src/webpack:/MyHighland/node_modules/@nativescript/facebook/index.ios.js:57:0)
', reason: '(null)'

When I initiate the LoginManager.logInWithPermissions function, I get the system dialog that “App Name” wants to use “facebook.com” to Sign In, and I then authorize in the facebook app. However when I am redirected back to my app, it crashes and I see the error above.

Do I need to manually create AppDelegate.swift / SceneDelegate.swift files as shown in step 3 of Facebook’s iOS setup? And if I need to create them, is there any documentation or reference on how to do so in a nativescript application?https://developers.facebook.com/docs/ios/getting-started#step-3--connect-the-app-delegate

"dependencies": {
    "@nativescript/background-http": "^5.0.2",
    "@nativescript/core": "~8.2.0",
    "@nativescript/facebook": "^2.0.0",
    "@nativescript/firebase-analytics": "2.0.1",
    "@nativescript/firebase-core": "2.0.1",
    "@nativescript/firebase-messaging": "2.0.1",
    "@nativescript/imagepicker": "^1.0.6",
    "@nativescript/local-notifications": "^6.0.0",
    "@nativescript/theme": "~3.0.1",
    "@triniwiz/nativescript-pager": "^13.0.3",
    "@triniwiz/nativescript-socketio": "^4.0.1",
    "@triniwiz/nativescript-toasty": "^4.1.3",
    "@vue/devtools": "^5.3.4",
    "axios": "^0.24.0",
    "highlight-words-core": "^1.2.2",
    "nativescript-appversion": "github:imandyie/nativescript-appversion",
    "nativescript-fonticon": "^2.0.2",
    "nativescript-gif": "^5.0.0",
    "nativescript-phone": "^3.0.2",
    "nativescript-ui-listview": "^10.0.2",
    "nativescript-vue": "~2.9.0",
    "nativescript-vue-devtools": "^1.5.1",
    "rxjs": "^7.5.5",
    "v-mask": "^2.3.0",
    "vue-axios": "^3.4.0",
    "vuex": "^3.6.2"
  },
  "devDependencies": {
    "@nativescript/android": "8.2.2",
    "@nativescript/ios": "~8.2.0",
    "@nativescript/webpack": "~5.0.0",
    "assert": "^2.0.0",
    "browserify-zlib": "^0.2.0",
    "buffer": "^6.0.3",
    "https-browserify": "^1.0.0",
    "nativescript-vue-template-compiler": "~2.9.0",
    "os-browserify": "^0.3.0",
    "path": "^0.12.7",
    "platform": "^1.3.6",
    "sass": "^1.32.8",
    "stream-browserify": "^3.0.0",
    "stream-http": "^3.2.0",
    "tns-ios": "^6.5.5",
    "tty-browserify": "0.0.1",
    "url": "^0.11.0",
    "util": "^0.12.4"
  }

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@meganedesigns resolved for all cases in 2.1.0, lemme know if any further issues. Thank you again for the great sample here.

@NathanWalker sorry for all the tags, but I setup a test repo with Firebase and Facebook login for you to try out. I have removed our Facebook/Firebase keys, but I can setup some test accounts if you need it.

https://github.com/meganedesigns/myCoolApp

We can probably keep this open to ensure it doesn’t cause issue with different firebase setups - any other detail could share with how your main is setup and/or how firebase is integrated and we could make further adjustments to consider the case.