CodeMinion / another_brother

Another Brother Flutter SDK
BSD 3-Clause "New" or "Revised" License
21 stars 19 forks source link

Cannot build on any branch, ios #44

Open kyeshmz opened 1 year ago

kyeshmz commented 1 year ago

Hi! I am using flutter 3.7.7 and was trying out both the demo github and this pubspec, but both do not seem to compile on ios. Sometimes I get a Error (Xcode): Undefined symbol: _OBJC_CLASS_$_BROTHERSDK, but other times it seems like the plugin does not install properly on both the master and ios without b branch.

Is there something I am missing, such as xcode version?

CodeMinion commented 1 year ago

Hi @kyeshmz !

Thanks for reaching out about this. In the case of iOS you'll need to follow our setup steps outlined here (https://www.youtube.com/watch?v=AcFnd-6hSew) because there are currently a few setup steps that we have not figured out yet how to automate.

Also for iOS bear in mind that you'll need to use a physical device during development because the native libraries we currently use don't compile for the emulator.

Thanks again for reaching out, I hope this helps but don't hesitate to reach out if there is anything else I can help with,

kyeshmz commented 1 year ago

I am running everything on a real device, is the libBROTHERSDK.a linking still needed even if we are submitting to the app store?

kyeshmz commented 1 year ago

It seems to not work on xcode 14.3 / flutter 3.7.10 / with xcode build failing with ```Error (Xcode): Undefined symbol: _OBJCCLASS$_BROTHERSDK

CodeMinion commented 1 year ago

Hi @kyeshmz ,

Sorry to hear you are still facing build issues. That Undefined symbol normally means the target membership for BROTHERSDK.h and libBROTHERSDK.a for those components (https://youtu.be/AcFnd-6hSew?t=117)

One thing I have seen happened after doing the setup if Xcode is closed this gets reset on the next build. So usually leaving Xcode open while building after the configuration is completed ensures that membership is not reset (the membership checks remain toggled).

That said, I run Xcode 13.3.1 / Flutter 3.7.5 so can't rule out it might be a specific issue on the newer version of Xcode yet either.

Could I trouble you to try configuring the Xcode side of things once more, leaving Xcode running and building from it to see if we can rule out the configuration reset.

With regards to libBROTHERSDK.a, if you are submitting to the store you should not have them as we have seen other submissions get rejected because of it so I recommend using the ios-no-type-b branch. Unless you are targeting Brother's TypeB printers you won't need that anyways.

kyeshmz commented 1 year ago

So I got forward with using the ios-no-type-b branch working on ios, and it seems like it creates a different printing pattern than master. I will try master again, but can we merge ios-type-b into master for opting out of type-b? I would think opting in to type-b would be much user friendly for those wanting to use this in production like me

kyeshmz commented 1 year ago

So it seems like I can run it once every 10 times in xcode, but not in any other debugging environment like vscode. EDIT: https://github.com/kyeshmz/another_brother forking out to run without type b seems to work in vscode

CodeMinion commented 1 year ago

Apologies for the late response @kyeshmz. Glad to hear you got it working.

I am told that the new typeB libraries from Brother solve this issue, if that's the case we'll likely upgrade to using that version during the hackathon and have no need for the no-type-b branch moving forward.