aws-amplify / amplify-swift

A declarative library for application development using cloud services.
Apache License 2.0
447 stars 193 forks source link

macOS support #1124

Closed DanielZanchi closed 1 year ago

DanielZanchi commented 3 years ago

Feature Request: At the moment it's not possible to have Amplify on a macOS app. SwiftUI is getting bigger and bigger and it would be awesome to have cross-platform apps working with Amplify.

Please make it possible!

Kilo-Loco commented 3 years ago

In addition to Apple's push to use SwiftUI as a means for cross platform apps within their ecosystem, Amplify Flutter will eventually need to cover this use case since desktop is a platform that will become stable in the near future.

In regards to priority between other Apple platforms within that ecosystem, supporting macOS seems to be the most important one to consider since there seems to be a push for creating macOS in the iOS community.

diegocstn commented 3 years ago

@DanielZanchi @Kilo-Loco Multi-platform support is one of our goals but we can't share a specific timeline at this point. SDKs related issue https://github.com/aws-amplify/aws-sdk-ios/issues/1603#issuecomment-713711473

robwithhair commented 3 years ago

Speaking as someone who built an app around the aws-ios-sdk, only finding at a late stage that it didn't compile for Mac. It was deeply frustrating and expensive to re-implement functionality from the library with API calls. It would have been good to have had clear warning in the documentation at time of development. Caused us as a company to re-evaluate our use of AWS as a platform for future app development, due to slow response to the above mentioned thread and the clear lack of app developers as a priority.

As a company our policy is that if we build an app for iPhone, it should work on iPad. The latest Apple Silicon releases have caused us to extend this policy. Now if we build for iPhone, it should work on iPad and Mac, since there is typically very little additional work if designed correctly.

For the above reason we only maintain legacy projects on AWS. We have a spend of roughly $4,000 pcm but our development efforts are now going elsewhere at least until this issue is properly resolved.

DanielZanchi commented 3 years ago

Hello! I managed to use Amplify on a macOS app under Catalyst. It's not the best solution but I am going to build two completely different apps for iOS and macOS (both built with SwiftUI). I understand the struggle :(

robwithhair commented 3 years ago

@DanielZanchi that's good to hear. It was mid 2019 when we started finding issues, so would you believe it's been nearly 2 years since this work was undertaken now and it doesn't feel like things have moved on much. However, I'm v happy to hear you managed to get Catalyst to build, cos it gives me hope we might be able to do the same at some point. I don't know if I would be able to convince my manager to give AWS another go after the fiasco of last time in a hurry though, so will have to wait for another project to come along to test the Catalyst support myself. It's a shame cos I've invested a lot of learning in the AWS ecosystem which I hardly use now. Fingers crossed AWS make native App developers a priority in the future.

saravr commented 3 years ago

