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

Use of undeclared identifier 'MicroblinkFlutterPlugin' #5

Open
AzarouAmine opened this issue Dec 14, 2021 · 8 comments
Open

Use of undeclared identifier 'MicroblinkFlutterPlugin' #5

AzarouAmine opened this issue Dec 14, 2021 · 8 comments

Comments

@AzarouAmine
Copy link

Hello,

When trying to launch the app in iOS I get this error :

Screen Shot 2021-12-14 at 01 31 03

@mparadina
Copy link
Contributor

Hi @AzarouAmine

This is a bug from our side.
The fix will be added in the next version of the SDK, however, until then, a workaround is to rename every “MicroblinkFlutterPlugin” text with “BlinkCardFlutterPlugin” in the GeneratedPluginRegistrant file.

So, the GeneratedPluginRegistrant.m file should look like this:

#import "GeneratedPluginRegistrant.h"

#if __has_include(<blinkcard_flutter/BlinkCardFlutterPlugin.h>)
#import <blinkcard_flutter/BlinkCardFlutterPlugin.h>
#else
@import blinkcard_flutter;
#endif

@implementation GeneratedPluginRegistrant

+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
  [BlinkCardFlutterPlugin registerWithRegistrar:[registry registrarForPlugin:@"BlinkCardFlutterPlugin"]];
}

@end

Let me know if it helped.

@AzarouAmine
Copy link
Author

AzarouAmine commented Dec 14, 2021

Thanks @mparadina,

Your solution works good, I'm able to run the app in iOS now. Any idea when the next version with the fix will be released?

@jimykhan
Copy link

jimykhan commented Jan 7, 2022

HI @AzarouAmine does this complete ur requirement i mean did u scan card properly

@AzarouAmine
Copy link
Author

AzarouAmine commented Jan 7, 2022

Hello @jimykhan ,

This solution does work, but it isn't the best one. Every time you rebuild your app (adding a new dependency for example), you'll have to make this change manually.

@nadas00
Copy link

nadas00 commented Feb 1, 2022

Hi @AzarouAmine

This is a bug from our side. The fix will be added in the next version of the SDK, however, until then, a workaround is to rename every “MicroblinkFlutterPlugin” text with “BlinkCardFlutterPlugin” in the GeneratedPluginRegistrant file.

So, the GeneratedPluginRegistrant.m file should look like this:

#import "GeneratedPluginRegistrant.h"

#if __has_include(<blinkcard_flutter/BlinkCardFlutterPlugin.h>)
#import <blinkcard_flutter/BlinkCardFlutterPlugin.h>
#else
@import blinkcard_flutter;
#endif

@implementation GeneratedPluginRegistrant

+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
  [BlinkCardFlutterPlugin registerWithRegistrar:[registry registrarForPlugin:@"BlinkCardFlutterPlugin"]];
}

@end

Let me know if it helped.

I am changing following in my code base but it regenerate and come back the older version when I run project. What can I do?

@anjapenic
Copy link

Hi @nadas00,

Are you changing it inside the GeneratedPluginRegistrant.m file? Which SDK version are you using and to which does it revert back to?

Best regards,
Anja

@nizarmasri-rockspoon
Copy link

nizarmasri-rockspoon commented Mar 28, 2022

Hey @anjapenic @AzarouAmine ,

I'm facing the same issue as @nadas00. I changed the code inside the GeneratedPluginRegistrant.m file like @AzarouAmine mentioned, but when I build the app, the GeneratedPluginRegistrant.m file regenerates with the previous, unchanged code.

flutter doctor:


[✓] Flutter (Channel stable, 2.10.1, on macOS 11.6 20G165 darwin-arm, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.64.0)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!


@mparadina
Copy link
Contributor

Hi @AzarouAmine @nadas00

Renaming the plugin strings is currently the only workaround to the issue.
However, the new version of the SDK with the fix should come out in approximately two weeks.

Once the release is live, I will make a follow-up here.

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

No branches or pull requests

6 participants