Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions ios/Capacitor/Capacitor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
62959B172524DA7800A3D7F1 /* JSExport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959AE32524DA7700A3D7F1 /* JSExport.swift */; };
62959B192524DA7800A3D7F1 /* CAPBridgedPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 62959AE52524DA7700A3D7F1 /* CAPBridgedPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
62959B1A2524DA7800A3D7F1 /* CAPPluginCall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959AE62524DA7700A3D7F1 /* CAPPluginCall.swift */; };
62959B1B2524DA7800A3D7F1 /* CAPFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959AE72524DA7700A3D7F1 /* CAPFile.swift */; };
62959B1C2524DA7800A3D7F1 /* CAPPluginMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = 62959AE82524DA7700A3D7F1 /* CAPPluginMethod.m */; };
62959B1D2524DA7800A3D7F1 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959AE92524DA7700A3D7F1 /* UIColor.swift */; };
62959B222524DA7800A3D7F1 /* Console.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959AEF2524DA7700A3D7F1 /* Console.swift */; };
Expand All @@ -54,7 +53,6 @@
62959B422524DA7800A3D7F1 /* DocLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959B102524DA7700A3D7F1 /* DocLinks.swift */; };
62959B432524DA7800A3D7F1 /* Data+Capacitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959B112524DA7700A3D7F1 /* Data+Capacitor.swift */; };
62959B452524DA7800A3D7F1 /* CAPPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 62959B132524DA7700A3D7F1 /* CAPPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
62959B462524DA7800A3D7F1 /* CAPBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959B142524DA7700A3D7F1 /* CAPBridge.swift */; };
62959B472524DA7800A3D7F1 /* CAPNotifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62959B152524DA7700A3D7F1 /* CAPNotifications.swift */; };
6296A77E253A2E49005A202A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6296A77D253A2E49005A202A /* AppDelegate.swift */; };
6296A782253A2E49005A202A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6296A781253A2E49005A202A /* ViewController.swift */; };
Expand Down Expand Up @@ -177,7 +175,6 @@
62959AE32524DA7700A3D7F1 /* JSExport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSExport.swift; sourceTree = "<group>"; };
62959AE52524DA7700A3D7F1 /* CAPBridgedPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPBridgedPlugin.h; sourceTree = "<group>"; };
62959AE62524DA7700A3D7F1 /* CAPPluginCall.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CAPPluginCall.swift; sourceTree = "<group>"; };
62959AE72524DA7700A3D7F1 /* CAPFile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CAPFile.swift; sourceTree = "<group>"; };
62959AE82524DA7700A3D7F1 /* CAPPluginMethod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CAPPluginMethod.m; sourceTree = "<group>"; };
62959AE92524DA7700A3D7F1 /* UIColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = "<group>"; };
62959AEF2524DA7700A3D7F1 /* Console.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Console.swift; sourceTree = "<group>"; };
Expand All @@ -196,7 +193,6 @@
62959B112524DA7700A3D7F1 /* Data+Capacitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+Capacitor.swift"; sourceTree = "<group>"; };
62959B122524DA7700A3D7F1 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
62959B132524DA7700A3D7F1 /* CAPPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPPlugin.h; sourceTree = "<group>"; };
62959B142524DA7700A3D7F1 /* CAPBridge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CAPBridge.swift; sourceTree = "<group>"; };
62959B152524DA7700A3D7F1 /* CAPNotifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CAPNotifications.swift; sourceTree = "<group>"; };
62959B8225253A9500A3D7F1 /* Capacitor.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Capacitor.modulemap; sourceTree = "<group>"; };
62959BBD2526510200A3D7F1 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -361,7 +357,6 @@
62959AE32524DA7700A3D7F1 /* JSExport.swift */,
621ECCD4254205BD00D3D615 /* CAPBridgeProtocol.swift */,
621ECCD9254205C400D3D615 /* CapacitorBridge.swift */,
62959B142524DA7700A3D7F1 /* CAPBridge.swift */,
62959B042524DA7700A3D7F1 /* CAPBridgeViewController.swift */,
621ECCE2254206A600D3D615 /* CAPApplicationDelegateProxy.swift */,
62959B0A2524DA7700A3D7F1 /* CAPBridgeDelegate.swift */,
Expand All @@ -375,7 +370,6 @@
623D691C254C7462002D01D1 /* CAPInstanceConfiguration.m */,
6214934625509C3F006C36F9 /* CAPInstanceConfiguration.swift */,
62959B082524DA7700A3D7F1 /* CAPLog.swift */,
62959AE72524DA7700A3D7F1 /* CAPFile.swift */,
62959B102524DA7700A3D7F1 /* DocLinks.swift */,
62959B152524DA7700A3D7F1 /* CAPNotifications.swift */,
62959B072524DA7700A3D7F1 /* CapacitorExtension.swift */,
Expand Down Expand Up @@ -675,8 +669,6 @@
A7D8B3522B238A840003FAD6 /* JSValueEncoder.swift in Sources */,
A7F7EDD5292BE8520015B73B /* CAPInstancePlugin.swift in Sources */,
A38C3D7B2848BE6F004B3680 /* CapacitorCookieManager.swift in Sources */,
62959B1B2524DA7800A3D7F1 /* CAPFile.swift in Sources */,
62959B462524DA7800A3D7F1 /* CAPBridge.swift in Sources */,
62959B1D2524DA7800A3D7F1 /* UIColor.swift in Sources */,
62959B332524DA7800A3D7F1 /* CAPPlugin.m in Sources */,
62959B1C2524DA7800A3D7F1 /* CAPPluginMethod.m in Sources */,
Expand Down
25 changes: 0 additions & 25 deletions ios/Capacitor/Capacitor/CAPBridge.swift

