Skip to content

Commit

Permalink
Merge pull request #417 from agilebits/rar/UIWebView-deprecation-removal
Browse files Browse the repository at this point in the history
UIWebView deprecation
  • Loading branch information
rudyrichter committed Jan 30, 2020
2 parents 5d5b2c9 + 1e0e520 commit ba96cf1
Show file tree
Hide file tree
Showing 15 changed files with 254 additions and 222 deletions.
6 changes: 3 additions & 3 deletions 1PasswordExtension.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |spec|

spec.name = "1PasswordExtension"
spec.module_name = "OnePasswordExtension"
spec.version = "1.8.5"
spec.version = "1.8.6"
spec.summary = "With just a few lines of code, your app can add 1Password support."
spec.description = <<-DESC
With just a few lines of code, your app can add 1Password support, enabling your users to:
Expand All @@ -16,11 +16,11 @@ Pod::Spec.new do |spec|

spec.homepage = "https://github.com/AgileBits/onepassword-app-extension"
spec.license = { :type => 'MIT', :file => 'LICENSE.txt' }
spec.authors = [ "Dave Teare", "Michael Fey", "Rad Azzouz", "Roustem Karimov" ]
spec.authors = [ "Dave Teare", "Michael Fey", "Roustem Karimov" ]
spec.social_media_url = "https://twitter.com/1Password"

spec.source = { :git => "https://github.com/AgileBits/onepassword-app-extension.git", :tag => spec.version }
spec.platform = :ios, 7.0
spec.platform = :ios, 9.0
spec.source_files = "*.{h,m}"
spec.frameworks = [ 'Foundation', 'MobileCoreServices', 'UIKit' ]
spec.weak_framework = "WebKit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -115,17 +115,18 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = Agilebits;
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = "AgileBits Inc.";
TargetAttributes = {
F1B11CE61ACA827600BBB963 = {
CreatedOnToolsVersion = 6.2;
LastSwiftMigration = 1130;
};
};
};
buildConfigurationList = F1B11CE21ACA827600BBB963 /* Build configuration list for PBXProject "App Demo for iOS Swift" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
compatibilityVersion = "Xcode 11.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -187,6 +188,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = "";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -195,20 +197,21 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -227,7 +230,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -242,6 +245,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = "";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -250,20 +254,21 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -276,10 +281,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -291,13 +297,20 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "acme-anvil-corp";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "App Demo for iOS Swift/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.agilebits.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "App Demo for iOS Swift";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "App Demo for iOS Swift/App Demo for iOS Swift-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand All @@ -307,12 +320,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "acme-anvil-corp";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "App Demo for iOS Swift/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.agilebits.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "App Demo for iOS Swift";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "App Demo for iOS Swift/App Demo for iOS Swift-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ChangePasswordViewController: UIViewController {

OnePasswordExtension.shared().changePasswordForLogin(forURLString: "https://www.acme.com", loginDetails: newLoginDetails, passwordGenerationOptions: passwordGenerationOptions, for: self, sender: sender) { (loginDictionary, error) in
guard let loginDictionary = loginDictionary else {
if let error = error as NSError?, error.code != AppExtensionErrorCodeCancelledByUser {
if let error = error as NSError?, error.code != AppExtensionErrorCode.cancelledByUser.rawValue {
print("Error invoking 1Password App Extension for find login: \(String(describing: error))")
}
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class LoginViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if OnePasswordExtension.shared().isAppExtensionAvailable() == false {
let alertController = UIAlertController(title: "1Password is not installed", message: "Get 1Password from the App Store", preferredStyle: UIAlertControllerStyle.alert)
let alertController = UIAlertController(title: "1Password is not installed", message: "Get 1Password from the App Store", preferredStyle: UIAlertController.Style.alert)

let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
alertController.addAction(cancelAction)
Expand All @@ -48,7 +48,7 @@ class LoginViewController: UIViewController {
@IBAction func findLoginFrom1Password(_ sender:AnyObject) {
OnePasswordExtension.shared().findLogin(forURLString: "https://www.acme.com", for: self, sender: sender, completion: { (loginDictionary, error) in
guard let loginDictionary = loginDictionary else {
if let error = error as NSError?, error.code != AppExtensionErrorCodeCancelledByUser {
if let error = error as NSError?, error.code != AppExtensionErrorCode.cancelledByUser.rawValue {
print("Error invoking 1Password App Extension for find login: \(String(describing: error))")
}
return
Expand All @@ -63,10 +63,10 @@ class LoginViewController: UIViewController {

// Important: It is recommended that you submit the OTP/TOTP to your validation server as soon as you receive it, otherwise it may expire.
let delayTime: DispatchTime = .now() + DispatchTimeInterval.milliseconds(500)
DispatchQueue.main.asyncAfter(deadline: delayTime) { self.performSegue(withIdentifier: "showThankYouViewController", sender: self)
DispatchQueue.main.asyncAfter(deadline: delayTime) {
self.performSegue(withIdentifier: "showThankYouViewController", sender: self)
}
}

})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class RegisterViewController: UIViewController {

OnePasswordExtension.shared().storeLogin(forURLString: "https://www.acme.com", loginDetails: newLoginDetails, passwordGenerationOptions: passwordGenerationOptions, for: self, sender: sender) { (loginDictionary, error) in
guard let loginDictionary = loginDictionary else {
if let error = error as NSError?, error.code != AppExtensionErrorCodeCancelledByUser {
if let error = error as NSError?, error.code != AppExtensionErrorCode.cancelledByUser.rawValue {
print("Error invoking 1Password App Extension for find login: \(String(describing: error))")
}
return
Expand Down
Loading

0 comments on commit ba96cf1

Please sign in to comment.