-
Notifications
You must be signed in to change notification settings - Fork 516
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
Default RuntimeIdentifier #10861
Comments
My thinking for making the iOS simulator default is to make the getting started experience smoother. A first-time user probably won't have a device connected yet, but the simulator would be able to launch fine. An experienced user will more likely understand how to change a setting to deploy to a device. Hopefully, the IDE would be able to select the right |
Agreed with option 2.
Agreed with option 2 on Mac On Windows... then a Mac might not be connected so it would make sense to build for a device. However it's more an IDE thing than the default tool (which runs on the Mac).
Yes, my understanding is that is more CLI defaults than IDE, just like we had with |
…alid RuntimeIdentifier. Fixes xamarin#10861. Also add tests: * Remove RuntimeIdentifier from a few sample projects. These projects should continue to build just fine. * Add tests for invalid RuntimeIdentifiers. Fixes xamarin#10861.
…alid RuntimeIdentifier. Fixes xamarin#10861. Also add tests: * Remove RuntimeIdentifier from a few sample projects. These projects should continue to build just fine. * Add tests for invalid RuntimeIdentifiers. Fixes xamarin#10861.
…alid RuntimeIdentifier. Fixes xamarin#10861. Also add tests: * Remove RuntimeIdentifier from a few sample projects. These projects should continue to build just fine. * Add tests for invalid RuntimeIdentifiers. Fixes xamarin#10861.
Add support for universal / fat apps for iOS, macOS and Mac Catalyst. We detect if we need to build a universal app by checking if `RuntimeIdentifiers` (plural) is set, and in that case we do a complete inner build for every `RuntimeIdentifier`, and then once those inner builds are done, we merge the resulting .app bundles together (using a new MSBuild task called `MergeAppBundles`). When merging app bundles together, we'll run into files that exist in both apps. Depending on the file type, we do different things: * MachO flies: lipo'ed together. * Managed assemblies: we do a binary comparison, if the assemblies are different, we put them in a RID-specific subdirectory. At runtime we know to look for assemblies in this directory. * runtimeconfig.bin, icudt.dat: put in a RID-specific subdirectory. * Info.plist: computed in the outer (fat) build, the one from the inner build is ignored. * Other files: for identical files we just copy one, otherwise we show an error. If we run into files that are different between apps, but we should handle somehow, then we'll have to decide on a case-to-case basis what to do. Some code shuffling was required to increase code sharing between the tools/ code, the msbuild/ code, and tests. I've also added support for a default `RuntimeIdentifier`. Fixes #10294. Fixes #10861.
Currently we require the RuntimeIdentifier to be set in order to build on all the Apple platforms, but having a default RuntimeIdentifier might make sense, at least in certain cases (and we don't have to do the same thing on all platforms).
Desktop platforms (macOS + Mac Catalyst)
For desktop platforms (macOS + Mac Catalyst), we have the choice between x64 and arm64, and at least for these platforms I think we should set a default. Options:
IMHO the second option is the one that makes the most sense.
At least for now I think it makes most sense to have the same default for both platforms.
Mobile platforms (iOS + tvOS)
We have more options here, because the app can target either a simulator or a device - this is really what it comes down to, if we should default to simulator or device, or if we should require the user to specify.
Pro: should always be able to build something that can be launched.
Con: ?
Cons: undeterministic. Someone trips over a network cable that disconnects your Apple TV, and suddenly your build behaves differently?
Cons: Slow. Will always spend time building something that is not needed.
IMHO we should default to the simulator (if we decide to default to anything).
We should also have in mind that we might want to change the default later.
Any other options/opinions?
We should also validate that the RuntimeIdentifier is one of the values we support.
The text was updated successfully, but these errors were encountered: