Piroro-hs / react-native-twitter

A Twitter API client library for React Native. Currently not maintained as my main motivation of creating this library was to use the User Streams API.
MIT License
39 stars 20 forks source link

iOS Example #5

Closed masiamj closed 7 years ago

masiamj commented 7 years ago

Is this project specific to Android? If not, can you please update the example project to include an iOS example?

I've integrated the library but having real trouble getting the access tokens when the Promise resolves.

Thanks!

kyle-ssg commented 6 years ago

@masiamj did you come up with a solution for this ?

kyle-ssg commented 6 years ago

Right, so I did in fact get it to work : I'd advise adding this to the example. If you did too it would have been good if you'd have posted a solution.

It's actually pretty easy to get this to work for iOS with a few modifications of AppDelegate

#import <React/RCTLinkingManager.h>

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{
        ... other url logic such as facebook/google 
        return [RCTLinkingManager application:application openURL:url options:options];
}