-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
iOS example #218
iOS example #218
Conversation
Codecov Report
@@ Coverage Diff @@
## master #218 +/- ##
=======================================
Coverage 87.57% 87.57%
=======================================
Files 6 6
Lines 169 169
=======================================
Hits 148 148
Misses 21 21 Continue to review full report at Codecov.
|
Update: I rebased on the latest master, removed the exit after 5 seconds which I somehow hadn't noticed, and ran it again on iOS 13. It works until I rotate the screen to landscape, then back to portrait. Everything freezes and I get:
Screenshot of it working, looks kinda crap. Maybe there's a DPI issue with winit or something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool. I kinda think you should put some of the steps you've got in the readme in a makefile and then put those as rules in the CI. The CMakeCache issue really is grossest of the setup steps.
[https://github.com/paritytech/rust-snappy/pull/10/files](https://github.com/paritytech/rust-snappy/pull/10/files) | ||
[https://stackoverflow.com/questions/52879026/cmake-cross-compile-on-macos-adds-macos-sdk-to-isysroot-in-flags-make/52879604#52879604](https://stackoverflow.com/questions/52879026/cmake-cross-compile-on-macos-adds-macos-sdk-to-isysroot-in-flags-make/52879604#52879604) | ||
|
||
* Open Xcode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been adding examples with the Xcode project in them as seen in rust-windowing/glutin#1233. I admit that it's a bit annoying to setup but you can also make it run in CI that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to take a look at that, I haven't worked on this in quite awhile so I need to refresh my memory.
From #214
This is essentially the triangle example, with some steps in a README describing how to build and run the example via Xcode.
I'm currently not pleased with the cargo setup I have, I needed to make the example its own project because I was building a library. I thought you could build examples as static libraries, but I couldn't get it to work. If someone could help, that would potentially simplify a lot.Update: Got it working via the normal cargo example system, not sure why I had trouble before.
There are also some nastier issues when building, having to do with
shaderc-sys
and CMake. I had to manually edit aCMakeCache.txt
file in order to make the build work it's described in the README. I need to investigate more on that.The example runs and displays a triangle, however it eventually crashes with an error:
This is an issue with winit, perhaps it's not visible in the most recent version, I haven't tested enough yet.
I ran this with XCode 10 + iOS 12 on an iPhone SE at first, and it was crashing due to some metal command buffer calls.
Today I ran it with XCode 11 + iOS 13 and it eventually reaches the winit crash I described above.