This file was deleted.

57 changes: 0 additions & 57 deletions ios/Capacitor/Capacitor/CAPBridgeProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,6 @@ import WebKit
var statusBarStyle: UIStatusBarStyle { get set }
var statusBarAnimation: UIStatusBarAnimation { get set }

// MARK: - Deprecated
@available(*, deprecated, renamed: "webView")
func getWebView() -> WKWebView?

@available(*, deprecated, renamed: "isSimEnvironment")
func isSimulator() -> Bool

@available(*, deprecated, renamed: "isDevEnvironment")
func isDevMode() -> Bool

@available(*, deprecated, renamed: "statusBarVisible")
func getStatusBarVisible() -> Bool

@available(*, deprecated, renamed: "statusBarStyle")
func getStatusBarStyle() -> UIStatusBarStyle

@available(*, deprecated, renamed: "userInterfaceStyle")
func getUserInterfaceStyle() -> UIUserInterfaceStyle

@available(*, deprecated, message: "Moved - equivalent is found on config.localURL")
func getLocalUrl() -> String

@available(*, deprecated, renamed: "savedCall(withID:)")
func getSavedCall(_ callbackId: String) -> CAPPluginCall?

@available(*, deprecated, renamed: "releaseCall(withID:)")
func releaseCall(callbackId: String)

// MARK: - Plugin Access
func plugin(withName: String) -> CAPPlugin?

Expand Down Expand Up @@ -84,46 +56,17 @@ import WebKit

// MARK: - View Presentation
func showAlertWith(title: String, message: String, buttonTitle: String)
@available(*, deprecated, message: "Use self?.bridge?.viewController?.present")
func presentVC(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)?)
@available(*, deprecated, message: "Use self?.bridge?.viewController?.dismiss")
func dismissVC(animated flag: Bool, completion: (() -> Void)?)
}

