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

Add C# data provider support for macOS #264

Closed
lyonsil opened this issue Jun 23, 2023 · 11 comments · Fixed by #942
Closed

Add C# data provider support for macOS #264

lyonsil opened this issue Jun 23, 2023 · 11 comments · Fixed by #942
Assignees

Comments

@lyonsil
Copy link
Member

lyonsil commented Jun 23, 2023

To decide:

Regarding how Paratext Lite handles this:

Paratext Lite doesn't use icu.net. Paratext Lite has its own really basic LdmlAdapter. Paratext Lite on MacOS shares a lot of the code with the Android version and currently uses the same approach.

Additional resources of interest:

@lyonsil lyonsil added this to Paranext Jun 23, 2023
@lyonsil lyonsil moved this to 📋Product Backlog in Paranext Jun 23, 2023
@lyonsil
Copy link
Member Author

lyonsil commented Jun 30, 2023

Here is some Q&A from Marc Durdin: (Q's from me, A's from him)


  • How important is it to develop on and target each OS release? Is it reasonable to target specific ones that generally would cover others? Is it most important just to target the newest one? If there are tips/suggestions for where to find market share and usage for different countries and demographics, that would be helpful.

It is difficult to support older versions of iOS and macOS -- Apple deprecate their tools very rapidly, so after a few releases, it becomes nearly impossible to build for the older versions (unless you maintain old build agents with older versions of operating systems to run the older versions of the development tools -- and have separate builds for the various versions). Thus, older iOS/macOS devices are not very useful because they cannot run most software. Generally, we aim to support the latest few releases, and do best-effort for older ones on macOS, where we are not on the App Store. On iOS, we only support the versions supported by App Store deployment (v12+ right now for example). We don't have any good data on market share and usage.


  • Are there reasonable shortcuts that work for macOS development? For example, if we have a Linux version of software that works, is there anything that would easily run a Linux VM similar to WSL on Windows?

Not really. VMs on macOS are not a great user experience. You'd be better running Parallels and Windows than attempting a Linux VM. We do Linux VMs as developers, and they're a pain to manage. And, you'll alienate a majority of macOS users who prefer to use vanilla macOS. You can target Java or some other cross-platform framework, but it makes for an ugly macOS experience, which is difficult because the users of macOS demand the greatest level of consistency with the platform look and feel. tl;dr: you need a native macOS version.


  • If we're working with C# and Typescript generally, is VSCode sufficient for development, or are we going to find it hard to work without Xcode?

You will find it hard to work without Xcode -- I personally do all my coding in VSCode when doing macOS work, but anything that involves UI or project management / deployment, etc, kinda requires breaking out Xcode. There are whole industries developed around not using Xcode (e.g. fastlane tools) but they constantly require maintenance because a lot of the infrastructure they work with is undocumented.


  • How hard is it to publish to the Mac App Store? Is it better to just assume we will side load apps?

Keyman can't be published to Mac App Store because it uses keyboard hooks, which are not permitted. We sideload, and frankly it's probably an easier experience to have your own installer. Most significant apps are available as standalone. So it's probably not a big blocker for users.

My perspective on the App Stores is that they are great for Apple, and offer some benefit for end users in terms of safety, but they are an opaque experience for developers -- we have wasted huge amounts of time dealing with App Store infrastructure issues.


  • How have you worked with ICU libraries on macOS? It seems that Apple doesn't provide all the icu4c libraries by default, but I see some builds available from Homebrew.

We haven't used the ICU libraries on macOS.

Note: although iOS and macOS are our two smallest platforms in terms of userbase, they are the most work for maintenance for us:

  • Apple keep us on the upgrade treadmill on their timetable -- e.g. regular requirements to update to latest xcode to continue publishing to app store, which requires upgrade to macOS to install, which forces us to stop supporting old versions of iOS, macOS. (This also means we can't publish updates to old versions of our apps because we can't build with newer xcode without lots of work!)
  • Apple's App Store, code signing, and notarization servers regularly fail, without warning, and break builds.
  • Apple's documentation is generally poor quality and inconsistent.
  • App Store review processes are fairly arbitrary and every now and then we get a build which fails review (despite not changing anything!) and we have to stop our regular work to address the issue.

@FoolRunning
Copy link
Contributor

I must say that all of that is not encouraging. 😖

@hatton
Copy link

hatton commented Jan 18, 2024

For what it's worth I publish the electron app lameta for macs using only vscode, but that's typescript only. I don't publish to the store, but I do have to sign and get the notarization. Apple completely changed this last month, and I found getting the electron app notarized in the new system to be quite a puzzle for lack of documentation. Eventually got it working, so that github action yml may be of use as a reference: https://github.com/onset/lameta

@hatton
Copy link

hatton commented Jan 18, 2024

Also, Marc was talking about an app with native UI. If you're doing electron, in my experience,

  • Once everything was running on mac, it just kept running. Now I just run some automated UI tests before release.
  • Newer versions of electron have a minimum supported mac OS version, so you have to watch that.
  • I don't recall ever running xcode.

@lyonsil lyonsil moved this from 📥 On Deck to 🎬 Product Backlog in Paranext Apr 29, 2024
@katherinejensen00
Copy link
Contributor

Unit testing will look like reenabling unit tests that didn't work on mac before.

@lyonsil lyonsil moved this from 🎬 Product Backlog to 🔖 ToDo in Paranext May 24, 2024
@lyonsil lyonsil self-assigned this May 24, 2024
@lyonsil lyonsil moved this from 🔖 ToDo to 🏗 In progress in Paranext May 24, 2024
@lyonsil
Copy link
Member Author

lyonsil commented May 28, 2024

Discovered a bug in the icu4c library causing test failures. We need to try rolling back to an older icu4c build on macOS if they are available to avoid these errors.

@lyonsil
Copy link
Member Author

lyonsil commented Jun 3, 2024

Turns out that wasn't a bug in icu4c but a bug in icu-dotnet's handling of UnicodeSet data.

@lyonsil
Copy link
Member Author

lyonsil commented Jun 6, 2024

sillsdev/libpalaso#1327

@lyonsil
Copy link
Member Author

lyonsil commented Jun 12, 2024

sillsdev/icu-dotnet#198

@hahn-kev
Copy link

@lyonsil I'd be interested to know where you settle on getting the mac native icu4c library from for Paratext, I just ran into the Microsoft nuget package that has windows an linux binaries, but wasn't sure what to do about mac.

@lyonsil
Copy link
Member Author

lyonsil commented Jun 12, 2024

@hahn-kev We haven't sorted it out yet, but as a first cut I'm assuming we will lean on MacPorts (which is what we are using in the macOS builds for icu-dotnet's GitHub build actions). MacPorts has both binary and build from source options available. Presumably we can bundle a universal build of icu4c libs into the platform installer for macOS.

@lyonsil lyonsil linked a pull request Jun 14, 2024 that will close this issue
@lyonsil lyonsil moved this from 🏗 In progress to 👀 In review in Paranext Jun 14, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Paranext Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

6 participants