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

Number of small Xcode 16 build fixes #1028

Merged
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
2 changes: 1 addition & 1 deletion Scripts/LintLocalizableStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ enum ScriptAction: String {
return
}

if let data: Data = try? JSONSerialization.data(withJSONObject: updatedInfoPlistJSON, options: [ .fragmentsAllowed ]) {
if let data: Data = try? JSONSerialization.data(withJSONObject: updatedInfoPlistJSON, options: [ .fragmentsAllowed, .sortedKeys ]) {
do {
try data.write(to: URL(fileURLWithPath: projectState.infoPlistLocalizationFile.path), options: [.atomic])
} catch {
Expand Down
7 changes: 5 additions & 2 deletions Session.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4634,7 +4634,6 @@
FD5E93D52C12D8120038C25A /* Add Commit Hash To Build Info Plist */,
FD5E93D72C12DA400038C25A /* Add App Group To Build Info Plist */,
FDC498C12AC1775400EDD897 /* Ensure Localizable.strings included */,
943BC5A02C6F26370066A56A /* Ensure InfoPlist.xcstrings updated */,
);
buildRules = (
);
Expand Down Expand Up @@ -4777,6 +4776,7 @@
FDD82C422A2085B900425F05 /* Add Commit Hash To Build Info Plist */,
FD5E93D32C12D3990038C25A /* Add App Group To Build Info Plist */,
FDC498BF2AC1747900EDD897 /* Ensure Localizable.strings included */,
FD0B1FA92CA3805C00F60F46 /* Ensure InfoPlist.xcstrings updated */,
);
buildRules = (
);
Expand Down Expand Up @@ -5263,7 +5263,7 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
943BC5A02C6F26370066A56A /* Ensure InfoPlist.xcstrings updated */ = {
FD0B1FA92CA3805C00F60F46 /* Ensure InfoPlist.xcstrings updated */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -5301,6 +5301,7 @@
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "INFO_PLIST=\"${TARGET_BUILD_DIR}\"/\"${INFOPLIST_PATH}\"\nENTITLEMENTS_FILE=\"${SRCROOT}/${CODE_SIGN_ENTITLEMENTS}\"\n\n# Wait for Info.plist to be processed\nwhile [[ ! -f \"${INFO_PLIST}\" ]] && [[ ! -f \"${ENTITLEMENTS_FILE}\" ]]; do\n echo \"Waiting for plist and entitlements to be copied\"\n sleep 1\ndone\n\n# Query and save the value; suppress any error message, if key not found.\nvalue=$(/usr/libexec/PlistBuddy -c 'print :AppGroupsId' \"${INFO_PLIST}\" 2>/dev/null)\n\n# Check if value is empty\nif [ -z \"$value\" ] \nthen\n /usr/libexec/PlistBuddy -c \"Add :AppGroupsId string\" \"${INFO_PLIST}\"\nfi\n\napp_group_id=$(xmllint --xpath 'string(//key[.=\"com.apple.security.application-groups\"]/following-sibling::array/string)' \"$ENTITLEMENTS_FILE\")\n\n/usr/libexec/PlistBuddy -c \"Set :AppGroupsId ${app_group_id}\" \"${INFO_PLIST}\"\n";
showEnvVarsInLog = 0;
};
FD5E93D42C12D3CB0038C25A /* Add Commit Hash To Build Info Plist */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -5364,6 +5365,7 @@
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "INFO_PLIST=\"${TARGET_BUILD_DIR}\"/\"${INFOPLIST_PATH}\"\nENTITLEMENTS_FILE=\"${SRCROOT}/${CODE_SIGN_ENTITLEMENTS}\"\n\n# Wait for Info.plist to be processed\nwhile [[ ! -f \"${INFO_PLIST}\" ]] && [[ ! -f \"${ENTITLEMENTS_FILE}\" ]]; do\n echo \"Waiting for plist and entitlements to be copied\"\n sleep 1\ndone\n\n# Query and save the value; suppress any error message, if key not found.\nvalue=$(/usr/libexec/PlistBuddy -c 'print :AppGroupsId' \"${INFO_PLIST}\" 2>/dev/null)\n\n# Check if value is empty\nif [ -z \"$value\" ] \nthen\n /usr/libexec/PlistBuddy -c \"Add :AppGroupsId string\" \"${INFO_PLIST}\"\nfi\n\napp_group_id=$(xmllint --xpath 'string(//key[.=\"com.apple.security.application-groups\"]/following-sibling::array/string)' \"$ENTITLEMENTS_FILE\")\n\n/usr/libexec/PlistBuddy -c \"Set :AppGroupsId ${app_group_id}\" \"${INFO_PLIST}\"\n";
showEnvVarsInLog = 0;
};
FD5E93D72C12DA400038C25A /* Add App Group To Build Info Plist */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -5505,6 +5507,7 @@
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "INFO_PLIST=\"${TARGET_BUILD_DIR}\"/\"${INFOPLIST_PATH}\"\n\n# Wait for Info.plist to be processed\nwhile [[ ! -f \"${INFO_PLIST}\" ]]; do\n echo \"Waiting for plist to be copied\"\n sleep 1\ndone\n\n# Query and save the value; suppress any error message, if key not found.\nvalue=$(/usr/libexec/PlistBuddy -c 'print :GitCommitHash' \"${INFO_PLIST}\" 2>/dev/null)\n\n# Check if value is empty\nif [ -z \"$value\" ] \nthen\n /usr/libexec/PlistBuddy -c \"Add :GitCommitHash string\" \"${INFO_PLIST}\"\nfi\n\n/usr/libexec/PlistBuddy -c \"Set :GitCommitHash `git rev-parse --short=7 HEAD`\" \"${INFO_PLIST}\"\n";
showEnvVarsInLog = 0;
};
FDE7214D287E50820093DF33 /* Lint Localizable.strings */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
2 changes: 1 addition & 1 deletion Session/Meta/Translations/InfoPlist.xcstrings

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions SessionUtilitiesKit/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public enum SNUtilitiesKit: MigratableTarget { // Just to make the external API
)
}

public static func configure(maxFileSize: UInt) {
SNUtilitiesKitConfiguration.maxFileSize = maxFileSize
public static func configure(networkMaxFileSize: UInt) {
SNUtilitiesKitConfiguration.maxFileSize = networkMaxFileSize
}
}

Expand Down
2 changes: 1 addition & 1 deletion SignalUtilitiesKit/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SessionUtilitiesKit
public enum Configuration {
public static func performMainSetup() {
// Need to do this first to ensure the legacy database exists
SNUtilitiesKit.configure(maxFileSize: UInt(Network.maxFileSize))
SNUtilitiesKit.configure(networkMaxFileSize: UInt(Network.maxFileSize))
SNMessagingKit.configure()
SNUIKit.configure()

Expand Down
2 changes: 1 addition & 1 deletion _SharedTestUtilities/NimbleExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fileprivate struct CallInfo {
}
}

fileprivate func generateCallInfo<M, T, R>(_ actualExpression: Expression<M>, _ functionBlock: @escaping (inout T) throws -> R) -> CallInfo where M: Mock<T> {
fileprivate func generateCallInfo<M, T, R>(_ actualExpression: Nimble.Expression<M>, _ functionBlock: @escaping (inout T) throws -> R) -> CallInfo where M: Mock<T> {
var maybeFunction: MockFunction?
var allFunctionsCalled: [FunctionConsumer.Key] = []
var desiredFunctionCalls: [String] = []
Expand Down