Description
This pull request seeks to implement an elegant login interface ready for branding and MDM.
Related Issue
#2 #120
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
QA
Test plan: https://github.com/owncloud/QA/blob/master/Mobile/iOS-app/Version%2011.4.0/Branding.md
Bugs & improvements
- [x] (1) Cancel button in login view https://github.com/owncloud/ios-app/pull/637#issuecomment-625087509 [FIXED]
- [X] (2) http urls do not connect https://github.com/owncloud/ios-app/pull/637#issuecomment-625091374 [FIXED]
- [x] (3) canAddAccount does not enable multiaccount https://github.com/owncloud/ios-app/pull/637#issuecomment-625093050 [FIXED]
- [X] (4) feedback mail hidden https://github.com/owncloud/ios-app/pull/637#issuecomment-625099332 [FIXED]
- [X] (5) Hardcoded URL https://github.com/owncloud/ios-app/pull/637#issuecomment-625754328 [FIXED]
- [x] (6) Background image in login view https://github.com/owncloud/ios-app/pull/637#issuecomment-626691742 [FIXED]
- [X] (7) Use of same profile fields https://github.com/owncloud/ios-app/pull/637#issuecomment-628482656 [clarified]
- [x] (8) Error when Deleting local files https://github.com/owncloud/ios-app/pull/637#issuecomment-630782139 [FIXED]
- [x] (9) App crashes after logging out https://github.com/owncloud/ios-app/pull/637#issuecomment-630782890 [FIXED]
- [x] (10) Settings not accesible till login is complete https://github.com/owncloud/ios-app/pull/637#issuecomment-630785900 [FIXED]
- [x] (11) Help and privacy empty, causes a crash https://github.com/owncloud/ios-app/pull/637#issuecomment-630789311
- [x] (12) Some profile questions https://github.com/owncloud/ios-app/pull/637#issuecomment-630802674
- [x] (13) Profile asked to add a new account. Can be skipped https://github.com/owncloud/ios-app/pull/637#issuecomment-630802970
- [x] (14) Welcome message is missing in OAuth2 https://github.com/owncloud/ios-app/pull/637#issuecomment-630809685 [FIXED]
- [x] (15) Order in items of authentication methods array https://github.com/owncloud/ios-app/pull/637#issuecomment-631348479
- [x] (16) Bookmark name is the same for every account in the same profile https://github.com/owncloud/ios-app/pull/637#issuecomment-631396807 [FIXED]
- [x] (17) Empty URL = crash https://github.com/owncloud/ios-app/pull/637#issuecomment-631400242
- [x] (18) Generic section. Some fields not matched in the app https://github.com/owncloud/ios-app/pull/637#issuecomment-631998665
- [x] (19) Themes section, not found items https://github.com/owncloud/ios-app/pull/637#issuecomment-634018684
- [x] (20) Additional questions: icon, card items, splash screen https://github.com/owncloud/ios-app/pull/637#issuecomment-634020501
- [x] (21) Settings access repeated https://github.com/owncloud/ios-app/pull/637#issuecomment-635326351 [FIXED]
How the feature works
Types
There are three object types of interest here:
- Theme Style: contains everything needed to generate a customized
ThemeCollection
, which defines the look of the UI
- Static Login Profile: contains everything needed to create a particular, new bookmark. Several profiles could f.ex. target different servers or cater to the needs of different departments.
- Static Login Bundle: contains global settings like name and logo of the organization and acts as a container for one of more Static Login Profiles.
Customizable Properties
Theme Style
| Property | Type | Meaning |
| ------------------------- | ---------------------------- | ------------------------------------------------------------ |
| identifier
| String
| Identifier uniquely identifying the style. |
| lightColor
| Color
| The light color to use in the generation of the theme colors. |
| darkColor
| Color
| The dark color to use in the generation of the theme colors. |
| themeStyle
| String
| The style to generate from the colors: dark (new app), light (new app), contrast (old iOS app) |
| customizedColorsByPath
| String
:String
dictionary | Key-value dictionary with colors to customize after automatic computation. F.ex. tableRowColors.labelColor
= #ff0000
to make labels in table rows red. |
Static Login Profile
| Property | Type | Meaning |
| -------------------------------- | -------------- | ------------------------------------------------------------ |
| identifier
| String
| Identifier uniquely identifying the static login profile. |
| name
| String
| Name of the login profile during setup. |
| prompt
| String
| Custom message to prompt the user to enter the account credentials. Presented above login/password fields for Basic Auth or above "Continue" button for OAuth2 |
| customLogoName
| String
| Name of the custom logo file to use for this bookmark. Placed in front of name
in the profile picker and in front of bookmarks in the server list. |
| bookmarkName
| String
| The name that should be used for the bookmark that's generated from this profile. |
| url
| String
| The URL of the server targeted by this profile. |
| allowedAuthenticationMethods
| String
array | The identifiers of the authentication methods allowed for this profile. Allows to f.ex. force OAuth2, or to use Basic Auth even if OAuth2 is available. |
| allowedCertificateFingerprints
| String
array | Array of fingerprint hex strings of the certificate(s) that the app may connect to in the context of this bookmark. Connections that use certificates not contained in this array will be aborted. |
| allowedPublicKeyFingerprints
| String
array | Like allowedCertificateFingerprints
, but targeting just the public key contained in the certificates rather than the certificate as a whole. |
| maxBookmarkCount
| Number
| The maximum number of bookmarks a user can generate from this profile. 0
if no limits apply. |
| themeStyleIdentifier
| String
| Identifier of the Theme Style to use for the UI when a bookmark generated from this profile is chosen by the user. |
Static Login Bundle
| Property | Type | Meaning |
| ---------------------------- | ---------------------------- | ------------------------------------------------------------ |
| organizationName
| String
| Name of the organization to use throughout the app. Including on top of the whole static login flow. |
| organizationLogoName
| String
| Name of the custom logo file to use throughout the app. Including on top of the whole static login flow. |
| organizationBackgroundName
| String
| Name of the custom image file to use as background for the static login interface. |
| organizationBackgroundName
| String
| Name of the custom image file to use as background for the static login interface. |
| loginThemeStyleIdentifier
| String
| Identifier of the Theme Style to use for the static login UI. |
| pickerTitle
| String
| Custom title to be shown on top of the profile picker. |
| pickerMessage
| String
| Custom message to be shown on top of the profile picker. |
| profiles
| Static Login Profile
array | An array of static login profiles contained in this bundle. If only one if provided, no profile picker is shown. |
Screenshots:
If more than one Static Login Profile have been provided, the user can choose:
Basic Auth interface:
OAuth2 interface:
After setup completed:
Account list (start screen when at least one account has been set up):
Themes can be chosen on a per-profile basis, to give the user a strong visual hint at the type of the account:
Approved by QA