Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions LoopFollow/ViewControllers/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class SettingsViewController: FormViewController {
if isTestFlightBuild() {
expirationHeaderString = "Beta (TestFlight) Expiration"
}

form
+++ Section(header: "Data Settings", footer: "")
<<< SegmentedRow<String>("units") { row in
Expand Down Expand Up @@ -288,13 +288,23 @@ class SettingsViewController: FormViewController {
}

+++ Section(header: getAppVersion(), footer: "")

+++ Section(header: expirationHeaderString, footer: String(expiration.description))

showHideNSDetails()

if !isMacApp() {
form +++ Section(header: expirationHeaderString, footer: String(expiration.description))
}

showHideNSDetails()
checkNightscoutStatus()
}

func isMacApp() -> Bool {
#if targetEnvironment(macCatalyst)
return true
#else
return false
#endif
}

func getAppVersion() -> String {
if let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
return "App Version: \(version)"
Expand Down
13 changes: 6 additions & 7 deletions Scripts/capture-build-details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ info_plist_path="${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/BuildDetails.plis

# Ensure the path to BuildDetails.plist is valid.
if [ "${info_plist_path}" == "/" -o ! -e "${info_plist_path}" ]; then
echo "ERROR: BuildDetails.plist file does not exist at path: ${info_plist_path}" >&2
exit 1
fi

echo "Gathering build date..."
echo "BuildDetails.plist file does not exist at path: ${info_plist_path}" >&2
else
echo "Gathering build date..."

# Capture the current date and write it to BuildDetails.plist
plutil -replace com-LoopFollow-build-date -string "$(date)" "${info_plist_path}"
# Capture the current date and write it to BuildDetails.plist
plutil -replace com-LoopFollow-build-date -string "$(date)" "${info_plist_path}"
fi