You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Methane applications built for iOS fail to run natively on MacOS with Apple Silicon with error:
[CAMetalLayer nextDrawable] returning nil because device is nil.
Steps To Reproduce
Steps to reproduce the behavior:
Build for iOS device: ./Build/Unix/Build.sh --apple-platform OS64 --apple-dev-team 43335E8AZR.
Open generated Xcode workspace from ./Build/Output/Xcode/OS64/MT-Release/Build/METHANE_KIT.xcodeproj.
Automatically generate schemas and select MethaneShadowCube application from the schemas drop-down in Xcode.
Select deployment target My Mac (Designed for iPhone) to the right of schema.
Press Run button in Xcode and see warning and error messages in Xcode log window:
MethaneShadowCube[10910:2972780] [CAMetalLayer nextDrawable] returning nil because device is nil.
-[MTLDebugRenderCommandEncoder setRenderPipelineState:]:1580: failed assertion `Set Render Pipeline State Validation
For color attachment 0, the renderPipelineState pixelFormat must be MTLPixelFormatInvalid, as no texture is set.
the pipelineState's per sample imageBlock usage(4) is greater than the encoder's perSample imageBlock usage(0)'
Program ended with exit code: 9
Expected behavior
iOS application should run normally on MacOS, similarly as it runs on iOS device or simulator.
Desktop (please complete the following information):
OS: MacOS
Version 12.5
Build environment: Xcode 13.4.1
The text was updated successfully, but these errors were encountered:
egorodet
changed the title
Methane applications built for iOS fail to run natively on MacOS with Apple Silicon
Methane applications built for iOS fail to run natively on Macs with Apple Silicon
Sep 6, 2022
# Methane Kit v0.7.0: Add iOS and tvOS platforms support
- **Platform** libraries:
- `Methane::Platform::AppIOS` implementation was added to support iOS and tvOS mobile platforms (closed#12).
- iOS Alert window implementation was added.
- Limited input support was added for iOS to translate touches to mouse events (keyboard input is not supported).
- Moved `RenderContext::GetContentScalingFactor` and `RenderContext::GetFontResolutionDpi` methods `Platform::IApp` interface with platform dependent implementations. Linux implementation for X11 was added.
- **Graphics** libraries:
- Manual memory management was removed from Objective-C Metal graphics implementation due to switching to ARC (automatic reference counting).
- `RenderCommandList::Draw` and `DrawIndexed` calls implementation for Metal was changed to not exclude using of `start_vertex` and `start_instance` parameters for GPU Family < `MTLGPUFamilyApple3` or `MTLGPUFamilyMac2`, which is essential for working on iOS Simulators.
- Unsupported `Sampler` parameters were put under `#ifdef APPLE_MACOS` to enable tvOS support.
- Fixed flipping camera projection up-side-down in portrait orientation.
- **Tutorials** applications:
- Customised default UI options to make HUD visible by default on iOS.
- Added iOS screenshots for tutorials.
- Added keyboards shortcuts for tutorials in README files.
- Known issue: #101
- **Tests** infrastructure:
- Add missing test targets to GCov coverage on Ubuntu.
- **Build** infrastructure:
- Added `Externals/iOS-Toolchain.cmake` file from [iOS-CMake](https://github.com/leetal/ios-cmake) project to enable iOS & tvOS build configuration.
- Apple Clang is now used with ARC enabled (automatic reference counting) via `-fobjc-arc` option.
- Split MacOS and iOS application `.plist` configs generation via `CMake/MethaneApplication.cmake`
- Split `CMake/MethaneGlobalOptions.cmake` from `CMake/MethaneBuildOptions.cmake` to allow including it in the root CMakeLists of external projects to properly set global CMake options.
- Add support for Apple code signing via `APPLE_DEVELOPMENT_TEAM` cmake option.
- Extended `Build/Unix/Build.sh` script to support iOS / tvOS builds via new command-line arguments `--apple-platform`, `--apple-dev-team` and `--apple-deploy-target`.
- Added iOS and tvOS Simulator builds in Azure Pipelines.
- Added CLion cmake configurations for iOS and tvOS.
- Added iOS and tvOS build instructions to `Build/README.md`.
Describe the bug
Methane applications built for iOS fail to run natively on MacOS with Apple Silicon with error:
Steps To Reproduce
Steps to reproduce the behavior:
./Build/Unix/Build.sh --apple-platform OS64 --apple-dev-team 43335E8AZR
../Build/Output/Xcode/OS64/MT-Release/Build/METHANE_KIT.xcodeproj
.MethaneShadowCube
application from the schemas drop-down in Xcode.My Mac (Designed for iPhone)
to the right of schema.Run
button in Xcode and see warning and error messages in Xcode log window:Expected behavior
iOS application should run normally on MacOS, similarly as it runs on iOS device or simulator.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: