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

[feature/flat-mdm-settings] Support for MDM setting hierarchies with flat keys #904

Merged
merged 2 commits into from
Mar 1, 2021

Conversation

felix-schwarz
Copy link
Contributor

@felix-schwarz felix-schwarz commented Feb 21, 2021

Description

  • adds support for MDM setting hierarchies with flat keys
  • simplified relaunch when receiving MDM setting updates

Example

{
	"profiles$[0].index" 		 : 0,
	"profiles$[0].name"  		 : "hello",
	"profiles$[0].attributes.highlight"  : true,
	"profiles$[0].nicknames[0]" 	 : "hi",
	"profiles$[0].nicknames[2]" 	 : "howdy",
	"profiles$[0].nicknames[1]" 	 : "hey",

	"profiles$[1].index" 		 : 1,
	"profiles$[1].name"  		 : "maxwell",
	"profiles$[1].attributes.highlight"  : false,
	"profiles$[1].nicknames[0]" 	 : "max",
	"profiles$[1].nicknames[1]" 	 : "maxy",

	"unrelated.settings.with.dots"	 : "oc"
}

After (transparent) expansion, this equals:

{
	"profiles" : [
		{
			"attributes" : {
				"highlight" : 1,
			},
			"index" : 0,
			"name" : "hello",
			"nicknames" : [
				"hi",
				"hey",
				"howdy"
			]
		},
		{
			"attributes" : {
				"highlight" : 0
			},
			"index" : 1,
			"name" : "maxwell",
			"nicknames" : [
				"max",
				"maxy"
			]
		}
	],

	"unrelated.settings.with.dots" : "oc"
}

Screenshots

Bildschirmfoto 2021-02-21 um 01 14 10

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

QA

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@felix-schwarz felix-schwarz added this to the 11.5.2 milestone Feb 22, 2021
@felix-schwarz felix-schwarz added the feature:MDM all kind of MDM / EMM related features label Feb 22, 2021
@jesmrec
Copy link
Contributor

jesmrec commented Feb 24, 2021

(1)

When something new is pushed from MDM, the app suddenly closes and the notification appears to re-launch:

Feb-24-2021 13-17-39

Not sure if this is the intended behaviour.

From user PoV, it'd be better to show the notification without closing the app, in order not to break any operation that the user is doing at this moment.

If the app is closed, nothing happens (this is OK, so a new launch will apply the remote changes)

iPhoneXR v14.4
3e3b6ccb

@jesmrec
Copy link
Contributor

jesmrec commented Feb 24, 2021

About the new setting hierarchy, is this only a way to display? or is there something that deserve to be tested?

…process

	- first notify the user about the changes
	- if the user taps the notification, schedule a relaunch notification and then quit
	- if the user taps the relaunch notification, the app is launched
- request authorization to post notifications if needed
@felix-schwarz
Copy link
Contributor Author

Re (1) I just pushed an update, so it now works a bit differently:

  • first notify the user about the changes
  • if the user taps the notification, schedule a relaunch notification and then quit
  • if the user taps the relaunch notification, the app is launched

That lets the user decide whether they want to quit the app at the time.

@felix-schwarz
Copy link
Contributor Author

About the new setting hierarchy, is this only a way to display? or is there something that deserve to be tested?

It is a different way to write the MDM plist. Instead of building <dict>ionaries and <array>s in the plist, that syntax encodes the dictionary/array structure in the key at the root level with a . (for dictionaries) and [] (for arrays) syntax.

The main benefit of this is that this allows to build AppConfig.xml files to allow configuration of parameters that would otherwise require storage in complex hierarchies that are hard or impossible to generate from an AppConfig.xml defined UI.

@jesmrec
Copy link
Contributor

jesmrec commented Feb 25, 2021

Re (1) I just pushed an update, so it now works a bit differently:

  • first notify the user about the changes
  • if the user taps the notification, schedule a relaunch notification and then quit
  • if the user taps the relaunch notification, the app is launched

That lets the user decide whether they want to quit the app at the time.

nice fix!

@jesmrec
Copy link
Contributor

jesmrec commented Feb 25, 2021

It is a different way to write the MDM plist. Instead of building <dict>ionaries and <array>s in the plist, that syntax encodes the dictionary/array structure in the key at the root level with a . (for dictionaries) and [] (for arrays) syntax.

The main benefit of this is that this allows to build AppConfig.xml files to allow configuration of parameters that would otherwise require storage in complex hierarchies that are hard or impossible to generate from an AppConfig.xml defined UI.

ok, it's like a JSON notation, so, nothing to say about this form my side. Will test together with the MDM features

@jesmrec jesmrec added the Approved by QA Approved by QA label Feb 25, 2021
@hosy hosy merged commit 43eaa9c into milestone/11.5.2 Mar 1, 2021
@delete-merged-branch delete-merged-branch bot deleted the feature/flat-mdm-settings branch March 1, 2021 10:48
@jesmrec jesmrec mentioned this pull request Mar 2, 2021
31 tasks
hosy added a commit that referenced this pull request Mar 3, 2021
* Preparing new version: changed version and build number to 11.5.2 and 188

* Add Themeable support to the Acknowledgements (#900)

* [feature/flat-mdm-settings] Support for MDM setting hierarchies with flat keys (#904)

* - automatic termination + relaunch by notification on MDM changes push
- fix indentation

* - react to setting changes pushed via MDM differently, in a two-step process
	- first notify the user about the changes
	- if the user taps the notification, schedule a relaunch notification and then quit
	- if the user taps the relaunch notification, the app is launched
- request authorization to post notifications if needed

* [fix/pdf-thumbnailview-position] PDF thumbnail view position on the iPad (#905)

* Fixing the thumbnail view position on the iPad in portrait view
- added orientation changed notification to recreate the constrains, when the device was rotated

* added changelog issue

* Calens changelog updated

* fixed QA finding (jumpy thumbnail view on iPhone)

* isPortrait mode is not working and removed it with size class

Co-authored-by: hosy <[email protected]>

* [fix/collapsible-progress-bar-position-flex] Collapse Progress Bar in Detail View (#911)

* Accessing hyper links in PDF view (#913)

* Updated release notes for version 11.5.2

* Calens changelog updated

* [feature/owncloud-online-screentshots] Create Screenshots for Branded Builds with Fastlane (#912)

* updated In-App release notes with marketing fix

* moved calens changelog files into release folder

* Calens changelog updated

* updated SDK to latest master commit

Co-authored-by: Felix Schwarz <[email protected]>
Co-authored-by: hosy <[email protected]>
Co-authored-by: Michael Neuwert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved by QA Approved by QA feature:MDM all kind of MDM / EMM related features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants