johannes-schliephake / nextcloud-passwords-ios

An iOS client for the Nextcloud Passwords app
GNU Affero General Public License v3.0
82 stars 9 forks source link

AppConfig for ServerURL #115

Closed LexioJ closed 1 year ago

LexioJ commented 3 years ago

Would it be possible to add appconfig capabilities (https://www.appconfig.org/ios/) to predefine ServerURL and later other configurations using MDM?

johannes-schliephake commented 3 years ago

Sounds interesting, I will look into it. Currently I have a handful of issues and features that I'd like to finish first; especially because of the iOS 15 release.

johannes-schliephake commented 1 year ago

Since @idominiki is also showing interest for AppConfig support I would like to give this a try.

I already implemented some initial steps a few months back and I'm confident it should work without too much additional effort. But I don't have the setup to test this feature. To be more precise, I need a way to test if the configured data is received by the app. Also, I have no experience with writing an AppConfig XML. If someone is willing to support me here, we can definitely make it work.

By the way: It's only possible to configure the URL (and maybe some of the app's settings), but the username is handled by Nextcloud's login flow and therefore out of the app's control.

idominiki commented 1 year ago

Hi @johannes-schliephake,

we have two different MDMs, so I can test it for you. If there is an update I can deploy the AppConfig and test it on device. I have no experience in App programming but I just tested a quick guide from here https://blog.eidinger.info/all-you-need-to-know-about-managed-app-configuration

It seems to works very fast / easy.

johannes-schliephake commented 1 year ago

That's awesome! Do you know if it can be tested using TestFlight builds? Otherwise we have to rely on actual App Store releases, which would make iterating on this feature harder.

idominiki commented 1 year ago

I don't know, but let's test it 😉

johannes-schliephake commented 1 year ago

Good news! I implemented the managed server URL. A TestFlight build is available at https://testflight.apple.com/join/iuljLJ4u. Now I have 3 questions for you:

  1. Can you install TestFlight builds via MDM?
  2. Does the Specfile at https://github.com/johannes-schliephake/nextcloud-passwords-ios/blob/develop/AppConfig/specfile.xml look good to you?
  3. Do you know if there is a convention on where to place the Specfile, so it can easily be found by admins or maybe be detected by MDM software?
idominiki commented 1 year ago

Hi @johannes-schliephake it works flawlessly!! GREAT!

Can you install TestFlight builds via MDM?

It created the AppConfig and distributed the App Store Version via MDM. Then I installed the TestFlight build manually and it works immediately.

https://user-images.githubusercontent.com/62521486/205593855-d7379d6f-9f6b-48b9-aabd-967ac43e1e2e.mp4

Do you know if there is a convention on where to place the Specfile, so it can easily be found by admins or maybe be detected by MDM software?

I think the AppConfig folder in the root directory is the best option. An MDM can't detect AppConfig's at the moment.

Thanks for the fast implementation!

johannes-schliephake commented 1 year ago

Awesome, that's great to hear! Also, thank you very much for your feedback on my questions. This helps me a lot.

I just released v2.6.4 containing the managed app config to the App Store. So from now on it's possible to distribute the app with a pre-configured URL.