-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Update] Add Mac Catalyst support #93
Conversation
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.
Correct. See the discussions below.
Some other iOS functionalities aren't supported either, see a similar discussion |
Ah okay, should we then conditionally exclude the affected samples from Catalyst builds until that support is added or the samples are reworked? I wonder if there's a good way to do so. |
IMO there is still value leaving these samples in even if they cannot be opened on Mac. Users can still see the README and source code 😝 … |
Will the Samples app go to the App Store at the final release and would it be listed as supporting Mac Catalyst? Is the loading of on-demand resources coming to Mac Catalyst for final? Not sure if Apple would allow it if there's functionality that doesn't work on Mac Catalyst. |
Samples app will go live on iOS App Store with 200.1 release. I believe Mac Catalyst support needs to be checked at that point.
I don't think ODR for Mac will come anytime soon - it is an ancient API. I need to look up some articles to decide the best way to publish an iOS app with Mac Catalyst support that requires many binary files. I have a card for adding a button to download all ODR and maybe Mac Catalyst compiler directives can be added there. 🤔 For now, I think it is OK to leave it as-is, since we are not publishing it to the App Store yet. Also I can see if App Store gives any automated feedback when I upload the dummy app. |
It may be OK, but it isn't great. I would be easy enough to filter out samples with resource dependencies on Mac Catalyst, so I think we should do that. Alternatively, we could have a build script that copies the resources into the Mac Catalyst framework and then change the logic here slightly: var usesOnDemandResources: Bool {
#if targetEnvironment(macCatalyst)
return false
#else
return sample.hasDependencies
#endif
}
var body: some View {
Group {
if usesOnDemandResources {
...
} else {
...
}
}
...
} Either one of those would be better than including samples that are broken/unusable. Yes, the user could view the README and source code, but they can do that from inside the project (which they'll be using "since we are not publishing it to the App Store yet" or on GitHub. |
I'll go with this approach in this PR as I want to submit the dummy app soon.
Copying all the resources to the bundle for Mac Catalyst sounds like a good plan. Do you recommend using a Swift script to do this, so I can use |
You can't use |
On-demand resources aren't available on Mac Catalyst, thus those sample will display as "Couldn’t communicate with a helper application." Later these binary resources will be copied to Mac Catalyst bundle, and additional logics will be added to handle that. See: #93 (comment)
Ready for review. |
Do you suggest putting it in the Instead, if we follow the new folder structure, it seems Xcode 14 put everything under the (Xcode 13 multiplatform folder structure) |
Use `targetEnvironment` in a different way. Co-authored-by: Philip Ridgeway <philip.ridgeway@gmail.com>
I understand if you don't want to do that right now—perhaps in a follow-up PR where the only change is relocating files. I do think it would be good to follow the Xcode 14 template as closely as possible since that's now the minimum version of Xcode. In other words, if we were creating the project today, that's what we'd end up with. Does that make sense? I'll let you decide when and how you want to rename/reorganize things towards that goal. |
Thanks. As the project structure change is not very related to Mac Catalyst, I'll address them in a separate #95. |
Thanks for the review! |
Description
This PR adds Mac Catalyst as a deployment destination to the app. It also includes the following changes
Resources
subpath, instead of under the root of the bundle.ArcGIS.Polygon
is resolved.Linked Issue(s)
swift/issues/3153
How To Test
Screenshots
To Discuss