sharing extension for ios implemented (missing widget for uplaod)

This commit is contained in:
Lucio Lelii 2023-03-10 22:32:50 +01:00
parent 3aca101be8
commit 74e2cb68e7
16 changed files with 338 additions and 112 deletions

View File

@ -14,6 +14,7 @@ dependencies {
implementation project(':capacitor-keyboard')
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-status-bar')
implementation project(':capacitor-share-extension')
}

View File

@ -16,3 +16,6 @@ project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capa
include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
include ':capacitor-share-extension'
project(':capacitor-share-extension').projectDir = new File('../node_modules/capacitor-share-extension/android/capacitor-share-extension')

View File

@ -14,9 +14,46 @@
504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
65B5151329BB4AB8005DC684 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B5151229BB4AB8005DC684 /* ShareViewController.swift */; };
65B5151629BB4AB8005DC684 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65B5151429BB4AB8005DC684 /* MainInterface.storyboard */; };
65B5151A29BB4AB8005DC684 /* upload.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 65B5151029BB4AB8005DC684 /* upload.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
65B5151829BB4AB8005DC684 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 504EC2FC1FED79650016851F /* Project object */;
proxyType = 1;
remoteGlobalIDString = 65B5150F29BB4AB8005DC684;
remoteInfo = upload;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
653C8E9E29BB40B300E6376F /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
65B5151A29BB4AB8005DC684 /* upload.appex in Embed Foundation Extensions */,
);
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
65B5150829BB48F4005DC684 /* Embed ExtensionKit Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(EXTENSIONS_FOLDER_PATH)";
dstSubfolderSpec = 16;
files = (
);
name = "Embed ExtensionKit Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
@ -27,6 +64,13 @@
504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
653C8E9029BB40B200E6376F /* UniformTypeIdentifiers.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UniformTypeIdentifiers.framework; path = System/Library/Frameworks/UniformTypeIdentifiers.framework; sourceTree = SDKROOT; };
65B5151029BB4AB8005DC684 /* upload.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = upload.appex; sourceTree = BUILT_PRODUCTS_DIR; };
65B5151229BB4AB8005DC684 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; };
65B5151529BB4AB8005DC684 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
65B5151729BB4AB8005DC684 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
65B5151E29BB74FD005DC684 /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = "<group>"; };
65B5153129BB7B97005DC684 /* upload.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = upload.entitlements; sourceTree = "<group>"; };
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
@ -41,6 +85,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
65B5150D29BB4AB8005DC684 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@ -48,6 +99,7 @@
isa = PBXGroup;
children = (
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
653C8E9029BB40B200E6376F /* UniformTypeIdentifiers.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -56,6 +108,7 @@
isa = PBXGroup;
children = (
504EC3061FED79650016851F /* App */,
65B5151129BB4AB8005DC684 /* upload */,
504EC3051FED79650016851F /* Products */,
7F8756D8B27F46E3366F6CEA /* Pods */,
27E2DDA53C4D2A4D1A88CE4A /* Frameworks */,
@ -66,6 +119,7 @@
isa = PBXGroup;
children = (
504EC3041FED79650016851F /* App.app */,
65B5151029BB4AB8005DC684 /* upload.appex */,
);
name = Products;
sourceTree = "<group>";
@ -73,6 +127,7 @@
504EC3061FED79650016851F /* App */ = {
isa = PBXGroup;
children = (
65B5151E29BB74FD005DC684 /* App.entitlements */,
50379B222058CBB4000EE86E /* capacitor.config.json */,
504EC3071FED79650016851F /* AppDelegate.swift */,
504EC30B1FED79650016851F /* Main.storyboard */,
@ -85,6 +140,17 @@
path = App;
sourceTree = "<group>";
};
65B5151129BB4AB8005DC684 /* upload */ = {
isa = PBXGroup;
children = (
65B5153129BB7B97005DC684 /* upload.entitlements */,
65B5151229BB4AB8005DC684 /* ShareViewController.swift */,
65B5151429BB4AB8005DC684 /* MainInterface.storyboard */,
65B5151729BB4AB8005DC684 /* Info.plist */,
);
path = upload;
sourceTree = "<group>";
};
7F8756D8B27F46E3366F6CEA /* Pods */ = {
isa = PBXGroup;
children = (
@ -106,23 +172,43 @@
504EC3011FED79650016851F /* Frameworks */,
504EC3021FED79650016851F /* Resources */,
9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */,
653C8E9E29BB40B300E6376F /* Embed Foundation Extensions */,
65B5150829BB48F4005DC684 /* Embed ExtensionKit Extensions */,
);
buildRules = (
);
dependencies = (
65B5151929BB4AB8005DC684 /* PBXTargetDependency */,
);
name = App;
productName = App;
productReference = 504EC3041FED79650016851F /* App.app */;
productType = "com.apple.product-type.application";
};
65B5150F29BB4AB8005DC684 /* upload */ = {
isa = PBXNativeTarget;
buildConfigurationList = 65B5151B29BB4AB8005DC684 /* Build configuration list for PBXNativeTarget "upload" */;
buildPhases = (
65B5150C29BB4AB8005DC684 /* Sources */,
65B5150D29BB4AB8005DC684 /* Frameworks */,
65B5150E29BB4AB8005DC684 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = upload;
productName = upload;
productReference = 65B5151029BB4AB8005DC684 /* upload.appex */;
productType = "com.apple.product-type.app-extension";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
504EC2FC1FED79650016851F /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1420;
TargetAttributes = {
504EC3031FED79650016851F = {
@ -130,6 +216,10 @@
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
65B5150F29BB4AB8005DC684 = {
CreatedOnToolsVersion = 14.2;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */;
@ -146,6 +236,7 @@
projectRoot = "";
targets = (
504EC3031FED79650016851F /* App */,
65B5150F29BB4AB8005DC684 /* upload */,
);
};
/* End PBXProject section */
@ -164,6 +255,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
65B5150E29BB4AB8005DC684 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
65B5151629BB4AB8005DC684 /* MainInterface.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
@ -211,8 +310,24 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
65B5150C29BB4AB8005DC684 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
65B5151329BB4AB8005DC684 /* ShareViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
65B5151929BB4AB8005DC684 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 65B5150F29BB4AB8005DC684 /* upload */;
targetProxy = 65B5151829BB4AB8005DC684 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
504EC30B1FED79650016851F /* Main.storyboard */ = {
isa = PBXVariantGroup;
@ -230,6 +345,14 @@
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
65B5151429BB4AB8005DC684 /* MainInterface.storyboard */ = {
isa = PBXVariantGroup;
children = (
65B5151529BB4AB8005DC684 /* Base */,
);
name = MainInterface.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
@ -350,7 +473,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 4RW9XSSSMV;
@ -371,7 +496,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 4RW9XSSSMV;
@ -387,6 +514,59 @@
};
name = Release;
};
65B5151C29BB4AB8005DC684 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = upload/upload.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 4RW9XSSSMV;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = upload/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = upload;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = gcube.workspace.starter.upload;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
65B5151D29BB4AB8005DC684 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = upload/upload.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 4RW9XSSSMV;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = upload/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = upload;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 16.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = gcube.workspace.starter.upload;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -408,6 +588,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
65B5151B29BB4AB8005DC684 /* Build configuration list for PBXNativeTarget "upload" */ = {
isa = XCConfigurationList;
buildConfigurations = (
65B5151C29BB4AB8005DC684 /* Debug */,
65B5151D29BB4AB8005DC684 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 504EC2FC1FED79650016851F /* Project object */;

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.gcube.workspace</string>
</array>
</dict>
</plist>

View File

@ -1,11 +1,14 @@
import UIKit
import Capacitor
import CapacitorShareExtension
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let store = ShareStore.store
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
@ -33,11 +36,45 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
// Called when the app was launched with a url. Feel free to add additional processing here,
// but if you want the App API to support tracking app url opens, make sure to keep this call
return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print("application function called")
var success = true
if CAPBridge.handleOpenUrl(url, options) {
success = ApplicationDelegateProxy.shared.application(app, open: url, options: options)
}
guard let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true),
let params = components.queryItems else {
return false
}
let titles = params.filter { $0.name == "title" }
let descriptions = params.filter { $0.name == "description" }
let types = params.filter { $0.name == "type" }
let urls = params.filter { $0.name == "url" }
let webPaths = params.filter { $0.name == "webPath" }
store.shareItems.removeAll()
if (titles.count > 0){
for index in 0...titles.count-1 {
var shareItem: JSObject = JSObject()
shareItem["title"] = titles[index].value!
shareItem["description"] = descriptions[index].value!
shareItem["type"] = types[index].value!
shareItem["url"] = urls[index].value!
shareItem["webPath"] = webPaths[index].value!
store.shareItems.append(shareItem)
}
}
store.processed = false
let nc = NotificationCenter.default
nc.post(name: Notification.Name("triggerSendIntent"), object: nil )
return success
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
// Called when the app was launched with an activity, including Universal Links.

View File

@ -1,38 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>d4sworkspace</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.getcapacitor.capacitor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>d4sworkspace</string>
</array>
</dict>
</array>
<key>NSExtensionAttributes</key>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>d4sworkspace</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
<key>CFBundleURLName</key>
<string>com.getcapacitor.capacitor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>d4sworkspace</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
@ -46,35 +50,30 @@
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png" ||
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif"
).@count == $extensionItem.attachments.@count
).@count == 1
</string>
</dict>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
).@count == 1</string>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
</plist>

View File

@ -16,6 +16,7 @@ def capacitor_pods
pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
pod 'CapacitorShareExtension', :path => '../../node_modules/capacitor-share-extension'
pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
end

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.gcube.workspace</string>
</array>
</dict>
</plist>

31
package-lock.json generated
View File

@ -33,9 +33,7 @@
"@ionic/angular": "^6.5.4",
"angular-oauth2-oidc": "^15.0.1",
"capacitor-share-extension": "^2.0.0",
"cordova-plugin-file-opener2": "^4.0.0",
"cordova-plugin-inappbrowser": "^5.0.0",
"cordova-plugin-x-socialsharing": "^6.0.4",
"ionicons": "^6.1.3",
"keycloak-angular": "^13.0.0",
"keycloak-js": "^20.0.5",
@ -6614,24 +6612,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cordova-plugin-file-opener2": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-file-opener2/-/cordova-plugin-file-opener2-4.0.0.tgz",
"integrity": "sha512-+O+MMldI2k5Kjoa62KXYxnZQIGE4k5VfoCmmOUmaV5XM6U6euiiKMfCkuMrOrdAFb1C5Jsx+SuBHbWx1NEB5lw==",
"engines": {
"cordovaDependencies": {
"2.0.0": {
"cordova": ">=6.0.0"
},
"3.0.0": {
"cordova": ">=7.0.0"
},
"4.0.0": {
"cordova-android": ">=10.0.0"
}
}
}
},
"node_modules/cordova-plugin-inappbrowser": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-inappbrowser/-/cordova-plugin-inappbrowser-5.0.0.tgz",
@ -6656,17 +6636,6 @@
}
}
},
"node_modules/cordova-plugin-x-socialsharing": {
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/cordova-plugin-x-socialsharing/-/cordova-plugin-x-socialsharing-6.0.4.tgz",
"integrity": "sha512-+ak6rN9i2xf/PARA/T3Hss09s0QhpFrOWvrYowy+PkCjGWx/ZVt9RkW+7yKemfyTXSgTp0YkyAAR4r6hPAfBGQ==",
"engines": [
{
"name": "cordova",
"version": ">=3.0.0"
}
]
},
"node_modules/core-js-compat": {
"version": "3.28.0",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.28.0.tgz",

View File

@ -38,9 +38,7 @@
"@ionic/angular": "^6.5.4",
"angular-oauth2-oidc": "^15.0.1",
"capacitor-share-extension": "^2.0.0",
"cordova-plugin-file-opener2": "^4.0.0",
"cordova-plugin-inappbrowser": "^5.0.0",
"cordova-plugin-x-socialsharing": "^6.0.4",
"ionicons": "^6.1.3",
"keycloak-angular": "^13.0.0",
"keycloak-js": "^20.0.5",

View File

@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { AuthGuard } from './_helper/auth-guard';
import { LoginGuard } from './_helper/login-guard';
const loginModule = () => import('./login/login.module').then(m => m.LoginPageModule);
@ -15,7 +14,7 @@ const routes: Routes = [
{
path: 'tabs',
loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule) , canActivate: [AuthGuard]
},
}
];
@NgModule({
imports: [

View File

@ -3,18 +3,21 @@ import { APP_INITIALIZER, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { KeycloakAngularModule, KeycloakService } from 'keycloak-angular';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { IonicModule, IonicRouteStrategy, ModalController, ToastController } from '@ionic/angular';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {initializeKeycloak} from './_helper/keycloak-init.factory'
import { D4sAuthService } from './d4sauth.service';
import { D4sIntentService } from './d4s-intent.service';
import {initializeIntent} from './_helper/intent-init.factory'
import { StoragehubService } from './storagehub.service';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, HttpClientModule, HttpClientModule, KeycloakAngularModule],
providers: [
D4sAuthService,
D4sAuthService, ModalController, StoragehubService, ToastController,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
{
provide: APP_INITIALIZER,
@ -22,6 +25,12 @@ import { D4sAuthService } from './d4sauth.service';
multi: true,
deps: [KeycloakService]
},
{
provide: APP_INITIALIZER,
useFactory: initializeIntent,
multi: true,
deps: [D4sIntentService]
},
],
bootstrap: [AppComponent]

View File

@ -6,10 +6,10 @@ import { RenameAction } from "./rename-item";
export class Actions {
private static mv = new MoveAction();
private static cp = new CopyAction();
private static ren = new RenameAction();
private static del = new DeleteAction();
static mv = new MoveAction();
static cp = new CopyAction();
static ren = new RenameAction();
static del = new DeleteAction();
public static getActionsPerType(type: string): Action[] {
switch (type) {

View File

@ -1,5 +1,4 @@
import { ModalOptions } from "@ionic/angular";
import { Observable } from "rxjs";
import { StoragehubService } from "src/app/storagehub.service";
import { WsViewerComponent } from "src/app/ws-viewer/ws-viewer.component";
import { WSItem } from "../ws-item";

View File

@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common';
import { Component, Input, OnInit } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { IonicModule, LoadingController, ModalController, ToastController } from '@ionic/angular';
import { IonicModule, ModalController } from '@ionic/angular';
import { Sorting, SortName, SortType } from '../model/sorting';
import { WSItem } from '../model/ws-item';
import { StoragehubService } from '../storagehub.service';
@ -18,8 +18,8 @@ import { StoragehubService } from '../storagehub.service';
})
export class WsViewerComponent implements OnInit {
constructor(private storagehub: StoragehubService, private modalCtrl: ModalController,
) { }
constructor(private storagehub: StoragehubService,
private modalCtrl: ModalController) { }
@Input() notClickableIds: string[] = [];
@Input() notSelectableIds: string[] = [];

View File

@ -10,3 +10,5 @@ if (environment.production) {
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));