Hello!, is there at least a workaround we can use until the feature is released? It can help moving forward with development. When I try to use Amplify.Auth where it is failing for me is (after signIn itself succeeding) SDK fails to get user attributes (which returns error saying user is not signed in). And seeing OSStatus error code -34018 means some keychain calls are failing? Is it an issue of some missing entitlement? As you can see I am getting desperate to get it work ;( Any suggestions?

3m commented 3 years ago

@Kilo-Loco I've watched all of your amplify/swift ui tutorials and they are excellent and have been so helpful, but one of the main reasons I was excited about SwiftUI was it's native support for MacOS, so I'm very concerned about the path I'm currently on... investing into using amplify without any indication from the Amplify team if they have plans to support MacOS? Are you able to provide any visibility into their plans?

u2m4c6 commented 3 years ago

macOS support is becoming the standard for Swift BaaS libraries like Realm Database and Firebase. AWS Amplify is currently my third choice and I am looking to migrate off AWS completely due to lack of macOS support.

3m commented 3 years ago

It would be very helpful to get an indication from the aws team for if/when this might be supported as our team is also trying to make a decision on which BAAS platform to use for a lot of our projects.

Sent from my iPhone

On Aug 10, 2021, at 1:59 PM, u2m4c6 @.***> wrote:

 macOS support is becoming the standard for Swift BaaS libraries like Realm Database and Firebase. AWS Amplify is currently my third choice and I am looking to migrate off AWS completely due to lack of macOS support.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

njreid commented 3 years ago

Whilst we don't have any MacOS native support plans that we can share at this point, could I suggest another approach? Have you considered writing your app using Amplify JS and wrapping it as a desktop app using Electron or Tauri? I know this isn't ideal if your skillset is Swift, but it will make supporting other platforms easier in the future.

I'm particularly impressed by how easy it was to wrap an existing web app in Tauri when I played with it last week. I was able to get a small (~7Mb) working Mac binary in about an hour. You can write extensions in Rust, if you need performant interaction with underlying Mac kits.

https://tauri.studio/en/

3m commented 3 years ago

Thanks for the response and the suggestion.

Unfortunately the big advantage for our team is leveraging our extensive iOS and Swift skills to create a pure Native Mac app. Many of our products don’t even have a web app, but could benefit greatly from being able to run on native Mac’s just like many iPhone apps took advantage of creating native iPad apps to take advantage of the additional screen real estate.

Especially now that SwiftUI allows cross-mac-platform apps using declarative API's, it’s unfortunate that macOS support is not in the near plans for amplify.

On Aug 16, 2021, at 1:18 PM, Nicholas Reid @.***> wrote:

Whilst we don't have any MacOS native support plans that we can share at this point, could I suggest another approach? Have you considered writing your app using Amplify JS and wrapping it as a desktop app using Electron or Tauri? I know this isn't ideal if your skillset is Swift, but it will make supporting other platforms easier in the future.

I'm particularly impressed by how easy it was to wrap an existing web app in Tauri when I played with it last week. I was able to get a small (~7Mb) working Mac binary in about an hour. You can write extensions in Rust, if you need performant interaction with underlying Mac kits.

https://tauri.studio/en/ https://tauri.studio/en/ — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aws-amplify/amplify-ios/issues/1124#issuecomment-899719542, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABLQCSSB3TN7H4KCEI7JJ3T5FI6RANCNFSM4ZUBPVYQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

hdworld11 commented 2 years ago

@DanielZanchi @3m @u2m4c6 @robwithhair @saravr Would love to hear more about your use cases so we can help prioritize this feature! You can either respond here or DM me on Twitter (https://twitter.com/HarshitaDaddala) or Discord (@harshitadaddala) so we can chat further!

OskarGroth commented 2 years ago

@hdworld11 I was just about to start development of a major Mac product of ours, with heavy dependencies on a backend service for file storage. I was ready to pick AWS as our service provider for the backend, but I'm sad to see that support for this platform is missing in Amplify.

I understand that you are focusing on iOS and that supporting additional platforms introduces more challenges, but with the latest developments in cross-platform technologies between Mac and iOS, it is really becoming a requirement for libraries like these to work on the Mac (just see other comments here).

There really doesn't need to be any novel use cases defined, the problem is simple:

I think you need to get ahead of this before it's too late.

3m commented 2 years ago

I very much agree with Oskar. There is no specific use case for Mac support because in the Apple app eco system, the Mac (largely made possible through SwiftUI) is just another device with a larger display. So just like almost every iPhone app now has an iPad counterpart (and optionally a watchOS counterpart and optionally an Apple TV counterpart), the Mac now is the missing piece that allows for using your app wherever it’s most convenient.

I would argue that SwiftUI compiling on the macOS target is equally as to support as iOS as it opens up even more opportunity for new innovation, especially with Apple just announcing their new 14 and 16inch M1 Pro/Max support that can drive up to 4 external displays (3 Apple Pro XDR 6K monitors + 1 4K TV). https://www.apple.com/macbook-pro-14-and-16/ https://www.apple.com/macbook-pro-14-and-16/

The apps that can be created with this kind of screen real estate are going to be incredible, and the biggest thing missing from Apples development ecosystem is a Mobile Backend as a Service, and I believe Amplify could be the clear winner in this space if it would only include macOS support.

There is really nothing that uniquely different about the Mac vs. the iPad because both support the concept of multiple scenes (https://developer.apple.com/documentation/swiftui/scene https://developer.apple.com/documentation/swiftui/scene).

But as it relates to Amplify, we just need to be able to compile for the Mac target — I’m not sure why you currently limit that? If you could explain reasoning for why you currently don’t support it or why it’s not on your roadmap, then maybe we can make suggestions or offer up concessions.

I just reserved my see for the upping AWS conference and was disappointed to not seeing any sessions about macOS support, but I’m still optimistic that there will hopefully be an announcement and a timeline so that we can make a decision to stick with Amplify or not.

On Oct 20, 2021, at 7:25 AM, Oskar Groth @.***> wrote:

@hdworld11 https://github.com/hdworld11 I was just about to start development of a major Mac product of ours, with heavy dependencies on a backend service for file storage. I was ready to pick AWS as our service provider for the backend, but I'm sad to see that support for this platform is missing in Amplify.

I understand that you are focusing on iOS and that supporting additional platforms introduces more challenges, but with the latest developments in cross-platform technologies between Mac and iOS, it is really becoming a requirement for libraries like these to work on the Mac (just see other comments here).

There really doesn't need to be any novel use cases defined, the problem is simple:

Interest in releasing Mac versions for existing iOS products (that use AWS) is surging thanks to SwiftUI and Catalyst Interest in developing brand new native Mac products (that use AWS) is surging thanks to SwiftUI and Apple Silicon I think you need to get ahead of this before it's too late.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aws-amplify/amplify-ios/issues/1124#issuecomment-947614135, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABLQCSJDIJ5QTGI52ZKFQ3UH2YLBANCNFSM4ZUBPVYQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

parachutemind commented 2 years ago

Ability to use AppSync in macOS is a key requirement that is holding using AppSync in our app. Right now I'm looking at a bare minimum implementation: ability to sign the AppSync request and use Apollo client directly (which compiles in macOS). Signing the request requires AWS Core (I think) that runs on macOS.

kopecn commented 2 years ago

diddo. Please extend this support. Our team needs this functionality.

kvaDrug commented 2 years ago

Need Analytics for Mac Catalyst in our iOS app. Supporting Mac Catalyst is much wanted in any iOS app, because it makes it audience slightly bigger without any significant efforts. And please, note, that Mac Catalysts is not the same as macOS. For example, catalyst is using UIKit, not AppKit. It's like an iOS simulator running on mac.

kopecn commented 2 years ago

checking in. still need this. Datamodels generated for iOS apps need common import into macOS apps.

yushdotkapoor commented 2 years ago

Oof, it's been over a year and no update on a major issue like this... This is a pretty substantial problem!

SmartJSONEditor commented 2 years ago

Really amplify needs macOS support, it is holding such a great platform too limited for universal apps.

kopecn commented 2 years ago

Really amplify needs macOS support, it is holding such a great platform too limited for universal apps.

And to add! I would venture to say that most developers now uses a Mac for their day to day dev work. Perhaps aws team should run some analytics and see what does their community use for their dev work machines.

hstriepe commented 2 years ago

It is now 1 ½ years later and we still do not have the support. Just sayin... Biggest problem for us is that it targets an old version of iOS. not permitting the -fsanitize=thread option.

kvaDrug commented 1 year ago

Amazon team should pay more attention to this issue, it makes Google products more attractive for developers, because they do support Catalyst.

atierian commented 1 year ago

Hey everyone! You asked, we listened.

Today we launched Amplify Library for Swift (v2.0.0) with native macOS support (currently beta). This new version is built on top of the AWS SDK for Swift, making Amplify Library for Swift exclusively Swift based. It also fully embraces the new world of Swift Structured Concurrency, exposing async/await APIs for all categories.

You can read more about the release here and be sure to check out the documentation for v2