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

Restart SwiftUI rewrite #460

Draft
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

stevenzeck
Copy link
Contributor

@stevenzeck stevenzeck commented Jun 29, 2024

This PR is a soft restart of rewriting the TestApp using SwiftUI. It's based on the other swiftui branch, but with minimal changes. None of the code that is changed affects the behavior of the UIKit version and thus can be safely merged into develop.

One thing that is changed for the UIKit version is the iOS Deployment Target now being 16.0.

  • To switch to the SwiftUI based UI, comment out @UIApplicationMain in AppDelegate.swift and uncomment out @main in TestApp.swift.

@stevenzeck
Copy link
Contributor Author

@mickael-menu Any thoughts about the iOS Deployment Target? This build will fail unless we change some SwiftUI code to be iOS 14 compatible (if that's even possible), or bump it up to iOS 15+.

@mickael-menu
Copy link
Member

Thanks @stevenzeck! We can definitely up the minimum iOS version to 15 or 16 for the Test App. The toolkit must stay at iOS 13 though.

@stevenzeck
Copy link
Contributor Author

Updated to 16. I'm happy with this now.

@CunningMonkey
Copy link

when i try the command "make spm" in your branch, it has error:

ninja@ninja-baidu ~/D/u/TestApp (rewrite-swiftui)> make spm
xcodegen generate
Parsing project spec failed: Invalid version:
make: *** [spm] Error 1

do you know how to fix this?

@stevenzeck
Copy link
Contributor Author

stevenzeck commented Aug 6, 2024

You should be using make dev for this branch, but both that and make spm should work. What version of xcodegen do you have installed? I'm on 2.42. Since I upgraded the iOS version to 16, it might fail on older versions.

@FuzzzzyBoy
Copy link
Contributor

FuzzzzyBoy commented Oct 12, 2024

Hi. Is this PR still in progress? I can help with SwiftUI refactoring in this PR or I can start my own PR

@stevenzeck
Copy link
Contributor Author

Hey @FuzzzzyBoy, yep it's still in progress. Any help would be greatly appreciated. Whichever way is easier for you.

@FuzzzzyBoy
Copy link
Contributor

Read PR more carefully - have some ideas. Maybe easy and fast way make several PR one per each screen instead of full rewrite? what do you think?

@mickael-menu
Copy link
Member

Yes I actually think doing these changes iteratively in many smaller PRs would be more convenient. For example:

  1. PRs to convert XIB and Storyboards of individual screens to SwiftUI.
  2. Once every screen is in SwiftUI, refactor the global UIKit navigation to SwiftUI.

@stevenzeck
Copy link
Contributor Author

I was trying to avoid keeping a separate swiftui branch up to date with develop while also incorporating Swift UI updates. That's what was happening here.

We can try that again though. Just need to be responsive to PRs and review suggestions.

@FuzzzzyBoy
Copy link
Contributor

#492 - for example add PR with only about screen refactoring

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

Successfully merging this pull request may close these issues.

4 participants