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

Once I added this package to the project the image_picker package stopped working !! #270

Closed
hassanyassiin opened this issue May 31, 2022 · 15 comments
Labels
Firebase Issues related to using ML Kit along with Firabase Out of scope Issues or features that are outside the scope of the plugin

Comments

@hassanyassiin
Copy link

once I added this package, I wasn't able to select images anymore by image_picker I tried with several projects. the gallery will open but the image will return nul, I don't know why but that what happening

@fbernaly fbernaly added the Out of scope Issues or features that are outside the scope of the plugin label May 31, 2022
@fbernaly
Copy link
Collaborator

Look at your dependencies. Fixing image_picker is outside the scope of this plugin. Check our example app, it is using image_picker and it is working with no issues in both iOS and Android, so I am afraid this more an issue is your dependencies and how you are configuring your project.

Check our example app, clone our repo: https://github.com/bharat-biradar/Google-Ml-Kit-plugin/tree/master/packages/google_ml_kit/example

Also, a couple of days ago I created this sample that uses one of our plugins and image_picker, and it is running with no issues: https://github.com/fbernaly/web_text_recognition_poc

@hassanyassiin
Copy link
Author

hassanyassiin commented May 31, 2022 via email

@fbernaly
Copy link
Collaborator

fbernaly commented May 31, 2022

  1. yes, you need to exclude armv7 as explained here: https://github.com/bharat-biradar/Google-Ml-Kit-plugin#ios

  2. which API are you using?

@hassanyassiin
Copy link
Author

hassanyassiin commented May 31, 2022 via email

@fbernaly
Copy link
Collaborator

yes, unfortunately in case of object detection you need Firebase, and that is because for this API there is this one feature that allows you to download your model from Firebase. And since the plugin bundles everything together we have not found a way to get rid of that. Other than adding the GoogleService-info.plist to the project you need to initialize Initialize Firebase in your app.

@fbernaly
Copy link
Collaborator

What do you mean with added automatically? never seen that?

@hassanyassiin
Copy link
Author

hassanyassiin commented Jun 1, 2022

ok then i added the GoogleService-info.plist to my project and i initialized firebase in my app but i didn't add the firebase sdk into my app as step 3 said is it necessary ?

Once i added the amrv7 there ....
Screen Shot 2022-06-01 at 9 26 13 AM

Then arm64 added here automatically, when i tried to remove it an error accur "Target Integrity (Xcode): The linked framework 'Pods_Runner.framework' is missing one or more architectures required by this target: arm64."
Screen Shot 2022-06-01 at 9 26 21 AM

@hassanyassiin
Copy link
Author

@fbernaly Please can you help to fix this issue about adding the amr64 automatically ? because I'm not able to run my app on the iOS simulators but on any iOS real device it works great and also on the android devices/emulators

@fbernaly
Copy link
Collaborator

fbernaly commented Jun 3, 2022

Have you tried to run ours example app in the iOS simulator? So far, for me it is compiling and running in the simulator. You need to check the configuration of your iOS project, compare it side by side with the configuration of our example app. Also, I am wondering if you excluded armv7 in the target level or project level? it should be project level. In the screenshot you shared you are showing me target level, but look at the screenshoot in our readme, it is showing project level.

@hassanyassiin
Copy link
Author

hassanyassiin commented Jun 3, 2022 via email

@fbernaly
Copy link
Collaborator

fbernaly commented Jun 3, 2022

Compare side by side with our example app. Ours can be ran in the simulator

@hassanyassiin
Copy link
Author

hassanyassiin commented Jun 3, 2022 via email

@fbernaly
Copy link
Collaborator

fbernaly commented Jun 3, 2022

@hassanyassiin
Copy link
Author

@fbernaly Thanks for your help! i clone the app and it is working great in all devices but except on the IOS simulators, the app run in the IOS simulator without errors but what happen is that the image picker will return null when select an image, and even the object detector package didn't work in the IOS simulator and what i noticed that once i run the app the arm64 added automatically into the target-> Exculed Architectures -> Any IOS Simulator !!.

Screen Shot 2022-06-05 at 8 49 02 PM

Kindly can you check on your IOS Simulator if the image picker return an image ? and if yess can you help me to solve this issue it take me too long and didn't find any solution and the deadline for me is Tuesday to submit my task!!!.
Note: I'm using Macbook pro m1

@fbernaly
Copy link
Collaborator

fbernaly commented Jun 5, 2022

Sorry, I cannot do anymore, I also running on a M1 processor as well, and for me it is perfectly running on the iOS simulator. I cannot reproduce the same issue you are facing. And image picker is working as well.

@fbernaly fbernaly added the Firebase Issues related to using ML Kit along with Firabase label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firebase Issues related to using ML Kit along with Firabase Out of scope Issues or features that are outside the scope of the plugin
Projects
None yet
Development

No branches or pull requests

2 participants