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

Remove twitter native support on iOS #1120

Merged
merged 4 commits into from Nov 29, 2021

Conversation

oamado
Copy link
Contributor

@oamado oamado commented Oct 28, 2021

Overview

As Twitter removed the support for the development kit, there is an issue in the visualization of a post. Related to #930

Test Plan

Share a tweet using the library, this will open the browser, and if the phone has the app, then the Twitter app will be launched correctly.

@MateusAndrade
Copy link
Collaborator

MateusAndrade commented Oct 28, 2021

What do you think about adding some notes about this? Maybe here: https://react-native-share.github.io/react-native-share/docs/troubleshooting-ios. We could point out to twitter docs regarding this.

@oamado
Copy link
Contributor Author

oamado commented Oct 28, 2021

@MateusAndrade I just updated the documentation. Let me know if you see something that can be improved

@@ -17,8 +17,7 @@ - (void)shareSingle:(NSDictionary *)options
inAppBaseUrl:(NSString *)inAppBaseUrl {

NSLog(@"Try open view");
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:inAppBaseUrl]]) {

if(![serviceType isEqualToString:@"com.apple.social.twitter"] && [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:inAppBaseUrl]]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about assign this to a variable? Maybe an: shouldOpenUrl? Or something like this:

    isSharingToTwitter:(BOOL*)sharingToTwitter = [serviceType isEqualToString:@"com.apple.social.twitter"];
    
    if(!sharingToTwitter && [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:inAppBaseUrl]]) {

Sorry if its wrong, I don't know a lot about objective-c 😓

@MateusAndrade MateusAndrade merged commit 3bccd59 into react-native-share:main Nov 29, 2021
MateusAndrade pushed a commit that referenced this pull request Nov 29, 2021
## [7.3.2](v7.3.1...v7.3.2) (2021-11-29)

### Bug Fixes

* **twitter:** remove twitter native support on iOS ([#1120](#1120)) ([3bccd59](3bccd59))
@MateusAndrade
Copy link
Collaborator

🎉 This PR is included in version 7.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

mobiledev7 added a commit to mobiledev7/react-native-share that referenced this pull request Dec 12, 2022
## [7.3.2](react-native-share/react-native-share@v7.3.1...v7.3.2) (2021-11-29)

### Bug Fixes

* **twitter:** remove twitter native support on iOS ([#1120](react-native-share/react-native-share#1120)) ([3bccd59](react-native-share/react-native-share@3bccd59))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants