Skip to content

Commit

Permalink
Fix profile sharing broken in iOS 17.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Mar 19, 2024
1 parent 7098a84 commit db8cbfa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion ApplicationLibrary/Views/Abstract/ShareButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ public struct ProfileShareButton<Label>: View where Label: View {

public var body: some View {
#if os(iOS)
if #available(iOS 16.0, *) {
if #available(iOS 17.4, *) {
bodyCompat
} else if #available(iOS 16.0, *) {
ShareLink(item: profile, subject: Text(profile.name), preview: SharePreview("Share profile"), label: label)
} else if UIDevice.current.userInterfaceIdiom != .pad {
bodyCompat
Expand Down
2 changes: 1 addition & 1 deletion Library/Database/Profile+Transferable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public struct TypedProfile: Transferable, Codable {

public static var transferRepresentation: some TransferRepresentation {
FileRepresentation(contentType: .profile) { typed in
try SentTransferredFile(typed.content.generateShareFile())
try SentTransferredFile(typed.content.generateShareFile(), allowAccessingOriginalFile: true)
} importing: { received in
try TypedProfile(.from(Data(contentsOf: received.file)))
}
Expand Down
24 changes: 12 additions & 12 deletions sing-box.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa;
PRODUCT_NAME = "sing-box";
SDKROOT = appletvos;
Expand Down Expand Up @@ -2040,7 +2040,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa;
PRODUCT_NAME = "sing-box";
SDKROOT = appletvos;
Expand Down Expand Up @@ -2278,7 +2278,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa;
PRODUCT_NAME = "sing-box";
Expand Down Expand Up @@ -2318,7 +2318,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa;
PRODUCT_NAME = "sing-box";
Expand All @@ -2341,7 +2341,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 210;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = Z56Z6NYZN2;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -2357,7 +2357,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
OTHER_CODE_SIGN_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa;
PRODUCT_NAME = "sing-box";
Expand All @@ -2379,7 +2379,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 195;
CURRENT_PROJECT_VERSION = 210;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = Z56Z6NYZN2;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -2395,7 +2395,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
OTHER_CODE_SIGN_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa;
PRODUCT_NAME = "sing-box";
Expand Down Expand Up @@ -2537,7 +2537,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.system;
PRODUCT_NAME = "$(inherited)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -2573,7 +2573,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.system;
PRODUCT_NAME = "$(inherited)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -2613,7 +2613,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent;
PRODUCT_NAME = SFM;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -2652,7 +2652,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.8.6;
MARKETING_VERSION = 1.8.9;
PRODUCT_BUNDLE_IDENTIFIER = io.nekohasekai.sfa.independent;
PRODUCT_NAME = SFM;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit db8cbfa

Please sign in to comment.