Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kofktu committed Oct 3, 2018
2 parents f54d0bc + d2fe052 commit ee89a42
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 23 deletions.
61 changes: 49 additions & 12 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,41 @@
C337D6991EFE2E1F00425943 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C337D6971EFE2E1F00425943 /* LaunchScreen.storyboard */; };
C337D6B01EFE36D800425943 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C337D6AF1EFE36D800425943 /* Foundation.framework */; };
C337D6B21EFE36DD00425943 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C337D6B11EFE36DD00425943 /* UIKit.framework */; };
C3BD31BA1EFE4B4F007DCD21 /* WKCookieWebView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C395B7031EFE49FA008F513C /* WKCookieWebView.framework */; };
C3DDE17D2164BFE200A79981 /* WKCookieWebView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3DDE17C2164BFA500A79981 /* WKCookieWebView.framework */; };
C3DDE17E2164BFE200A79981 /* WKCookieWebView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C3DDE17C2164BFA500A79981 /* WKCookieWebView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
C395B7021EFE49FA008F513C /* PBXContainerItemProxy */ = {
C3DDE17B2164BFA500A79981 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C395B6FE1EFE49FA008F513C /* WKCookieWebView.xcodeproj */;
containerPortal = C3DDE1772164BFA500A79981 /* WKCookieWebView.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = C337D6771EFE2CFF00425943;
remoteInfo = WKCookieWebView;
};
C3DDE17F2164BFE200A79981 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C3DDE1772164BFA500A79981 /* WKCookieWebView.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = C337D6761EFE2CFF00425943;
remoteInfo = WKCookieWebView;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
C3DDE1812164BFE200A79981 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
C3DDE17E2164BFE200A79981 /* WKCookieWebView.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
C337D68B1EFE2E1F00425943 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
C337D68E1EFE2E1F00425943 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -37,17 +59,17 @@
C337D69A1EFE2E1F00425943 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C337D6AF1EFE36D800425943 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
C337D6B11EFE36DD00425943 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
C395B6FE1EFE49FA008F513C /* WKCookieWebView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WKCookieWebView.xcodeproj; path = ../WKCookieWebView/WKCookieWebView.xcodeproj; sourceTree = "<group>"; };
C3DDE1772164BFA500A79981 /* WKCookieWebView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WKCookieWebView.xcodeproj; path = ../WKCookieWebView.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
C337D6881EFE2E1F00425943 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C3BD31BA1EFE4B4F007DCD21 /* WKCookieWebView.framework in Frameworks */,
C337D6B21EFE36DD00425943 /* UIKit.framework in Frameworks */,
C337D6B01EFE36D800425943 /* Foundation.framework in Frameworks */,
C3DDE17D2164BFE200A79981 /* WKCookieWebView.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -57,7 +79,7 @@
C337D6821EFE2E1F00425943 = {
isa = PBXGroup;
children = (
C395B6FE1EFE49FA008F513C /* WKCookieWebView.xcodeproj */,
C3DDE1772164BFA500A79981 /* WKCookieWebView.xcodeproj */,
C337D68D1EFE2E1F00425943 /* Example */,
C337D68C1EFE2E1F00425943 /* Products */,
C337D6AE1EFE36D800425943 /* Frameworks */,
Expand Down Expand Up @@ -94,10 +116,10 @@
name = Frameworks;
sourceTree = "<group>";
};
C395B6FF1EFE49FA008F513C /* Products */ = {
C3DDE1782164BFA500A79981 /* Products */ = {
isa = PBXGroup;
children = (
C395B7031EFE49FA008F513C /* WKCookieWebView.framework */,
C3DDE17C2164BFA500A79981 /* WKCookieWebView.framework */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -112,10 +134,12 @@
C337D6871EFE2E1F00425943 /* Sources */,
C337D6881EFE2E1F00425943 /* Frameworks */,
C337D6891EFE2E1F00425943 /* Resources */,
C3DDE1812164BFE200A79981 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
C3DDE1802164BFE200A79981 /* PBXTargetDependency */,
);
name = Example;
productName = Example;
Expand All @@ -134,6 +158,7 @@
TargetAttributes = {
C337D68A1EFE2E1F00425943 = {
CreatedOnToolsVersion = 8.3.2;
DevelopmentTeam = KLVLNTBFM4;
ProvisioningStyle = Automatic;
};
};
Expand All @@ -151,8 +176,8 @@
projectDirPath = "";
projectReferences = (
{
ProductGroup = C395B6FF1EFE49FA008F513C /* Products */;
ProjectRef = C395B6FE1EFE49FA008F513C /* WKCookieWebView.xcodeproj */;
ProductGroup = C3DDE1782164BFA500A79981 /* Products */;
ProjectRef = C3DDE1772164BFA500A79981 /* WKCookieWebView.xcodeproj */;
},
);
projectRoot = "";
Expand All @@ -163,11 +188,11 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
C395B7031EFE49FA008F513C /* WKCookieWebView.framework */ = {
C3DDE17C2164BFA500A79981 /* WKCookieWebView.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = WKCookieWebView.framework;
remoteRef = C395B7021EFE49FA008F513C /* PBXContainerItemProxy */;
remoteRef = C3DDE17B2164BFA500A79981 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
Expand Down Expand Up @@ -197,6 +222,14 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
C3DDE1802164BFE200A79981 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = WKCookieWebView;
targetProxy = C3DDE17F2164BFE200A79981 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
C337D6921EFE2E1F00425943 /* Main.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -313,7 +346,9 @@
C337D69E1EFE2E1F00425943 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = KLVLNTBFM4;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.kofktu.Example;
Expand All @@ -325,7 +360,9 @@
C337D69F1EFE2E1F00425943 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = KLVLNTBFM4;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.kofktu.Example;
Expand Down
2 changes: 1 addition & 1 deletion WKCookieWebView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "WKCookieWebView"
s.version = "1.1.0"
s.version = "1.1.1"
s.summary = "WKCookieWebView"

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion WKCookieWebView/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<string>1.1.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
11 changes: 2 additions & 9 deletions WKCookieWebView/WKCookieWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ open class WKCookieWebView: WKWebView {

private func update(with cachedCookies: [HTTPCookie]?, documentCookie: String, host: String) {
let cookieValues = documentCookie.components(separatedBy: "; ")
var cachedCookies: [HTTPCookie]? = cachedCookies

for value in cookieValues {
var comps = value.components(separatedBy: "=")
Expand All @@ -114,12 +113,12 @@ open class WKCookieWebView: WKWebView {

properties[.value] = cookieValue

self.delete(cookie: localCookie)

if let cookie = HTTPCookie(properties: properties) {
self.set(cookie: cookie)
self.onUpdateCookieStorage?(self)
}
} else if let index = cachedCookies?.index(of: localCookie) {
cachedCookies?.remove(at: index)
}
} else {
if !cookieName.isEmpty && !cookieValue.isEmpty {
Expand All @@ -138,12 +137,6 @@ open class WKCookieWebView: WKWebView {
}
}
}

// Delete cookies with the same name
cachedCookies?.forEach {
self.delete(cookie: $0)
self.onUpdateCookieStorage?(self)
}
}

private func update(cookies: [HTTPCookie]?) {
Expand Down

0 comments on commit ee89a42

Please sign in to comment.