Michael Kirk
a7bd372147
Fix tests by removing side effect in getter
...
While setting up the test CurrentAppContect, we use OWSTemporaryDirectory which in turn
recursively references CurrentAppContext, which crashes.
Clearing temp directories on every activation is sufficient.
7 years ago
Matthew Chen
dd54b40bed
Respond to CR.
7 years ago
Matthew Chen
987726df6c
Temp files.
7 years ago
Michael Kirk
f243914fe5
NSTemporaryDirectory -> OWSTemporaryDirectory/AccessibleAfterFirstAuth
...
Remove redundant move - AFNetworking alread moves the CFNetwork tmp file for
us.
7 years ago
Michael Kirk
6560358375
Fix failed attachment downloads in beta
7 years ago
Matthew Chen
399dd13cee
Add test app context; use mock "document" and "shared data container" directories in tests, use mock keychain storage in tests.
7 years ago
Michael Kirk
c7662b5a86
Step 2/2 %s/OWSAssert/OWSAssertDebug for existing previous assert semantics
...
Going forward, we want to prefer safer asserts, but we don't want to blindly
apply crashing asserts across the codebase
7 years ago
Matthew Chen
f473f60111
Apply OWS log functions in Objective-C.
7 years ago
Matthew Chen
cc5a480baa
Apply OWS log functions in Objective-C.
7 years ago
Matthew Chen
3a50377902
Apply OWS log functions in Objective-C.
7 years ago
Matthew Chen
713606271c
Rename fail macros in Obj-C.
7 years ago
Michael Kirk
c05700fd98
Log in OWSFail
...
step 1: rename OWSFail->OWSFailNoProdLog
step 2: rename OWSProdLogAndFail->OWSFail
step 3: Convert OWSFailNoProdLog->OWSFail where we want logging
step 4: Rename OWSCFail->OWSCFailNoProdLog
step 5: Rename OWSProdLogAndCFail -> OWSCFail
step 6: Convert OWSCFailNoProdLog -> OWSCFail where we want logging
7 years ago
Matthew Chen
d0c691bb7f
Lazy attachment restores.
8 years ago
Matthew Chen
08ba7c85ed
Clean up ahead of PR.
8 years ago
Matthew Chen
4746948dfe
Respond to CR.
8 years ago
Michael Kirk
e020b0ff99
Persist default sound so we can use it for fallback notifications
...
// FREEBIE
8 years ago
Matthew Chen
706006539f
Improve the robustness of the migration logic.
8 years ago
Matthew Chen
d91507d897
Improve the robustness of the migration logic.
8 years ago
Michael Kirk
033505afd7
Remove slow file protection updates from launch path
...
To avoid blocking launch, file protection is now updated async for most
moved files. Out of paranoia, the database files are also update
redundantly on a sync code path.
It's still critical that we update permissions recursively for two
reasons:
1. Updating a containing directories FileProtection does not affect
existing files in that directory.
2. Because we've changed the containers default file protection level
(from unspecified to NSFileProtectionComplete), some existing files
will have there file protection updated upon launching Signal 2.20.
It's not clear to me which files this affects, and I haven't found
any relevant documentation, but from observation, it seems to affect
any top-level files in the container. Regardless, we're now doing the
right thing: after launching 2.20, ensure all file permissions are
what we expect.
Also removed no-op file protection on legacy db files. They've already
been moved by the time this method runs in AppSetup.
// FREEBIE
8 years ago
matthew chen
47aa29db25
Fix build breakage.
8 years ago
Michael Kirk
da15f245cf
CR: fix early return, assert on error
...
inline functions which were only used once
// FREEBIE
8 years ago
Michael Kirk
b4359b33dd
Fix "lose messages received while in background"
...
A moved legacy DB has the NSFileProtectionClassComplete, meaning it's
never accessible while the device is locked.
// FREEBIE
8 years ago
Matthew Chen
5cf89a0f3d
Register all database views asynchronously.
8 years ago
Matthew Chen
6f7f1b3b08
Improve pre-migration testing tools.
8 years ago
Matthew Chen
9d909025c9
Handle UIImage shares.
8 years ago
Matthew Chen
5770a18b08
Handle text shares like URLs.
8 years ago
Matthew Chen
6a81d8e5c2
Respond to CR.
8 years ago
Matthew Chen
0cc7f3e00e
Clean up ahead of PR.
8 years ago
Matthew Chen
16f7317579
Complete backup restore/import.
8 years ago
Matthew Chen
272a90d269
Add import back up UI. Begin work on import backup logic.
8 years ago
Matthew Chen
9ac2383a2c
Retain changes from session database branch.
8 years ago
Matthew Chen
085f8a6f64
Clean up ahead of PR.
8 years ago
Matthew Chen
791743a5f0
Fix order of operations in SAE setup.
8 years ago
Matthew Chen
bf21d0c0ed
Enable logging in SAE; rework log file management to include multiple log directories.
8 years ago
Matthew Chen
779e89fe74
Clean up ahead of PR.
8 years ago
Matthew Chen
7429e1968c
Clean up ahead of PR.
8 years ago
Matthew Chen
cd11ec5698
Add app group, share keychain. Take a first pass at file migration to shared data directory.
8 years ago
Matthew Chen
2d8a7b03d0
Respond to CR.
...
// FREEBIE
8 years ago