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

App Center SDK as a Swift Package for Xcode 11 #1295

Closed
shpakovski opened this issue Jun 7, 2019 · 34 comments
Closed

App Center SDK as a Swift Package for Xcode 11 #1295

shpakovski opened this issue Jun 7, 2019 · 34 comments
Assignees
Labels
feature request New feature request sdk

Comments

@shpakovski
Copy link

WWDC’19 is a fantastic event. Among other things, Apple is adding native support for Swift Packages to Xcode 11. This makes Swift Package Manager an officially supported package manager for third-party libraries on all platforms, including iOS. What’s your plan regarding CocoaPods, Carthage and the future of SDK? Thanks.

@shpakovski
Copy link
Author

shpakovski commented Jun 8, 2019

My suggestion would be to create multiple Swift packages, similar to your spec for CocoaPods. For example, a shared package AppCenter or AppCenterCore would include only generic classes for communicating with your Open API. Then separate packages like AppCenterAnalytics, AppCenterCrashes, AppCenterPush etc. would use that shared library as a transport. What do you think?

@iamclement
Copy link

iamclement commented Jun 13, 2019

Thanks for getting in touch @shpakovski. I agree, this WWDC was one of a kind! It's true that AppCenterAnalytics, AppCenterCrashes, AppCenterPush etc. are dependent on AppCenter(core). Although if we look into details we can see that AppCenterDistribute won't be supported yet because resources are not yet supported by Swift Packages. AppCenterCrashes and AppCenterAuth are shipping their dependencies as binaries to simplify the integration. Since Swift Packages are not compatible with binaries we'd need to make these dependencies Swift Packages too. Also the way the frameworks are built today would need some remodeling. It's not trivial.

@shpakovski
Copy link
Author

Hi @clpolet, thanks for the answer! As a Mac developer, I omitted non-trivial frameworks with resources. It seems possible to “package” the ones I mentioned. Although I understand the bigger picture. Let’s wait while SwiftPM adds support for bundles and resources 👍

@a2
Copy link

a2 commented Aug 12, 2019

My personal vote would be for an xcframework bundle. I'm working on a Catalyst Mac app at the moment but I'm having trouble linking against both the iOS and macOS framework bundles from the release archives from a single target.

@lumaxis
Copy link
Contributor

lumaxis commented Sep 5, 2019

@a2 From what I heard at WWDC, xcframeworks might not quite be ready yet for us. There is currently no support for distributing binaries (which is required for some of our dependencies) and no support for resource bundles, iirc.

@marcocattai
Copy link

AppCenter still doesn't work with MacCatalyst. Any news on this?

@iamclement
Copy link

@marcocattai are you referring to the UIKit on macOS feature supported in Catalina? If so the answer is no the App Center iOS SDK doesn't run on Catalina. We are aware of the feature request but it's not planned yet.

@marcocattai
Copy link

marcocattai commented Sep 19, 2019

Thank you for your answer Clpolet,

... not planned? lack of resources to allocate on it? Just a remembering, you are Microsoft guys!

We are already using HockeyApp/now Appcenter.ms to track crashes on iOS ...the fact that the Catalina version is not even planned is very disappointing.

@hamswan
Copy link

hamswan commented Sep 19, 2019

@marcocattai I understand your concerns. We will discuss this internally and add this in future plans. I will not be able to commit an ETA but you can track this through this issue.

@iamclement
Copy link

Let's try to keep each feature separate. I replied to @marcocattai in the dedicated feature: microsoft/appcenter-sdk-apple#1745 .
I am removing the not planned label because it seems that it doesn't convey the right message.

@shpakovski
Copy link
Author

@clpolet Hello 👋 As you have added support for Carthage, would it be possible to “wrap” all frameworks into Package.swift? This would make Xcode integration even better! Thanks in advance.

@iamclement
Copy link

Hello @shpakovski, having framework targets is definitely a step forward :). Though there are still quite some work to do for instance enabling SPM for the SDK dependencies on Crashes and Auth but also waiting for bundle support on SPM for Distribute.

