Skip to content

Commit

Permalink
Merge branch 'sftp-provider' of github.com:carloscabanero/blink into raw
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Sep 9, 2021
2 parents 1d7c8c5 + f6adad7 commit d95e5f7
Show file tree
Hide file tree
Showing 80 changed files with 4,341 additions and 2,228 deletions.
635 changes: 575 additions & 60 deletions Blink.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions Blink.xcodeproj/xcshareddata/xcschemes/Blink.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
isEnabled = "NO">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Debug"
Expand Down
108 changes: 108 additions & 0 deletions Blink.xcodeproj/xcshareddata/xcschemes/BlinkFileProvider.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9827124F262E4BDB00F883FA"
BuildableName = "BlinkFileProvider.appex"
BlueprintName = "BlinkFileProvider"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<RemoteRunnable
runnableDebuggingMode = "1"
BundleIdentifier = "com.apple.DocumentsApp"
RemotePath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Applications/Files.app">
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9827125D262E4BDB00F883FA"
BuildableName = "BlinkFileProviderUI.appex"
BlueprintName = "BlinkFileProviderUI"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
askForAppToLaunch = "Yes"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
71 changes: 71 additions & 0 deletions Blink.xcodeproj/xcshareddata/xcschemes/BlinkFilesTests.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "07FABBB625C9AECF00E1CC2C"
BuildableName = "BlinkFilesTests.xctest"
BlueprintName = "BlinkFilesTests"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EA0BA18A1C0CC57B00719C1A"
BuildableName = "Blink.app"
BlueprintName = "Blink"
ReferencedContainer = "container:Blink.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
31 changes: 19 additions & 12 deletions Blink/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

#import "AppDelegate.h"
#import "BKiCloudSyncHandler.h"
#import "BlinkPaths.h"
#import <BlinkConfig/BlinkPaths.h>
#import "BKDefaults.h"
#import "BKPubKey.h"
#import "BKHosts.h"
#import <BlinkConfig/BKHosts.h>
#import <BlinkConfig/BKPubKey.h>
#import <ios_system/ios_system.h>
#import <UserNotifications/UserNotifications.h>
#include <libssh/callbacks.h>
Expand Down Expand Up @@ -83,8 +83,19 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

signal(SIGPIPE, __on_pipebroken_signal);

[BlinkPaths migrateToHomeAtGroupContainer];

[BKDefaults loadDefaults];
[BKPubKey loadIDS];
[BKHosts loadHosts];
[self _loadProfileVars];
[[UIView appearance] setTintColor:[UIColor blinkTint]];

signal(SIGPIPE, __on_pipebroken_signal);

dispatch_queue_t bgQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0);
dispatch_async(bgQueue, ^{
[BlinkPaths linkDocumentsIfNeeded];
[BlinkPaths linkICloudDriveIfNeeded];
});

Expand All @@ -94,7 +105,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
addCommandList([[NSBundle mainBundle] pathForResource:@"blinkCommandsDictionary" ofType:@"plist"]); // Load blink commands to ios_system
__setupProcessEnv(); // we should call this after ios_system initializeEnvironment to override its defaults.
});

NSNotificationCenter *nc = NSNotificationCenter.defaultCenter;
[nc addObserver:self
selector:@selector(_onSceneDidEnterBackground:)
Expand All @@ -116,14 +127,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

[UIApplication sharedApplication].applicationSupportsShakeToEdit = NO;

//#ifdef TARGET_OS_MACCATALYST
// NSURL * bundleURL = [[[NSBundle mainBundle] builtInPlugInsURL] URLByAppendingPathComponent:@"AppKitBridge.bundle"];
// [[NSBundle bundleWithURL:bundleURL] load];
// NSObject *clas = (NSObject *)NSClassFromString(@"AppBridge");
//
// [clas performSelector:@selector(tuneStyle)];
//#endif



[NSFileProviderManager syncWithBKHosts];

return YES;
}

Expand Down
1 change: 1 addition & 0 deletions Blink/Blink-bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ extern void ios_exit(int errorCode) __dead2; // set error code and exits from th
#import "BKPubKey.h"
#import "BKHosts.h"
#import "UICKeyChainStore.h"
#import "BKiCloudSyncHandler.h"

#endif /* Blink_bridge_h */
Loading

0 comments on commit d95e5f7

Please sign in to comment.