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

Value of type 'AccessToken' has no member 'permissions' & Value of type 'AccessToken' has no member 'declinedPermissions' #69

Closed
Hashane opened this issue Mar 20, 2021 · 3 comments

Comments

@Hashane
Copy link

Hashane commented Mar 20, 2021

Describe the bug

Xcode Build Runner fails with two swift compiler errors.

  • Value of type 'AccessToken' has no member 'permissions'

  • Value of type 'AccessToken' has no member 'declinedPermissions'

Environment

flutter doctor -v
[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2.3 20D91 darwin-x64, locale en)
• Flutter version 2.0.3 at /Users/judehashane/workspace/flutter
• Framework revision 4d7946a68d (2 days ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/judehashane/Library/Android/sdk
• Platform android-30, build-tools 29.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.54.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
• Test (mobile) • cf5c0a7bd28fe2a8183ca3762de0a2f9fe2a4157 • ios • iOS 12.5.1
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90

• No issues found!

pubspec.yaml

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  provider: ^5.0.0
  firebase_auth: ^1.0.1
  cloud_firestore: ^1.0.1
  google_sign_in: ^5.0.1
  flutter_facebook_auth: ^3.1.1

Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>App Name</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.googleusercontent.apps.KEY</string>
                <string>KEY</string>
            </array>
        </dict>
    </array>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>FacebookAppID</key>
    <string>KEY</string>
    <key>FacebookDisplayName</key>
    <string>App Name</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>fbapi</string>
      <string>fbapi20130214</string>
      <string>fbapi20130410</string>
      <string>fbapi20130702</string>
      <string>fbapi20131010</string>
      <string>fbapi20131219</string>
      <string>fbapi20140410</string>
      <string>fbapi20140116</string>
      <string>fbapi20150313</string>
      <string>fbapi20150629</string>
      <string>fbapi20160328</string>
      <string>fbauth</string>
      <string>fb-messenger-share-api</string>
      <string>fbauth2</string>
      <string>fbshareextension</string>
    </array>
</dict>
</plist>

To Reproduce
Xcode Build Runner fails when "flutter_facebook_auth: ^3.1.1” dependency is added to pubspec.yaml.

Expected behavior
Successful Build and Login to Facebook using IOS App.

Screenshots

FILE: flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-3.1.1/ios/Classes/FacebookAuth.swift

Screen Shot 2021-03-21 at 3 59 23 AM

@darwin-morocho
Copy link
Owner

darwin-morocho commented Mar 20, 2021

the swift Facebook sdk has problems with objective-c project you should use swift as a default language for ios

#41 (comment)

@Hashane
Copy link
Author

Hashane commented Mar 21, 2021

@darwin-morocho Changing default language to Swift solved the issue. Thank you!

@marslannasr7koncepts
Copy link

Hi @darwin-morocho can you tell me how your able to change it I have a existing code and it supports objective c how i can convert to Swift.?

@darwin-morocho Changing default language to Swift solved the issue. Thank you!

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

3 participants