@shpakovski
Copy link
Author

shpakovski commented Sep 26, 2019

Hi @clpolet Understandable but you could start small e.g. most apps need only AppCenter, Crashes and Analytics. This way you could also verify how this works 🙂

@OlexandrStepanov
Copy link

+1 for Swift Package Manager support.
Currently AppCenter is the only dependency I have in the project which prevents me from migrating to SPM from CocoaPods.

@shpakovski shpakovski reopened this Oct 3, 2019
@rodrigoelp
Copy link

Hey guys, is there any update on this? It would be fantastic for this to be offered.

@ahdbilal
Copy link
Contributor

@rodrigoelp I am transferring this issue to AppCenter Central Repository where all the new feature requests are being tracked and prioritized. Thanks

@husbig
Copy link

husbig commented Nov 20, 2019

Is there any update in this feature ?

@JoshHrach
Copy link

We would also like to see Swift Package Manager support for App Center.

@shpakovski
Copy link
Author

Hey Microsoft 👋 Any (good) news? Is this even in plans? Thanks.

@husbig
Copy link

husbig commented Jan 21, 2020

Is there any update?

@ahdbilal
Copy link
Contributor

This is under active consideration. We will share more details once we get approval and the team moves into implementation phase.

@kaunteya
Copy link

kaunteya commented Apr 1, 2020

Any update on this?

AppCenter is the only pod in my Podfile now.

@ahdbilal
Copy link
Contributor

ahdbilal commented Apr 1, 2020

Thanks for the feedback and the votes. We are seriously looking into it. I will share an update soon. Thanks

@ahdbilal
Copy link
Contributor

The team has picked this up and are now evaluating it. There are few limitations and we might have to release this in phases. I will share an update once the evaluation is complete.

@JoshHrach
Copy link

@MatkovIvan
Copy link

Hi there,
The feature has been merged to develop branch, so you can already try it. This will be included in the next SDK release. The feedback is always welcome.

Thanks

@kaunteya
Copy link

kaunteya commented May 8, 2020

@MatkovIvan Is this still in beta?

@MatkovIvan
Copy link

@kaunteya there are no releases with it yet, so you need to specify branch or commit hash for now. You can treat this as a beta, yes.

@cliftonlabrum
Copy link

I just tried this by specifying the master branch in Xcode 11.4.1:

ac1

...but I'm getting an error:

ac2

Do I have to specify a branch other than master?

@kaunteya
Copy link

Hi there,
The feature has been merged to develop branch, so you can already try it. This will be included in the next SDK release. The feedback is always welcome.

Thanks

Try develop branch

@cliftonlabrum
Copy link

Thanks for your quick reply, @kaunteya. I just tried that and get a different error now. :) Do I need to specify a particular commit?

I have:

  1. Removed the Carthage version of App Center
  2. Deleted derived data
  3. Restarted Xcode

Any ideas?

ac-develop

ac-error

@cliftonlabrum
Copy link

I figured it out. You have to use the Apple SDK repo path.

Repository: https://github.com/microsoft/appcenter-sdk-apple
Branch: : develop

@tonyarnold
Copy link

I can see this has been released as part of v3.2.0, but I can't find any documentation for the feature. I'm seeing the following error when I attempt to build a macOS app target that integrates both dependencies:

Screen Shot 2020-05-25 at 14 28 11

@MatkovIvan
Copy link

MatkovIvan commented May 25, 2020

Hi there,

This has been released in 3.2.0.

@tonyarnold documentation changes are already merged and will be published soon.
Regarding "cyclic" dependencies - core module doesn't have this dependency for sure. I saw the similar issues in Xcode because of "Find Implicit Dependencies" checkbox (Edit scheme -> Build), please try to disable it. If the problem persists - please open a new issue in the apple repo, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request sdk
Projects
None yet
Development

No branches or pull requests