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

8 Warnings #57

Closed
Igor-Poltavtsev opened this issue Nov 22, 2018 · 5 comments
Closed

8 Warnings #57

Igor-Poltavtsev opened this issue Nov 22, 2018 · 5 comments

Comments

@Igor-Poltavtsev
Copy link

Hi! I have 8 warnings like:
no rule to process file '/Frameworks/MetalPetal/Shaders/BlendingShaders.metal' of type 'sourcecode.metal' for architecture 'x86_64' (in target 'MetalPetal')

Could you fix this or provide any suggestions?

@YuAo
Copy link
Member

YuAo commented Nov 23, 2018

Xcode does not compile the .metal files for the simulator. You can safely ignore these warnings, since metal code won't run on a simulator.

@YuAo YuAo closed this as completed Nov 23, 2018
@Igor-Poltavtsev
Copy link
Author

Igor-Poltavtsev commented Nov 23, 2018

@YuAo Is it safe to remove .metal files from Build Phases?

@Igor-Poltavtsev
Copy link
Author

@YuAo I tried, not, app won't work in this case.
I found such solution:
https://stackoverflow.com/questions/46254475/ignore-metal-files-when-building-for-ios-simulator-target
But it requires changes in code.
What do you think, about of implementing this solution?
We keep our project free of any warnings and this 8 warnings quite ennoying.

@YuAo
Copy link
Member

YuAo commented Nov 26, 2018

The stackoverflow solution you provided should work.

In the situation of MetalPetal, no code change is required, because MetalPetal loads the metallib file from its own framework bundle. All you need to do is compile the .metal file to a file named "default.metallib" and place it in the MetalPetal.framework bundle.

This solution requires that you change your project / build configurations. And everything about Metal Compiler in your project settings won't work anymore because you are not using Xcode's build system to build .metal files.

I'm not sure it is a good solution for the framework vendor to implement.

I think the proper place for this solution should be the post_install hook of CocoaPods. https://guides.cocoapods.org/syntax/podfile.html#post_install You should be able to write a post install hook to perform the change.

@evanxlh
Copy link

evanxlh commented Jun 17, 2019

I just removed .metal files from the Compile Sources, and it seems to work well.

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

3 participants