/*
Extensions to Obj-C protocols are not exposed to Obj-C code because of limitations in the runtime.
Therefore these methods are implicitly Swift-only.

The deprecated methods are declared here because they can be defined without colliding with the synthesized Obj-C setters
for the respective properties (e.g. `setStatusBarVisible:` for 'statusBarVisible`).
*/
extension CAPBridgeProtocol {
// variadic parameters cannot be exposed to Obj-C
@available(*, deprecated, message: "Use CAPLog directly")
public func modulePrint(_ plugin: CAPPlugin, _ items: Any...) {
let output = items.map { String(describing: $0) }.joined(separator: " ")
CAPLog.print("⚡️ ", plugin.pluginId, "-", output)
}

// default arguments are not permitted in protocol declarations
public func alert(_ title: String, _ message: String, _ buttonTitle: String = "OK") {
showAlertWith(title: title, message: message, buttonTitle: buttonTitle)
}

@available(*, deprecated, renamed: "statusBarVisible")
public func setStatusBarVisible(_ visible: Bool) {
statusBarVisible = visible
}

@available(*, deprecated, renamed: "statusBarStyle")
public func setStatusBarStyle(_ style: UIStatusBarStyle) {
statusBarStyle = style
}

@available(*, deprecated, renamed: "statusBarAnimation")
public func setStatusBarAnimation(_ animation: UIStatusBarAnimation) {
statusBarAnimation = animation
}
}

