Last active
July 17, 2024 00:38
-
-
Save witt3rd/39c99b8514d99478b864114c8b2fc874 to your computer and use it in GitHub Desktop.
Revisions
-
witt3rd revised this gist
Jul 17, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # VOY-4321: Root Cause Analysis Report [Filed by LI-RCA](http://localhost:2024/assets/yichen2.html) ## Issue -
witt3rd revised this gist
Jul 17, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # VOY-4321: Root Cause Analysis Report [Filed by LI-RCA](http://localhost:2024/yichen.html) ## Issue The LinkedIn sharing functionality in the ShareBoxController is non-functional on iOS 11 and later versions. -
witt3rd created this gist
Jul 17, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ # VOY-4321: Root Cause Analysis Report ## Issue The LinkedIn sharing functionality in the ShareBoxController is non-functional on iOS 11 and later versions. ## Root Cause The root cause of this issue is the use of deprecated and removed APIs for LinkedIn sharing through the Social framework. ## Detailed Analysis 1. The code attempts to use `SLComposeViewController` with `SLServiceTypeLinkedIn`: ```objc if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeLinkedIn]) { SLComposeViewController *shareBoxComposer = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeLinkedIn]; // ... } ``` 2. Apple deprecated and removed support for LinkedIn sharing via the Social framework in iOS 11. 3. As a result, `[SLComposeViewController isAvailableForServiceType:SLServiceTypeLinkedIn]` will always return `NO` on iOS 11 and later, preventing the LinkedIn sharing functionality from working. 4. The fallback code assumes that LinkedIn is not configured on the device, which is incorrect: ```objc } else { // LinkedIn is not configured on the device, show an alert UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"LinkedIn Account" message:@"Please configure a LinkedIn account in your device settings to share on LinkedIn." preferredStyle:UIAlertControllerStyleAlert]; // ... } ``` ## Impact Users on iOS 11 and later versions are unable to share content to LinkedIn using this feature. They receive a misleading error message suggesting that LinkedIn is not configured on their device, even if it is. ## Recommendations 1. Remove the deprecated LinkedIn sharing code using `SLComposeViewController` and `SLServiceTypeLinkedIn`. 2. Implement an alternative sharing method: - Use the official LinkedIn API and SDK for iOS. - Implement a web-based sharing solution using a web view or by opening the LinkedIn app (if installed) with a custom URL scheme. - Use a more general sharing method like `UIActivityViewController`, which allows users to choose from available sharing options on their device. 3. Update the error handling to provide more accurate information to users about the availability of LinkedIn sharing. 4. Consider implementing a more flexible sharing architecture that can adapt to changes in social media platform APIs and policies. By addressing these points, the ShareBoxController can provide a more reliable and future-proof LinkedIn sharing experience for users across different iOS versions.