Skip to content

Conversation

phantumcode
Copy link
Contributor

@phantumcode phantumcode commented Sep 8, 2022

Issue #, if available:

Description of changes:

  • Create lib-legacy directory based on the current existing lib directory
  • add a v2 (latest) - v1 toggle switch for Amplify iOS V1 and V2

Screenshot:
Amplify iOS Doc Version Switch

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@phantumcode phantumcode requested a review from a team as a code owner September 8, 2022 15:01
@phantumcode phantumcode requested a review from a team September 8, 2022 15:01
@phantumcode phantumcode requested a review from a team as a code owner September 8, 2022 15:01
Copy link
Contributor

@tjleing tjleing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like /lib/[x] files are being replaced with /lib-v1 files -- are redirects in place? on iOS all of the paths should still work (but access a v2 page), but on Android links going to /lib pages will be broken until we add them.

@phantumcode
Copy link
Contributor Author

phantumcode commented Sep 8, 2022

it seems like /lib/[x] files are being replaced with /lib-v1 files -- are redirects in place? on iOS all of the paths should still work (but access a v2 page), but on Android links going to /lib pages will be broken until we add them.

Android docs are still available under /lib/ and all links still works. A clone of /lib/ was created and moved to /lib-v1/ for both Android and iOS, links to lib-v1 for Android won't work until they're added. When Android is ready to update to v2, add v2 contents under /lib/ and enable the switcher.

@abdallahshaban557
Copy link
Contributor

@phantumcode - can you please elaborate on why this toggle is needed?

  • Are the public APIs exposed to customers significantly different between V1 and v2?
  • If I want to migrate between V1 and V2, do I just have to change my project setup?

@phantumcode
Copy link
Contributor Author

@phantumcode - can you please elaborate on why this toggle is needed?

  • Are the public APIs exposed to customers significantly different between V1 and v2?
  • If I want to migrate between V1 and V2, do I just have to change my project setup?

Amplify iOS V2 introduces major breaking changes. All public APIs in each categories will be different syntax. It's functionally the same as V1 but introduces Swift's new async/await structured concurrency pattern.

In order to migrate from V1 to V2, customers will need to update the API usages and update the iOS app to adopt the new Swift async/await structured concurrency.

@atierian
Copy link
Contributor

atierian commented Sep 9, 2022

Does it make sense to swap the positions of v1 and v2 (latest)?

┌────────────────┬──────────────────┐
│                │                  │
│      v1        │    v2 (latest)   │
│                │                  │
└────────────────┴──────────────────┘

I see there's precedent for the way you have it here, but it feels wrong to have reverse chronological for LTR languages here.

@lgtm-com
Copy link

lgtm-com bot commented Sep 9, 2022

This pull request introduces 1 alert when merging f9c943a into 2492477 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

@phantumcode
Copy link
Contributor Author

Does it make sense to swap the positions of v1 and v2 (latest)?

┌────────────────┬──────────────────┐
│                │                  │
│      v1        │    v2 (latest)   │
│                │                  │
└────────────────┴──────────────────┘

I see there's precedent for the way you have it here, but it feels wrong to have reverse chronological for LTR languages here.

Good suggestion @atierian . @hdworld11 is also in agreement. I've updated the latest revision to re-order the toggle switches with v2 selected by default.

@phantumcode phantumcode merged commit a701e54 into dev-preview-ios Sep 12, 2022
@phantumcode phantumcode deleted the phantum/add_ios_legacy_toggle branch September 12, 2022 21:21
@phantumcode phantumcode added the amplify/ios Mostly related to iOS software. label Sep 12, 2022
royjit pushed a commit that referenced this pull request Oct 4, 2022
* add iOS library latest-legacy toggle switch

* update verbige from Legacy to v1

* remove v1 postfix on category titles

* fix filter check

* swap the order of v1-v2 toggle

* fix lint rule violation
sebaland pushed a commit that referenced this pull request Oct 12, 2022
* add iOS library latest-legacy toggle switch

* update verbige from Legacy to v1

* remove v1 postfix on category titles

* fix filter check

* swap the order of v1-v2 toggle

* fix lint rule violation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amplify/ios Mostly related to iOS software.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants