-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from loopandlearn/testflight-build-expiration
Testflight build expiration
- Loading branch information
Showing
5 changed files
with
141 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict/> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// BuildDetails.swift | ||
// LoopFollow | ||
// | ||
// Created by Jonas Björkert on 2024-03-25. | ||
// Copyright © 2024 Jon Fawcett. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class BuildDetails { | ||
static var `default` = BuildDetails() | ||
|
||
let dict: [String: Any] | ||
|
||
init() { | ||
guard let url = Bundle.main.url(forResource: "BuildDetails", withExtension: "plist"), | ||
let data = try? Data(contentsOf: url), | ||
let parsed = try? PropertyListSerialization.propertyList(from: data, format: nil) as? [String: Any] else { | ||
dict = [:] | ||
return | ||
} | ||
dict = parsed | ||
} | ||
|
||
var buildDateString: String? { | ||
return dict["com-LoopFollow-build-date"] as? String | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh -e | ||
|
||
# capture-build-details.sh | ||
# LoopFollow | ||
# | ||
# Created by Jonas Björkert on 2024-03-25. | ||
# Copyright © 2024 Jon Fawcett. All rights reserved. | ||
|
||
info_plist_path="${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/BuildDetails.plist" | ||
|
||
# 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..." | ||
|
||
# Capture the current date and write it to BuildDetails.plist | ||
plutil -replace com-LoopFollow-build-date -string "$(date)" "${info_plist_path}" |