/*
Expand Down
14 changes: 0 additions & 14 deletions ios/Capacitor/Capacitor/CAPFile.swift

This file was deleted.

15 changes: 0 additions & 15 deletions ios/Capacitor/Capacitor/CAPInstanceConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ extension InstanceConfiguration {
return localURL.appendingPathComponent(errorPath)
}

@available(*, deprecated, message: "Use getPluginConfig")
@objc public func getPluginConfigValue(_ pluginId: String, _ configKey: String) -> Any? {
return (pluginConfigurations as? JSObject)?[keyPath: KeyPath("\(pluginId).\(configKey)")]
}

@objc public func getPluginConfig(_ pluginId: String) -> PluginConfig {
if let cfg = (pluginConfigurations as? JSObject)?[keyPath: KeyPath("\(pluginId)")] as? JSObject {
return PluginConfig(config: cfg)
Expand All @@ -44,16 +39,6 @@ extension InstanceConfiguration {
return false
}

@available(*, deprecated, message: "Use direct property accessors")
@objc public func getValue(_ key: String) -> Any? {
return (legacyConfig as? JSObject)?[keyPath: KeyPath(key)]
}

@available(*, deprecated, message: "Use direct property accessors")
@objc public func getString(_ key: String) -> String? {
return (legacyConfig as? JSObject)?[keyPath: KeyPath(key)] as? String
}

// MARK: - Private

private func doesHost(_ host: String, match pattern: String) -> Bool {
Expand Down
37 changes: 1 addition & 36 deletions ios/Capacitor/Capacitor/CAPNotifications.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
Notificaton types for NotificationCenter and NSNotificationCenter

We want to include `capacitor` in the name(s) to uniquely identify these even though it can make the names long
and the deprecated notifications are only here for backwards compatibility.
We want to include `capacitor` in the name(s) to uniquely identify these even though it can make the names long.
*/
// swiftlint:disable identifier_name
extension Notification.Name {
Expand Down Expand Up @@ -32,38 +31,4 @@ extension Notification.Name {
public static let capacitorViewWillTransition = Notification.Name.capacitorViewWillTransition
}

/**
Deprecated, will be removed
*/
@objc public enum CAPNotifications: Int {
@available(*, deprecated, message: "renamed to 'Notification.Name.capacitorOpenURL'")
case URLOpen
@available(*, deprecated, message: "renamed to 'Notification.Name.capacitorOpenUniversalLink'")
case UniversalLinkOpen
@available(*, deprecated, message: "Notification.Name.capacitorContinueActivity'")
case ContinueActivity
@available(*, deprecated, message: "renamed to 'Notification.Name.capacitorDidRegisterForRemoteNotifications'")
case DidRegisterForRemoteNotificationsWithDeviceToken
@available(*, deprecated, message: "renamed to 'Notification.Name.capacitorDidFailToRegisterForRemoteNotifications'")
case DidFailToRegisterForRemoteNotificationsWithError
@available(*, deprecated, message: "renamed to 'Notification.Name.capacitorDecidePolicyForNavigationAction'")
case DecidePolicyForNavigationAction

public func name() -> String {
switch self {
case .URLOpen:
return Notification.Name.capacitorOpenURL.rawValue
case .UniversalLinkOpen:
return Notification.Name.capacitorOpenUniversalLink.rawValue
case .ContinueActivity:
return Notification.Name.capacitorContinueActivity.rawValue
case .DidRegisterForRemoteNotificationsWithDeviceToken:
return Notification.Name.capacitorDidRegisterForRemoteNotifications.rawValue
case .DidFailToRegisterForRemoteNotificationsWithError:
return Notification.Name.capacitorDidFailToRegisterForRemoteNotifications.rawValue
case .DecidePolicyForNavigationAction:
return Notification.Name.capacitorDecidePolicyForNavigationAction.rawValue
}
}
}
// swiftlint:enable identifier_name
1 change: 0 additions & 1 deletion ios/Capacitor/Capacitor/CAPPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
-(NSString* _Nonnull)getId;
-(BOOL)getBool:(CAPPluginCall* _Nonnull) call field:(NSString* _Nonnull)field defaultValue:(BOOL)defaultValue DEPRECATED_MSG_ATTRIBUTE("Use accessors on CAPPluginCall instead. See CAPBridgedJSTypes.h for Obj-C implementations.");
-(NSString* _Nullable)getString:(CAPPluginCall* _Nonnull)call field:(NSString* _Nonnull)field defaultValue:(NSString* _Nonnull)defaultValue DEPRECATED_MSG_ATTRIBUTE("Use accessors on CAPPluginCall instead. See CAPBridgedJSTypes.h for Obj-C implementations.");
-(id _Nullable)getConfigValue:(NSString* _Nonnull)key __deprecated_msg("use getConfig() and access config values using the methods available depending on the type.");
-(PluginConfig* _Nonnull)getConfig;
-(void)setCenteredPopover:(UIViewController* _Nonnull) vc;
-(void)setCenteredPopover:(UIViewController* _Nonnull) vc size:(CGSize) size;
Expand Down
4 changes: 0 additions & 4 deletions ios/Capacitor/Capacitor/CAPPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ - (NSString *) getString:(CAPPluginCall *)call field:(NSString *)field defaultVa
return [call getString:field defaultValue:defaultValue];
}

-(id)getConfigValue:(NSString *)key __deprecated {
return [self.bridge.config getPluginConfigValue:self.pluginName :key];
}

-(PluginConfig*)getConfig {
return [self.bridge.config getPluginConfig:self.pluginName];
}
Expand Down
13 changes: 0 additions & 13 deletions ios/Capacitor/Capacitor/CAPPluginCall.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import Foundation

@available(*, deprecated, renamed: "PluginCallResultData")
public typealias PluginCallErrorData = [String: Any]
@available(*, deprecated, renamed: "PluginCallResultData")
public typealias PluginResultData = [String: Any]

/**
* Swift niceties for CAPPluginCall
*/
Expand All @@ -26,14 +21,6 @@ extension CAPPluginCall: JSValueContainer {
}

@objc public extension CAPPluginCall {
@available(*, deprecated, message: "Presence of a key should not be considered significant. Use typed accessors to check the value instead.")
func hasOption(_ key: String) -> Bool {
guard let value = options[key] else {
return false
}
return !(value is NSNull)
}

func resolve() {
successHandler(CAPPluginCallResult(nil), self)
}
Expand Down
Loading
Loading