-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[ios_platform_images] Support loading system images #4803
Conversation
packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
Outdated
Show resolved
Hide resolved
packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
Outdated
Show resolved
Hide resolved
Can you rebase onto main? We had to refresh our auth tokens. |
packages/ios_platform_images/example/integration_test/ios_platform_images.dart
Outdated
Show resolved
Hide resolved
packages/ios_platform_images/example/integration_test/ios_platform_images.dart
Outdated
Show resolved
Hide resolved
packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
Outdated
Show resolved
Hide resolved
packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
Outdated
Show resolved
Hide resolved
packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
Outdated
Show resolved
Hide resolved
packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
Outdated
Show resolved
Hide resolved
packages/ios_platform_images/ios/Classes/IosPlatformImagesPlugin.m
Outdated
Show resolved
Hide resolved
What's the status of this PR? Is this ready for another round of review? |
Sorry, school has been getting intense for me. I implemented the trivial parts of your review and agree that Pigeon is the way to go, so I've looked at some examples but have yet to implement it. |
Okay thanks, I'll go ahead and mark this as a draft for now so it won't show up in triage sweeps, and you can mark it as ready for review once you've updated it. |
packages/ios_platform_images/example/integration_test/ios_platform_images_integration_test.dart
Outdated
Show resolved
Hide resolved
Apologies for my delays getting back to this. I believe the most significant parts of this PR are correct unless I went too far out of scope with the pigeon implementation. The one thing I haven't been able to figure out on my own, however, is why the error case integration test fails. |
Sorry for the delay in looking at the error you mentioned; unfortunately the logs have expired so I can't see what the failure was. There are also a lot of other failures here (unit tests, format, etc.) Could you push an update to fix those issue, and then we can look at the new run of the integration test failure to see what the failure message is? |
It looks like the native code implementing the Pigeon interface isn't compiling in this version. |
@cadenkriese Is this still something you are planning on finishing? Should we mark it as a draft for now? |
Yes, apologies for the delay (again). I'm trying to figure out unit testing with pigeon but haven't found any resources for that? On a macro level are unit tests making their own mock api implementation or does the framework handle that somehow? |
Dart unit tests, or native unit tests? For Dart, you can just use Mockito to generate a mock implementation of the |
Thanks for the tips, let me know if there's anything wrong with how I've implemented it. The last thing I believe is the pesky error I'm getting with the native test error case, where it isn't throwing the error at the right time? My reasoning for that guess is that the test fails due to an ArgumentError, but that's what I'm expecting on this line Line 56 in 5700f92
edit: also not sure how to proceed with the test as a whole, see #4803 (comment) |
@stuartmorgan, apologies for the silence on my end. I want to try to finish this since the 1-year mark is coming up. Here's a summary of the issues I'm facing and looking for guidance on: Most importantly, I'm trying to figure out how to proceed with the failure integration test; I've tried 3 or 4 different implementations, but nothing can handle the asynchrony properly and report back to the test framework. The current state of the relevant code is here. Lines 39 to 58 in 6b322af
I also can't get the integration test to run on my machine (Runner crashes), and it looks like LUCI can't either https://ci.chromium.org/ui/p/flutter/builders/try/Mac_x64%20ios_platform_tests_3_of_4%20master/817/overview. So ultimately, I'm very lost when it comes to all of this, I would appreciate some help getting back on track. Also, the analyzer isn't liking that Pigeon generates an unused function, what should I do about this?
Thank you again for your persistence with this! |
In general, or when running the specific integration test you referenced above?
That's a Pigeon bug; we can fix it and then you can update this PR with the new version of Pigeon. |
It appears to be due to the test since it doesn't occur when I comment it out, here's the output when running When running
Sounds good 👍 |
They worked on two different iPhones in simulator but it's not passing in CI so I'm not sure if it's reliable. |
Yeah... You could check it's greater than 0, or you could use a Matcher like https://api.flutter.dev/flutter/package-matcher_matcher/closeTo.html |
We've just completed the migration of the plugin code to the flutter/packages repository, as described in https://flutter.dev/go/flutter-plugins-repo-migration, and this repository is now being archived. Unfortunately that means that all in-progress PRs here must be moved to flutter/packages. Please see our instructions for an explanation of how to move your PR, and if you have any issues moving your PR please don't hesitate to reach out in the #hackers-ecosystem channel in Discord. Our apologies that your PR was caught in this one-time transition. We're aware that it's disruptive in the short term, and appreciate your help in getting us to a better long-term state! |
I've implemented a method to retrieve system images known as 'sfsymbols' as one of the first steps in implementing https://flutter.dev/go/sf-symbols. At the same time, I've updated the example app to contain a demo, as well as added integration tests.
Issues are fixed by this PR.
flutter/flutter#82208
flutter/flutter#60034 (partially)
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style].///
).