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 example fails with error in emulator #9

Open
thismachinechills opened this issue Jul 8, 2018 · 6 comments

Comments

@thismachinechills
Copy link

@thismachinechills thismachinechills commented Jul 8, 2018

After compiling and running the example application on the iOS 11.4 emulator, clicking the "Log In" button will fail with this error:

[TwitterKit] did encounter error with message "Unable to authenticate using the system account.": Error Domain=TWTRLogInErrorDomain Code=0 "User denied access to system accounts." UserInfo={NSLocalizedDescription=User denied access to system accounts., NSLocalizedRecoverySuggestion=Give this user access to the System Twitter account.}
[TwitterKit] No matching scheme found.
[TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings" UserInfo={NSLocalizedDescription=Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings}

I've tried replacing the consumer key and secret with my own, and I receive the same error above.

Here's my flutter doctor -v

$ flutter doctor -v
[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.5 17F77, locale en-US)
    • Flutter version 0.5.1 at /Volumes/New/flutter
    • Framework revision c7ea3ca377 (6 weeks ago), 2018-05-29 21:07:33 +0200
    • Engine revision 1ed25ca7b7
    • Dart version 2.0.0-dev.58.0.flutter-f981f09760

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/alex/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[!] VS Code (version 1.25.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected devices (1 available)
    • iPhone X • 26335CBA-34C8-44E6-BF80-A75703FB2F8F • ios • iOS 11.4 (simulator)

! Doctor found issues in 1 category.
@thismachinechills thismachinechills changed the title iOS example fails with error iOS example fails with error in emulator Jul 8, 2018
@eudangeld

This comment has been minimized.

Copy link

@eudangeld eudangeld commented Jul 25, 2018

I have the same problem here on real device and simulator IOS 11.4.1

@eudangeld

This comment has been minimized.

Copy link

@eudangeld eudangeld commented Jul 30, 2018

[SOLVED]
@thismachinechills
go to your app setting in: https://apps.twitter.com/app
In URLCallback just add the following urls:
Android - twittersdk://
iOS -CONSUMERKEY://

Works for me on IOS simulator and real device

@mtellect

This comment has been minimized.

Copy link

@mtellect mtellect commented Aug 31, 2018

i get this error on iOS build

  • Running pre install hooks
    [!] The 'Pods-Runner' target has transitive dependencies that include static binaries:
@dlutton

This comment has been minimized.

Copy link

@dlutton dlutton commented Sep 17, 2018

@mtellect I ran into the same issue. They need to update this package to include s.static_framework = true inside their flutter_twitter_login.podspec file.

You can view the issue here:
issue

I was able to fork this repo, make the change, and confirmed it worked.

I also opened a PR for this fix.

@psycry

This comment has been minimized.

Copy link

@psycry psycry commented Apr 11, 2019

[SOLVED]
@thismachinechills
go to your app setting in: https://apps.twitter.com/app
In URLCallback just add the following urls:
Android - twittersdk://
iOS -CONSUMERKEY://

Works for me on IOS simulator and real device

Worked for me

@HaoCherHong

This comment has been minimized.

Copy link

@HaoCherHong HaoCherHong commented Nov 8, 2019

go to your app setting in: https://apps.twitter.com/app
In URLCallback just add the following urls:
Android - twittersdk://
iOS -CONSUMERKEY://

iOS should be twitterkit-CONSUMERKEY://

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.