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/build-flags] Add build flags support #1026

Merged
merged 8 commits into from
Sep 17, 2021

Conversation

felix-schwarz
Copy link
Contributor

@felix-schwarz felix-schwarz commented Aug 30, 2021

Description

Add support for app build flags to enable/disable features at compile time:

  • via APP_BUILD_FLAGS in the Xcode project settings
  • via app.build-flags in the Branding.plist:
<key>app.build-flags</key>
<string>DISABLE_BACKGROUND_LOCATION</string>

Overview and instructions in doc/APP_BUILD_FLAGS.md.

Also includes fixes from fix/ios12-branded-settings-crash (#1018).

Related Issue

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)

- add APP_BUILD_FLAGS to the project
- add APP_BUILD_FLAGS.md documentation
- add support for "app.build-flags" Branding.plist key to fastlane Fastfile
- implement DISABLE_BACKGROUND_LOCATION app build flag
…our preprocessor commands

- add DISABLE_BACKGROUND_LOCATION #ifdef to Info.plist
- remove DISABLE_BACKGROUND_LOCATION from Xcode project
@CLAassistant
Copy link

CLAassistant commented Aug 30, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hosy
❌ felix-schwarz
You have signed the CLA already but the status is still pending? Let us recheck it.

@michaelstingl
Copy link
Contributor

  • via app.build-flags in the Branding.plist

😍 👍

@michaelstingl
Copy link
Contributor

@felix-schwarz in iOS 12 with DISABLE_BACKGROUND_LOCATION, "Background upload notifications" are still visible. I think it should be disabled as well.

image

@michaelstingl michaelstingl added this to the 11.7.1-Fix milestone Sep 6, 2021
… instant media upload, move actual actions to actions block

- BackgroundUploadSettingsSection: ensure "Background upload notifications" is only available on iOS 13+
@felix-schwarz
Copy link
Contributor Author

@michaelstingl Thanks! Fixed as of d4e8aa8.

…ing DISABLE_BACKGROUND_LOCATION feature flag
ownCloud/AppDelegate.swift Show resolved Hide resolved
ownCloud/AppDelegate.swift Show resolved Hide resolved
@hosy hosy self-requested a review September 15, 2021 08:00
@jesmrec
Copy link
Contributor

jesmrec commented Sep 16, 2021

Where should be placed the <key>app.build-flags</key> inside the Branding.plist file?

I set it in the first <dict> block of oC online branding file and the background options in Settings(Media Upload) are visible and could be switched on.

What's wrong on my side?

@hosy
Copy link
Collaborator

hosy commented Sep 16, 2021

@jesmrec this value will only be used, if the app will be build with fastlane. You placed the key/value pair on the right place, but you have to build the app via fastlane.

@hosy
Copy link
Collaborator

hosy commented Sep 17, 2021

@jesmrec should I help you with the fastlane build?

@jesmrec
Copy link
Contributor

jesmrec commented Sep 17, 2021

Thanks @hosy for your help. Just as info:

To build the app: fastlane owncloud_branding_adhoc_build , by using correct distribution cert.

With the branding parameter

<key>app.build-flags</key>
<string>DISABLE_BACKGROUND_LOCATION</string>

the background location services are disabled:

Screenshot 2021-09-17 at 14 23 42

And the Info.plist does not contain the DISABLE_BACKGROUND_LOCATION stuff

@jesmrec
Copy link
Contributor

jesmrec commented Sep 17, 2021

So, this is approved on my side

@jesmrec jesmrec added the Approved by QA Approved by QA label Sep 17, 2021
@hosy hosy merged commit 806488d into milestone/11.7.1 Sep 17, 2021
@delete-merged-branch delete-merged-branch bot deleted the feature/build-flags branch September 17, 2021 12:51
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants