Skip to content

Commit

Permalink
Merge pull request #184 from aggarwal-p/master
Browse files Browse the repository at this point in the history
Updated Code to replace UIWebView with WkWebView
  • Loading branch information
Joaquín Moreira authored Aug 11, 2022
2 parents 801f786 + 31b9d1e commit 8c91396
Show file tree
Hide file tree
Showing 37 changed files with 409 additions and 284 deletions.
4 changes: 4 additions & 0 deletions 3.0_Release_Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ Unfortunately part of the changes have meant that progress blocks are no longer
For the most part your code should still work when upgrading from the 2.0 version of the framework in Objective-C. However, many methods have been deprecated which will produce warnings. It is recommended you upgrade these to the replacement methods as soon as possible, as the deprecated versions may be removed in a future release.

If you are using Swift, you may have more work to do. The deprecated methods are not exposed to Swift, and several APIs have been renamed for Swift to better reflect the API naming guidelines in Swift 3.0.

##Updating to 4.0.0
Replacing UIWebView with WKWebView for better compatibility and AppStore Acceptance.

3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
= 4.0.0
* Replacing UIWebView with WKWebView for better compatibility

= 2.0.5
* Fix Cocoapods integration

Expand Down
6 changes: 3 additions & 3 deletions EvernoteSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = "EvernoteSDK"
spec.version = "3.0.0"
spec.version = "4.0.0"
spec.summary = "Evernote Cloud SDK for iOS."
spec.homepage = "https://github.com/evernote/evernote-cloud-sdk-ios"
spec.license = ' https://github.com/evernote/evernote-cloud-sdk-ios/blob/master/LICENSE'
spec.authors = { 'Evernote' => '[email protected]' }
spec.source = { :git => "https://github.com/evernote/evernote-cloud-sdk-ios.git", :tag => "3.0.0"}
spec.source = { :git => "https://github.com/evernote/evernote-cloud-sdk-ios.git", :tag => "4.0.0"}
spec.ios.deployment_target = "8.0"
spec.xcconfig = {'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2 ${PODS_ROOT}/Headers/Public/evernote-cloud-sdk-ios/SendToEvernoteActivity'}

Expand All @@ -14,6 +14,6 @@ Pod::Spec.new do |spec|
spec.resource = "ENSDKResources.bundle"
spec.requires_arc = true

