Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit ba96cf1

Browse files
authored
Merge pull request #417 from agilebits/rar/UIWebView-deprecation-removal
UIWebView deprecation
2 parents 5d5b2c9 + 1e0e520 commit ba96cf1

File tree

15 files changed

+254
-222
lines changed

15 files changed

+254
-222
lines changed

1PasswordExtension.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Pod::Spec.new do |spec|
22

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

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

2222
spec.source = { :git => "https://github.com/AgileBits/onepassword-app-extension.git", :tag => spec.version }
23-
spec.platform = :ios, 7.0
23+
spec.platform = :ios, 9.0
2424
spec.source_files = "*.{h,m}"
2525
spec.frameworks = [ 'Foundation', 'MobileCoreServices', 'UIKit' ]
2626
spec.weak_framework = "WebKit"

Demos/App Demo for iOS Swift/App Demo for iOS Swift.xcodeproj/project.pbxproj

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 52;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -115,17 +115,18 @@
115115
isa = PBXProject;
116116
attributes = {
117117
LastSwiftUpdateCheck = 0700;
118-
LastUpgradeCheck = 0910;
119-
ORGANIZATIONNAME = Agilebits;
118+
LastUpgradeCheck = 1130;
119+
ORGANIZATIONNAME = "AgileBits Inc.";
120120
TargetAttributes = {
121121
F1B11CE61ACA827600BBB963 = {
122122
CreatedOnToolsVersion = 6.2;
123+
LastSwiftMigration = 1130;
123124
};
124125
};
125126
};
126127
buildConfigurationList = F1B11CE21ACA827600BBB963 /* Build configuration list for PBXProject "App Demo for iOS Swift" */;
127-
compatibilityVersion = "Xcode 3.2";
128-
developmentRegion = English;
128+
compatibilityVersion = "Xcode 11.0";
129+
developmentRegion = en;
129130
hasScannedForEncodings = 0;
130131
knownRegions = (
131132
en,
@@ -187,6 +188,7 @@
187188
buildSettings = {
188189
ALWAYS_SEARCH_USER_PATHS = NO;
189190
ASSETCATALOG_COMPILER_APPICON_NAME = "";
191+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
190192
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
191193
CLANG_CXX_LIBRARY = "libc++";
192194
CLANG_ENABLE_MODULES = YES;
@@ -195,20 +197,21 @@
195197
CLANG_WARN_BOOL_CONVERSION = YES;
196198
CLANG_WARN_COMMA = YES;
197199
CLANG_WARN_CONSTANT_CONVERSION = YES;
200+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
198201
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
199202
CLANG_WARN_EMPTY_BODY = YES;
200203
CLANG_WARN_ENUM_CONVERSION = YES;
201204
CLANG_WARN_INFINITE_RECURSION = YES;
202205
CLANG_WARN_INT_CONVERSION = YES;
203206
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
207+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
204208
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
205209
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
206210
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
207211
CLANG_WARN_STRICT_PROTOTYPES = YES;
208212
CLANG_WARN_SUSPICIOUS_MOVE = YES;
209213
CLANG_WARN_UNREACHABLE_CODE = YES;
210214
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
211-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
212215
COPY_PHASE_STRIP = NO;
213216
ENABLE_STRICT_OBJC_MSGSEND = YES;
214217
ENABLE_TESTABILITY = YES;
@@ -227,7 +230,7 @@
227230
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
228231
GCC_WARN_UNUSED_FUNCTION = YES;
229232
GCC_WARN_UNUSED_VARIABLE = YES;
230-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
233+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
231234
MTL_ENABLE_DEBUG_INFO = YES;
232235
ONLY_ACTIVE_ARCH = YES;
233236
SDKROOT = iphoneos;
@@ -242,6 +245,7 @@
242245
buildSettings = {
243246
ALWAYS_SEARCH_USER_PATHS = NO;
244247
ASSETCATALOG_COMPILER_APPICON_NAME = "";
248+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
245249
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
246250
CLANG_CXX_LIBRARY = "libc++";
247251
CLANG_ENABLE_MODULES = YES;
@@ -250,20 +254,21 @@
250254
CLANG_WARN_BOOL_CONVERSION = YES;
251255
CLANG_WARN_COMMA = YES;
252256
CLANG_WARN_CONSTANT_CONVERSION = YES;
257+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
253258
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
254259
CLANG_WARN_EMPTY_BODY = YES;
255260
CLANG_WARN_ENUM_CONVERSION = YES;
256261
CLANG_WARN_INFINITE_RECURSION = YES;
257262
CLANG_WARN_INT_CONVERSION = YES;
258263
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
264+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
259265
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
260266
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
261267
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
262268
CLANG_WARN_STRICT_PROTOTYPES = YES;
263269
CLANG_WARN_SUSPICIOUS_MOVE = YES;
264270
CLANG_WARN_UNREACHABLE_CODE = YES;
265271
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
266-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
267272
COPY_PHASE_STRIP = NO;
268273
ENABLE_NS_ASSERTIONS = NO;
269274
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -276,10 +281,11 @@
276281
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
277282
GCC_WARN_UNUSED_FUNCTION = YES;
278283
GCC_WARN_UNUSED_VARIABLE = YES;
279-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
284+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
280285
MTL_ENABLE_DEBUG_INFO = NO;
281286
SDKROOT = iphoneos;
282-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
287+
SWIFT_COMPILATION_MODE = wholemodule;
288+
SWIFT_OPTIMIZATION_LEVEL = "-O";
283289
SWIFT_VERSION = 2.3;
284290
TARGETED_DEVICE_FAMILY = "1,2";
285291
VALIDATE_PRODUCT = YES;
@@ -291,13 +297,20 @@
291297
buildSettings = {
292298
ASSETCATALOG_COMPILER_APPICON_NAME = "acme-anvil-corp";
293299
CLANG_ENABLE_MODULES = YES;
300+
CODE_SIGN_IDENTITY = "Apple Development";
301+
CODE_SIGN_STYLE = Manual;
302+
DEVELOPMENT_TEAM = "";
294303
INFOPLIST_FILE = "App Demo for iOS Swift/Info.plist";
295-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
304+
LD_RUNPATH_SEARCH_PATHS = (
305+
"$(inherited)",
306+
"@executable_path/Frameworks",
307+
);
296308
PRODUCT_BUNDLE_IDENTIFIER = "com.agilebits.$(PRODUCT_NAME:rfc1034identifier)";
297309
PRODUCT_NAME = "App Demo for iOS Swift";
310+
PROVISIONING_PROFILE_SPECIFIER = "";
298311
SWIFT_OBJC_BRIDGING_HEADER = "App Demo for iOS Swift/App Demo for iOS Swift-Bridging-Header.h";
299312
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
300-
SWIFT_VERSION = 4.0;
313+
SWIFT_VERSION = 5.0;
301314
TARGETED_DEVICE_FAMILY = 1;
302315
};
303316
name = Debug;
@@ -307,12 +320,19 @@
307320
buildSettings = {
308321
ASSETCATALOG_COMPILER_APPICON_NAME = "acme-anvil-corp";
309322
CLANG_ENABLE_MODULES = YES;
323+
CODE_SIGN_IDENTITY = "Apple Development";
324+
CODE_SIGN_STYLE = Manual;
325+
DEVELOPMENT_TEAM = "";
310326
INFOPLIST_FILE = "App Demo for iOS Swift/Info.plist";
311-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
327+
LD_RUNPATH_SEARCH_PATHS = (
328+
"$(inherited)",
329+
"@executable_path/Frameworks",
330+
);
312331
PRODUCT_BUNDLE_IDENTIFIER = "com.agilebits.$(PRODUCT_NAME:rfc1034identifier)";
313332
PRODUCT_NAME = "App Demo for iOS Swift";
333+
PROVISIONING_PROFILE_SPECIFIER = "";
314334
SWIFT_OBJC_BRIDGING_HEADER = "App Demo for iOS Swift/App Demo for iOS Swift-Bridging-Header.h";
315-
SWIFT_VERSION = 4.0;
335+
SWIFT_VERSION = 5.0;
316336
TARGETED_DEVICE_FAMILY = 1;
317337
};
318338
name = Release;

Demos/App Demo for iOS Swift/App Demo for iOS Swift/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1313

1414
var window: UIWindow?
1515

16-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
16+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1717
// Override point for customization after application launch.
1818
return true
1919
}

Demos/App Demo for iOS Swift/App Demo for iOS Swift/ChangePasswordViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ChangePasswordViewController: UIViewController {
7777

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

Demos/App Demo for iOS Swift/App Demo for iOS Swift/LoginViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class LoginViewController: UIViewController {
2828
override func viewDidAppear(_ animated: Bool) {
2929
super.viewDidAppear(animated)
3030
if OnePasswordExtension.shared().isAppExtensionAvailable() == false {
31-
let alertController = UIAlertController(title: "1Password is not installed", message: "Get 1Password from the App Store", preferredStyle: UIAlertControllerStyle.alert)
31+
let alertController = UIAlertController(title: "1Password is not installed", message: "Get 1Password from the App Store", preferredStyle: UIAlertController.Style.alert)
3232

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

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

Demos/App Demo for iOS Swift/App Demo for iOS Swift/RegisterViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class RegisterViewController: UIViewController {
6565

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

0 commit comments

Comments
 (0)