tolotrasamuel / account_picker

Prompt user to pick an Email or a Phone number saved on device without requiring extra permission
MIT License
3 stars 4 forks source link

ios error #1

Closed flutter-painter closed 1 year ago

flutter-painter commented 4 years ago

Great pub, Anyway to circumvent this on ios ? No podspec found for account_picker in .symlinks/plugins/account_picker/ios

tolotrasamuel commented 4 years ago

Unfortunately, ios is not supported yet. I am waiting for someone to send a PR. Because I don't even have a Mac book. Never built an IoS app before. If you find a solution, feel free to update this thread

On Sat, Aug 29, 2020, 23:01 Pierre notifications@github.com wrote:

Great pub, Anyway to circumvent this on ios ? No podspec found for account_picker in .symlinks/plugins/account_picker/ios

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tolotrasamuel/account_picker/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7AJX3KAJF7PEM5HKL4SSDSDFGBBANCNFSM4QPEW6JQ .

flutter-painter commented 4 years ago

Haven't built one yet either, Yet, this issue is not about ios support, It is about not blocking the app from building on ios, I encountered a similar issue with blue thermal plugin, Though it does not work on iphone, the runner still builds. I'll dig the following snippet,


  installer.analysis_result.specifications.each do |s|
    if s.name == 'YOUR_POD_NAME_HERE'
      s.swift_version = '4.2'
    end
  end
end ```
tolotrasamuel commented 4 years ago

Have you tried if(Platform.isIos) // ignore the plugin

Or if I am understanding correctly, this happens during build time.

On Mon, Aug 31, 2020, 09:15 Pierre notifications@github.com wrote:

Haven't built one yet either, Yet, this issue is not about ios support, It is about not blocking the app from building on ios, I encountered a similar issue with blue thermal plugin, Though it does not work on iphone, the runner still builds. I'll dig the following snippet,

installer.analysis_result.specifications.each do |s| if s.name == 'YOUR_POD_NAME_HERE' s.swift_version = '4.2' end end end ```

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tolotrasamuel/account_picker/issues/1#issuecomment-683553996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7AJXYXM5E4JKWO7UFL4KDSDMWY7ANCNFSM4QPEW6JQ .

pierre-gancel commented 4 years ago

It happens during build time

pierre-gancel commented 4 years ago

simply copy paste the snipper in the build and remove pub from .yaml

Jai05-techie commented 4 years ago

Hi, facing same issue in iOS any workaround ?

pierre-gancel commented 4 years ago

remove the plugin from the .yaml and paste this in your code if device is android I don't know if this also works on ios, if there is a similar method, please share

Future<List> getEmailFromMethodChannel() async {
  const MethodChannel _channel = const MethodChannel('account_picker');
  final List<dynamic> emailResult =
      await _channel.invokeMethod('requestEmailHint');
  if (emailResult != null) {
    // [0] email
    // [1] type of account
    return [emailResult[0], emailResult[1]];
  } else {
    return null;
  }
}

Future<String> getPhoneFromMethodChannel() async {
  const MethodChannel _channel = const MethodChannel('account_picker');
  final String phone = await _channel.invokeMethod('requestPhoneHint');
  return phone;
}
pierre-gancel commented 4 years ago

mea culpa this does not work I had a look at https://flutter.dev/docs/development/platform-integration/platform-channels#step-4-add-an-ios-platform-specific-implementation

will see if I can PR with ios

tolotrasamuel commented 1 year ago

check 2.1.0