spec.framework = "MobileCoreServices", "CoreGraphics", "Foundation", "UIKit"
spec.framework = "CoreServices", "CoreGraphics", "Foundation", "UIKit", "WebKit"
spec.library = "xml2"
end
48 changes: 39 additions & 9 deletions EvernoteSDKSample/EvernoteSDKSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
030DA2F81E27BCF700FD4BDB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 030DA2F71E27BCF700FD4BDB /* AppDelegate.m */; };
030DA3001E27BCF700FD4BDB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 030DA2FF1E27BCF700FD4BDB /* Assets.xcassets */; };
030DA3031E27BCF700FD4BDB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 030DA3011E27BCF700FD4BDB /* LaunchScreen.storyboard */; };
030DA3211E27BD4700FD4BDB /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 030DA3201E27BD4700FD4BDB /* MobileCoreServices.framework */; };
030DA3231E27BD5100FD4BDB /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 030DA3221E27BD5100FD4BDB /* libxml2.tbd */; };
030DA3361E27BDB700FD4BDB /* CommonUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 030DA3251E27BDB700FD4BDB /* CommonUtils.m */; };
030DA3371E27BDB700FD4BDB /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 030DA3271E27BDB700FD4BDB /* MainViewController.m */; };
Expand All @@ -26,6 +25,8 @@
030DA3461E27BEEE00FD4BDB /* LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = 030DA3421E27BEEE00FD4BDB /* LICENSE.txt */; };
030DA3471E27BEEE00FD4BDB /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 030DA3441E27BEEE00FD4BDB /* SVProgressHUD.m */; };
038EE1E11E27C1A800595956 /* EvernoteSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 038EE1E01E27C18800595956 /* EvernoteSDK.framework */; };
27F202F82433958F00A535EA /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27F202F72433958F00A535EA /* CoreServices.framework */; };
4E6D597A28056D6700634EC4 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E6D597628056D6700634EC4 /* WebKit.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -60,7 +61,6 @@
030DA2FF1E27BCF700FD4BDB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
030DA3021E27BCF700FD4BDB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
030DA3041E27BCF700FD4BDB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
030DA3201E27BD4700FD4BDB /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
030DA3221E27BD5100FD4BDB /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
030DA3241E27BDB700FD4BDB /* CommonUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonUtils.h; sourceTree = "<group>"; };
030DA3251E27BDB700FD4BDB /* CommonUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommonUtils.m; sourceTree = "<group>"; };
Expand All @@ -85,15 +85,19 @@
030DA3431E27BEEE00FD4BDB /* SVProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVProgressHUD.h; sourceTree = "<group>"; };
030DA3441E27BEEE00FD4BDB /* SVProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVProgressHUD.m; sourceTree = "<group>"; };
038EE1D51E27C18800595956 /* evernote-sdk-ios.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "evernote-sdk-ios.xcodeproj"; path = "../../evernote-sdk-ios.xcodeproj"; sourceTree = "<group>"; };
27F202F72433958F00A535EA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
4E6D597628056D6700634EC4 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
4EE007B0281192F3007E4A1B /* EvernoteSDKSample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = EvernoteSDKSample.entitlements; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
030DA2ED1E27BCF700FD4BDB /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4E6D597A28056D6700634EC4 /* WebKit.framework in Frameworks */,
038EE1E11E27C1A800595956 /* EvernoteSDK.framework in Frameworks */,
030DA3211E27BD4700FD4BDB /* MobileCoreServices.framework in Frameworks */,
27F202F82433958F00A535EA /* CoreServices.framework in Frameworks */,
030DA3231E27BD5100FD4BDB /* libxml2.tbd in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -121,6 +125,7 @@
030DA2F21E27BCF700FD4BDB /* EvernoteSDKSample */ = {
isa = PBXGroup;
children = (
4EE007B0281192F3007E4A1B /* EvernoteSDKSample.entitlements */,
038EE1D51E27C18800595956 /* evernote-sdk-ios.xcodeproj */,
030DA33F1E27BEEE00FD4BDB /* 3rdparty */,
030DA2F61E27BCF700FD4BDB /* AppDelegate.h */,
Expand Down Expand Up @@ -162,8 +167,9 @@
030DA31F1E27BD4700FD4BDB /* Frameworks */ = {
isa = PBXGroup;
children = (
4E6D597628056D6700634EC4 /* WebKit.framework */,
27F202F72433958F00A535EA /* CoreServices.framework */,
030DA3221E27BD5100FD4BDB /* libxml2.tbd */,
030DA3201E27BD4700FD4BDB /* MobileCoreServices.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -223,19 +229,19 @@
030DA2E81E27BCF700FD4BDB /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
LastUpgradeCheck = 1330;
ORGANIZATIONNAME = Evernote;
TargetAttributes = {
030DA2EF1E27BCF700FD4BDB = {
CreatedOnToolsVersion = 8.2;
DevelopmentTeam = Q79WDW8YH9;
DevelopmentTeam = 35CHVC8T8P;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 030DA2EB1E27BCF700FD4BDB /* Build configuration list for PBXProject "EvernoteSDKSample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -333,20 +339,30 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
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_DOCUMENTATION_COMMENTS = YES;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
Expand All @@ -369,7 +385,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -380,20 +396,30 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
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_DOCUMENTATION_COMMENTS = YES;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
Expand All @@ -410,7 +436,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand All @@ -426,6 +452,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.evernote.EvernoteSDKSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = NO;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
Expand All @@ -438,6 +466,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.evernote.EvernoteSDKSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = NO;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ @interface SVProgressHUD ()
@property (nonatomic, readonly) CGFloat visibleKeyboardHeight;
@property (nonatomic, assign) UIOffset offsetFromCenter;


- (void)showProgress:(float)progress
status:(NSString*)string
maskType:(SVProgressHUDMaskType)hudMaskType;
Expand Down Expand Up @@ -331,7 +330,7 @@ - (void)setStatus:(NSString *)string {
- (void)setFadeOutTimer:(NSTimer *)newTimer {

if(_fadeOutTimer)
[_fadeOutTimer invalidate], _fadeOutTimer = nil;
([_fadeOutTimer invalidate]), _fadeOutTimer = nil;

if(newTimer)
_fadeOutTimer = newTimer;
Expand Down Expand Up @@ -612,14 +611,14 @@ - (void)dismiss {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self cancelRingLayerAnimation];
[_hudView removeFromSuperview];
_hudView = nil;
_hudView = nil;

[_overlayView removeFromSuperview];
_overlayView = nil;

[_indefiniteAnimatedLayer removeFromSuperlayer];
_indefiniteAnimatedLayer = nil;

_indefiniteAnimatedLayer = nil;
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil);

[[NSNotificationCenter defaultCenter] postNotificationName:SVProgressHUDDidDisappearNotification
Expand Down
3 changes: 2 additions & 1 deletion EvernoteSDKSample/EvernoteSDKSample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
#warning Add Consumer Key and Consumer Secret, but also modify your app's Info.plist according to documentation!
#warning Remove these warnings once done with it.


// Set shared session key information.
[ENSession setSharedSessionConsumerKey:@"your_consumer_key"
consumerSecret:@"your_consumer_secret"
Expand All @@ -38,7 +39,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options
{
return [[ENSession sharedSession] handleOpenURL:url];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,52 @@
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
9 changes: 3 additions & 6 deletions EvernoteSDKSample/EvernoteSDKSample/CommonUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ @implementation CommonUtils

+ (void)showSimpleAlertWithMessage:(NSString *)message
{
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:nil
message:message
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:@"OK", nil];
[alert show];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:alert animated:YES completion:nil];
}

@end
10 changes: 10 additions & 0 deletions EvernoteSDKSample/EvernoteSDKSample/EvernoteSDKSample.entitlements
Original file line number Diff line number Diff line change
@@ -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.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit 8c91396

Please sign in to comment.