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

Add authentication example #101

Merged
merged 15 commits into from
Jul 28, 2022
Merged

Add authentication example #101

merged 15 commits into from
Jul 28, 2022

Conversation

rolson
Copy link
Contributor

@rolson rolson commented Jul 26, 2022

Add authentication example

swift 2034

@rolson rolson self-assigned this Jul 26, 2022
@dfeinzimer
Copy link
Collaborator

dfeinzimer commented Jul 27, 2022

I'm still researching why, but the new sample project isn't finding the toolkit package for some reason.

See below

rolson and others added 2 commits July 27, 2022 07:51
…pbxproj

Co-authored-by: David Feinzimer <dfeinzimer@esri.com>
@rolson rolson requested a review from dfeinzimer July 27, 2022 15:31
@mhdostal
Copy link
Member

Some general usability stuff:

  • on iPad Pro 9.7, iOS 15.5 simulator in Portrait mode, the app started up with the < Back button visible. You need to tap that to get back to the view with the "Sign In" button.
  • It would match AGOL if the profile pic was a circle:
LoadableImageView(loadableImage: thumbnail)
    .frame(width: 100, height: 100, alignment: .center)
    .clipShape(Circle())
  • The first time opening the app and signing in, the "Feature Maps" view appears without it's title and without the "user" icon. Opening a map and going back causes those items to appear.
    image

@rolson
Copy link
Contributor Author

rolson commented Jul 27, 2022

The first time opening the app and signing in, the "Feature Maps" view appears without it's title and without the "user" icon. Opening a map and going back causes those items to appear.

Is that consistent for you? I haven't seen that with Xcode 13.4 and iOS 15.5 simulator (iPhone 13 Pro). What is your config?

@rolson rolson requested a review from dfeinzimer July 27, 2022 17:12
@rolson
Copy link
Contributor Author

rolson commented Jul 27, 2022

@mhdostal thank you for reporting the bugs. I think they should be fixed now

@mhdostal
Copy link
Member

Is that consistent for you? I haven't seen that with Xcode 13.4 and iOS 15.5 simulator (iPhone 13 Pro). What is your config?

Xcode 14 beta 2, iPad Pro 9.7 iOS 15.5 simulator. Same behavior with iPhone 13 mini, iOS 16 simulator.

@rolson
Copy link
Contributor Author

rolson commented Jul 27, 2022

maybe it's a bug in the Xcode beta.

@mhdostal
Copy link
Member

maybe it's a bug in the Xcode beta.

I don't see it in your latest bit of code, so it looks like it's OK.

@mhdostal
Copy link
Member

mhdostal commented Jul 27, 2022

With the latest code, I'm seeing this in the log:

=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
2022-07-27 13:12:59.104218-0500 AuthenticationExample[10764:47490343] [SwiftUI] Modifying state during view update, this will cause undefined behavior.

When I tap the "Cancel" button when signing in. iOS 15.5, iPad Pro 9.7" simulator; Xcode 14 beta 2.

@rolson
Copy link
Contributor Author

rolson commented Jul 27, 2022

Modifying state during view update, this will cause undefined behavior.

Anybody know how to set a breakpoint to break on this?

@rolson
Copy link
Contributor Author

rolson commented Jul 27, 2022

With the latest code, I'm seeing this in the log:

=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 104216 ===
=== AttributeGraph: cycle detected through attribute 103752 ===
2022-07-27 13:12:59.104218-0500 AuthenticationExample[10764:47490343] [SwiftUI] Modifying state during view update, this will cause undefined behavior.

When I tap the "Cancel" button when signing in. iOS 15.5, iPad Pro 9.7" simulator; Xcode 14 beta 2.

its this offending code:

            .toolbar {
                ToolbarItem(placement: .navigationBarTrailing) {
                    Button {
                        showProfile = true
                    } label: {
                        Image(systemName: "person.circle")
                    }
                }
            }

It's the .toolbar that causes the issue, even if I comment it all out all the code inside it I still get the issue:

            .toolbar {
//                ToolbarItem(placement: .navigationBarTrailing) {
//                    Button {
//                        showProfile = true
//                    } label: {
//                        Image(systemName: "person.circle")
//                    }
//                }
            }

However, commenting out the .toolbar{ } causes the issue to go away.

@mhdostal
Copy link
Member

However, commenting out the .toolbar{ } causes the issue to go away.

So some odd internal SwiftUI thing. I'm not concerned about it then.

mhdostal
mhdostal previously approved these changes Jul 27, 2022
@rolson
Copy link
Contributor Author

rolson commented Jul 27, 2022

created an issue: #104

dfeinzimer
dfeinzimer previously approved these changes Jul 27, 2022
Copy link
Collaborator

@dfeinzimer dfeinzimer left a comment

Choose a reason for hiding this comment

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

Just the one suggestion.

Also, is there a good set of test credentials to test this with? I used my own for now but I don't have any items in my account.

@rolson rolson dismissed stale reviews from dfeinzimer and mhdostal via b929b9a July 27, 2022 23:45
Copy link
Collaborator

@dfeinzimer dfeinzimer left a comment

Choose a reason for hiding this comment

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

For some reason the sign out button doesn't work on the Xcode 14 beta simulators but it's fine on the Xcode 13 ones.

@rolson rolson requested a review from mhdostal July 28, 2022 02:43
@rolson
Copy link
Contributor Author

rolson commented Jul 28, 2022

@mhdostal - I just need your re-approval please sir.

@rolson rolson merged commit 9f782e6 into v.next Jul 28, 2022
@rolson rolson deleted the ryan3374/2034 branch July 28, 2022 18:52
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.

3 participants