tipsi-twitter
tipsi-twitter copied to clipboard
Missing documentation for 2.0 upgrade
tipsi-twitter recently released a major version unaccompanied by any documentation. There was a commit associated with the release that noted that TwitterKit was updated to 3.1 though, so I did have that to go on. I also found Issue #12 which was helpful to an extent.
In lieu of anything official, here are some notes from my experiences wrestling with this.
Best I can figure, the 1.x versions didn't work with iOS 11. At least, it didn't for the app I'm using this package in. Here's what I did to get the package working again in iOS.
- Update
tipsi-twitter
in package.json to 2.0.0 and install the new package. - Open your Podfile and find the line that says
pod 'TwitterKit', '2.7.0'
. Change it topod 'TwitterKit', '~> 3.1'
. - Important note! TwitterKit > 3.0 requires at least iOS 9. So if you're still trying to support 8.0, don't. For us that primarily meant changing a line in the Podfile
platform :ios, '8.0'
to9.0
. - In Terminal,
cd
intoios
and then runpod install
to get the new files.
This got me to a new error when trying to actually use the module to authenticate:
"Exception 'Attempt made to Log in or Like a Tweet without a valid Twitter Kit URL Scheme set up in the app settings. Please see https://dev.twitter.com/twitterkit/ios/installation for more info.' was thrown while invoking login on target TPSTwitterModule with params (
1026,
1027
)"
I'm guessing that, since iOS removed the OS-level Twitter integration for 11.0, we now need URL redirects? Fortunately, the error message is helpful. I went to that URL and found what I needed in the "Configure Info.Plist" section.
After that, it'll log in, but it won't redirect back to the app. More random TwitterKit code snippets are required! Open up AppDelegate.m and add #import <TwitterKit/TwitterKit.h>
up with the imports. Then, add a snippet from this section.
Then it worked.
At one point I unlinked and relinked tipsi-twitter, but I don't think that did anything meaningful.
I'm not sure how all this app is used or if anyone would have had these problems with a fresh install, but if everyone now needs to add URL redirecting in order to make this work, then it should be referenced in the readme.
Hey @BrendanBerkley , thank you for such detailed issue
I'm not sure how all this app is used or if anyone would have had these problems with a fresh install
We're using it but we're always doing a fresh build every time on CI for releases.
@isnifer could you please handle the rest
@BrendanBerkley @cybergrind ok, I will do it tomorrow