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

Fixes for iOS-Bugs, Code Modernization & lowercase enum-members in dart #21

Closed
wants to merge 4 commits into from
Closed

Fixes for iOS-Bugs, Code Modernization & lowercase enum-members in dart #21

wants to merge 4 commits into from

Conversation

imdatceleste
Copy link

Changes

1. Bug-fix iOS

There was mismatch of value and path in the Swift Sharing-code. This resulted in a crash. I fixed this.

Since I have only iOS 16 to test with, I am now supporting both keys in incoming data from iOS, i.e. path and value when converting the data to JSON.

Then, if there is anything in path, I still use it.

2. Modernize Swift-Code

Also modernized the Swift-Code.

  • Move to guard
  • Early Return whenever possible
  • Implement all editor suggestions

3. dart

  • Convert to camel-Case (lowercase) enum members

Comment

There is one warning left in Swift-code due to new SDK. This can be fixed by implementing the corresponding function as async as that only works with Swift 5.5

@michaelmartins09
Copy link

Thank you @imdatsolak !! Your changes worked for me \o/

@yangricardo
Copy link

Hi, any updates on this PR acception? How can i test your latest suggestions, @imdatsolak ?

@imdatceleste
Copy link
Author

Hi, any updates on this PR acception? How can i test your latest suggestions, @imdatsolak ?

You can just use my repo. Put this in your pubspec.yaml:

flutter_sharing_intent:
   git:
      url: git@github.com:imdatsolak/flutter_sharing_intent.git
      ref: imdatsolak/ios-fix

@simonegiammy
Copy link

Hi, I'm trying to try your fix but I'm getting this error:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
any help?

@imdatceleste
Copy link
Author

Hi, I'm trying to try your fix but I'm getting this error:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
any help?

If you are talking to me: you need to have access to github using your SSH key, otherwise access via SSH won't work.

If you can't use an SSH key, you might need to go to my repo and get the HTTPs-clone URL and replace git:github.com... with that URL.

@kristofb
Copy link

Hello @imdatsolak, may you synchronize your branch with bhagat-techind/flutter_sharing_intent and update the PR ? I hope this will help for the PR. And also, you should remove from your PR the team ID changes from XCode project, and keep that only locally on your computer; this will reduce the changes.
I'll work on a merge of both branch for the moment.
Thanks

@imdatceleste
Copy link
Author

imdatceleste commented Sep 11, 2023

@kristofb made the necessary changes (I hope). Please check.

Also, the Team ID is done automatically by Xcode and required for testing purposes. I did make the changes manually with a text-editor. You probably still need to check them.

@FelixGaebler FelixGaebler mentioned this pull request Sep 30, 2023
@Firooz-Smart
Copy link

Firooz-Smart commented Nov 23, 2023

Thank you sir @imdatsolak you saved my time after 4 days i found this helpful. worked for me. now i can receive text/url and images in my app

@samatzp
Copy link

samatzp commented Dec 1, 2023

@bhagat-techind Hi man! why this pr not merged?)

@juanan-onelife
Copy link

Thank you @imdatsolak for the solution!

@alodevloper
Copy link

Hello @imdatsolak , it gives me this error , any help ?

Swift Compiler Error (Xcode): Cannot find type 'SharingFile' in scope
/..Share%20Extension/ShareViewController.swift:14:26
ShareViewController.swift:14

Swift Compiler Error (Xcode): Cannot find type 'SharingFileType' in scope
/..e/ios/Share%20Extension/ShareViewController.swift:248:47

@imdatceleste
Copy link
Author

Hello @imdatsolak , it gives me this error , any help ?

Swift Compiler Error (Xcode): Cannot find type 'SharingFile' in scope /..Share%20Extension/ShareViewController.swift:14:26 ShareViewController.swift:14

Swift Compiler Error (Xcode): Cannot find type 'SharingFileType' in scope /..e/ios/Share%20Extension/ShareViewController.swift:248:47

I can't really reproduce what you are doing. If you get my fork as described here you shouldn't have any problems.

I don't know what @bhagat-techind is currently doing with merging since it created merge conflicts compared to their changes, but I am actively using my fork in my projects and I don't see any problems there.

@alodevloper
Copy link

Hello @imdatsolak , it gives me this error , any help ?
Swift Compiler Error (Xcode): Cannot find type 'SharingFile' in scope /..Share%20Extension/ShareViewController.swift:14:26 ShareViewController.swift:14
Swift Compiler Error (Xcode): Cannot find type 'SharingFileType' in scope /..e/ios/Share%20Extension/ShareViewController.swift:248:47

I can't really reproduce what you are doing. If you get my fork as described here you shouldn't have any problems.

I don't know what @bhagat-techind is currently doing with merging since it created merge conflicts compared to their changes, but I am actively using my fork in my projects and I don't see any problems there.

thank you it works now , thanks for the effort

@imdatceleste imdatceleste closed this by deleting the head repository Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants