Skip to content

Commit 5614dad

Browse files
committed
Fixes iOS UI sync
1 parent c32709f commit 5614dad

File tree

5 files changed

+28
-22
lines changed

5 files changed

+28
-22
lines changed

FSNotes iOS/Info.plist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>NSHumanReadableCopyright</key>
6-
<string></string>
7-
<key>UIFileSharingEnabled</key>
8-
<true/>
95
<key>CFBundleDevelopmentRegion</key>
106
<string>$(DEVELOPMENT_LANGUAGE)</string>
117
<key>CFBundleDisplayName</key>
@@ -101,6 +97,8 @@
10197
<string>Needs for attach photo in notes</string>
10298
<key>NSFaceIDUsageDescription</key>
10399
<string>Note encryption and decryption with FaceID</string>
100+
<key>NSHumanReadableCopyright</key>
101+
<string></string>
104102
<key>NSLocationWhenInUseUsageDescription</key>
105103
<string>Requested when photo attached</string>
106104
<key>NSPhotoLibraryAddUsageDescription</key>
@@ -134,6 +132,8 @@
134132
<string>fetch</string>
135133
<string>remote-notification</string>
136134
</array>
135+
<key>UIFileSharingEnabled</key>
136+
<true/>
137137
<key>UILaunchStoryboardName</key>
138138
<string>LaunchScreen</string>
139139
<key>UIMainStoryboardFile</key>

FSNotes iOS/View/EditTextView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ class EditTextView: UITextView, UITextViewDelegate {
202202
if let rtfd = try? attributedString.data(from: NSMakeRange(0, attributedString.length), documentAttributes: [NSAttributedString.DocumentAttributeKey.documentType:NSAttributedString.DocumentType.rtfd]) {
203203

204204
UIPasteboard.general.setItems([
205-
[kUTTypeText as String: attributedString.string],
206205
["es.fsnot.attributed.text": rtfd],
207206
[kUTTypePlainText as String: attributedString.string],
208207
[kUTTypeFlatRTFD as String: rtfd]

FSNotes.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4419,12 +4419,12 @@
44194419
CODE_SIGN_IDENTITY = "iPhone Developer";
44204420
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
44214421
CODE_SIGN_STYLE = Automatic;
4422-
CURRENT_PROJECT_VERSION = 210;
4422+
CURRENT_PROJECT_VERSION = 212;
44234423
DEVELOPMENT_TEAM = 866P6MTE92;
44244424
INFOPLIST_FILE = "FSNotes iOS Share/Info.plist";
44254425
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
44264426
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
4427-
MARKETING_VERSION = 4.4.1;
4427+
MARKETING_VERSION = 4.5.1;
44284428
PRODUCT_BUNDLE_IDENTIFIER = "co.fluder.mobile.FSNotes-iOS.FSNotes-iOS-Share";
44294429
PRODUCT_NAME = "$(TARGET_NAME)";
44304430
SDKROOT = iphoneos;
@@ -4443,13 +4443,13 @@
44434443
CODE_SIGN_IDENTITY = "iPhone Distribution";
44444444
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
44454445
CODE_SIGN_STYLE = Automatic;
4446-
CURRENT_PROJECT_VERSION = 210;
4446+
CURRENT_PROJECT_VERSION = 211;
44474447
DEVELOPMENT_TEAM = 866P6MTE92;
44484448
ENABLE_NS_ASSERTIONS = NO;
44494449
INFOPLIST_FILE = "FSNotes iOS Share/Info.plist";
44504450
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
44514451
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
4452-
MARKETING_VERSION = 4.4.1;
4452+
MARKETING_VERSION = 4.5.0;
44534453
PRODUCT_BUNDLE_IDENTIFIER = "co.fluder.mobile.FSNotes-iOS.FSNotes-iOS-Share";
44544454
PRODUCT_NAME = "$(TARGET_NAME)";
44554455
SDKROOT = iphoneos;
@@ -4471,12 +4471,12 @@
44714471
CODE_SIGN_IDENTITY = "iPhone Developer";
44724472
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
44734473
CODE_SIGN_STYLE = Automatic;
4474-
CURRENT_PROJECT_VERSION = 210;
4474+
CURRENT_PROJECT_VERSION = 212;
44754475
DEVELOPMENT_TEAM = 866P6MTE92;
44764476
INFOPLIST_FILE = "FSNotes iOS/Info.plist";
44774477
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
44784478
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
4479-
MARKETING_VERSION = 4.4.1;
4479+
MARKETING_VERSION = 4.5.1;
44804480
PRODUCT_BUNDLE_IDENTIFIER = "co.fluder.mobile.FSNotes-iOS";
44814481
PRODUCT_NAME = "$(TARGET_NAME)";
44824482
PROVISIONING_PROFILE = "";
@@ -4501,13 +4501,13 @@
45014501
CODE_SIGN_IDENTITY = "iPhone Developer";
45024502
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
45034503
CODE_SIGN_STYLE = Automatic;
4504-
CURRENT_PROJECT_VERSION = 210;
4504+
CURRENT_PROJECT_VERSION = 212;
45054505
DEVELOPMENT_TEAM = 866P6MTE92;
45064506
ENABLE_NS_ASSERTIONS = NO;
45074507
INFOPLIST_FILE = "FSNotes iOS/Info.plist";
45084508
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
45094509
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
4510-
MARKETING_VERSION = 4.4.1;
4510+
MARKETING_VERSION = 4.5.1;
45114511
PRODUCT_BUNDLE_IDENTIFIER = "co.fluder.mobile.FSNotes-iOS";
45124512
PRODUCT_NAME = "$(TARGET_NAME)";
45134513
PROVISIONING_PROFILE = "";

FSNotes/Business/Storage.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ class Storage {
140140
return UserDefaultsManagement.storageUrl
141141
#endif
142142

143-
guard let iCloudDocumentsURL = FileManager.default.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents").standardized else { return getLocalDocuments() }
143+
let ubiquityContainer = FileManager.default.url(forUbiquityContainerIdentifier: nil)
144+
145+
guard let iCloudDocumentsURL = ubiquityContainer?
146+
.appendingPathComponent("Documents")
147+
.standardized
148+
else { return getLocalDocuments() }
144149

145150
if (!FileManager.default.fileExists(atPath: iCloudDocumentsURL.path, isDirectory: nil)) {
146151
do {
@@ -1319,7 +1324,7 @@ class Storage {
13191324
let urls = fetchAllDirectories(url: main.url)
13201325
{
13211326
for url in urls {
1322-
let standardizedURL = (url as URL).standardized.resolvingSymlinksInPath()
1327+
let standardizedURL = (url as URL).standardized
13231328

13241329
if standardizedURL == archiveURL
13251330
|| standardizedURL == trashURL

FSNotes/Helpers/UserDefaultsManagement.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,14 @@ public class UserDefaultsManagement {
290290

291291
static var localDocumentsContainer: URL? {
292292
get {
293-
if let path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first {
293+
if var path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first {
294+
295+
#if os(iOS)
296+
if path.starts(with: "/var") {
297+
path = "/private\(path)"
298+
}
299+
#endif
300+
294301
return URL(fileURLWithPath: path, isDirectory: true)
295302
}
296303

@@ -695,12 +702,7 @@ public class UserDefaultsManagement {
695702
}
696703
#endif
697704

698-
if var archive = storageUrl?.appendingPathComponent("Archive", isDirectory: true) {
699-
700-
#if os(iOS)
701-
archive = archive.resolvingSymlinksInPath()
702-
#endif
703-
705+
if let archive = storageUrl?.appendingPathComponent("Archive", isDirectory: true) {
704706
if !FileManager.default.fileExists(atPath: archive.path) {
705707
do {
706708
try FileManager.default.createDirectory(at: archive, withIntermediateDirectories: false, attributes: nil)

0 commit comments

Comments
 (0)