appcenter-sdk-apple icon indicating copy to clipboard operation
appcenter-sdk-apple copied to clipboard

Fix SwiftUI Previews in Xcode 14

Open AnatolyPristensky opened this issue 2 years ago • 11 comments

SwiftUI Previews in Xcode 14 failing to run when adding AppCenter through SPM

Things to consider before you submit the PR:

  • ~[ ] Has CHANGELOG.md been updated?~
  • ~[ ] Are tests passing locally?~
  • [x] Are the files formatted correctly?
  • ~[ ] Did you add unit tests?~
  • ~[ ] Did you check UI tests on the sample app? They are not executed on CI.~
  • [x] Did you test your change with either the sample apps that are included in the repository or with a blank app that uses your change?

Description

This PR fixing SwiftUI Previews in Xcode 14 that failed to run when adding AppCenter through SPM.

AB#2429

AnatolyPristensky avatar Sep 22 '22 12:09 AnatolyPristensky

Codecov Report

Merging #2433 (2eb6ce2) into develop (07b065f) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #2433   +/-   ##
========================================
  Coverage    90.71%   90.71%           
========================================
  Files          125      125           
  Lines         8774     8774           
========================================
  Hits          7959     7959           
  Misses         815      815           
Flag Coverage Δ
MacCatalyst 90.63% <ø> (ø)
iOS 90.93% <ø> (ø)
macOS 90.22% <ø> (ø)
tvOS 90.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 22 '22 12:09 codecov[bot]

eagerly awaiting this fix.

CuriousDev21 avatar Sep 23 '22 12:09 CuriousDev21

My team is also eagerly awaiting this fix 😁

andersonalex avatar Sep 28 '22 16:09 andersonalex

any updates on this?

monRo avatar Sep 29 '22 15:09 monRo

My team just switched to using this branch and our previews work like a charm now 😁 image

andersonalex avatar Sep 29 '22 22:09 andersonalex

Any updates on this?

pju-dawn avatar Oct 04 '22 12:10 pju-dawn

@microsoft/appcenter-fte Merge/approve?

smakus avatar Oct 04 '22 23:10 smakus

Would be great to add this to MSAL login repo as well

https://github.com/AzureAD/microsoft-authentication-library-for-objc/issues/1565

mapedd avatar Oct 05 '22 08:10 mapedd

Hi folks, we are having some issues on our CI at this moment. Will merge this PR as soon as possible.

DmitriyKirakosyan avatar Oct 05 '22 08:10 DmitriyKirakosyan

@DmitriyKirakosyan Any update?

honkmaster avatar Oct 11 '22 06:10 honkmaster

I think it works fine in Xcode 14.1 beta. It's kind of a work around but it helps in the time being

mapedd avatar Oct 11 '22 08:10 mapedd

@DmitriyKirakosyan , please don't force push into this PR's branch when it can be avoid.. Some people may already use it in SPM to work around the Xcode 14 SwiftUI preview issue. ForcePush'ing will break their SPM setup and they'll have to manually fix up their Packages.resolved file(s).

geertbleyen avatar Oct 18 '22 07:10 geertbleyen

Hi @geertbleyen , sorry for that. I rebased to make it mergable and keep the history clean. So now the branch is removed anyway. Using swift package from a PR's branch is not a good idea as the branch may be rebased and removed. For stability I would create a fork with that change. Now anyone using this commit can use develop while the fix is not merged to master.

DmitriyKirakosyan avatar Oct 18 '22 11:10 DmitriyKirakosyan

Hey. When will this bugfix be released?

fnazarios avatar Nov 03 '22 14:11 fnazarios

Hi @fnazarios, we are currently working on the release, so I expect it to be published within two weeks.

MikhailSuendukov avatar Nov 03 '22 15:11 MikhailSuendukov