Comments (3)
Hi @rachelkang, I think you need to change the $(RuntimeIdentifier)
to ios-arm64
to run on a device. You could either change the .csproj
file or use the -r
switch at the command-line:
$ dotnet build HelloMaui -t:Run -f net6.0-ios -r ios-arm64
Let me know if that works, thanks.
The crash you get at startup, seems like a problem in Maui, to me:
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at Microsoft.Maui.ViewExtensions.UpdateSemantics(UIView nativeView, IView view)
at Microsoft.Maui.Handlers.ViewHandler.MapSemantics(IViewHandler handler, IView view)
at Microsoft.Maui.PropertyMapper`2.<>c__DisplayClass21_0[[Microsoft.Maui.IView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.IViewHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<Add>b__0(IViewHandler r, IFrameworkElement v)
at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IViewHandler viewHandler, IFrameworkElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperties(IViewHandler viewHandler, IFrameworkElement virtualView)
at Microsoft.Maui.Handlers.ViewHandler`2[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.LayoutView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IView view)
at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view)
at Microsoft.Maui.HandlerExtensions.ToNative(IView view, IMauiContext context)
at Microsoft.Maui.MauiUIApplicationDelegate`1[[HelloMaui.Startup, HelloMaui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].FinishedLaunching(UIApplication application, NSDictionary launchOptions)
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at HelloMaui.Program.Main(String[] args) in /Users/rachelkang/net6-mobile-samples/HelloMaui/iOS/Program.cs:line 12
2021-04-09 09:34:47.389328-0400 HelloMaui[25843:192553] Unhandled managed exception: Object reference not set to an instance of an object (System.NullReferenceException)
at Microsoft.Maui.ViewExtensions.UpdateSemantics(UIView nativeView, IView view)
at Microsoft.Maui.Handlers.ViewHandler.MapSemantics(IViewHandler handler, IView view)
at Microsoft.Maui.PropertyMapper`2.<>c__DisplayClass21_0[[Microsoft.Maui.IView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.IViewHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<Add>b__0(IViewHandler r, IFrameworkElement v)
at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IViewHandler viewHandler, IFrameworkElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperties(IViewHandler viewHandler, IFrameworkElement virtualView)
at Microsoft.Maui.Handlers.ViewHandler`2[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.LayoutView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IView view)
at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view)
at Microsoft.Maui.HandlerExtensions.ToNative(IView view, IMauiContext context)
at Microsoft.Maui.MauiUIApplicationDelegate`1[[HelloMaui.Startup, HelloMaui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].FinishedLaunching(UIApplication application, NSDictionary launchOptions)
--- End of stack trace from previous location ---
at UIKit.UIApplication.Main(String[] args, IntPtr principal, IntPtr delegate)
at UIKit.UIApplication.Main(String[] args, String principalClassName, String delegateClassName)
at HelloMaui.Program.Main(String[] args) in /Users/rachelkang/net6-mobile-samples/HelloMaui/iOS/Program.cs:line 12
from maui-samples.
@jonathanpeppers thanks for the suggestion! I tried both ways, and am now seeing this build error:
Build FAILED.
3 +[DVTExtendedPlatformInfo extendedPlatformInfoForPlatformIdentifier : error : ] (in DVTFoundation) [/Users/rachelkang/net6-mobile-samples/HelloMaui/HelloMaui.csproj]
/usr/local/share/dotnet/sdk/6.0.100-preview.3.21202.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(876,5): error MSB3073: The command "/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/14.4.100-preview.3.1326/tools/bin/mlaunch --launchdev bin/Debug/net6.0-ios/ios-arm64/HelloMaui.app/ --stdout /dev/ttys000 --stderr /dev/ttys000 --wait-for-exit" exited with code 134. [/Users/rachelkang/net6-mobile-samples/HelloMaui/HelloMaui.csproj]
0 Warning(s)
2 Error(s)
here's the full gist: https://gist.github.com/rachelkang/9aad005729e49e600e1ebffc60abea2a
and thanks for nothing the MAUI issue - I think we've since fixed that exception, but will definitely continue to keep an eye out for it
from maui-samples.
Do you have an Xcode 12.4? I don't think 12.5 works yet.
I normally install them side-by-side and use sudo xcode-select -s /Applications/Xcode12.4.app/
to switch between versions.
from maui-samples.
Related Issues (20)
- why are all sample codes not running because of packages? HOT 3
- BugSweeper
- WebAuthenticator in PlatformIntegrationDemo ends (crashes?) App HOT 1
- Native embedding sample
- NativeEmbeddingDemo doesn't work. HOT 2
- DatePicker crashes app HOT 3
- Point of Sale will not even Compile... HOT 4
- WEATHER APP DOES NOT RUN!! HOT 2
- Update quest.config
- Share.RequestAsync() doesn't work on .Net MAUI HOT 1
- Update OIDC keys for the OSPO API
- All of the CollectionView samples need to be updated so the CV is inside a Grid not a StackLayout
- MAUI and OpenXR HOT 1
- ISSUE on Windows for any official .NET MAUI examples in the repo that uses TableView
- Update native embedding sample
- Application name in the Localization Sample does not work on iOS platform. HOT 2
- Command bindings are not re-established when navigating back and forth in UIInterface samples HOT 3
- CollectionView ScrollTo not working HOT 1
- Push notifications sample HOT 1
- PlatformIntegrationDemo WebAuthenticator problems on emulator?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maui-samples.