Automattic / Gravatar-SDK-iOS

Gravatar SDK is a Swift library that allows you to integrate Gravatar features into your own iOS applications.
https://gravatar.com
Mozilla Public License 2.0
41 stars 5 forks source link

Add option to pick image by using the camera #363

Closed etoledom closed 2 months ago

etoledom commented 2 months ago

Description

Adding the option to upload a new Avatar image by taking a photo using the camera.

Note: We are forcing the sources to be used by the Avatar Picker. I'm not sure if we should make it an option to the 3rd party dev, since this is Gravatar domain.

In case we want to give this option, we can do it in a next PR.

Testing Steps

wpmobilebot commented 2 months ago
Gravatar SwiftUI Prototype Build📲 You can test the changes from this Pull Request in Gravatar SwiftUI Prototype Build by scanning the QR code below to install the corresponding build.
App NameGravatar SwiftUI Prototype Build Gravatar SwiftUI Prototype Build
Build Number1123
Version1.0
Bundle IDcom.automattic.gravatar-sdk-demo-swiftui.prototype-build
Commit73289cfb8121b390c3eec57d977d08675ae1850f
App Center BuildGravatar SDK Demo - SwiftUI #55
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
wpmobilebot commented 2 months ago
Gravatar UIKit Prototype Build📲 You can test the changes from this Pull Request in Gravatar UIKit Prototype Build by scanning the QR code below to install the corresponding build.
App NameGravatar UIKit Prototype Build Gravatar UIKit Prototype Build
Build Number1123
Version1.0
Bundle IDcom.automattic.gravatar-sdk-demo-uikit.prototype-build
Commit73289cfb8121b390c3eec57d977d08675ae1850f
App Center BuildGravatar SDK Demo - UIKit #56
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
etoledom commented 2 months ago
  1. We do the trick here mentioned here. Which would look sth like this:

I implemented this and seems to work good, for as long as Apple don't change the camera background color 🙈

  1. Add bottom padding with the amount of safe area bottom inset. In this case we need to use GeometryReader to get the safe area bottom inset i think 🤔

This seems to give a similar result to not call .ignoresSafeArea(), right? And it leaves an empty space at the bottom.

I'd go with the color fill for now.

etoledom commented 2 months ago

@pinarol - Ready for another look 👀