[MediaWiki-commits] [Gerrit] point to new location of localized resources - change (translatewiki)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/250979 Change subject: point to new location of localized resources .. point to new location of localized resources Now under the "Wikipedia/Localizations" folder. Change-Id: If8cdd5a1c1b7f87f47b84ece4a65a2da6cbf0cac --- M groups/Wikimedia/WikimediaMobile-ios.yaml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/79/250979/1 diff --git a/groups/Wikimedia/WikimediaMobile-ios.yaml b/groups/Wikimedia/WikimediaMobile-ios.yaml index 95a8057..b787035 100644 --- a/groups/Wikimedia/WikimediaMobile-ios.yaml +++ b/groups/Wikimedia/WikimediaMobile-ios.yaml @@ -21,7 +21,7 @@ FILES: class: AppleFFS - sourcePattern: "%GROUPROOT%/wikipedia-ios/Wikipedia/%CODE%.lproj/Localizable.strings" + sourcePattern: "%GROUPROOT%/wikipedia-ios/Wikipedia/Localizations/%CODE%.lproj/Localizable.strings" --- BASIC: @@ -34,7 +34,7 @@ FILES: class: AppleFFS - sourcePattern: "%GROUPROOT%/wikipedia-ios/Wikipedia/%CODE%.lproj/InfoPlist.strings" + sourcePattern: "%GROUPROOT%/wikipedia-ios/Wikipedia/Localizations/%CODE%.lproj/InfoPlist.strings" --- BASIC: -- To view, visit https://gerrit.wikimedia.org/r/250979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8cdd5a1c1b7f87f47b84ece4a65a2da6cbf0cac Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Bgerstle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adds an apple-app-site-association file used to support iOS ... - change (operations/mediawiki-config)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/250897 Change subject: adds an apple-app-site-association file used to support iOS deep-linking .. adds an apple-app-site-association file used to support iOS deep-linking Bug: T111829 The goal is for the mobile and desktop sites to serve this file from root (over SSH). Change-Id: I95e68181f10d83d4115d48a241387e47217cd21d --- A docroot/wikipedia.org/apple-app-site-association 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/97/250897/1 diff --git a/docroot/wikipedia.org/apple-app-site-association b/docroot/wikipedia.org/apple-app-site-association new file mode 100644 index 000..5c90951 --- /dev/null +++ b/docroot/wikipedia.org/apple-app-site-association @@ -0,0 +1 @@ +git clone ssh://bgers...@gerrit.wikimedia.org:29418/operations/mediawiki-config \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/250897 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95e68181f10d83d4115d48a241387e47217cd21d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Bgerstle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move wikipedia-ios config to GitHub & remove Main_iPhone loc... - change (translatewiki)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/239399 Change subject: move wikipedia-ios config to GitHub & remove Main_iPhone localizations .. move wikipedia-ios config to GitHub & remove Main_iPhone localizations == YAML changes Main_iPhone has been broken up into separate .xib files, and all localization is done programmatically via key/value pairs in Localizable.strings. == Repo changes - Project was moved into the GIT_PROJECTS array in the repocommit & repoupdate files - URL in REPOCONF was changed to point to GitHub using git:// protocol Change-Id: Ice6b97b8cb2318ca46d3c5c95296dd1c4c4577f7 --- M REPOCONF M bin/repocommit M bin/repoupdate M groups/Wikimedia/WikimediaMobile-ios.yaml 4 files changed, 6 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/99/239399/1 diff --git a/REPOCONF b/REPOCONF index 4aaf67b..3f3195a 100644 --- a/REPOCONF +++ b/REPOCONF @@ -44,6 +44,6 @@ REPO_WIKIEDUDASHBOARD=git://github.com/WikiEducationFoundation/WikiEduDashboard.git REPO_WIKIMANIA=https://gerrit.wikimedia.org/r/wikimedia/wikimania-scholarships REPO_WIKIPEDIAANDROID=https://gerrit.wikimedia.org/r/apps/android/wikipedia -REPO_WIKIPEDIAIOS=https://gerrit.wikimedia.org/r/apps/ios/wikipedia +REPO_WIKIPEDIAIOS=git://github.com/wikimedia/wikipedia-ios.git REPO_WIKISOURCEMOBILE=git://github.com/wikimedia/WikisourceMobile.git REPO_WIKTIONARYMOBILE=git://github.com/wikimedia/WiktionaryMobile.git diff --git a/bin/repocommit b/bin/repocommit index dfcc1a4..aaf26a7 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -57,7 +57,8 @@ wikiblame \ wikiedudashboard \ WikisourceMobile \ -WiktionaryMobile" +WiktionaryMobile \ +wikipedia-ios" for i in $GITPROJECTS; do if [ "$i" = "$PROJECT" ] @@ -83,8 +84,7 @@ crosswatch \ pywikibot \ wikimania \ -wikipedia-android \ -wikipedia-ios" +wikipedia-android" for i in $GERRITPROJECTS; do if [ "$i" = "$PROJECT" ] diff --git a/bin/repoupdate b/bin/repoupdate index 39eda6e..e7edc3d 100755 --- a/bin/repoupdate +++ b/bin/repoupdate @@ -62,7 +62,8 @@ vicuna \ waymarked-trails-site \ wikiblame \ -wikimania" +wikimania \ +wikipedia-ios" for i in $GITUPDATEPROJECTS; do if [ "$i" = "$PROJECT" ] @@ -78,7 +79,6 @@ int-orphantalk \ wikiedudashboard \ wikipedia-android \ -wikipedia-ios \ WikisourceMobile \ WiktionaryMobile" diff --git a/groups/Wikimedia/WikimediaMobile-ios.yaml b/groups/Wikimedia/WikimediaMobile-ios.yaml index c2b4d71..18c948f 100644 --- a/groups/Wikimedia/WikimediaMobile-ios.yaml +++ b/groups/Wikimedia/WikimediaMobile-ios.yaml @@ -45,25 +45,6 @@ MANGLER: prefix: wikipedia-ios-ui- -FILES: - class: AppleFFS - sourcePattern: "%GROUPROOT%/wikipedia-ios/Wikipedia/%CODE%.lproj/Main_iPhone.strings" - -TAGS: - ignored: -- "wikipedia-ios-ui-8HR-Gs-iaC.normalTitle" -- "wikipedia-ios-ui-UVB-P9-soS.normalTitle" -- "wikipedia-ios-ui-atP-34-Uka.normalTitle" -- "wikipedia-ios-ui-cq9-Zs-YsN.normalTitle" -- "wikipedia-ios-ui-aCV-ih-PXn.text" -- "wikipedia-ios-ui-cbH-8H-z54.text" -- "wikipedia-ios-ui-djd-0J-VZY.text" -- "wikipedia-ios-ui-jxY-ej-I9e.text" -- "wikipedia-ios-ui-nI1-bn-0Ii.text" -- "wikipedia-ios-ui-SER-n4-DZC.text" -- "wikipedia-ios-ui-Vkd-3W-cSt.text" -- "wikipedia-ios-ui-XkB-Xo-Xq0.text" - --- BASIC: icon: wiki://Wikipedia-logo-v2.svg -- To view, visit https://gerrit.wikimedia.org/r/239399 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice6b97b8cb2318ca46d3c5c95296dd1c4c4577f7 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Bgerstle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add notifs for #wikimedia-ios room - change (labs...wikibugs2)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/236050 Change subject: add notifs for #wikimedia-ios room .. add notifs for #wikimedia-ios room Change-Id: I8189b8fd21e3e8bfc99768def767b4149b8ae1a1 --- M channels.yaml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 refs/changes/50/236050/1 diff --git a/channels.yaml b/channels.yaml index b08e529..2548e1a 100644 --- a/channels.yaml +++ b/channels.yaml @@ -189,5 +189,8 @@ "#wikimedia-xtools": - Tool-Labs-xTools +"#wikimedia-ios": +- Wikipedia-iOS-.* + firehose-channel: '#mediawiki-feed' default-channel: '#wikimedia-dev' -- To view, visit https://gerrit.wikimedia.org/r/236050 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8189b8fd21e3e8bfc99768def767b4149b8ae1a1 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikibugs2 Gerrit-Branch: master Gerrit-Owner: Bgerstle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update support url - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226979 Change subject: update support url .. update support url Change-Id: I5e6457e4c1baa3205cd3fda27028eb89d5df15b5 --- M fastlane/metadata/en-US/support_url.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/79/226979/1 diff --git a/fastlane/metadata/en-US/support_url.txt b/fastlane/metadata/en-US/support_url.txt index 89310b9..5fc3501 100644 --- a/fastlane/metadata/en-US/support_url.txt +++ b/fastlane/metadata/en-US/support_url.txt @@ -1 +1 @@ -https://www.mediawiki.org/wiki/Wikimedia_Apps/FAQ +https://www.mediawiki.org/wiki/Wikimedia_Apps/iOS_FAQ -- To view, visit https://gerrit.wikimedia.org/r/226979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e6457e4c1baa3205cd3fda27028eb89d5df15b5 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix gallery image owner label overflow - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226726 Change subject: fix gallery image owner label overflow .. fix gallery image owner label overflow Needed to add tail truncation to attributed string attributes (since it attributes were overriding UIButton.titleLabel.lineBreakMode), as well as adding a = standard trailing constraint to the button. See Phab ticket for screencaps of the fix. Bug: T106174 Change-Id: I73e51682200dea5186e9e6e0a6c5f06d79a837a5 --- M Wikipedia.xcodeproj/project.pbxproj D Wikipedia/Categories/NSParagraphStyle+WMFNaturalAlignmentStyle.m R Wikipedia/Categories/NSParagraphStyle+WMFParagraphStyles.h A Wikipedia/Categories/NSParagraphStyle+WMFParagraphStyles.m M Wikipedia/View Controllers/Image Gallery/WMFImageGalleryDetailOverlayView.m M Wikipedia/View Controllers/Image Gallery/WMFImageGalleryDetailOverlayView.xib 6 files changed, 51 insertions(+), 37 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/26/226726/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 40d3040..48f6477 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -230,7 +230,6 @@ BC0FED751AAA026C002488D7 /* NSArray+BKIndexTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB58F7B1A8D0C8E00465627 /* NSArray+BKIndexTests.m */; }; BC0FED761AAA026C002488D7 /* NSString+WMFHTMLParsingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C983151B1AA5205700E25EE1 /* NSString+WMFHTMLParsingTests.m */; }; BC0FED771AAA026C002488D7 /* WMFImageURLParsingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCBDE0AB1AA76EAC006BD29A /* WMFImageURLParsingTests.m */; }; - BC23759A1AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2375991AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.m */; }; BC23759E1AB8928600B0BAA8 /* WMFDateFormatterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC23759D1AB8928600B0BAA8 /* WMFDateFormatterTests.m */; }; BC2375C11ABB14CC00B0BAA8 /* WMFArticleImageInjectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2375C01ABB14CC00B0BAA8 /* WMFArticleImageInjectionTests.m */; }; BC2CBB8E1AA10F400079A313 /* UIView+WMFFrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2CBB8D1AA10F400079A313 /* UIView+WMFFrameUtils.m */; }; @@ -245,6 +244,7 @@ BC5FE5751B1DFF5400273BC0 /* ArticleFetcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5FE5741B1DFF5400273BC0 /* ArticleFetcherTests.m */; }; BC69C3141AB0C1FF0090B039 /* WMFImageInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */; }; BC6BF4001B19213600362968 /* XCTestCase+WMFLocaleTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6BF3FE1B19209900362968 /* XCTestCase+WMFLocaleTesting.m */; }; + BC725ECF1B628C0300E0A64C /* NSParagraphStyle+WMFParagraphStyles.m in Sources */ = {isa = PBXBuildFile; fileRef = BC725ECE1B628C0300E0A64C /* NSParagraphStyle+WMFParagraphStyles.m */; }; BC7DFCD61AA4E5FE35C3 /* WMFImageURLParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */; }; BC7E4A521B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7E4A511B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m */; }; BC86B9361A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */; }; @@ -773,8 +773,6 @@ BC092BA11B19135700093C59 /* WMFApiJsonResponseSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WMFApiJsonResponseSerializer.m; path = Serializers/WMFApiJsonResponseSerializer.m; sourceTree = group; }; BC092BA61B19189100093C59 /* MWKSiteInfoFetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSiteInfoFetcherTests.m; sourceTree = group; }; BC14F89F1B34B72500860018 /* WikipediaUnitTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WikipediaUnitTests-Prefix.pch; sourceTree = group; }; - BC2375981AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSParagraphStyle+WMFNaturalAlignmentStyle.h; sourceTree = group; }; - BC2375991AB78D8A00B0BAA8 /*
[MediaWiki-commits] [Gerrit] fix nil handling in langlink responses - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226923 Change subject: fix nil handling in langlink responses .. fix nil handling in langlink responses When we get a response from langlinks where the langlinks field is absent (instead of empty) for a given page, we need to gracefully return an empty array. Bug: T106853 Change-Id: I778fc261e1a77a92b653d90782e885c01e67d464 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Networking/Fetchers/MWKLanguageLinkFetcher.m M Wikipedia/Networking/Serializers/MWKLanguageLinkResponseSerializer.h M Wikipedia/Networking/Serializers/MWKLanguageLinkResponseSerializer.m M Wikipedia/Networking/Serializers/WMFApiJsonResponseSerializer.m A WikipediaUnitTests/MWKLanguageLinkResponseSerializerTests.m 6 files changed, 50 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/23/226923/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 48f6477..1442d21 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -245,6 +245,7 @@ BC69C3141AB0C1FF0090B039 /* WMFImageInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */; }; BC6BF4001B19213600362968 /* XCTestCase+WMFLocaleTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6BF3FE1B19209900362968 /* XCTestCase+WMFLocaleTesting.m */; }; BC725ECF1B628C0300E0A64C /* NSParagraphStyle+WMFParagraphStyles.m in Sources */ = {isa = PBXBuildFile; fileRef = BC725ECE1B628C0300E0A64C /* NSParagraphStyle+WMFParagraphStyles.m */; }; + BC725ED21B62DADD00E0A64C /* MWKLanguageLinkResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC725ED11B62DADD00E0A64C /* MWKLanguageLinkResponseSerializerTests.m */; }; BC7DFCD61AA4E5FE35C3 /* WMFImageURLParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */; }; BC7E4A521B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7E4A511B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m */; }; BC86B9361A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */; }; @@ -799,6 +800,7 @@ BC6FEAE01A9B7EFD00A1D890 /* WMFCodingStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFCodingStyle.m; sourceTree = group; }; BC725ECD1B628C0300E0A64C /* NSParagraphStyle+WMFParagraphStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSParagraphStyle+WMFParagraphStyles.h; sourceTree = group; }; BC725ECE1B628C0300E0A64C /* NSParagraphStyle+WMFParagraphStyles.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSParagraphStyle+WMFParagraphStyles.m; sourceTree = group; }; + BC725ED11B62DADD00E0A64C /* MWKLanguageLinkResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKLanguageLinkResponseSerializerTests.m; sourceTree = group; }; BC7A4A231B17B3510003E73E /* NSObjectUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSObjectUtilities.h; sourceTree = group; }; BC7ACB621AB34C9C00791497 /* WMFAsyncTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFAsyncTestCase.h; path = ../WMFAsyncTestCase.h; sourceTree = group; }; BC7ACB631AB34C9C00791497 /* WMFAsyncTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WMFAsyncTestCase.m; path = ../WMFAsyncTestCase.m; sourceTree = group; }; @@ -2152,6 +2154,7 @@ BC092BA61B19189100093C59 /* MWKSiteInfoFetcherTests.m */, BC7E4A511B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m */, BC905BCF1B60391F0010227E /* MWKLanguageLinkFetcherTests.m */, + BC725ED11B62DADD00E0A64C /* MWKLanguageLinkResponseSerializerTests.m */, ); name = Tests; path = WikipediaUnitTests; @@ -2997,6 +3000,7 @@ 04F1226A1ACB822D002FC3B5 /* NSString+FormattedAttributedStringTests.m in Sources */, BCCED2D01AE03BE20094EB7E /* MWKSectionListTests.m in Sources */, BC7E4A521B34B53E00EECD8B /*
[MediaWiki-commits] [Gerrit] add API error handling to articlefetcher - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226925 Change subject: add API error handling to articlefetcher .. add API error handling to articlefetcher Bug: T102643 Change-Id: I8f434b1e0e4d8d2c7a7647fd7e46a918e008f78a --- M Wikipedia/Networking/Fetchers/ArticleFetcher.m M Wikipedia/Networking/WMFNetworkUtilities.m 2 files changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/25/226925/1 diff --git a/Wikipedia/Networking/Fetchers/ArticleFetcher.m b/Wikipedia/Networking/Fetchers/ArticleFetcher.m index 53ba3ca..25b9f65 100644 --- a/Wikipedia/Networking/Fetchers/ArticleFetcher.m +++ b/Wikipedia/Networking/Fetchers/ArticleFetcher.m @@ -81,12 +81,17 @@ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ //NSLog(@JSON: %@, responseObject); [[MWNetworkActivityIndicatorManager sharedManager] pop]; +// Clear any MCCMNC header - needed because manager is a singleton. +[self removeMCCMNCHeaderFromRequestSerializer:manager.requestSerializer]; // Convert the raw NSData response to a dictionary. NSDictionary* responseDictionary = [self dictionaryFromDataResponse:localResponseObject]; - -// Clear any MCCMNC header - needed because manager is a singleton. -[self removeMCCMNCHeaderFromRequestSerializer:manager.requestSerializer]; +id error = responseDictionary[@error]; +if (error) { +NSError* apiError = WMFErrorForApiErrorObject(error); +[self finishWithError:apiError fetchedData:nil]; +return; +} @try { [self.article importMobileViewJSON:responseDictionary[@mobileview]]; diff --git a/Wikipedia/Networking/WMFNetworkUtilities.m b/Wikipedia/Networking/WMFNetworkUtilities.m index 366a317..378537e 100644 --- a/Wikipedia/Networking/WMFNetworkUtilities.m +++ b/Wikipedia/Networking/WMFNetworkUtilities.m @@ -24,8 +24,8 @@ void (^ maybeMapApiToUserInfo)(NSString*, NSString*) = ^(NSString* userInfoKey, NSString* apiErrorKey) { [userInfoBuilder wmf_maybeSetObject:apiError[apiErrorKey] forKey:userInfoKey]; }; -maybeMapApiToUserInfo(NSLocalizedDescriptionKey, @code); -maybeMapApiToUserInfo(NSLocalizedFailureReasonErrorKey, @info); +maybeMapApiToUserInfo(NSLocalizedFailureReasonErrorKey, @code); +maybeMapApiToUserInfo(NSLocalizedDescriptionKey, @info); maybeMapApiToUserInfo(NSLocalizedRecoverySuggestionErrorKey, @*); return [NSError errorWithDomain:WMFNetworkingErrorDomain code:WMFNetworkingError_APIError userInfo:userInfoBuilder]; } -- To view, visit https://gerrit.wikimedia.org/r/226925 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f434b1e0e4d8d2c7a7647fd7e46a918e008f78a Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use correct site when loading search results - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226926 Change subject: use correct site when loading search results .. use correct site when loading search results Change-Id: Iddcc803914758623a23d25895635eee81c1a2bfe --- M Wikipedia/View Controllers/SearchResults/SearchResultsController.m 1 file changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/26/226926/1 diff --git a/Wikipedia/View Controllers/SearchResults/SearchResultsController.m b/Wikipedia/View Controllers/SearchResults/SearchResultsController.m index d1d6d3c..b51ce2a 100644 --- a/Wikipedia/View Controllers/SearchResults/SearchResultsController.m +++ b/Wikipedia/View Controllers/SearchResults/SearchResultsController.m @@ -540,7 +540,7 @@ return (self.type == WMFSearchResultsControllerTypeReadMore); } -- (NSString*)getSearchLanguage { +- (NSString*)searchLanguage { if ([self isReadMore]) { return [SessionSingleton sharedInstance].currentArticleSite.language; } else { @@ -548,11 +548,15 @@ } } +- (MWKSite*)searchSite { +return [[MWKSite alloc] initWithLanguage:[self searchLanguage]]; +} + - (void)performSupplementalFullTextSearchForTerm:(NSString*)searchTerm { (void)[[SearchResultFetcher alloc] initAndSearchForTerm:searchTerm searchType:SEARCH_TYPE_IN_ARTICLES searchReason:SEARCH_REASON_SUPPLEMENT_PREFIX_WITH_FULL_TEXT - language:[self getSearchLanguage] + language:[self searchLanguage] maxResults:[self maxResultsAdjustedForExcludedArticles] withManager:[QueuesSingleton sharedInstance].searchResultsFetchManager thenNotifyDelegate:self]; @@ -569,7 +573,7 @@ (void)[[SearchResultFetcher alloc] initAndSearchForTerm:searchTerm searchType:SEARCH_TYPE_TITLES searchReason:reason - language:[self getSearchLanguage] + language:[self searchLanguage] maxResults:[self maxResultsAdjustedForExcludedArticles] withManager:[QueuesSingleton sharedInstance].searchResultsFetchManager thenNotifyDelegate:self]; @@ -646,17 +650,16 @@ [self.searchFunnel logSearchResultTap]; } -- (void)loadArticleWithTitle:(NSString*)title { -if ([title length] == 0) { +- (void)loadArticleWithTitle:(NSString*)titleText { +if ([titleText length] == 0) { return; } [self saveSearchTermToRecentList]; -// Set CurrentArticleTitle so web view knows what to load. -title = [title wmf_stringByReplacingUndrescoresWithSpaces]; +titleText = [titleText wmf_stringByReplacingUndrescoresWithSpaces]; -[NAV loadArticleWithTitle:[[SessionSingleton sharedInstance].searchSite titleWithString:title] +[NAV loadArticleWithTitle:[[self searchSite] titleWithString:titleText] animated:YES discoveryMethod:MWKHistoryDiscoveryMethodSearch popToWebVC:YES]; -- To view, visit https://gerrit.wikimedia.org/r/226926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iddcc803914758623a23d25895635eee81c1a2bfe Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix crash when saving empty/nil title - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226644 Change subject: fix crash when saving empty/nil title .. fix crash when saving empty/nil title Bug: T106028 Change-Id: I8f52107717fd301c89bdd0e3022e53d1862fbcd2 --- M MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m M MediaWikiKit/MediaWikiKit/MWKSavedPageList.h M MediaWikiKit/MediaWikiKit/MWKSavedPageList.m M MediaWikiKit/MediaWikiKit/MediaWikiKit.h A MediaWikiKit/MediaWikiKit/NSError+MWKErrors.h A MediaWikiKit/MediaWikiKit/NSError+MWKErrors.m A MediaWikiKit/MediaWikiKitTests/MWKSavedPageListTests.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/EventLogging/SavedPagesFunnel.h M Wikipedia/EventLogging/SavedPagesFunnel.m M Wikipedia/Global.h M Wikipedia/Session/SessionSingleton.h M Wikipedia/Session/SessionSingleton.m M Wikipedia/View Controllers/WebView/WebViewController.m A Wikipedia/mw-utils/WMFOutParamUtils.h A WikipediaUnitTests/WMFSafeAssignTests.m 16 files changed, 284 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/44/226644/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m b/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m index 9bfa6e4..72b26b8 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m +++ b/MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m @@ -47,4 +47,10 @@ return [NSDictionary dictionaryWithDictionary:dict]; } +WMF_SYNTHESIZE_IS_EQUAL(MWKSavedPageEntry, isEqualToSavedEntry:) + +- (BOOL)isEqualToSavedEntry:(MWKSavedPageEntry*)rhs { +return WMF_RHS_PROP_EQUAL(title, isEqualToTitle:); +} + @end diff --git a/MediaWikiKit/MediaWikiKit/MWKSavedPageList.h b/MediaWikiKit/MediaWikiKit/MWKSavedPageList.h index fda336a..fafd391 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSavedPageList.h +++ b/MediaWikiKit/MediaWikiKit/MWKSavedPageList.h @@ -22,6 +22,16 @@ - (MWKSavedPageEntry*)entryForTitle:(MWKTitle*)title; - (BOOL)isSaved:(MWKTitle*)title; +/** + * Toggle the save state for `title`. + * + * @param title Title to toggle state for, either saving or un-saving it. + * @param error Out-param of any error that occurred while toggling save state and saving. + * + * @return The new saved state for `title` (i.e. `YES` if saved, `NO` if not). + */ +- (BOOL)toggleSaveStateForTitle:(MWKTitle*)title error:(NSError**)error; + /// Add a new entry to the saved page list! - (void)addEntry:(MWKSavedPageEntry*)entry; /// Remove one. diff --git a/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m b/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m index 5aeafef..bdce33c 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m +++ b/MediaWikiKit/MediaWikiKit/MWKSavedPageList.m @@ -7,6 +7,7 @@ // #import MediaWikiKit.h +#import NSError+MWKErrors.h @interface MWKSavedPageList () @@ -18,6 +19,21 @@ @implementation MWKSavedPageList +- (BOOL)toggleSaveStateForTitle:(MWKTitle*)title error:(NSError* __autoreleasing*)error { +if (!title.text.length) { +WMFSafeAssign(error, [NSError wmf_emptyTitleError]); +return NO; +} +MWKSavedPageEntry* entry = [self entryForTitle:title]; +if (!entry) { +[self addEntry:[[MWKSavedPageEntry alloc] initWithTitle:title]]; +return YES; +} else { +[self removeEntry:entry]; +return NO; +} +} + - (NSUInteger)length { return [self.entries count]; } diff --git a/MediaWikiKit/MediaWikiKit/MediaWikiKit.h b/MediaWikiKit/MediaWikiKit/MediaWikiKit.h index 2001f21..9072924 100644 --- a/MediaWikiKit/MediaWikiKit/MediaWikiKit.h +++ b/MediaWikiKit/MediaWikiKit/MediaWikiKit.h @@ -10,6 +10,7 @@ #import Foundation/Foundation.h +#import NSError+MWKErrors.h #import MWKDataObject.h #import MWKSiteDataObject.h diff --git a/MediaWikiKit/MediaWikiKit/NSError+MWKErrors.h b/MediaWikiKit/MediaWikiKit/NSError+MWKErrors.h new file mode 100644 index 000..9a2eae4 --- /dev/null +++ b/MediaWikiKit/MediaWikiKit/NSError+MWKErrors.h @@ -0,0 +1,23 @@ +// +// NSError+MWKErrors.h +// Wikipedia +// +// Created by Brian Gerstle on 7/23/15. +// Copyright (c) 2015 Wikimedia Foundation. All rights reserved. +// + +#import Foundation/Foundation.h + +extern NSString* const MWKErrorDomain; + +typedef NS_ENUM (NSInteger, MWKErrorCode) { +MWKEmptyTitleError = 1 +}; + +@interface NSError (MWKErrors) + ++ (instancetype)wmf_emptyTitleError; + ++ (instancetype)wmf_mwkError:(MWKErrorCode)code userInfo:(NSDictionary*)userInfo; + +@end diff --git a/MediaWikiKit/MediaWikiKit/NSError+MWKErrors.m b/MediaWikiKit/MediaWikiKit/NSError+MWKErrors.m new file mode 100644 index 000..17c5cfc --- /dev/null +++ b/MediaWikiKit/MediaWikiKit/NSError+MWKErrors.m @@ -0,0 +1,25 @@ +// +// NSError+MWKErrors.m +// Wikipedia +// +// Created by Brian Gerstle on 7/23/15. +// Copyright (c) 2015 Wikimedia Foundation. All rights reserved. +// + +#import NSError+MWKErrors.h + +NSString* const MWKErrorDomain
[MediaWiki-commits] [Gerrit] un-static face detector - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226649 Change subject: un-static face detector .. un-static face detector We were reusing the face face detector (and its state) across all image objects. This is probably what caused the crash, but at the very least this will remove an unnecessarily-persistent piece of state and prevent threading issues. Bug: T106025 Change-Id: I863a7f49939afd90fc7a631333dd008906a7dde4 --- M MediaWikiKit/MediaWikiKit/MWKImage.m M Wikipedia/Custom Objects/WMFFaceDetector.h M Wikipedia/Custom Objects/WMFFaceDetector.m 3 files changed, 51 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/49/226649/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.m b/MediaWikiKit/MediaWikiKit/MWKImage.m index 75077bf..9f2a0e9 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImage.m +++ b/MediaWikiKit/MediaWikiKit/MWKImage.m @@ -62,14 +62,8 @@ if (!imageData) { imageData = [self asNSData]; } - -static WMFFaceDetector* faceDetector = nil; -if (!faceDetector) { -faceDetector = [[WMFFaceDetector alloc] init]; -} -[faceDetector setImageWithData:imageData]; +WMFFaceDetector* faceDetector = [[WMFFaceDetector alloc] initWithImageData:imageData]; [faceDetector detectFaces]; - self.focalRectsInUnitCoordinatesAsStrings = [faceDetector allFaceBoundsAsStringsNormalizedToUnitRect]; } } diff --git a/Wikipedia/Custom Objects/WMFFaceDetector.h b/Wikipedia/Custom Objects/WMFFaceDetector.h index a3b1338..7a3da4b 100644 --- a/Wikipedia/Custom Objects/WMFFaceDetector.h +++ b/Wikipedia/Custom Objects/WMFFaceDetector.h @@ -3,24 +3,20 @@ @interface WMFFaceDetector : NSObject -@property (nonatomic, strong) CIImage* image; +@property (nonatomic, strong, readonly) CIImage* image; /** - * Set the image property with UIImage - * Useful if you didn't have a CIImage before hand - * Will attempt to use image.CIImage first, then fallback to UIImagePNGRepresentation() + * The `CIFeature` objects representing faces detected by the receiver. * - * @param image the image to use + * This will be `nil` before detection is run, and a non-empty array afterwards. */ -- (void)setImageWithUIImage:(UIImage*)image; +@property (nonatomic, copy, readonly) NSArray* faces; -/** - * Set the image property with NSData - * Useful if you didn't have a CIImage before hand - * - * @param data to create the image from - */ -- (void)setImageWithData:(NSData*)data; +- (instancetype)initWithCIImage:(CIImage*)image NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithUIImage:(UIImage*)image; + +- (instancetype)initWithImageData:(NSData*)data; /** * Detect faces synchronously @@ -33,13 +29,6 @@ * @param completion fired when face detection is completed */ - (void)detectFacesWithCompletionBlock:(dispatch_block_t)completion; - -/** - * All faces - * - * @return An array of CIFaceFeature - */ -- (NSArray*)allFaces; /** * Get an array of the bounds of all the faces. Each bounds will be normalized diff --git a/Wikipedia/Custom Objects/WMFFaceDetector.m b/Wikipedia/Custom Objects/WMFFaceDetector.m index 426d743..ed3bbee 100644 --- a/Wikipedia/Custom Objects/WMFFaceDetector.m +++ b/Wikipedia/Custom Objects/WMFFaceDetector.m @@ -7,39 +7,53 @@ @interface WMFFaceDetector () -@property (strong, atomic) CIDetector* detector; -@property (strong, atomic) NSArray* faces; -@property (assign, atomic) BOOL faceDetectionHasRan; +@property (strong, nonatomic) CIDetector* detector; +@property (strong, nonatomic) CIImage* image; +@property (readwrite, copy, nonatomic) NSArray* faces; +@property (assign, nonatomic) BOOL didDetectFaces; @end @implementation WMFFaceDetector ++ (CIDetector*)sharedDetector { +static CIDetector* sharedDetector; +static dispatch_once_t onceToken; +dispatch_once(onceToken, ^{ +sharedDetector = [CIDetector detectorOfType:CIDetectorTypeFace +context:nil +options:@{ + CIDetectorAccuracy: CIDetectorAccuracyLow, + CIDetectorMinFeatureSize: @(0.15) + }]; +}); +return sharedDetector; +} + - (instancetype)init { +return [self initWithCIImage:nil]; +} + +- (instancetype)initWithImageData:(NSData*)data { +NSParameterAssert(data.length); +return [self initWithCIImage:[[CIImage alloc] initWithData:data]]; +} + +- (instancetype)initWithUIImage:(UIImage*)image { +return [self initWithCIImage:image.CIImage ? : [[CIImage alloc] initWithCGImage:image.CGImage]]; +} + +- (instancetype)initWithCIImage:(CIImage*)image { +NSParameterAssert(image); +if (!image) { +return nil; +} self = [super init]; if (self)
[MediaWiki-commits] [Gerrit] fix crash due to weak promise ref - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226284 Change subject: fix crash due to weak promise ref .. fix crash due to weak promise ref Change-Id: I64a5986c4d68fc2cd38cbec98114d0f453fa73ef --- M Wikipedia/UI-V5/WMFArticleViewController.m 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/84/226284/1 diff --git a/Wikipedia/UI-V5/WMFArticleViewController.m b/Wikipedia/UI-V5/WMFArticleViewController.m index 8bf386c..eb1012d 100644 --- a/Wikipedia/UI-V5/WMFArticleViewController.m +++ b/Wikipedia/UI-V5/WMFArticleViewController.m @@ -55,7 +55,7 @@ @property (nonatomic, strong) WMFArticleFetcher* articleFetcher; /// Promise representing the request for the current article's data. -@property (nonatomic, weak, nullable) AnyPromise* articleRequest; +@property (nonatomic, strong, nullable) AnyPromise* articleRequest; @property (nonatomic, strong) WMFSearchFetcher* readMoreFetcher; @property (nonatomic, strong) WMFSearchResults* readMoreResults; @@ -189,6 +189,10 @@ // only do error handling if not presenting gallery DDLogError(@Article Fetch Error: %@, [error localizedDescription]); } +}) +.finally(^{ +@strongify(self); +self.articleRequest = nil; }); } -- To view, visit https://gerrit.wikimedia.org/r/226284 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64a5986c4d68fc2cd38cbec98114d0f453fa73ef Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: 5.0 Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix crash when fetching title with empty text - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226429 Change subject: fix crash when fetching title with empty text .. fix crash when fetching title with empty text pass an error instead of silently failing or crashing Bug: T106026 Change-Id: Ie95e4410097d3597ac7f46da5d054c4334f7e33e --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Networking/Fetchers/MWKLanguageLinkFetcher.h M Wikipedia/Networking/Fetchers/MWKLanguageLinkFetcher.m M Wikipedia/Networking/WMFNetworkUtilities.h A WikipediaUnitTests/MWKLanguageLinkFetcherTests.m M WikipediaUnitTests/WMFAsyncTestCase.h M WikipediaUnitTests/WMFAsyncTestCase.m 7 files changed, 111 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/29/226429/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 8b3b594..ae8fc76 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -249,6 +249,7 @@ BC86B9361A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */; }; BC86B93D1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93C1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m */; }; BC86B9401A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */; }; + BC905BD01B60391F0010227E /* MWKLanguageLinkFetcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC905BCF1B60391F0010227E /* MWKLanguageLinkFetcherTests.m */; }; BC90C4BE1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = BC90C4BD1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.m */; }; BC92A7711AFA841C003C4212 /* MWKSection+WMFSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC92A7701AFA841C003C4212 /* MWKSection+WMFSharing.m */; }; BC92A7731AFA88D3003C4212 /* MWKSection+WMFSharingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC92A7721AFA88D3003C4212 /* MWKSection+WMFSharingTests.m */; }; @@ -809,6 +810,7 @@ BC86B93C1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICollectionViewFlowLayout+NSCopying.m; sourceTree = group; }; BC86B93E1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICollectionViewFlowLayout+WMFItemSizeThatFits.h; sourceTree = group; }; BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICollectionViewFlowLayout+WMFItemSizeThatFits.m; sourceTree = group; }; + BC905BCF1B60391F0010227E /* MWKLanguageLinkFetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKLanguageLinkFetcherTests.m; sourceTree = group; }; BC90C4BC1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWindow+WMFMainScreenWindow.h; sourceTree = group; }; BC90C4BD1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIWindow+WMFMainScreenWindow.m; sourceTree = group; }; BC92A76E1AFA83D2003C4212 /* WMFSharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFSharing.h; path = ShareCard/WMFSharing.h; sourceTree = group; }; @@ -2146,6 +2148,7 @@ BC5FE5741B1DFF5400273BC0 /* ArticleFetcherTests.m */, BC092BA61B19189100093C59 /* MWKSiteInfoFetcherTests.m */, BC7E4A511B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m */, + BC905BCF1B60391F0010227E /* MWKLanguageLinkFetcherTests.m */, ); name = Tests; path = WikipediaUnitTests; @@ -2985,6 +2988,7 @@ BC23759E1AB8928600B0BAA8 /* WMFDateFormatterTests.m in Sources */, BC0FED771AAA026C002488D7 /* WMFImageURLParsingTests.m in Sources */, BCEC778F1AC9AEC800D9DDA5 /* MWKImage+AssociationTestUtils.m in
[MediaWiki-commits] [Gerrit] fix list crashes, history saves from search, KVO cycles - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226233 Change subject: fix list crashes, history saves from search, KVO cycles .. fix list crashes, history saves from search, KVO cycles History list controller was causing crashes when getting KVO callbacks before the collectionView was loaded. Search viewController wasn't configuring its results controller w/ saved page list or recent page list, so history updates weren't occurring from the search view. Broke cycles between self - KVOController - observationBlock - self by using KVOControllerUnretained (doesn't retain self) and/or using the observer argument passed to the block to avoid referencing self. Bug: T106420 Change-Id: I404db20c89225763f683282fd790ed8baeec36f3 --- M MediaWikiKit/MediaWikiKit/MWKList.m M Wikipedia/UI-V5/WMFAppViewController.m M Wikipedia/UI-V5/WMFArticleListCollectionViewController.m M Wikipedia/UI-V5/WMFRecentPagesDataSource.m M Wikipedia/UI-V5/WMFSavedPagesDataSource.m M Wikipedia/UI-V5/WMFSearchViewController.m 6 files changed, 77 insertions(+), 50 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/33/226233/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKList.m b/MediaWikiKit/MediaWikiKit/MWKList.m index 1f2a743..fb9757a 100644 --- a/MediaWikiKit/MediaWikiKit/MWKList.m +++ b/MediaWikiKit/MediaWikiKit/MWKList.m @@ -136,7 +136,6 @@ } - (void)performSaveWithCompletion:(dispatch_block_t)completion error:(WMFErrorHandler)errorHandler { -//nonop if (errorHandler) { errorHandler([NSError wmf_unableToSaveErrorWithReason:@Save is unimplemented for this list]); } diff --git a/Wikipedia/UI-V5/WMFAppViewController.m b/Wikipedia/UI-V5/WMFAppViewController.m index 4380f7c..5a5b2af 100644 --- a/Wikipedia/UI-V5/WMFAppViewController.m +++ b/Wikipedia/UI-V5/WMFAppViewController.m @@ -64,12 +64,18 @@ - (void)configureSavedViewController { [self configureArticleListController:self.savedArticlesViewController]; -self.savedArticlesViewController.dataSource = [[WMFSavedPagesDataSource alloc] initWithSavedPagesList:[self userDataStore].savedPageList]; +if (!self.savedArticlesViewController.dataSource) { +self.savedArticlesViewController.dataSource = +[[WMFSavedPagesDataSource alloc] initWithSavedPagesList:[self userDataStore].savedPageList]; +} } - (void)configureRecentViewController { [self configureArticleListController:self.recentArticlesViewController]; -self.recentArticlesViewController.dataSource = [[WMFRecentPagesDataSource alloc] initWithRecentPagesList:[self userDataStore].historyList]; +if (!self.recentArticlesViewController.dataSource) { +self.recentArticlesViewController.dataSource = +[[WMFRecentPagesDataSource alloc] initWithRecentPagesList:[self userDataStore].historyList]; +} } #pragma mark - Public diff --git a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m index 6ec6410..e50f8b4 100644 --- a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m +++ b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m @@ -89,6 +89,22 @@ #pragma mark - Accessors +#define WMFWarnIfNilOnReturn(prop, type) \ +- (type*)prop { \ +if (!_ ## prop) { DDLogWarn(@%@ not configured with #prop !, [self debugDescription]); } \ +return _ ## prop; \ +} + +WMFWarnIfNilOnReturn(dataStore, MWKDataStore) + +WMFWarnIfNilOnReturn(recentPages, MWKHistoryList) + +WMFWarnIfNilOnReturn(savedPages, MWKSavedPageList) + +- (NSString*)debugDescription { +return [NSString stringWithFormat:@%@ dataSourceClass: %@, self, [self.dataSource class]]; +} + - (TGLStackedLayout*)stackedLayout { if (!_stackedLayout) { TGLStackedLayout* layout = [[TGLStackedLayout alloc] init]; @@ -129,21 +145,9 @@ [self updateListForMode:self.mode animated:NO completion:NULL]; } -- (void)viewWillAppear:(BOOL)animated { -[super viewWillAppear:animated]; -} - -- (void)viewDidAppear:(BOOL)animated { -[super viewDidAppear:animated]; -} - - (void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; [self updateCellSizeBasedOnViewFrame]; -} - -- (BOOL)shouldAutorotate { -return YES; } - (NSUInteger)supportedInterfaceOrientations { @@ -191,7 +195,8 @@ if (cell.viewController == nil) { WMFArticleViewController* vc = -[WMFArticleViewController articleViewControllerWithDataStore:self.dataStore savedPages:self.savedPages]; +[WMFArticleViewController articleViewControllerWithDataStore:self.dataStore + savedPages:self.savedPages]; [vc setMode:WMFArticleControllerModeList animated:NO]; [cell setViewControllerAndAddViewToContentView:vc]; } @@ -243,7 +248,8 @@
[MediaWiki-commits] [Gerrit] fix MWKList KVO and article observation - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/226019 Change subject: fix MWKList KVO and article observation .. fix MWKList KVO and article observation Change-Id: I6e02b8a5b82e5daaf9cac5250fa9f835bc495770 --- M MediaWikiKit/MediaWikiKit/MWKList.m M MediaWikiKit/MediaWikiKitTests/MWKListTests.m M Wikipedia/Networking/Fetchers/ArticleFetcher.h M Wikipedia/UI-V5/WMFArticleFetcher.h M Wikipedia/UI-V5/WMFArticleFetcher.m M Wikipedia/UI-V5/WMFArticleViewController.m 6 files changed, 51 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/19/226019/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKList.m b/MediaWikiKit/MediaWikiKit/MWKList.m index 02c7c3a..1f2a743 100644 --- a/MediaWikiKit/MediaWikiKit/MWKList.m +++ b/MediaWikiKit/MediaWikiKit/MWKList.m @@ -19,7 +19,7 @@ - (instancetype)init { self = [super init]; if (self) { -self.mutableEntries = [NSMutableArray array]; +_mutableEntries = [NSMutableArray array]; self.entriesByTitle = [NSMutableDictionary dictionary]; } return self; @@ -144,6 +144,10 @@ #pragma mark - KVO +- (NSMutableArray*)mutableEntries { +return [self mutableArrayValueForKey:@entries]; +} + - (NSUInteger)countOfEntries { return [_mutableEntries count]; } diff --git a/MediaWikiKit/MediaWikiKitTests/MWKListTests.m b/MediaWikiKit/MediaWikiKitTests/MWKListTests.m index 7e33315..6e4ab34 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKListTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKListTests.m @@ -131,4 +131,21 @@ XCTAssertEqual([list countOfEntries], 0, @Should have length 0 after removing all); } +- (void)testKVO { +MWKList* list= [[MWKList alloc] init]; +NSMutableArray* observations = [NSMutableArray new]; +[self.KVOController observe:list +keyPath:WMF_SAFE_KEYPATH(list, entries) +options:0 + block:^(id observer, id object, NSDictionary* change) { +[observations addObject:@[change[NSKeyValueChangeKindKey], change[NSKeyValueChangeIndexesKey]]]; +}]; +[list addEntry:self.testObjects[0]]; +[list removeEntry:self.testObjects[0]]; +XCTAssertEqual(observations.count, 2); +XCTAssertEqualObjects(observations[0], (@[@(NSKeyValueChangeInsertion), [NSIndexSet indexSetWithIndex:0]])); +XCTAssertEqualObjects(observations[1], (@[@(NSKeyValueChangeRemoval), [NSIndexSet indexSetWithIndex:0]])); +[self.KVOController unobserve:list]; +} + @end diff --git a/Wikipedia/Networking/Fetchers/ArticleFetcher.h b/Wikipedia/Networking/Fetchers/ArticleFetcher.h index 343918c..95b1d5f 100644 --- a/Wikipedia/Networking/Fetchers/ArticleFetcher.h +++ b/Wikipedia/Networking/Fetchers/ArticleFetcher.h @@ -15,8 +15,4 @@ completionBlock:(WMFArticleHandler)completion errorBlock:(WMFErrorHandler)errorHandler; - - - - @end diff --git a/Wikipedia/UI-V5/WMFArticleFetcher.h b/Wikipedia/UI-V5/WMFArticleFetcher.h index 72b3ead..10b5a03 100644 --- a/Wikipedia/UI-V5/WMFArticleFetcher.h +++ b/Wikipedia/UI-V5/WMFArticleFetcher.h @@ -13,7 +13,7 @@ - (instancetype)initWithDataStore:(MWKDataStore*)dataStore; -- (AnyPromise*)fetchArticleForPageTitle:(MWKTitle*)pageTitle progress:(WMFProgressHandler)progress; +- (AnyPromise*)fetchArticleForPageTitle:(MWKTitle*)pageTitle progress:(WMFProgressHandler __nullable)progress; @end diff --git a/Wikipedia/UI-V5/WMFArticleFetcher.m b/Wikipedia/UI-V5/WMFArticleFetcher.m index 94faf33..727e9be 100644 --- a/Wikipedia/UI-V5/WMFArticleFetcher.m +++ b/Wikipedia/UI-V5/WMFArticleFetcher.m @@ -37,20 +37,14 @@ return _fetcher; } -- (AnyPromise*)fetchArticleForPageTitle:(MWKTitle*)pageTitle progress:(WMFProgressHandler)progress { +- (AnyPromise*)fetchArticleForPageTitle:(MWKTitle*)pageTitle progress:(WMFProgressHandler __nullable)progress { return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { -AFHTTPRequestOperation* operation = [self.fetcher fetchSectionsForTitle:pageTitle inDataStore:self.dataStore withManager:self.operationManager progressBlock:^(CGFloat completionProgress) { -dispatch_async(dispatch_get_main_queue(), ^{ -if (progress) { -progress(completionProgress); -} -}); -} completionBlock:^(MWKArticle* article) { -resolve(article); -} errorBlock:^(NSError* error) { -resolve(error); -}]; - +AFHTTPRequestOperation* operation = [self.fetcher fetchSectionsForTitle:pageTitle + inDataStore:self.dataStore + withManager:self.operationManager +
[MediaWiki-commits] [Gerrit] overlay app icon from dev lane 5.0 version bump - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/224430 Change subject: overlay app icon from dev lane 5.0 version bump .. overlay app icon from dev lane 5.0 version bump - cherry-picked bump lane from master - bumped version to 5.0 - tweaked process-icons to allow for overlaying icon Change-Id: I0a22ea3d62078e858e9cc9e884b1b32ede3f9c31 --- M Pods/Pods.xcodeproj/project.pbxproj M Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Wikipedia-Info.plist M WikipediaUnitTests/Supporting Files/Info.plist M fastlane/Fastfile M fastlane/lib/utils.rb M scripts/process-icons.sh 8 files changed, 6,554 insertions(+), 6,543 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/30/224430/1 -- To view, visit https://gerrit.wikimedia.org/r/224430 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a22ea3d62078e858e9cc9e884b1b32ede3f9c31 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: 5.0 Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Migrate article images from un-migrated save page entries - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/224115 Change subject: Migrate article images from un-migrated save page entries .. Migrate article images from un-migrated save page entries At launch, we start a process which recursively grabs an unmigrated entry from the saved page list and - Reads the article data from the data store - Iterates each image - Moves legacy image data into the disk storage under the new image cache - Marks the entry as migrated - Rinse and repeat... Bug: T101527 Change-Id: I2de490556a7902d7e71e3d179bd8f91cd8e17bf7 --- M MediaWikiKit/MediaWikiKit/MWKArticle.h M MediaWikiKit/MediaWikiKit/MWKArticle.m M MediaWikiKit/MediaWikiKit/MWKDataStore.h M MediaWikiKit/MediaWikiKit/MWKDataStore.m M MediaWikiKit/MediaWikiKit/MWKImage.h M MediaWikiKit/MediaWikiKit/MWKImage.m M MediaWikiKit/MediaWikiKit/MWKImageInfo.h M MediaWikiKit/MediaWikiKit/MWKImageList.h M MediaWikiKit/MediaWikiKit/MWKImageList.m M MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.h M MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m M MediaWikiKit/MediaWikiKit/MWKSavedPageList.h M MediaWikiKit/MediaWikiKit/MWKSavedPageList.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/AppDelegate.m M Wikipedia/Categories/MWKArticle+Convenience.h A Wikipedia/Categories/SDWebImageManager+WMFCacheRemovalWithDebugging.h A Wikipedia/Categories/SDWebImageManager+WMFCacheRemovalWithDebugging.m M Wikipedia/Housekeeping/DataHousekeeping.m A Wikipedia/Housekeeping/WMFBackgroundTaskManager.swift A Wikipedia/Images/SDImageCache+WMFPersistentCache.h A Wikipedia/Images/SDImageCache+WMFPersistentCache.m M Wikipedia/Images/WMFImageController+Debug.swift M Wikipedia/Images/WMFImageController.swift A Wikipedia/Legacy Data Migration/WMFLegacyImageDataMigration.swift M Wikipedia/UI-V5/iPhone_Root.storyboard M Wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m M Wikipedia/Wikipedia-Bridging-Header.h M Wikipedia/mw-utils/WMFLogging.h A WikipediaUnitTests/Fixtures/ArticleWithoutImages.dataexport.json A WikipediaUnitTests/Fixtures/Barack_Obama/Article.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/100px-Seal_of_the_President_of_the_United_States.svg.png/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/100px-Seal_of_the_President_of_the_United_States.svg.png/Image.png A WikipediaUnitTests/Fixtures/Barack_Obama/Images/110px-2004_Illinois_Senate_results.svg.png/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/110px-2004_Illinois_Senate_results.svg.png/Image.png A WikipediaUnitTests/Fixtures/Barack_Obama/Images/115px-President_Barack_Obama.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/115px-President_Barack_Obama.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-BarackObamaportrait.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-BarackObamaportrait.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-Barack_Obama_at_Cairo_University_cropped.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-Barack_Obama_at_Cairo_University_cropped.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-Barack_Obama_playing_basketball_with_members_of_Congress_and_Cabinet_secretaries_2.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-Barack_Obama_playing_basketball_with_members_of_Congress_and_Cabinet_secretaries_2.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-Official_portrait_of_Barack_Obama.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/170px-Official_portrait_of_Barack_Obama.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px--President_Obama_on_Death_of_Osama_bin_Laden.ogv.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px--President_Obama_on_Death_of_Osama_bin_Laden.ogv.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-2004_Illinois_Senate_results.svg.png/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-2004_Illinois_Senate_results.svg.png/Image.png A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-Ann_Dunham_with_father_and_children.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-Ann_Dunham_with_father_and_children.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-Barack_Obama_addresses_joint_session_of_Congress_2009-02-24.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-Barack_Obama_addresses_joint_session_of_Congress_2009-02-24.jpg/Image.plist A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-Barack_Obama_hangout.jpg/Image.jpg A WikipediaUnitTests/Fixtures/Barack_Obama/Images/220px-Barack_Obama_hangout.jpg/Image.plist A
[MediaWiki-commits] [Gerrit] fastlane dev - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/224193 Change subject: fastlane dev .. fastlane dev Change-Id: I3946c5c1a07f4cb1a800e54e713309825443d4b6 --- M Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme M Wikipedia.xcodeproj/project.pbxproj M fastlane/Appfile M fastlane/Fastfile 4 files changed, 48 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/93/224193/1 diff --git a/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme b/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme index bccb329..63388dc 100644 --- a/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme +++ b/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme @@ -39,6 +39,15 @@ ignoresPersistentStateOnLaunch = NO debugDocumentVersioning = YES allowLocationSimulation = YES + MacroExpansion + BuildableReference +BuildableIdentifier = primary +BlueprintIdentifier = 327250458583B0D2978E8C3C +BuildableName = libPods-WikipediaUnitTests-SDWebImage.a +BlueprintName = Pods-WikipediaUnitTests-SDWebImage +ReferencedContainer = container:Pods.xcodeproj + /BuildableReference + /MacroExpansion AdditionalOptions /AdditionalOptions /LaunchAction diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 02360c9..b7ebb01 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -4045,7 +4045,7 @@ -Werror=incompatible-pointer-types, -Werror=incomplete-implementation, ); - WMF_HOCKEYAPP_IDENTIFIER = 76947f174e31a9e33fe67d81ff31732e; + WMF_HOCKEYAPP_IDENTIFIER = 7138507aefac3ee74c295f75a0b857e4; WRAPPER_EXTENSION = app; }; name = Debug; diff --git a/fastlane/Appfile b/fastlane/Appfile index d361e8a..039b63a 100644 --- a/fastlane/Appfile +++ b/fastlane/Appfile @@ -19,5 +19,9 @@ for_lane :store do app_identifier org.wikimedia.wikipedia end + + for_lane :dev do +app_identifier org.wikimedia.wikipedia.developer + end end diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 238639d..0b5c97a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -88,7 +88,38 @@ deliver beta: true end - desc Upload AdHoc build to Hockey. + desc Upload a developer build to Hockey. + lane :dev do +sigh( + adhoc: true, + force: true, + filename: 'build/dev.mobileprovision' +) +# force iTunes file sharing to be enabled (normally disabled for release builds) +ENV['WMF_FORCE_ITUNES_FILE_SHARING'] = '1' +# force debug menu to be shown +ENV['WMF_FORCE_DEBUG_MENU'] = '1' +xcargs= [PROVISIONING_PROFILE=#{Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::SIGH_UDID]}, + # force app ID suffix to developer + APP_ID_SUFFIX=.developer, + # force hockey app ID + WMF_HOCKEYAPP_IDENTIFIER=7138507aefac3ee74c295f75a0b857e4].join ' ' +ipa( + configuration: Release, + scheme: Wikipedia, + embed: 'build/dev.mobileprovision', + xcargs: xcargs +) +hockey( + notes: git_commit_log, + notify: '0', # Do not notify + status: '2', # Make available for download + release_type: '2' # 'alpha' release type +) + end + + + desc Upload AdHoc \Release Candidate\ build to Hockey. lane :rc do sigh( adhoc: true, @@ -100,7 +131,7 @@ # force debug menu to be shown ENV['WMF_FORCE_DEBUG_MENU'] = '1' ipa( - configuration: Wikipedia, + configuration: Release, scheme: Wikipedia, embed: 'build/adhoc.mobileprovision', xcargs: PROVISIONING_PROFILE=#{Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::SIGH_UDID]} @@ -121,7 +152,7 @@ filename: 'build/release.mobileprovision' ) ipa( - configuration: Wikipedia, + configuration: Release, scheme: Wikipedia, embed: 'build/release.mobileprovision', xcargs: PROVISIONING_PROFILE=#{Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::SIGH_UDID]} -- To view, visit https://gerrit.wikimedia.org/r/224193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3946c5c1a07f4cb1a800e54e713309825443d4b6 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: 5.0 Gerrit-Owner: Bgerstle bgers...@wikimedia.org
[MediaWiki-commits] [Gerrit] brute-force fix for schemeless image URLs - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/223787 Change subject: brute-force fix for schemeless image URLs .. brute-force fix for schemeless image URLs also added unit tests for all the NSURL+Extras categories Bug: T102258 Change-Id: Ia44c86e4d648401f7d00c258683eef62d6c7456f --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Categories/NSURL+Extras.h M Wikipedia/Categories/NSURL+Extras.m M Wikipedia/Images/WMFImageController.swift A WikipediaUnitTests/NSURLExtrasTests.m 5 files changed, 105 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/87/223787/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index bbd0cfb..ca4b1d7 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -278,6 +278,7 @@ BC6BF4001B19213600362968 /* XCTestCase+WMFLocaleTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6BF3FE1B19209900362968 /* XCTestCase+WMFLocaleTesting.m */; }; BC7DFCD61AA4E5FE35C3 /* WMFImageURLParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */; }; BC7E4A441B33812700EECD8B /* LanguagesViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC7E4A431B33812700EECD8B /* LanguagesViewController.storyboard */; }; + BC8210CC1B4EB2390010BF7B /* NSURLExtrasTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8210CB1B4EB2390010BF7B /* NSURLExtrasTests.m */; }; BC86B9361A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */; }; BC86B93D1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93C1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m */; }; BC86B9401A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */; }; @@ -884,6 +885,7 @@ BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFImageURLParsing.m; sourceTree = group; }; BC7E4A431B33812700EECD8B /* LanguagesViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LanguagesViewController.storyboard; sourceTree = group; }; BC7E4A491B34A26A00EECD8B /* WMFLogging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WMFLogging.h; sourceTree = group; }; + BC8210CB1B4EB2390010BF7B /* NSURLExtrasTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLExtrasTests.m; sourceTree = group; }; BC86B9341A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperationManager+UniqueRequests.h; sourceTree = group; }; BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperationManager+UniqueRequests.m; sourceTree = group; }; BC86B93B1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICollectionViewFlowLayout+NSCopying.h; sourceTree = group; }; @@ -2321,6 +2323,7 @@ BCAFC5CF1AFD5E7D004615BA /* MWKArticle+WMFSharingTests.m */, BC5FE5741B1DFF5400273BC0 /* ArticleFetcherTests.m */, BC092BA61B19189100093C59 /* MWKSiteInfoFetcherTests.m */, + BC8210CB1B4EB2390010BF7B /* NSURLExtrasTests.m */, ); name = Tests; path = WikipediaUnitTests; @@ -3182,6 +3185,7 @@ BCB8487B1DF90077EC24 /* WMFRoundingUtilitiesTests.m in Sources */, BC0FED6F1AAA0268002488D7 /* MWKImageInfo+MWKImageComparisonTests.m in Sources */, BC0FED621AAA0263002488D7 /* WMFCodingStyle.m in Sources */, + BC8210CC1B4EB2390010BF7B /* NSURLExtrasTests.m in Sources */, BC0FED741AAA026C002488D7 /* CircularBitwiseRotationTests.m in Sources */,
[MediaWiki-commits] [Gerrit] dismiss search keyboard on scroll - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/223965 Change subject: dismiss search keyboard on scroll .. dismiss search keyboard on scroll and cause search bar to resign first responder when an item is selected in the list Bug: T105397 Change-Id: I4f518bea03300e08a355e3bf8d1cdd71d6e19286 --- M Wikipedia/UI-V5/WMFArticleListCollectionViewController.h M Wikipedia/UI-V5/WMFArticleListCollectionViewController.m M Wikipedia/UI-V5/WMFSearchViewController.m M Wikipedia/UI-V5/iPhone_Root.storyboard 4 files changed, 21 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/65/223965/1 diff --git a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.h b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.h index 441c292..260fbd3 100644 --- a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.h +++ b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.h @@ -9,11 +9,18 @@ WMFArticleListModeBottomStacked }; +@protocol WMFArticleListViewControllerDelegate NSObject + +- (void)didSelectItem; + +@end + @interface WMFArticleListCollectionViewController : UICollectionViewController @property (nonatomic, strong) MWKDataStore* dataStore; @property (nonatomic, strong) MWKSavedPageList* savedPages; @property (nonatomic, strong, nullable) idWMFArticleListDataSource dataSource; +@property (nonatomic, weak) IBOutlet idWMFArticleListViewControllerDelegate delegate; @property (nonatomic, assign, readonly) WMFArticleListMode mode; diff --git a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m index ed45ec3..5389d09 100644 --- a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m +++ b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m @@ -252,6 +252,8 @@ vc.transitioningDelegate= self.cardTransition; vc.modalPresentationStyle = UIModalPresentationCustom; +[self.delegate didSelectItem]; + [self presentViewController:vc animated:YES completion:NULL]; } diff --git a/Wikipedia/UI-V5/WMFSearchViewController.m b/Wikipedia/UI-V5/WMFSearchViewController.m index ae4b8ad..285d6fa 100644 --- a/Wikipedia/UI-V5/WMFSearchViewController.m +++ b/Wikipedia/UI-V5/WMFSearchViewController.m @@ -14,7 +14,7 @@ static NSUInteger const kWMFMinResultsBeforeAutoFullTextSearch = 12; @interface WMFSearchViewController () - +WMFArticleListViewControllerDelegate @property (nonatomic, strong) WMFArticleListCollectionViewController* resultsListController; @property (strong, nonatomic) IBOutlet UISearchBar* searchBar; @property (strong, nonatomic) IBOutlet UIButton* searchSuggestionButton; @@ -77,6 +77,8 @@ - (void)viewDidLoad { [super viewDidLoad]; +self.resultsListController.delegate = self; +self.resultsListController.collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag; [self updateUIWithResults:nil]; } @@ -186,4 +188,10 @@ [self searchForSearchTerm:self.searchBar.text]; } +#pragma mark - WMFArticleListViewControllerDelegate + +- (void)didSelectItem { +[self.searchBar resignFirstResponder]; +} + @end diff --git a/Wikipedia/UI-V5/iPhone_Root.storyboard b/Wikipedia/UI-V5/iPhone_Root.storyboard index a7ce4ca..e8d306e 100644 --- a/Wikipedia/UI-V5/iPhone_Root.storyboard +++ b/Wikipedia/UI-V5/iPhone_Root.storyboard @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=UTF-8 standalone=no? -document type=com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB version=3.0 toolsVersion=7706 systemVersion=15A204h targetRuntime=iOS.CocoaTouch propertyAccessControl=none useAutolayout=YES useTraitCollections=YES initialViewController=O8j-Xm-zXE +document type=com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB version=3.0 toolsVersion=7706 systemVersion=14E46 targetRuntime=iOS.CocoaTouch propertyAccessControl=none useAutolayout=YES useTraitCollections=YES initialViewController=O8j-Xm-zXE dependencies deployment identifier=iOS/ plugIn identifier=com.apple.InterfaceBuilder.IBCocoaTouchPlugin version=7703/ @@ -179,7 +179,7 @@ objects collectionViewController storyboardIdentifier=WMFArticleListCollectionViewController useStoryboardIdentifierAsRestorationIdentifier=YES id=qVm-oc-aaW customClass=WMFArticleListCollectionViewController sceneMemberID=viewController collectionView key=view clipsSubviews=YES multipleTouchEnabled=YES contentMode=scaleToFill alwaysBounceVertical=YES dataMode=prototypes id=cbI-aA-luO -rect key=frame x=0.0 y=0.0 width=600 height=536/ +rect key=frame x=0.0 y=0.0 width=600 height=496/ autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/
[MediaWiki-commits] [Gerrit] wording - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/223219 Change subject: wording .. wording more user friendly; bugging sounds like you don't want them. Change-Id: I1d30dc11f1094373b560a00e5a0d5bc8fb3571b3 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/19/223219/1 diff --git a/README.md b/README.md index 676aa58..b71d1c1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ ## Building and Running This project requires [Xcode 6](https://itunes.apple.com/us/app/xcode/id497799835) or higher. The easiest way to get it is from the [App Store](https://itunes.apple.com/us/app/xcode/id497799835?mt=12), but you can also download it from [developer.apple.com](https://developer.apple.com/) if you have an AppleID registered with an Apple developer account. -Once you have Xcode, you should be able to open `Wikipedia.xcworkspace` and run the app on the iOS Simulator (using the **Wikipedia** scheme and target). If you encounter any issues, please don't hesitate to let us know via a bug report or bugging us on IRC. +Once you have Xcode, you should be able to open `Wikipedia.xcworkspace` and run the app on the iOS Simulator (using the **Wikipedia** scheme and target). If you encounter any issues, please don't hesitate to let us know via a bug report or speaking to us on IRC. ## Development ### Architecture -- To view, visit https://gerrit.wikimedia.org/r/223219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d30dc11f1094373b560a00e5a0d5bc8fb3571b3 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] use HTTPS submodule for SDWebImage - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/222373 Change subject: use HTTPS submodule for SDWebImage .. use HTTPS submodule for SDWebImage Change-Id: I9532375684852a1e1227bfef5e7e0e5f4ac2afa9 --- M .gitmodules M Pods/Pods.xcodeproj/project.pbxproj M Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme 3 files changed, 6,735 insertions(+), 6,735 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/73/222373/1 -- To view, visit https://gerrit.wikimedia.org/r/222373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9532375684852a1e1227bfef5e7e0e5f4ac2afa9 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: 5.0 Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] history list performance tests - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/221850 Change subject: history list performance tests .. history list performance tests Change-Id: I20ec399ec283240bd8d5dd56f8fac0755d4719a2 --- A MediaWikiKit/MediaWikiKitTests/MWKHistoryListPerformanceTests.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia.xcodeproj/xcshareddata/xcschemes/Wikipedia.xcscheme 3 files changed, 49 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/50/221850/1 diff --git a/MediaWikiKit/MediaWikiKitTests/MWKHistoryListPerformanceTests.m b/MediaWikiKit/MediaWikiKitTests/MWKHistoryListPerformanceTests.m new file mode 100644 index 000..72b458d --- /dev/null +++ b/MediaWikiKit/MediaWikiKitTests/MWKHistoryListPerformanceTests.m @@ -0,0 +1,41 @@ +// +// MWKHistoryListPerformanceTests.m +// Wikipedia +// +// Created by Brian Gerstle on 6/29/15. +// Copyright (c) 2015 Wikimedia Foundation. All rights reserved. +// + +#import UIKit/UIKit.h +#import XCTest/XCTest.h + +#import NSDateFormatter+WMFExtensions.h +#import WMFTestFixtureUtilities.h +#import MWKHistoryList.h + +@interface MWKHistoryListPerformanceTests : XCTestCase + +@end + +@implementation MWKHistoryListPerformanceTests + +- (void)testReadPerformance { +NSMutableArray* entries = [NSMutableArray arrayWithCapacity:1000]; +for (int i = 0; i 1000; i++) { +[entries addObject:@{ + @language: @en, + @domain: @wikipedia.org, + @title: [[NSUUID UUID] UUIDString], + @date: [[NSDateFormatter wmf_iso8601Formatter] stringFromDate:[NSDate date]], + @scrollPosition: @0, + @discoveryMethod: [MWKHistoryEntry stringForDiscoveryMethod:MWKHistoryDiscoveryMethodLink] + }]; +} + +[self measureBlock:^{ +MWKHistoryList* list = [[MWKHistoryList alloc] initWithDict:NSDictionaryOfVariableBindings(entries)]; +XCTAssertEqual(list.length, [entries count]); +}]; +} + +@end diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 5e52831..777b9af 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -332,6 +332,7 @@ BCF012331AD2FA38008D3675 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = BCF012321AD2FA38008D3675 /* assets */; }; BCFE026A1B41ABB5003752B7 /* MWKHistoryListCorruptDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE02691B41ABB5003752B7 /* MWKHistoryListCorruptDataTests.m */; }; BCFE026F1B41B482003752B7 /* MWKSavedPageListCorruptDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE026E1B41B482003752B7 /* MWKSavedPageListCorruptDataTests.m */; }; + BCFE02781B41FA12003752B7 /* MWKHistoryListPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE02771B41FA12003752B7 /* MWKHistoryListPerformanceTests.m */; }; C42D947E1A937DAC00A4871A /* SavedArticlesFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = C42D947D1A937DAC00A4871A /* SavedArticlesFetcher.m */; }; C42D94861A937DE000A4871A /* WMFBorderButton.m in Sources */ = {isa = PBXBuildFile; fileRef = C42D94831A937DE000A4871A /* WMFBorderButton.m */; }; C42D94871A937DE000A4871A /* WMFProgressLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = C42D94851A937DE000A4871A /* WMFProgressLineView.m */; }; @@ -979,6 +980,7 @@ BCF012321AD2FA38008D3675 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../Wikipedia/assets; sourceTree = group; }; BCFE02691B41ABB5003752B7 /* MWKHistoryListCorruptDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKHistoryListCorruptDataTests.m; sourceTree = group; }; BCFE026E1B41B482003752B7 /* MWKSavedPageListCorruptDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSavedPageListCorruptDataTests.m; sourceTree = group; }; + BCFE02771B41FA12003752B7 /* MWKHistoryListPerformanceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKHistoryListPerformanceTests.m; sourceTree = group; }; C42D947C1A937DAC00A4871A /* SavedArticlesFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavedArticlesFetcher.h; sourceTree = group; }; C42D947D1A937DAC00A4871A /* SavedArticlesFetcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SavedArticlesFetcher.m; sourceTree = group; }; C42D94821A937DE000A4871A /* WMFBorderButton.h */ = {isa = PBXFileReference; fileEncoding = 4;
[MediaWiki-commits] [Gerrit] centralized image caching retrieval - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/220527 Change subject: centralized image caching retrieval .. centralized image caching retrieval Project changes: - Added SDWebImage fork as a submodule, which means you now need to run `git submodule update --init --recursive` to grab the files needed by the project (which CocoaPods integrates into the project like any other Pod)... - Luckily `make pod` will now do this for you Code changes: - Wrote WMFImageController to manage fetching, caching, and downloading images (on top of SDWebImageManager) - Rewrote WMFArticleImageProtocol to use WMFImageController What works right now: - Lead article images in the webview (face detection should also work, but can't search to find an article with a face) - Pull to refresh loading from the cache What doesn't work: - Native images (not using old MWKDataStore image storage) - As a result of this, saved pages is also broken until migration is implemented WMFImageController is integrated - Keeping images for saved pages: need to add lookup during disk cleanup, pending extension of SDWebImage in next ticket (T101527) Bug: T95350 Change-Id: I98037e1637fd8d6534a570480edc0ab1556fb44b --- M Wikipedia.xcodeproj/project.pbxproj A Wikipedia/Images/SDWebImageManager+PromiseKit.swift A Wikipedia/Images/WMFImageController.swift A Wikipedia/Networking/Cancellable.swift M Wikipedia/Protocols/WMFArticleImageProtocol.m M Wikipedia/Wikipedia-Bridging-Header.h A Wikipedia/mw-utils/SwiftUtilities.swift 7 files changed, 386 insertions(+), 148 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/27/220527/10 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 30633d4..64df850 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -321,6 +321,10 @@ BCB848781BF80077EC24 /* WMFRoundingUtilities.c in Sources */ = {isa = PBXBuildFile; fileRef = BCB848771BF80077EC24 /* WMFRoundingUtilities.c */; }; BCB8487B1DF90077EC24 /* WMFRoundingUtilitiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB8487A1DF90077EC24 /* WMFRoundingUtilitiesTests.m */; }; BCB848831AAE0C5C0077EC24 /* WMFImageGalleryCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 08D631F91A69B8CD00D87AD0 /* WMFImageGalleryCollectionViewCell.m */; }; + BCBDC8821B38E414003A6D17 /* SDWebImageManager+PromiseKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCBDC8811B38E414003A6D17 /* SDWebImageManager+PromiseKit.swift */; }; + BCBDC8841B38E441003A6D17 /* WMFImageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCBDC8831B38E441003A6D17 /* WMFImageController.swift */; }; + BCBDC88C1B3A0715003A6D17 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCBDC88B1B3A0715003A6D17 /* Cancellable.swift */; }; + BCBDC88E1B3A42E7003A6D17 /* SwiftUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCBDC88D1B3A42E7003A6D17 /* SwiftUtilities.swift */; }; BCC185D81A9E5628005378F8 /* UILabel+WMFStyling.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185D71A9E5628005378F8 /* UILabel+WMFStyling.m */; }; BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */; }; BCC185E81A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */; }; @@ -968,6 +972,10 @@ BCB848771BF80077EC24 /* WMFRoundingUtilities.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = WMFRoundingUtilities.c; sourceTree = group; }; BCB8487A1DF90077EC24 /* WMFRoundingUtilitiesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFRoundingUtilitiesTests.m; sourceTree = group; }; BCB848811AAE06420077EC24 /* ImageGallerySpecs */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; name = ImageGallerySpecs; path = Image Gallery/ImageGallerySpecs; sourceTree = group; }; + BCBDC8811B38E414003A6D17 /* SDWebImageManager+PromiseKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SDWebImageManager+PromiseKit.swift; path = Images/SDWebImageManager+PromiseKit.swift; sourceTree = group; }; + BCBDC8831B38E441003A6D17 /* WMFImageController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WMFImageController.swift; path =
[MediaWiki-commits] [Gerrit] add sdwebimage fork as local pod - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/220951 Change subject: add sdwebimage fork as local pod .. add sdwebimage fork as local pod Change-Id: Id39a423af461dfbd48ea31a6098c551ce554e635 --- A .gitmodules M Makefile M Podfile M Podfile.lock A Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h A Pods/Headers/Private/SDWebImage/SDImageCache.h A Pods/Headers/Private/SDWebImage/SDWebImageCompat.h A Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h A Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h A Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h A Pods/Headers/Private/SDWebImage/SDWebImageManager.h A Pods/Headers/Private/SDWebImage/SDWebImageOperation.h A Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h A Pods/Headers/Private/SDWebImage/UIButton+WebCache.h A Pods/Headers/Private/SDWebImage/UIImage+GIF.h A Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h A Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h A Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h A Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h A Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h A Pods/Headers/Public/SDWebImage/SDImageCache.h A Pods/Headers/Public/SDWebImage/SDWebImageCompat.h A Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h A Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h A Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h A Pods/Headers/Public/SDWebImage/SDWebImageManager.h A Pods/Headers/Public/SDWebImage/SDWebImageOperation.h A Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h A Pods/Headers/Public/SDWebImage/UIButton+WebCache.h A Pods/Headers/Public/SDWebImage/UIImage+GIF.h A Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h A Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h A Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h A Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h A Pods/Local Podspecs/SDWebImage.podspec.json M Pods/Manifest.lock M Pods/Pods.xcodeproj/project.pbxproj A Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-WikipediaUnitTests-SDWebImage.xcscheme M Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-Private.xcconfig M Pods/Target Support Files/Pods-BlocksKit/Pods-BlocksKit-Private.xcconfig M Pods/Target Support Files/Pods-CocoaLumberjack/Pods-CocoaLumberjack-Private.xcconfig M Pods/Target Support Files/Pods-HockeySDK/Pods-HockeySDK-Private.xcconfig M Pods/Target Support Files/Pods-KVOController/Pods-KVOController-Private.xcconfig M Pods/Target Support Files/Pods-Mantle/Pods-Mantle-Private.xcconfig M Pods/Target Support Files/Pods-Masonry/Pods-Masonry-Private.xcconfig A Pods/Target Support Files/Pods-SDWebImage/Pods-SDWebImage-Private.xcconfig A Pods/Target Support Files/Pods-SDWebImage/Pods-SDWebImage-dummy.m A Pods/Target Support Files/Pods-SDWebImage/Pods-SDWebImage-prefix.pch A Pods/Target Support Files/Pods-SDWebImage/Pods-SDWebImage.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-AFNetworking/Pods-WikipediaUnitTests-AFNetworking-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-BlocksKit/Pods-WikipediaUnitTests-BlocksKit-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-CocoaLumberjack/Pods-WikipediaUnitTests-CocoaLumberjack-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-HockeySDK/Pods-WikipediaUnitTests-HockeySDK-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-KVOController/Pods-WikipediaUnitTests-KVOController-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-Mantle/Pods-WikipediaUnitTests-Mantle-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-Masonry/Pods-WikipediaUnitTests-Masonry-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-OCHamcrest/Pods-WikipediaUnitTests-OCHamcrest-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-OCMockito/Pods-WikipediaUnitTests-OCMockito-Private.xcconfig A Pods/Target Support Files/Pods-WikipediaUnitTests-SDWebImage/Pods-WikipediaUnitTests-SDWebImage-Private.xcconfig A Pods/Target Support Files/Pods-WikipediaUnitTests-SDWebImage/Pods-WikipediaUnitTests-SDWebImage-dummy.m A Pods/Target Support Files/Pods-WikipediaUnitTests-SDWebImage/Pods-WikipediaUnitTests-SDWebImage-prefix.pch A Pods/Target Support Files/Pods-WikipediaUnitTests-SDWebImage/Pods-WikipediaUnitTests-SDWebImage.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-hpple/Pods-WikipediaUnitTests-hpple-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-libextobjc/Pods-WikipediaUnitTests-libextobjc-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-acknowledgements.markdown M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-acknowledgements.plist M Pods/Target Support
[MediaWiki-commits] [Gerrit] restore legacy empty string behavior for titles - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/221668 Change subject: restore legacy empty string behavior for titles .. restore legacy empty string behavior for titles also added some more conservative fallbacks assertions for internal links just in case Bug: T103737 Change-Id: Iba79b9a4e65351484e9867f4f750fe751dc7841f --- M MediaWikiKit/MediaWikiKit/MWKTitle.m M MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m M Wikipedia.xcodeproj/project.pbxproj 3 files changed, 39 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/68/221668/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKTitle.m b/MediaWikiKit/MediaWikiKit/MWKTitle.m index 1dfb19b..2d4cef1 100644 --- a/MediaWikiKit/MediaWikiKit/MWKTitle.m +++ b/MediaWikiKit/MediaWikiKit/MWKTitle.m @@ -23,19 +23,23 @@ @implementation MWKTitle -- (instancetype)initWithSite:(MWKSite*)site normalizedTitle:(NSString*)text fragment:(NSString* __nullable)fragment { +- (instancetype)initWithSite:(MWKSite*)site + normalizedTitle:(NSString*)text +fragment:(NSString* __nullable)fragment { NSParameterAssert(site); -NSParameterAssert(text.length); self = [super init]; if (self) { self.site = site; -self.text = text; +// HAX: fall back to empty strings in case of nil text to handle API edge cases prevent crashes +self.text = text.length ? text : @; self.fragment = fragment; } return self; } - (instancetype)initWithInternalLink:(NSString*)relativeInternalLink site:(MWKSite*)site { +NSAssert(relativeInternalLink.length == 0 || [relativeInternalLink wmf_isInternalLink], + @Expected string with internal link prefix but got: %@, relativeInternalLink); return [self initWithString:[relativeInternalLink wmf_internalLinkPath] site:site]; } @@ -43,11 +47,15 @@ NSAssert(![string wmf_isInternalLink], @Didn't expect %@ to be an internal link. Use initWithInternalLink:site: instead., string); -NSArray* bits = [string componentsSeparatedByString:@#]; -NSParameterAssert(bits.count = 1); -return [self initWithSite:site - normalizedTitle:[bits[0] wmf_normalizedPageTitle] - fragment:[bits wmf_safeObjectAtIndex:1]]; +if ([string wmf_isInternalLink]) { +// recurse here after stripping internal link prefix +return [self initWithInternalLink:string site:site]; +} else { +NSArray* bits = [string componentsSeparatedByString:@#]; +return [self initWithSite:site + normalizedTitle:[[bits firstObject] wmf_normalizedPageTitle] + fragment:[bits wmf_safeObjectAtIndex:1]]; +} } + (MWKTitle*)titleWithString:(NSString*)str site:(MWKSite*)site { diff --git a/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m b/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m index 4ad903f..88761e9 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m @@ -27,11 +27,23 @@ site = [[MWKSite alloc] initWithDomain:@wikipedia.org language:@en]; } -- (void)tearDown { -// Put teardown code here. This method is called after the invocation of each test method in the class. -[super tearDown]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored -Wnonnull + +- (void)testNilResultsInEmptyString { +MWKTitle* title; +XCTAssertNoThrow((title = [site titleWithString:nil])); +assertThat(title.text, is(@)); } +- (void)testPermitsEmptyString { +MWKTitle* title; +XCTAssertNoThrow((title = [site titleWithString:@])); +assertThat(title.text, is(@)); +} + +#pragma clang diagnostic pop + - (void)testSimple { MWKTitle* title = [MWKTitle titleWithString:@Simple site:site]; XCTAssertEqualObjects(title.text, @Simple, @Text form is full); diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 31ab1c9..04c4794 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -3582,6 +3582,8 @@ -Werror=arc-retain-cycles, -Werror=incompatible-pointer-types, -Werror=incomplete-implementation, + -Werror=, + -Werror=nonnull, ); WMF_HOCKEYAPP_IDENTIFIER = 35ef86a164e10f9c01c634c640ec2f0a; WRAPPER_EXTENSION = app; @@ -3690,6 +3692,8 @@ -Werror=arc-retain-cycles, -Werror=incompatible-pointer-types,
[MediaWiki-commits] [Gerrit] saved history list error handling testing - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/221669 Change subject: saved history list error handling testing .. saved history list error handling testing - attempt to recover from bad history saved list entries by removing them - test handling of add/remove invalid entries nil Bug: T103737 Change-Id: I88e6360bfe58dc89a3a53fea2cb43a05dac7a20a --- M MediaWikiKit/MediaWikiKit/MWKDataObject.h M MediaWikiKit/MediaWikiKit/MWKDataObject.m M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m M MediaWikiKit/MediaWikiKit/MWKHistoryList.m M MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.h M MediaWikiKit/MediaWikiKit/MWKSavedPageEntry.m M MediaWikiKit/MediaWikiKit/MWKSavedPageList.m M MediaWikiKit/MediaWikiKit/MWKSiteDataObject.h M MediaWikiKit/MediaWikiKit/MWKSiteDataObject.m M MediaWikiKit/MediaWikiKit/MWKTitle.m A MediaWikiKit/MediaWikiKitTests/MWKHistoryListCorruptDataTests.m M MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m A MediaWikiKit/MediaWikiKitTests/MWKSavedPageListCorruptDataTests.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/View Controllers/WebView/WebViewController.m M WikipediaUnitTests/MWKSection+WMFSharingTests.m M WikipediaUnitTests/MWKSectionListTests.m M WikipediaUnitTests/Utilities/MWKImage+AssociationTestUtils.m M WikipediaUnitTests/WMFImageInfoControllerTests.m 19 files changed, 299 insertions(+), 43 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/69/221669/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKDataObject.h b/MediaWikiKit/MediaWikiKit/MWKDataObject.h index c795730..d0acf97 100644 --- a/MediaWikiKit/MediaWikiKit/MWKDataObject.h +++ b/MediaWikiKit/MediaWikiKit/MWKDataObject.h @@ -14,6 +14,7 @@ - (NSString*)optionalString:(NSString*)key dict:(NSDictionary*)dict; - (NSString*)requiredString:(NSString*)key dict:(NSDictionary*)dict; +- (NSString*)requiredString:(NSString*)key dict:(NSDictionary*)dict allowEmpty:(BOOL)allowEmpty; - (NSNumber*)optionalNumber:(NSString*)key dict:(NSDictionary*)dict; - (NSNumber*)requiredNumber:(NSString*)key dict:(NSDictionary*)dict; diff --git a/MediaWikiKit/MediaWikiKit/MWKDataObject.m b/MediaWikiKit/MediaWikiKit/MWKDataObject.m index a3e348c..d29424d 100644 --- a/MediaWikiKit/MediaWikiKit/MWKDataObject.m +++ b/MediaWikiKit/MediaWikiKit/MWKDataObject.m @@ -34,8 +34,12 @@ } - (NSString*)requiredString:(NSString*)key dict:(NSDictionary*)dict { +return [self requiredString:key dict:dict allowEmpty:YES]; +} + +- (NSString*)requiredString:(NSString*)key dict:(NSDictionary*)dict allowEmpty:(BOOL)allowEmpty { NSString* str = [self optionalString:key dict:dict]; -if (str == nil) { +if (str == nil || (str.length == 0 !allowEmpty)) { @throw [NSException exceptionWithName:@MWKDataObjectException reason:@expected string, got nothing userInfo:@{@key: key}]; diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m index 15e7699..9688f1a 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m @@ -36,7 +36,7 @@ self = [self initWithSite:[MWKSite siteWithDomain:domain language:language]]; if (self) { -self.title = [self requiredTitle:@title dict:dict]; +self.title = [self requiredTitle:@title dict:dict allowEmpty:NO]; self.date= [self requiredDate:@date dict:dict]; self.discoveryMethod = [MWKHistoryEntry discoveryMethodForString:[self requiredString:@discoveryMethod dict:dict]]; self.scrollPosition = [[self requiredNumber:@scrollPosition dict:dict] intValue]; @@ -74,10 +74,24 @@ [dict wmf_maybeSetObject:[self iso8601DateString:self.date] forKey:@date]; [dict wmf_maybeSetObject:[MWKHistoryEntry stringForDiscoveryMethod:self.discoveryMethod] forKey:@discoveryMethod]; [dict wmf_maybeSetObject:@(self.scrollPosition) forKey:@scrollPosition]; - + return [NSDictionary dictionaryWithDictionary:dict]; } +- (NSString*)description { +return [NSString stringWithFormat:@%@: {\n +\ttitle: %@,\n +\tdate: %@,\n +\tdiscoveryMethod: %@,\n +\tscrollPosition: %d\n +}, +[super description], +self.title, +self.date, +[MWKHistoryEntry stringForDiscoveryMethod:self.discoveryMethod], +self.scrollPosition]; +} + + (NSString*)stringForDiscoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { switch (discoveryMethod) { case MWKHistoryDiscoveryMethodSearch: diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m index 10a5e79..24bf69d 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m +++
[MediaWiki-commits] [Gerrit] Version Bump - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/221673 Change subject: Version Bump .. Version Bump Change-Id: I5b4de021ce3523491a31eee7cab80fd3e603030f --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Wikipedia-Info.plist M WikipediaUnitTests/Supporting Files/Info.plist 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/73/221673/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 5e52831..5f80c84 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -3562,7 +3562,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = iPhone Distribution; CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 150; FRAMEWORK_SEARCH_PATHS = $(inherited); GCC_OPTIMIZATION_LEVEL = 3; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -3672,7 +3672,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = iPhone Distribution; CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 150; FRAMEWORK_SEARCH_PATHS = $(inherited); GCC_OPTIMIZATION_LEVEL = 3; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -3881,7 +3881,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = iPhone Developer; CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 150; DEBUG_INFORMATION_FORMAT = dwarf; FRAMEWORK_SEARCH_PATHS = $(inherited); GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -3924,7 +3924,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = iPhone Distribution; CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution; - CURRENT_PROJECT_VERSION = 130; + CURRENT_PROJECT_VERSION = 150; FRAMEWORK_SEARCH_PATHS = $(inherited); GCC_OPTIMIZATION_LEVEL = 3; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/Wikipedia/Wikipedia-Info.plist b/Wikipedia/Wikipedia-Info.plist index 33b86b0..2ef9550 100644 --- a/Wikipedia/Wikipedia-Info.plist +++ b/Wikipedia/Wikipedia-Info.plist @@ -21,7 +21,7 @@ keyCFBundleSignature/key string/string keyCFBundleVersion/key - string149/string + string150/string keyLSRequiresIPhoneOS/key true/ keyNSLocationWhenInUseUsageDescription/key diff --git a/WikipediaUnitTests/Supporting Files/Info.plist b/WikipediaUnitTests/Supporting Files/Info.plist index c80314d..2f9f61d 100644 --- a/WikipediaUnitTests/Supporting Files/Info.plist +++ b/WikipediaUnitTests/Supporting Files/Info.plist @@ -19,6 +19,6 @@ keyCFBundleSignature/key string/string keyCFBundleVersion/key - string130/string + string150/string /dict /plist -- To view, visit https://gerrit.wikimedia.org/r/221673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5b4de021ce3523491a31eee7cab80fd3e603030f Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] automate bumping via fastlane - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/221672 Change subject: automate bumping via fastlane .. automate bumping via fastlane Change-Id: I3d486611eddfd51159ad7cf45ae1cb3b2b252318 --- M fastlane/Fastfile M fastlane/lib/utils.rb 2 files changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/72/221672/1 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 238639d..91387ba 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -42,7 +42,12 @@ ) end - desc Bump the version, and submit a new **Wikipedia Alpha** Build to Apple TestFlight + desc Increment app build version, commit, tag locally. + lane :bump do +with_bump + end + + desc Submit a new **Wikipedia Alpha** Build to Apple TestFlight lane :alpha do increment_build_number( build_number: ENV[BUILD_NUMBER].to_i diff --git a/fastlane/lib/utils.rb b/fastlane/lib/utils.rb index 25a95b9..2b373d3 100644 --- a/fastlane/lib/utils.rb +++ b/fastlane/lib/utils.rb @@ -52,12 +52,16 @@ end # commit version bump, call a block, then push the bump to git -def with_bump - increment_build_number +def with_bump(push=false) + if ENV['BUILD_NUMBER'] +increment_build_number(build_number: ENV['BUILD_NUMBER'].to_i) + else +increment_build_number + end commit_version_bump plist_version = get_version_short_string File.expand_path(File.join(ENV['PWD'], 'Wikipedia/Wikipedia-Info.plist')) # tag must be added after the version bump is committed add_git_tag(tag: #{plist_version}.#{Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::BUILD_NUMBER]}) yield if block_given? - push_to_git_remote + push_to_git_remote if push end -- To view, visit https://gerrit.wikimedia.org/r/221672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d486611eddfd51159ad7cf45ae1cb3b2b252318 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] sync with master - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/220943 Change subject: sync with master .. sync with master Change-Id: I49ec50f938f4eb6e78c60a97620e665876da25f0 --- M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m M MediaWikiKit/MediaWikiKit/MWKHistoryList.m M MediaWikiKit/MediaWikiKit/MWKUserDataStore.m M MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Base.lproj/Main_iPhone.storyboard M Wikipedia/Global.h M Wikipedia/View Controllers/WebView/WebViewController.m D Wikipedia/af.lproj/Main_iPhone.strings M Wikipedia/ast.lproj/Localizable.strings D Wikipedia/azb.lproj/Main_iPhone.strings D Wikipedia/bgn.lproj/Main_iPhone.strings D Wikipedia/da.lproj/Main_iPhone.strings D Wikipedia/de.lproj/Main_iPhone.strings D Wikipedia/diq.lproj/Main_iPhone.strings D Wikipedia/fr.lproj/Main_iPhone.strings D Wikipedia/gu.lproj/Main_iPhone.strings D Wikipedia/id.lproj/Main_iPhone.strings D Wikipedia/is.lproj/Main_iPhone.strings D Wikipedia/ka.lproj/Main_iPhone.strings D Wikipedia/kk-cyrl.lproj/Main_iPhone.strings D Wikipedia/km.lproj/Main_iPhone.strings D Wikipedia/ksh.lproj/Main_iPhone.strings D Wikipedia/ku-latn.lproj/Main_iPhone.strings D Wikipedia/lb.lproj/Main_iPhone.strings D Wikipedia/mt.lproj/Main_iPhone.strings D Wikipedia/my.lproj/Main_iPhone.strings D Wikipedia/nb.lproj/Main_iPhone.strings D Wikipedia/om.lproj/Main_iPhone.strings D Wikipedia/pa.lproj/Main_iPhone.strings D Wikipedia/pl.lproj/Main_iPhone.strings M Wikipedia/qqq.lproj/Localizable.strings D Wikipedia/qqq.lproj/Main_iPhone.strings D Wikipedia/ro.lproj/Main_iPhone.strings D Wikipedia/sa.lproj/Main_iPhone.strings D Wikipedia/sah.lproj/Main_iPhone.strings D Wikipedia/sw.lproj/Main_iPhone.strings D Wikipedia/tg-cyrl.lproj/Main_iPhone.strings D Wikipedia/uz.lproj/Main_iPhone.strings D Wikipedia/yi.lproj/Main_iPhone.strings D Wikipedia/zh-hans.lproj/Main_iPhone.strings M WikipediaUnitTests/MWKSection+WMFSharingTests.m M WikipediaUnitTests/MWKSectionListTests.m M WikipediaUnitTests/Utilities/MWKImage+AssociationTestUtils.m M WikipediaUnitTests/WMFImageInfoControllerTests.m 45 files changed, 25 insertions(+), 826 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/43/220943/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m index ca4ef1c..46b148c 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m @@ -74,7 +74,7 @@ [dict wmf_maybeSetObject:[self iso8601DateString:self.date] forKey:@date]; [dict wmf_maybeSetObject:[MWKHistoryEntry stringForDiscoveryMethod:self.discoveryMethod] forKey:@discoveryMethod]; [dict wmf_maybeSetObject:@(self.scrollPosition) forKey:@scrollPosition]; - + return [NSDictionary dictionaryWithDictionary:dict]; } diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m index 10eed39..b0e718b 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m @@ -107,15 +107,9 @@ #pragma mark - History Update - HEAD (db4b8e For easier debugging of 5.0, show Read button.) - (AnyPromise*)addPageToHistoryWithTitle:(MWKTitle*)title discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { -if (title == nil) { +if (title.text.length == 0) { return [AnyPromise promiseWithValue:[NSError wmf_errorWithType:WMFErrorTypeStringMissingParameter userInfo:nil]]; -=== -- (void)addEntry:(MWKHistoryEntry*)entry { -if ([entry.title.text length] == 0) { -return; - BRANCH (ffd60b version bump) } MWKHistoryEntry* entry = [[MWKHistoryEntry alloc] initWithTitle:title discoveryMethod:discoveryMethod]; @@ -125,7 +119,7 @@ } - (AnyPromise*)addEntry:(MWKHistoryEntry*)entry { -if (entry.title == nil) { +if ([entry.title.text length] == 0) { return [AnyPromise promiseWithValue:[NSError wmf_errorWithType:WMFErrorTypeStringMissingParameter userInfo:nil]]; } @@ -142,15 +136,9 @@ return [AnyPromise promiseWithValue:entry]; } - HEAD (db4b8e For easier debugging of 5.0, show Read button.) - (AnyPromise*)savePageScrollPosition:(CGFloat)scrollposition toPageInHistoryWithTitle:(MWKTitle*)title { -if (title == nil) { +if ([title.text length] == 0) { return [AnyPromise promiseWithValue:[NSError wmf_errorWithType:WMFErrorTypeStringMissingParameter userInfo:nil]]; -=== -- (void)removeEntry:(MWKHistoryEntry*)entry { -if ([entry.title.text length] == 0) { -return; - BRANCH (ffd60b version bump) } MWKHistoryEntry* entry = [self entryForTitle:title]; @@ -164,7 +152,7 @@ } - (AnyPromise*)removePageFromHistoryWithTitle:(MWKTitle*)title { -if (title == nil) { +if (title.text.length == 0) { return [AnyPromise
[MediaWiki-commits] [Gerrit] uncrustify stuff - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/220813 Change subject: uncrustify stuff .. uncrustify stuff Change-Id: I908a3f0efdaedd4fd5d75fdc27b23cab201d6433 --- M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m M MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m M Wikipedia/View Controllers/WebView/WebViewController.m M WikipediaUnitTests/MWKSection+WMFSharingTests.m M WikipediaUnitTests/MWKSectionListTests.m M WikipediaUnitTests/Utilities/MWKImage+AssociationTestUtils.m M WikipediaUnitTests/WMFImageInfoControllerTests.m 7 files changed, 17 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/13/220813/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m index 15e7699..b69fc7b 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m @@ -74,7 +74,7 @@ [dict wmf_maybeSetObject:[self iso8601DateString:self.date] forKey:@date]; [dict wmf_maybeSetObject:[MWKHistoryEntry stringForDiscoveryMethod:self.discoveryMethod] forKey:@discoveryMethod]; [dict wmf_maybeSetObject:@(self.scrollPosition) forKey:@scrollPosition]; - + return [NSDictionary dictionaryWithDictionary:dict]; } diff --git a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m index b9253dc..21637f1 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m @@ -42,7 +42,7 @@ MWKDataStore* tmpDataStore = [[MWKDataStore alloc] initWithBasePath:self.tempDataStoreDir]; // create article w/ mock section to prevent crashing due to image import side effects -MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; +MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; MWKArticle* article = [[MWKArticle alloc] initWithTitle:title dataStore:tmpDataStore]; [article.sections setSections:[NSMutableArray arrayWithObject:mock([MWKSection class])]]; diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 47e8997..da8259f 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -1332,18 +1332,16 @@ - (void)navigateToPage:(MWKTitle*)title discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { - NSParameterAssert(title); -if([title.text length] == 0){ - +if ([title.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } - + NSString* cleanTitle = title.text; NSParameterAssert(cleanTitle.length); [self hideKeyboard]; - + self.jumpToFragment = title.fragment; if (discoveryMethod != MWKHistoryDiscoveryMethodBackForward discoveryMethod != MWKHistoryDiscoveryMethodReloadFromNetwork discoveryMethod != MWKHistoryDiscoveryMethodReloadFromCache) { @@ -1352,7 +1350,6 @@ [self retrieveArticleForPageTitle:title discoveryMethod:discoveryMethod]; - } - (void)reloadCurrentArticleFromNetwork { @@ -1382,10 +1379,8 @@ - (void)retrieveArticleForPageTitle:(MWKTitle*)pageTitle discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { - NSParameterAssert(pageTitle); -if([pageTitle.text length] == 0){ - +if ([pageTitle.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } @@ -1471,13 +1466,12 @@ self.isFetchingArticle = NO; -if([article.title.text length] == 0){ - +if ([article.title.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } - + // Update the toc and web view. [self displayArticle:article.title]; @@ -1649,9 +1643,8 @@ #pragma mark Display article from data store - (void)displayArticle:(MWKTitle*)title { - NSParameterAssert(title.text); -if([title.text length] == 0){ +if ([title.text length] == 0) { return; } diff --git a/WikipediaUnitTests/MWKSection+WMFSharingTests.m b/WikipediaUnitTests/MWKSection+WMFSharingTests.m index 1c181c8..a211579 100644 --- a/WikipediaUnitTests/MWKSection+WMFSharingTests.m +++ b/WikipediaUnitTests/MWKSection+WMFSharingTests.m @@ -24,7 +24,7 @@ } - (void)testSimpleSnippet { -MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; +
[MediaWiki-commits] [Gerrit] scale language row height w/ device - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/220609 Change subject: scale language row height w/ device .. scale language row height w/ device Fixes text being cropped on iPad. [0] 0: https://phabricator.wikimedia.org/T97780#1393885 Bug: T97780 Change-Id: I56257700c474a02f3dbd64cfa48f08d98f70d524 --- M Wikipedia/Base.lproj/Main_iPhone.storyboard M Wikipedia/View Controllers/Languages/LanguagesViewController.m M Wikipedia/View Controllers/WebView/WebViewController.m 3 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/09/220609/1 diff --git a/Wikipedia/Base.lproj/Main_iPhone.storyboard b/Wikipedia/Base.lproj/Main_iPhone.storyboard index 08c087c..8c34dfc 100644 --- a/Wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/Wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=UTF-8 standalone=no? -document type=com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB version=3.0 toolsVersion=7706 systemVersion=15A178w targetRuntime=iOS.CocoaTouch propertyAccessControl=none useAutolayout=YES initialViewController=1qV-3k-dN1 +document type=com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB version=3.0 toolsVersion=7706 systemVersion=14D136 targetRuntime=iOS.CocoaTouch propertyAccessControl=none useAutolayout=YES initialViewController=1qV-3k-dN1 dependencies deployment identifier=iOS/ development version=5100 identifier=xcode/ @@ -1878,7 +1878,7 @@ view autoresizesSubviews=NO opaque=NO clipsSubviews=YES clearsContextBeforeDrawing=NO contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=DsV-9G-XpE userLabel=Bottom Menu Container customClass=BottomMenuContainerView rect key=frame x=0.0 y=0.0 width=320 height=46/ subviews -view contentMode=scaleToFill ambiguous=YES misplaced=YES translatesAutoresizingMaskIntoConstraints=NO id=vRW-Da-kEk userLabel=Back Button customClass=WikiGlyphButton +view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=vRW-Da-kEk userLabel=Back Button customClass=WikiGlyphButton rect key=frame x=10 y=0.0 width=40 height=46/ animations/ color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ @@ -1891,7 +1891,7 @@ animations/ color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ /view -view contentMode=scaleToFill ambiguous=YES misplaced=YES translatesAutoresizingMaskIntoConstraints=NO id=1LN-g3-9sh userLabel=Forward Button customClass=WikiGlyphButton +view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=1LN-g3-9sh userLabel=Forward Button customClass=WikiGlyphButton rect key=frame x=75 y=0.0 width=40 height=46/ animations/ color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ @@ -1904,7 +1904,7 @@ animations/ color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ /view -view contentMode=scaleToFill ambiguous=YES misplaced=YES translatesAutoresizingMaskIntoConstraints=NO id=SIR-FX-olC userLabel=Save Button customClass=WikiGlyphButton +view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=SIR-FX-olC userLabel=Save Button customClass=WikiGlyphButton rect key=frame x=140 y=0.0 width=40 height=46/ animations/ color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ @@ -1918,7 +1918,7 @@ animations/ color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ /view -view contentMode=scaleToFill ambiguous=YES misplaced=YES translatesAutoresizingMaskIntoConstraints=NO id=dTJ-8C-aMG userLabel=Languages Button customClass=WikiGlyphButton +view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=dTJ-8C-aMG userLabel=Languages Button
[MediaWiki-commits] [Gerrit] update reorganize pods - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219844 Change subject: update reorganize pods .. update reorganize pods Change-Id: Ia9b6c9e101ef2db6137770dbee308f9c9fd6b4b5 --- M Gemfile M Gemfile.lock M Podfile M Podfile.lock M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m M Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h M Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m M Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h M Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m M Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h M Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m M Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h M Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m M Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h M Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m M Pods/AFNetworking/LICENSE M Pods/AFNetworking/README.md M Pods/Manifest.lock M Pods/Pods.xcodeproj/project.pbxproj M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-acknowledgements.markdown M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-acknowledgements.plist M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-environment.h M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-resources.sh M Pods/Target Support Files/Pods/Pods-acknowledgements.markdown M Pods/Target Support Files/Pods/Pods-acknowledgements.plist M Pods/Target Support Files/Pods/Pods-environment.h M Pods/Target Support Files/Pods/Pods-resources.sh 30 files changed, 5,041 insertions(+), 5,009 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/44/219844/1 -- To view, visit https://gerrit.wikimedia.org/r/219844 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9b6c9e101ef2db6137770dbee308f9c9fd6b4b5 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: 5.0 Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] save user lang selection - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219474 Change subject: save user lang selection .. save user lang selection Change-Id: I8f3eef90811ca600941efcc6db256d471fd87a49 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/UI-V5/Global.h M Wikipedia/View Controllers/Languages/LanguagesViewController.m M Wikipedia/View Controllers/Languages/MWKLanguageLinkController.h M Wikipedia/View Controllers/Languages/MWKLanguageLinkController.m A Wikipedia/View Controllers/Languages/MWKLanguageLinkController_Private.h A WikipediaUnitTests/MWKLanguageLinkControllerTests.m A WikipediaUnitTests/Supporting Files/WikipediaUnitTests-Prefix.pch 8 files changed, 241 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/74/219474/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index a9f9e1e..27dae01 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -245,6 +245,7 @@ BC69C3141AB0C1FF0090B039 /* WMFImageInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */; }; BC6BF4001B19213600362968 /* XCTestCase+WMFLocaleTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6BF3FE1B19209900362968 /* XCTestCase+WMFLocaleTesting.m */; }; BC7DFCD61AA4E5FE35C3 /* WMFImageURLParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */; }; + BC7E4A521B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7E4A511B34B53E00EECD8B /* MWKLanguageLinkControllerTests.m */; }; BC86B9361A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B9351A92966B00B4C039 /* AFHTTPRequestOperationManager+UniqueRequests.m */; }; BC86B93D1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93C1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m */; }; BC86B9401A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */; }; @@ -764,6 +765,7 @@ BC092BA01B19135700093C59 /* WMFApiJsonResponseSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFApiJsonResponseSerializer.h; path = Serializers/WMFApiJsonResponseSerializer.h; sourceTree = group; }; BC092BA11B19135700093C59 /* WMFApiJsonResponseSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WMFApiJsonResponseSerializer.m; path = Serializers/WMFApiJsonResponseSerializer.m; sourceTree = group; }; BC092BA61B19189100093C59 /* MWKSiteInfoFetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSiteInfoFetcherTests.m; sourceTree = group; }; + BC14F89F1B34B72500860018 /* WikipediaUnitTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WikipediaUnitTests-Prefix.pch; sourceTree = group; }; BC2375981AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSParagraphStyle+WMFNaturalAlignmentStyle.h; sourceTree = group; }; BC2375991AB78D8A00B0BAA8 /* NSParagraphStyle+WMFNaturalAlignmentStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSParagraphStyle+WMFNaturalAlignmentStyle.m; sourceTree = group; }; BC23759D1AB8928600B0BAA8 /* WMFDateFormatterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFDateFormatterTests.m; sourceTree = group; }; @@ -796,6 +798,8 @@ BC7DFCCB1AA4BA8A35C3 /* WMFCodingStyle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WMFCodingStyle.h; sourceTree = group; }; BC7DFCD41AA4E5FE35C3 /* WMFImageURLParsing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMFImageURLParsing.h; sourceTree = group; }; BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFImageURLParsing.m; sourceTree = group; }; + BC7E4A501B34B4B900EECD8B /* MWKLanguageLinkController_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
[MediaWiki-commits] [Gerrit] update reorganize pods - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219434 Change subject: update reorganize pods .. update reorganize pods Change-Id: Ia9b6c9e101ef2db6137770dbee308f9c9fd6b4b5 --- M Gemfile M Gemfile.lock M Podfile M Podfile.lock M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h M Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m M Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h M Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m M Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h M Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m M Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h M Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m M Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h M Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m M Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h M Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m M Pods/AFNetworking/LICENSE M Pods/AFNetworking/README.md M Pods/Manifest.lock M Pods/Pods.xcodeproj/project.pbxproj M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-acknowledgements.markdown M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-acknowledgements.plist M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-environment.h M Pods/Target Support Files/Pods-WikipediaUnitTests/Pods-WikipediaUnitTests-resources.sh M Pods/Target Support Files/Pods/Pods-acknowledgements.markdown M Pods/Target Support Files/Pods/Pods-acknowledgements.plist M Pods/Target Support Files/Pods/Pods-environment.h M Pods/Target Support Files/Pods/Pods-resources.sh 30 files changed, 5,041 insertions(+), 5,009 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/34/219434/1 -- To view, visit https://gerrit.wikimedia.org/r/219434 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9b6c9e101ef2db6137770dbee308f9c9fd6b4b5 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add CocoaLumberjack - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219435 Change subject: add CocoaLumberjack .. add CocoaLumberjack Change-Id: I85bf6739df20541587ae0e485a05ad4a2295f02f --- M Podfile M Podfile.lock A Pods/CocoaLumberjack/Classes/CocoaLumberjack.h A Pods/CocoaLumberjack/Classes/CocoaLumberjack.swift A Pods/CocoaLumberjack/Classes/DDASLLogCapture.h A Pods/CocoaLumberjack/Classes/DDASLLogCapture.m A Pods/CocoaLumberjack/Classes/DDASLLogger.h A Pods/CocoaLumberjack/Classes/DDASLLogger.m A Pods/CocoaLumberjack/Classes/DDAbstractDatabaseLogger.h A Pods/CocoaLumberjack/Classes/DDAbstractDatabaseLogger.m A Pods/CocoaLumberjack/Classes/DDAssertMacros.h A Pods/CocoaLumberjack/Classes/DDFileLogger.h A Pods/CocoaLumberjack/Classes/DDFileLogger.m A Pods/CocoaLumberjack/Classes/DDLegacyMacros.h A Pods/CocoaLumberjack/Classes/DDLog+LOGV.h A Pods/CocoaLumberjack/Classes/DDLog.h A Pods/CocoaLumberjack/Classes/DDLog.m A Pods/CocoaLumberjack/Classes/DDLogMacros.h A Pods/CocoaLumberjack/Classes/DDTTYLogger.h A Pods/CocoaLumberjack/Classes/DDTTYLogger.m A Pods/CocoaLumberjack/Classes/Extensions/DDContextFilterLogFormatter.h A Pods/CocoaLumberjack/Classes/Extensions/DDContextFilterLogFormatter.m A Pods/CocoaLumberjack/Classes/Extensions/DDDispatchQueueLogFormatter.h A Pods/CocoaLumberjack/Classes/Extensions/DDDispatchQueueLogFormatter.m A Pods/CocoaLumberjack/Classes/Extensions/DDMultiFormatter.h A Pods/CocoaLumberjack/Classes/Extensions/DDMultiFormatter.m A Pods/CocoaLumberjack/LICENSE.txt A Pods/CocoaLumberjack/README.md A Pods/Headers/Private/CocoaLumberjack/CocoaLumberjack.h A Pods/Headers/Private/CocoaLumberjack/DDASLLogCapture.h A Pods/Headers/Private/CocoaLumberjack/DDASLLogger.h A Pods/Headers/Private/CocoaLumberjack/DDAbstractDatabaseLogger.h A Pods/Headers/Private/CocoaLumberjack/DDAssertMacros.h A Pods/Headers/Private/CocoaLumberjack/DDContextFilterLogFormatter.h A Pods/Headers/Private/CocoaLumberjack/DDDispatchQueueLogFormatter.h A Pods/Headers/Private/CocoaLumberjack/DDFileLogger.h A Pods/Headers/Private/CocoaLumberjack/DDLegacyMacros.h A Pods/Headers/Private/CocoaLumberjack/DDLog+LOGV.h A Pods/Headers/Private/CocoaLumberjack/DDLog.h A Pods/Headers/Private/CocoaLumberjack/DDLogMacros.h A Pods/Headers/Private/CocoaLumberjack/DDMultiFormatter.h A Pods/Headers/Private/CocoaLumberjack/DDTTYLogger.h A Pods/Headers/Public/CocoaLumberjack/CocoaLumberjack.h A Pods/Headers/Public/CocoaLumberjack/DDASLLogCapture.h A Pods/Headers/Public/CocoaLumberjack/DDASLLogger.h A Pods/Headers/Public/CocoaLumberjack/DDAbstractDatabaseLogger.h A Pods/Headers/Public/CocoaLumberjack/DDAssertMacros.h A Pods/Headers/Public/CocoaLumberjack/DDContextFilterLogFormatter.h A Pods/Headers/Public/CocoaLumberjack/DDDispatchQueueLogFormatter.h A Pods/Headers/Public/CocoaLumberjack/DDFileLogger.h A Pods/Headers/Public/CocoaLumberjack/DDLegacyMacros.h A Pods/Headers/Public/CocoaLumberjack/DDLog+LOGV.h A Pods/Headers/Public/CocoaLumberjack/DDLog.h A Pods/Headers/Public/CocoaLumberjack/DDLogMacros.h A Pods/Headers/Public/CocoaLumberjack/DDMultiFormatter.h A Pods/Headers/Public/CocoaLumberjack/DDTTYLogger.h M Pods/Manifest.lock M Pods/Pods.xcodeproj/project.pbxproj M Pods/Target Support Files/Pods-AFNetworking/Pods-AFNetworking-Private.xcconfig M Pods/Target Support Files/Pods-BlocksKit/Pods-BlocksKit-Private.xcconfig A Pods/Target Support Files/Pods-CocoaLumberjack/Pods-CocoaLumberjack-Private.xcconfig A Pods/Target Support Files/Pods-CocoaLumberjack/Pods-CocoaLumberjack-dummy.m A Pods/Target Support Files/Pods-CocoaLumberjack/Pods-CocoaLumberjack-prefix.pch A Pods/Target Support Files/Pods-CocoaLumberjack/Pods-CocoaLumberjack.xcconfig M Pods/Target Support Files/Pods-HockeySDK/Pods-HockeySDK-Private.xcconfig M Pods/Target Support Files/Pods-Masonry/Pods-Masonry-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-AFNetworking/Pods-WikipediaUnitTests-AFNetworking-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-BlocksKit/Pods-WikipediaUnitTests-BlocksKit-Private.xcconfig A Pods/Target Support Files/Pods-WikipediaUnitTests-CocoaLumberjack/Pods-WikipediaUnitTests-CocoaLumberjack-Private.xcconfig A Pods/Target Support Files/Pods-WikipediaUnitTests-CocoaLumberjack/Pods-WikipediaUnitTests-CocoaLumberjack-dummy.m A Pods/Target Support Files/Pods-WikipediaUnitTests-CocoaLumberjack/Pods-WikipediaUnitTests-CocoaLumberjack-prefix.pch A Pods/Target Support Files/Pods-WikipediaUnitTests-CocoaLumberjack/Pods-WikipediaUnitTests-CocoaLumberjack.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-HockeySDK/Pods-WikipediaUnitTests-HockeySDK-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-Masonry/Pods-WikipediaUnitTests-Masonry-Private.xcconfig M Pods/Target Support Files/Pods-WikipediaUnitTests-OCHamcrest/Pods-WikipediaUnitTests-OCHamcrest-Private.xcconfig M Pods/Target Support
[MediaWiki-commits] [Gerrit] remove UI-V5 folder - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219428 Change subject: remove UI-V5 folder .. remove UI-V5 folder Change-Id: Id383dafa49b1f70855a2f9e70c2a675da6b26311 --- M Wikipedia.xcodeproj/project.pbxproj R Wikipedia/Global.h R Wikipedia/mw-utils/WMFGCDHelpers.h 3 files changed, 2 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/28/219428/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index a9f9e1e..d0ececa 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -2050,15 +2050,6 @@ name = Image Gallery; sourceTree = group; }; - 0EFB0EF61B31ECCB00D05C08 /* UI-V5 */ = { - isa = PBXGroup; - children = ( - 0EFB0EF71B31ECCB00D05C08 /* Global.h */, - 0EFB0EF81B31ECCB00D05C08 /* WMFGCDHelpers.h */, - ); - path = UI-V5; - sourceTree = group; - }; 0EFB0EF91B31EE2D00D05C08 /* LegacyCoreData */ = { isa = PBXGroup; children = ( @@ -2421,6 +2412,7 @@ C9180EC118AED30C006C1DCA /* mw-utils */ = { isa = PBXGroup; children = ( + 0EFB0EF81B31ECCB00D05C08 /* WMFGCDHelpers.h */, C9180EC218AED30C006C1DCA /* WikipediaAppUtils.h */, C9180EC318AED30C006C1DCA /* WikipediaAppUtils.m */, BC7DFCD41AA4E5FE35C3 /* WMFImageURLParsing.h */, @@ -2516,7 +2508,6 @@ D4BC22B3181E9E6300CAC673 /* empty.png */, D4991447181D51DE00E6073C /* AppDelegate.h */, D4991448181D51DE00E6073C /* AppDelegate.m */, - 0EFB0EF61B31ECCB00D05C08 /* UI-V5 */, D499144A181D51DE00E6073C /* Main_iPhone.storyboard */, D46CD8C018A1AC4F0042959E /* InfoPlist.strings */, D46CD8C218A1AC4F0042959E /* Localizable.strings */, @@ -2542,6 +2533,7 @@ D4EE00BB182445670090790F /* mw-support */, C9180EC118AED30C006C1DCA /* mw-utils */, 049566BF18F5F4CB0058EA12 /* Zero */, + 0EFB0EF71B31ECCB00D05C08 /* Global.h */, BCD41DD41B1079A600231BB1 /* Wikipedia-Bridging-Header.h */, ); path = Wikipedia; diff --git a/Wikipedia/UI-V5/Global.h b/Wikipedia/Global.h similarity index 100% rename from Wikipedia/UI-V5/Global.h rename to Wikipedia/Global.h diff --git a/Wikipedia/UI-V5/WMFGCDHelpers.h b/Wikipedia/mw-utils/WMFGCDHelpers.h similarity index 100% rename from Wikipedia/UI-V5/WMFGCDHelpers.h rename to Wikipedia/mw-utils/WMFGCDHelpers.h -- To view, visit https://gerrit.wikimedia.org/r/219428 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id383dafa49b1f70855a2f9e70c2a675da6b26311 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Podfile to iOS 7 - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/219205 Change subject: Update Podfile to iOS 7 .. Update Podfile to iOS 7 Follow on patch for T102362 Change-Id: I398822335e02047e3ff3a2da078c58b4c5d6ae73 --- M Podfile M Pods/Pods.xcodeproj/project.pbxproj 2 files changed, 4,687 insertions(+), 4,680 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/05/219205/1 -- To view, visit https://gerrit.wikimedia.org/r/219205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I398822335e02047e3ff3a2da078c58b4c5d6ae73 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump to 4.1.5.141 - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/216861 Change subject: Bump to 4.1.5.141 .. Bump to 4.1.5.141 Change-Id: Iebce6e6e081e316a4919e5ddd07368449cdf1190 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Wikipedia-Info.plist 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/61/216861/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index e55b1f4..8760d41 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -224,9 +224,9 @@ BC49B3641AEECFD8009F55BE /* ArticleLoadingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC49B3631AEECFD8009F55BE /* ArticleLoadingTests.m */; }; BC50C37F1A83C784006DC7AF /* WMFNetworkUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = BC50C37E1A83C784006DC7AF /* WMFNetworkUtilities.m */; }; BC50C3871A83CBDA006DC7AF /* MWKImageInfoResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = BC50C3861A83CBDA006DC7AF /* MWKImageInfoResponseSerializer.m */; }; - BC5FE5751B1DFF5400273BC0 /* ArticleFetcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5FE5741B1DFF5400273BC0 /* ArticleFetcherTests.m */; }; BC5FE5701B1DF02900273BC0 /* ENWikiSiteInfo.json in Resources */ = {isa = PBXBuildFile; fileRef = BC5FE56F1B1DF02900273BC0 /* ENWikiSiteInfo.json */; }; BC5FE5721B1DF38A00273BC0 /* NOWikiSiteInfo.json in Resources */ = {isa = PBXBuildFile; fileRef = BC5FE5711B1DF38A00273BC0 /* NOWikiSiteInfo.json */; }; + BC5FE5751B1DFF5400273BC0 /* ArticleFetcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5FE5741B1DFF5400273BC0 /* ArticleFetcherTests.m */; }; BC69C3141AB0C1FF0090B039 /* WMFImageInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */; }; BC6BF4001B19213600362968 /* XCTestCase+WMFLocaleTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6BF3FE1B19209900362968 /* XCTestCase+WMFLocaleTesting.m */; }; BC7DFCD61AA4E5FE35C3 /* WMFImageURLParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7DFCD51AA4E5FE35C3 /* WMFImageURLParsing.m */; }; @@ -764,9 +764,9 @@ BC50C3821A83C88F006DC7AF /* WMFJoinedPropertyParametersTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFJoinedPropertyParametersTests.m; sourceTree = group; }; BC50C3851A83CBDA006DC7AF /* MWKImageInfoResponseSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWKImageInfoResponseSerializer.h; path = Serializers/MWKImageInfoResponseSerializer.h; sourceTree = group; }; BC50C3861A83CBDA006DC7AF /* MWKImageInfoResponseSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MWKImageInfoResponseSerializer.m; path = Serializers/MWKImageInfoResponseSerializer.m; sourceTree = group; }; - BC5FE5741B1DFF5400273BC0 /* ArticleFetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArticleFetcherTests.m; sourceTree = group; }; BC5FE56F1B1DF02900273BC0 /* ENWikiSiteInfo.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ENWikiSiteInfo.json; sourceTree = group; }; BC5FE5711B1DF38A00273BC0 /* NOWikiSiteInfo.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = NOWikiSiteInfo.json; sourceTree = group; }; + BC5FE5741B1DFF5400273BC0 /* ArticleFetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArticleFetcherTests.m; sourceTree = group; }; BC69C3121AB0C1FF0090B039 /* WMFImageInfoController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFImageInfoController.h; path = Image Gallery/WMFImageInfoController.h; sourceTree = group; }; BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WMFImageInfoController.m; path = Image Gallery/WMFImageInfoController.m; sourceTree = group; }; BC6BF3FD1B19209900362968 /* XCTestCase+WMFLocaleTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCTestCase+WMFLocaleTesting.h; sourceTree = group; }; diff --git a/Wikipedia/Wikipedia-Info.plist b/Wikipedia/Wikipedia-Info.plist index a64bcc4..8446d09 100644 --- a/Wikipedia/Wikipedia-Info.plist +++
[MediaWiki-commits] [Gerrit] fix compiler error - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/216875 Change subject: fix compiler error .. fix compiler error Change-Id: Iae758d8ce28119d95487775b3511d2ba56423c12 --- M Wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/75/216875/1 diff --git a/Wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/Wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index cb12fb4..302f58a 100644 --- a/Wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/Wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -163,7 +163,7 @@ || ![(WikiGlyphButton*)recognizer.view enabled]) { return; } -[self animateAndPerformActionForButton:recognizer.view +[self animateAndPerformActionForButton:(WikiGlyphButton*)recognizer.view disableButtonInteraction:recognizer.view.tag == BOTTOM_MENU_BUTTON_SHARE]; } -- To view, visit https://gerrit.wikimedia.org/r/216875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae758d8ce28119d95487775b3511d2ba56423c12 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix visual fnl lang picker regressions - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/216903 Change subject: fix visual fnl lang picker regressions .. fix visual fnl lang picker regressions - Language filtering (filter both localized lang name autonym) - Rounded edit pencil in webview footer - Bottom spacing of webview footer (restored 30-top 35-bottom space constraints) Bug: T97780 Change-Id: Idff071211a9ed17a8f7c74c06f03baad714481cd --- M Wikipedia/Categories/UIView+WMFRoundCorners.h M Wikipedia/Categories/UIView+WMFRoundCorners.m M Wikipedia/View Controllers/Languages/LanguagesViewController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.xib M Wikipedia/View Controllers/WebView/WebViewController.m 6 files changed, 27 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/03/216903/1 diff --git a/Wikipedia/Categories/UIView+WMFRoundCorners.h b/Wikipedia/Categories/UIView+WMFRoundCorners.h index e657532..9e2cf19 100644 --- a/Wikipedia/Categories/UIView+WMFRoundCorners.h +++ b/Wikipedia/Categories/UIView+WMFRoundCorners.h @@ -5,6 +5,14 @@ @interface UIView (WMF_RoundCorners) +/// Round all corners of the receiver, making it circular. +- (void)wmf_roundCorners; + +/** + * Round the given corners of the receiver. + * @param corners The corners to apply rounding to. + * @param radiusThe radius to apply to @c corners. + */ - (void)wmf_roundCorners:(UIRectCorner)corners toRadius:(float)radius; @end diff --git a/Wikipedia/Categories/UIView+WMFRoundCorners.m b/Wikipedia/Categories/UIView+WMFRoundCorners.m index 66e3e4c..4053d50 100644 --- a/Wikipedia/Categories/UIView+WMFRoundCorners.m +++ b/Wikipedia/Categories/UIView+WMFRoundCorners.m @@ -5,9 +5,11 @@ @implementation UIView (WMF_RoundCorners) -- (void)wmf_roundCorners:(UIRectCorner)corners toRadius:(float)radius { // Use for rounding *specific* corners of a UIView. - // Based on http://stackoverflow.com/a/5826745/135557 +- (void)wmf_roundCorners { +self.layer.cornerRadius = self.frame.size.width / 2.f; +} +- (void)wmf_roundCorners:(UIRectCorner)corners toRadius:(float)radius { UIBezierPath* maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:corners cornerRadii:CGSizeMake(radius, radius)]; diff --git a/Wikipedia/View Controllers/Languages/LanguagesViewController.m b/Wikipedia/View Controllers/Languages/LanguagesViewController.m index e33a098..b051f7d 100644 --- a/Wikipedia/View Controllers/Languages/LanguagesViewController.m +++ b/Wikipedia/View Controllers/Languages/LanguagesViewController.m @@ -147,9 +147,9 @@ } else { filteredLanguages = [self.languagesData bk_select:^BOOL (NSDictionary* lang) { // TODO: use proper model object and refactor this into an instance method -return [lang[@name] wmf_isEqualToStringIgnoringCase:self.filterString] +return [lang[@name] wmf_caseInsensitiveContainsString:self.filterString] || [lang[@canonical_name] wmf_caseInsensitiveContainsString:self.filterString] -|| [lang[@code] wmf_isEqualToStringIgnoringCase:self.filterString]; +|| [lang[@code] wmf_caseInsensitiveContainsString:self.filterString]; }]; } @@ -167,8 +167,7 @@ return ![preferredLanguagesSection.languages containsObject:evaluatedObject]; }]]; -self.sections = [@[preferredLanguagesSection, otherLanguagesSection] -bk_select:^BOOL (LanguagesTableSectionViewModel* section) { +self.sections = [@[preferredLanguagesSection, otherLanguagesSection] bk_select :^BOOL (LanguagesTableSectionViewModel* section) { return section.languages.count 0; }]; diff --git a/Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m b/Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m index 88102ec..ecc9624 100644 --- a/Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m +++ b/Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m @@ -13,6 +13,7 @@ #import UIColor+WMFHexColor.h #import UIViewController+ModalPresent.h //#import UIView+Debugging.h +#import UIView+WMFRoundCorners.h #pragma mark Font sizes @@ -48,21 +49,15 @@ - (void)viewDidLoad { [super viewDidLoad]; - -[self adjustConstraintsScaleForViews: - @[self.lastModGlyphLabel, self.lastModLabel]]; - -//[self.view randomlyColorSubviews]; -} - -- (void)viewDidAppear:(BOOL)animated
[MediaWiki-commits] [Gerrit] build url using formats until iOS 6 is dropped - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/216692 Change subject: build url using formats until iOS 6 is dropped .. build url using formats until iOS 6 is dropped Can't use NSURLComponents until iOS 6 is dropped. Wrapped in a pragma which will throw a compiler error when we drop iOS 6, that way we can immediately switch to NSURLComponents. Change-Id: I3bba52502e2bc1f361137069ccdf87c38ac9cbba --- M MediaWikiKit/MediaWikiKit/MWKSite.m 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/92/216692/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKSite.m b/MediaWikiKit/MediaWikiKit/MWKSite.m index 66def57..d4ca25f 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSite.m +++ b/MediaWikiKit/MediaWikiKit/MWKSite.m @@ -73,6 +73,8 @@ } - (NSURL*)apiEndpoint:(BOOL)isMobile { +#if __IPHONE_OS_VERSION_MIN_REQUIRED = __IPHONE_7_0 +#error use this implementation now that iOS 6 is dropped NSURLComponents* apiEndpointComponents = [[NSURLComponents alloc] init]; apiEndpointComponents.scheme = @https; NSMutableArray* hostComponents = [NSMutableArray arrayWithObject:self.language]; @@ -81,8 +83,14 @@ } [hostComponents addObject:self.domain]; apiEndpointComponents.host = [hostComponents componentsJoinedByString:@.]; -apiEndpointComponents.path = @/w/api.php; +apiEndpointComponents.path = @; return [apiEndpointComponents URL]; +#else +return [NSURL URLWithString:[NSString stringWithFormat:@https://%@.%@%@/w/api.php;, + self.language, + isMobile ? @m. : @, + self.domain]]; +#endif } #pragma mark - NSObject -- To view, visit https://gerrit.wikimedia.org/r/216692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bba52502e2bc1f361137069ccdf87c38ac9cbba Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add FAQ wiki link to More menu - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/216276 Change subject: add FAQ wiki link to More menu .. add FAQ wiki link to More menu FAQ lives under the new About section (formerly Privacy and Terms). Since the section is renamed, I removed all the old localizations. - [x] update More menu w/ FAQ option - [x] clicking FAQ item opens wiki page in safari - [x] add qqq en localizations for button title - [x] add link accessibility trait Boyscout cleanups: - Removed commented out unused references to old More rows related to Saved Pages Bug: T99783 Change-Id: I2715d7c2cd07174bef724b97052f58b77cfcc83e --- M Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M Wikipedia/ast.lproj/Localizable.strings M Wikipedia/bn.lproj/Localizable.strings M Wikipedia/br.lproj/Localizable.strings M Wikipedia/ca.lproj/Localizable.strings M Wikipedia/ce.lproj/Localizable.strings M Wikipedia/da.lproj/Localizable.strings M Wikipedia/de.lproj/Localizable.strings M Wikipedia/en.lproj/Localizable.strings M Wikipedia/es.lproj/Localizable.strings M Wikipedia/fa.lproj/Localizable.strings M Wikipedia/fi.lproj/Localizable.strings M Wikipedia/fo.lproj/Localizable.strings M Wikipedia/fr.lproj/Localizable.strings M Wikipedia/gl.lproj/Localizable.strings M Wikipedia/he.lproj/Localizable.strings M Wikipedia/hu.lproj/Localizable.strings M Wikipedia/id.lproj/Localizable.strings M Wikipedia/is.lproj/Localizable.strings M Wikipedia/it.lproj/Localizable.strings M Wikipedia/ja.lproj/Localizable.strings M Wikipedia/ka.lproj/Localizable.strings M Wikipedia/km.lproj/Localizable.strings M Wikipedia/ko.lproj/Localizable.strings M Wikipedia/krc.lproj/Localizable.strings M Wikipedia/ksh.lproj/Localizable.strings M Wikipedia/lb.lproj/Localizable.strings M Wikipedia/mai.lproj/Localizable.strings M Wikipedia/mk.lproj/Localizable.strings M Wikipedia/ms.lproj/Localizable.strings M Wikipedia/nb.lproj/Localizable.strings M Wikipedia/nl.lproj/Localizable.strings M Wikipedia/oc.lproj/Localizable.strings M Wikipedia/pa.lproj/Localizable.strings M Wikipedia/pt-br.lproj/Localizable.strings M Wikipedia/pt.lproj/Localizable.strings M Wikipedia/qqq.lproj/Localizable.strings M Wikipedia/ro.lproj/Localizable.strings M Wikipedia/ru.lproj/Localizable.strings M Wikipedia/sa.lproj/Localizable.strings M Wikipedia/sk.lproj/Localizable.strings M Wikipedia/sv.lproj/Localizable.strings M Wikipedia/sw.lproj/Localizable.strings M Wikipedia/tr.lproj/Localizable.strings M Wikipedia/uk.lproj/Localizable.strings M Wikipedia/vi.lproj/Localizable.strings M Wikipedia/zh-hans.lproj/Localizable.strings M Wikipedia/zh-hant.lproj/Localizable.strings 48 files changed, 90 insertions(+), 192 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/76/216276/1 diff --git a/Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m index f86dd9e..999d041 100644 --- a/Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m @@ -42,8 +42,6 @@ typedef NS_ENUM (NSUInteger, SecondaryMenuRowIndex) { SECONDARY_MENU_ROW_INDEX_LOGIN, -SECONDARY_MENU_ROW_INDEX_SAVED_PAGES, -SECONDARY_MENU_ROW_INDEX_SAVE_PAGE, SECONDARY_MENU_ROW_INDEX_SEARCH_LANGUAGE, SECONDARY_MENU_ROW_INDEX_ZERO_FAQ, SECONDARY_MENU_ROW_INDEX_ZERO_WARN_WHEN_LEAVING, @@ -57,10 +55,11 @@ SECONDARY_MENU_ROW_INDEX_RATE_APP, SECONDARY_MENU_ROW_INDEX_DEBUG_CRASH, SECONDARY_MENU_ROW_INDEX_HEADING_ZERO, -SECONDARY_MENU_ROW_INDEX_HEADING_LEGAL, +SECONDARY_MENU_ROW_INDEX_HEADING_ABOUT, SECONDARY_MENU_ROW_INDEX_HEADING_DEBUG, SECONDARY_MENU_ROW_INDEX_HEADING_BLANK, -SECONDARY_MENU_ROW_INDEX_HEADING_BLANK_2 +SECONDARY_MENU_ROW_INDEX_HEADING_BLANK_2, +SECONDARY_MENU_ROW_INDEX_FAQ }; static uint const WMFDebugSectionCount= 2; @@ -75,8 +74,6 @@ @property (strong, nonatomic) IBOutlet TabularScrollView* scrollView; @property (strong, nonatomic) NSMutableArray* rowData; @property (strong, nonatomic) NSMutableArray* rowViews; -@property (nonatomic) BOOL hidePagesSection; - @property (strong, nonatomic) NSDictionary* highlightedTextAttributes; @end @@ -121,7 +118,6 @@ self.highlightedTextAttributes = @{ NSFontAttributeName: [UIFont italicSystemFontOfSize:MENU_TITLE_FONT_SIZE] }; -self.hidePagesSection = NO; self.navigationItem.hidesBackButton = YES; self.view.backgroundColor = CHROME_COLOR; @@ -134,10 +130,6 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - -MWKTitle* currentArticleTitle = [SessionSingleton sharedInstance].currentArticle.title; - -self.hidePagesSection =
[MediaWiki-commits] [Gerrit] Fix to makefile so it pulls same upstream css as before. - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix to makefile so it pulls same upstream css as before. .. Fix to makefile so it pulls same upstream css as before. The mobile app extension css handling changed: https://gerrit.wikimedia.org/r/#/c/213431 This means we needed to tweak the url the make file was using to retrieve css so we get the same css as before. Change-Id: I8c91b06cb15d69b8ff367ba84cc61ee55acd4e5e --- M Makefile M Wikipedia/assets/abusefilter.css M Wikipedia/assets/preview.css M Wikipedia/assets/styles.css 4 files changed, 7 insertions(+), 7 deletions(-) Approvals: Bgerstle: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/Makefile b/Makefile index 8a20fb4..2caa142 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ web: ##Make web assets web: css grunt -CSS_ORIGIN = http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enonly=stylesskin=vectormodules= +CSS_ORIGIN = http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enonly=stylesskin=vectormodules=skins.minerva.base.reset|skins.minerva.content.styles| WEB_ASSETS_DIR = Wikipedia/assets define get_css_module diff --git a/Wikipedia/assets/abusefilter.css b/Wikipedia/assets/abusefilter.css index 5044b68..4e43e3e 100644 --- a/Wikipedia/assets/abusefilter.css +++ b/Wikipedia/assets/abusefilter.css @@ -1,2 +1,2 @@ -html,body,div,span,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,ins,em,img,small,strike,strong,sub,sup,tt,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,input,textarea,button,select,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;background:none}table,caption,tbody,tfoot,thead,tr,th,td{font-size:100%}button{border:none;background-color:transparent}body{line-height:1;-webkit-tap-highlight-color:transparent}input{line-height:normal}ol,ul{list-style:none}table{border-collapse:collapse}html{-webkit-text-size-adjust:none;font-size:100%}body{font-family:Helvetica Neue,Helvetica,Nimbus Sans L,Arial,Liberation Sans,sans-serif;line-height:1.4;color:#252525;background:#fff}.content{line-height:1.65;margin:.8em 16px 0;word-wrap:break-word}@media all and (max-width:280px){body{font-size:.8em}.content{margin:0 12px}}.nomobile{display:none !important}.content .thumb{margin:.6em 0}.content .thumb .thumbinner{margin:0 auto;max-width:100% !important}.content .thumb .thumbinner div{float:none !important;width:auto !important;clear:both !important}.content .thumb .noresize{width:100%;overflow-x:auto}.content .thumb .noresize img{max-width:none !important}.content .thumbcaption{margin:.5em 0 0;font-size:.8em;line-height:1.5;padding:0 !important;color:#555;width:auto !important}.content .thumbborder{border:1px solid #CCC}.content img{vertical-align:middle}.content .floatright{clear:right;float:right;margin:0 0 .6em .6em}.content .floatleft{clear:left;float:left;margin:0 .6em .6em 0}.content a img{max-width:100% !important;height:auto !important}.content div.magnify{display:none}ul.gallery{list-style:none;max-width:100%}ul.gallery .gallerybox{display:inline-block;vertical-align:top;max-width:100%}ul.gallery .gallerybox .thumb img{display:block}ul.gallery .gallerybox div{max-width:100%}ul.gallery .gallerybox div .thumb{max-width:100%}ul.gallery .gallerybox .gallerytext{overflow:hidden;padding:2px 4px;word-wrap:break-word;font-size:.8em}#section_0{line-height:1.3}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{line-height:1.3;font-family:Linux Libertine,Georgia,Times,serif;padding:.5em 0}.pre-content h1,.content h1{-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto;font-family:Linux Libertine,Georgia,Times,serif;font-size:1.7em;-ms-word-break:normal;word-break:normal;word-wrap:break-word}h2{font-size:1.5em}h3{font-size:1.2em;font-weight:bold}h4{font-weight:bold}blockquote{font-family:Linux Libertine,Georgia,Times,serif;font-size:1.1em;quotes:\201C \201D;padding:1em 25px 1em 30px;position:relative;overflow:hidden}blockquote:before{content:open-quote;font-size:3em;position:absolute;left:0;top:0}blockquote:after{content:close-quote;font-size:3em;line-height:1;position:absolute;right:0;bottom:0}.content ol ol,.content ol ul,.content ul ol,.content ul ul{margin-left:1em}.content ol li,.content ul li{margin-bottom:10px}.content ol li:last-child,.content ul li:last-child{margin-bottom:inherit}.content ul{list-style:square inside}.content ulliul{list-style-type:disc}.content ulliulliul{list-style-type:circle}.content ol{list-style:decimal inside}dl{margin-left:1em}dl dt{font-weight:bold}.hlist ul li,ul.hlist
[MediaWiki-commits] [Gerrit] move hockeyapp debug menu config to info.plist - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/215817 Change subject: move hockeyapp debug menu config to info.plist .. move hockeyapp debug menu config to info.plist - tested on: - [x] Debug: https://rink.hockeyapp.net/manage/apps/152723/crash_reasons/36517884/multiple - [x] Alpha: https://rink.hockeyapp.net/manage/apps/176472/app_versions/29/crash_reasons/36518556 - [x] Beta: https://rink.hockeyapp.net/manage/apps/152725/app_versions/33/crash_reasons/36518862 - [x] Release (not showing debug menu, but HA id is correct) - [x] Release w/ override: https://rink.hockeyapp.net/manage/apps/152731/app_versions/16/crash_reasons/36492385?type=crashes Bug: T101269 Change-Id: I0af310e18f13eb92d7c9676973baacc01e76d83d --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Categories/BITHockeyManager+WMFExtensions.m M Wikipedia/Categories/NSBundle+WMFInfoUtils.h M Wikipedia/Categories/NSBundle+WMFInfoUtils.m M Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M Wikipedia/Wikipedia-Info.plist M fastlane/Fastfile M scripts/process_plist.sh 8 files changed, 53 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/17/215817/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index a8d189e..1fc9ec6 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -3542,6 +3542,7 @@ -Werror=incompatible-pointer-types, -Werror=incomplete-implementation, ); + WMF_HOCKEYAPP_IDENTIFIER = 35ef86a164e10f9c01c634c640ec2f0a; WRAPPER_EXTENSION = app; }; name = Alpha; @@ -3644,6 +3645,7 @@ -Werror=incompatible-pointer-types, -Werror=incomplete-implementation, ); + WMF_HOCKEYAPP_IDENTIFIER = 2295c3698bbd0b050f257772dd2bdbb2; WRAPPER_EXTENSION = app; }; name = Beta; @@ -3836,6 +3838,7 @@ -Werror=incompatible-pointer-types, -Werror=incomplete-implementation, ); + WMF_HOCKEYAPP_IDENTIFIER = 76947f174e31a9e33fe67d81ff31732e; WRAPPER_EXTENSION = app; }; name = Debug; @@ -3871,6 +3874,7 @@ -Werror=incompatible-pointer-types, -Werror=incomplete-implementation, ); + WMF_HOCKEYAPP_IDENTIFIER = 5d80da08a6761e5c6456736af7ebad88; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/Wikipedia/Categories/BITHockeyManager+WMFExtensions.m b/Wikipedia/Categories/BITHockeyManager+WMFExtensions.m index 536b9bf..dfc4028 100644 --- a/Wikipedia/Categories/BITHockeyManager+WMFExtensions.m +++ b/Wikipedia/Categories/BITHockeyManager+WMFExtensions.m @@ -15,19 +15,6 @@ static NSString* const kHockeyAppAlwaysSendStringsKey= @hockeyapp-alert-always-send; static NSString* const kHockeyAppDoNotSendStringsKey = @hockeyapp-alert-do-not-send; -static NSString* WMFCurrentHockeyReportingID() { -static NSDictionary* hockeyAPIKeysByBundleID; -if (!hockeyAPIKeysByBundleID) { -hockeyAPIKeysByBundleID = @{ -@org.wikimedia.wikipedia.tfbeta: @2295c3698bbd0b050f257772dd2bdbb2, -@org.wikimedia.wikipedia.tfalpha: @38c83eea9df95b47d210c8ad137e815a, -@org.wikimedia.wikipedia: @5d80da08a6761e5c6456736af7ebad88, -@org.wikimedia.wikipedia.developer: @76947f174e31a9e33fe67d81ff31732e -}; -} -return hockeyAPIKeysByBundleID[[[NSBundle mainBundle] wmf_bundleIdentifier]]; -} - @implementation BITHockeyManager (WMFExtensions) + (NSString*)crashSendText { @@ -43,7 +30,7 @@ } - (void)wmf_setupAndStart { -[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:WMFCurrentHockeyReportingID()]; +[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:[[NSBundle mainBundle] wmf_hockeyappIdentifier]]; [[BITHockeyManager sharedHockeyManager] startManager]; [BITHockeyManager sharedHockeyManager].updateManager.updateSetting = BITUpdateCheckManually; [[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation]; diff --git
[MediaWiki-commits] [Gerrit] make sure to run block when commenting out version bump work - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: make sure to run block when commenting out version bump work .. make sure to run block when commenting out version bump work Change-Id: I8d31cfcc78ae01f9e94d444c7f69d9779f01e57a --- M fastlane/lib/utils.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/fastlane/lib/utils.rb b/fastlane/lib/utils.rb index 50ce4cc..b8360af 100644 --- a/fastlane/lib/utils.rb +++ b/fastlane/lib/utils.rb @@ -60,6 +60,6 @@ # # tag must be added after the version bump is committed # add_git_tag(tag: #{plist_version}.#{Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::BUILD_NUMBER]}) # end - # yield if block_given? + yield if block_given? # push_to_git_remote if ENV['WMF_BUMP'] end -- To view, visit https://gerrit.wikimedia.org/r/215640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d31cfcc78ae01f9e94d444c7f69d9779f01e57a Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix unit tests (again) crash reporting - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/215659 Change subject: fix unit tests (again) crash reporting .. fix unit tests (again) crash reporting Crash reporting is now expected to always be enabled. Exceptions (not assertions) will be thrown if it fails to be setup. This will give us early feedback (immediate at app launch) if it is ever accidentally disabled again. - Use bundle identifier instead of bundle version to get HockeyApp App ID for current bundle ID (auto-complete mistake) - Remove conditional logic in HockeyApp setup (should always setup, and fail silently if attached to debugger) - Add convenience macros to verify certain preconditions inline (see WMFPreconditions.h WMFPreconditionsTests.m) - Re-add fixtures to the testing target Bug: T100331 Change-Id: I97730f9f599e8fbb6f8c0662b39a5b8bb9bf8220 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Categories/BITHockeyManager+WMFExtensions.h M Wikipedia/Categories/BITHockeyManager+WMFExtensions.m M Wikipedia/Categories/NSBundle+WMFInfoUtils.h M Wikipedia/Categories/NSBundle+WMFInfoUtils.m A Wikipedia/mw-utils/WMFPreconditions.h M Wikipedia/mw-utils/WikipediaAppUtils.h M Wikipedia/mw-utils/WikipediaAppUtils.m D WikipediaUnitTests/BITHockeyManagerWMFExtensionsTests.m A WikipediaUnitTests/WMFPreconditionsTests.m 10 files changed, 157 insertions(+), 99 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/59/215659/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 925775e..1683c9d 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -187,7 +187,6 @@ 0EA4402E1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EA4402D1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.m */; }; 0EBC56681AD3656900E82CDD /* WMFAsyncTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7ACB631AB34C9C00791497 /* WMFAsyncTestCase.m */; }; 0EBC567F1AD442CC00E82CDD /* BITHockeyManager+WMFExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EBC567E1AD442CC00E82CDD /* BITHockeyManager+WMFExtensions.m */; }; - 0EBC56961AD5B22800E82CDD /* BITHockeyManagerWMFExtensionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EBC56951AD5B22800E82CDD /* BITHockeyManagerWMFExtensionsTests.m */; }; 0EBC56971AD5B69300E82CDD /* BITHockeyManager+WMFExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EBC567E1AD442CC00E82CDD /* BITHockeyManager+WMFExtensions.m */; }; 0EE7687B1AF982C100A5D046 /* WMFArticleProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE7687A1AF982C100A5D046 /* WMFArticleProtocol.m */; }; 0EE768811AFD25CC00A5D046 /* WMFSearchFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EE768801AFD25CC00A5D046 /* WMFSearchFunnel.m */; }; @@ -282,18 +281,19 @@ BCC185D81A9E5628005378F8 /* UILabel+WMFStyling.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185D71A9E5628005378F8 /* UILabel+WMFStyling.m */; }; BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */; }; BCC185E81A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */; }; + BCCEC1211B1F68CF00A8B522 /* golden-gate.jpg in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DDE1B11CC5800231BB1 /* golden-gate.jpg */; }; + BCCEC1221B1F68CF00A8B522 /* MainPageMobileView.json in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DDF1B11CC5800231BB1 /* MainPageMobileView.json */; }; + BCCEC1231B1F68CF00A8B522 /* Obama.json in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DE01B11CC5800231BB1 /* Obama.json */; }; + BCCEC1241B1F68CF00A8B522 /* organization-anon.json in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DE11B11CC5800231BB1 /* organization-anon.json */; }; + BCCEC1251B1F68CF00A8B522 /* protection-empty.json in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DE21B11CC5800231BB1 /* protection-empty.json */; }; + BCCEC1261B1F68CF00A8B522 /* protection-obama.json in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DE31B11CC5800231BB1 /* protection-obama.json */; }; + BCCEC1271B1F68CF00A8B522 /* section0.json in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DE41B11CC5800231BB1 /* section0.json */; }; + BCCEC1281B1F68CF00A8B522 /* section1-end.json in Resources */ = {isa = PBXBuildFile; fileRef = BCD41DE51B11CC5800231BB1 /* section1-end.json */; }; +
[MediaWiki-commits] [Gerrit] Fix for Bug: T99122 - exception on non-wmf image urls - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix for Bug: T99122 - exception on non-wmf image urls .. Fix for Bug: T99122 - exception on non-wmf image urls Once again throwing an exception where none was needed. Removed the exception and returned nil instead. Followed code paths to the change and ensured nil case can be handled by each caller. Also removed an unnecessary check for / when is ensured to be gone by the method provided by the SDK Added assertion to ensure non-nil filename. Change-Id: Iee8f5858c90e2ee0455567aa391e0452e00db389 --- M MediaWikiKit/MediaWikiKit/MWKArticle.m M MediaWikiKit/MediaWikiKit/MWKDataStore.m 2 files changed, 26 insertions(+), 28 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.m b/MediaWikiKit/MediaWikiKit/MWKArticle.m index 424da87..acc13f5 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.m +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.m @@ -188,14 +188,17 @@ * else return nil */ - (MWKImage*)existingImageWithURL:(NSString*)url { -NSString* thisImageCacheFolderPath = [self.dataStore pathForImageURL:url title:self.title]; -BOOL isDirectory= NO; -BOOL thisImageCacheFolderPathExists = [[NSFileManager defaultManager] fileExistsAtPath:thisImageCacheFolderPath isDirectory:isDirectory]; -if (!thisImageCacheFolderPathExists) { +NSString* imageCacheFolderPath = [self.dataStore pathForImageURL:url title:self.title]; +if (!imageCacheFolderPath) { return nil; -} else { -return [self imageWithURL:url]; } + +BOOL imageCacheFolderPathExists = [[NSFileManager defaultManager] fileExistsAtPath:imageCacheFolderPath isDirectory:NULL]; +if (!imageCacheFolderPathExists) { +return nil; +} + +return [self imageWithURL:url]; } #pragma mark - Save diff --git a/MediaWikiKit/MediaWikiKit/MWKDataStore.m b/MediaWikiKit/MediaWikiKit/MWKDataStore.m index cc7b972..c5a145c 100644 --- a/MediaWikiKit/MediaWikiKit/MWKDataStore.m +++ b/MediaWikiKit/MediaWikiKit/MWKDataStore.m @@ -82,7 +82,7 @@ - (NSString*)pathForImageURL:(NSString*)url title:(MWKTitle*)title { NSString* imagesPath = [self pathForImagesWithTitle:title]; NSString* encURL = [self safeFilenameWithImageURL:url]; -return [imagesPath stringByAppendingPathComponent:encURL]; +return encURL ? [imagesPath stringByAppendingPathComponent : encURL] : nil; } - (NSString*)pathForImage:(MWKImage*)image { @@ -108,28 +108,19 @@ - (NSString*)safeFilenameWithImageURL:(NSString*)str { str = [str wmf_schemelessURL]; -if ([str hasPrefix:MWKDataStoreValidImageSitePrefix]) { -NSString* suffix = [str substringFromIndex:[MWKDataStoreValidImageSitePrefix length]]; -NSString* fileName = [suffix lastPathComponent]; - -// Image URLs are already percent-encoded, so don't double-encode em. -// In fact, we want to decode them... -// If we don't, long Unicode filenames may not fit in the filesystem. -NSString* decodedFileName = [fileName stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - -// Just to be safe, confirm no path explostions! -if ([decodedFileName rangeOfString:@/].location != NSNotFound) { -@throw [NSException exceptionWithName:@MWKDataStoreException - reason:@Tried to save URL with encoded slash - userInfo:@{@str: str}]; -} - -return decodedFileName; -} else { -@throw [NSException exceptionWithName:@MWKDataStoreException - reason:@Tried to save non-upload.wikimedia.org URL as image - userInfo:@{@str: str ? str : [NSNull null]}]; +if (![str hasPrefix:MWKDataStoreValidImageSitePrefix]) { +return nil; } + +NSString* suffix = [str substringFromIndex:[MWKDataStoreValidImageSitePrefix length]]; +NSString* fileName = [suffix lastPathComponent]; + +// Image URLs are already percent-encoded, so don't double-encode em. +// In fact, we want to decode them... +// If we don't, long Unicode filenames may not fit in the filesystem. +NSString* decodedFileName = [fileName stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + +return decodedFileName; } #pragma mark - save methods @@ -146,6 +137,10 @@ } - (BOOL)saveData:(NSData*)data toFile:(NSString*)filename atPath:(NSString*)path error:(NSError**)error { +NSAssert([filename length] 0, @No file path given for saving data); +if (!filename) { +return NO; +} [self ensurePathExists:path error:error]; NSString* absolutePath = [path stringByAppendingPathComponent:filename]; return [data writeToFile:absolutePath
[MediaWiki-commits] [Gerrit] Fix alpha builds - use jenkins number for build number until... - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix alpha builds - use jenkins number for build number until we have the ability to push changes to gerrit. .. Fix alpha builds - use jenkins number for build number until we have the ability to push changes to gerrit. Change-Id: I6b1bd2bec3b6a1e9e7ccc8febd61448414e9d2df --- M fastlane/Fastfile M fastlane/lib/utils.rb 2 files changed, 12 insertions(+), 10 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 0bf2195..b58b73a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -50,6 +50,9 @@ force: true, filename: 'build/alpha.mobileprovision' ) + + increment_build_number ENV[BUILD_NUMBER].to_i + # uncomment when CI is able to push tags ipa( configuration: Alpha, diff --git a/fastlane/lib/utils.rb b/fastlane/lib/utils.rb index e5fb350..50ce4cc 100644 --- a/fastlane/lib/utils.rb +++ b/fastlane/lib/utils.rb @@ -53,14 +53,13 @@ # commit version bump, call a block, then push the bump to git def with_bump - if ENV['WMF_BUMP'] -increment_build_number -commit_version_bump -plist_version = get_version_short_string File.expand_path(File.join(ENV['PWD'], 'Wikipedia/Wikipedia-Info.plist')) -# tag must be added after the version bump is committed -add_git_tag(tag: #{plist_version}.#{Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::BUILD_NUMBER]}) - end - yield if block_given? - push_to_git_remote if ENV['WMF_BUMP'] + # if ENV['WMF_BUMP'] + # increment_build_number + # commit_version_bump + # plist_version = get_version_short_string File.expand_path(File.join(ENV['PWD'], 'Wikipedia/Wikipedia-Info.plist')) + # # tag must be added after the version bump is committed + # add_git_tag(tag: #{plist_version}.#{Fastlane::Actions.lane_context[Fastlane::Actions::SharedValues::BUILD_NUMBER]}) + # end + # yield if block_given? + # push_to_git_remote if ENV['WMF_BUMP'] end - -- To view, visit https://gerrit.wikimedia.org/r/215367 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b1bd2bec3b6a1e9e7ccc8febd61448414e9d2df Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for article not reloading from cache on app start. - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix for article not reloading from cache on app start. .. Fix for article not reloading from cache on app start. Also fixed issue with both article Images.plist and section Images.plist being doubled in size every time an article was refreshed. Bug: T101078 Change-Id: I8d461cb09c6b6a7381ba5ee01fc9cadcd6f49c17 --- M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h M MediaWikiKit/MediaWikiKit/MWKImageList.h M MediaWikiKit/MediaWikiKit/MWKImageList.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/C Methods/WMFArticleParsing.m A Wikipedia/Categories/NSURL+Extras.h A Wikipedia/Categories/NSURL+Extras.m M Wikipedia/Networking/Fetchers/ArticleFetcher.m M Wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m M Wikipedia/View Controllers/WebView/WebViewController.h M Wikipedia/View Controllers/WebView/WebViewController.m M WikipediaUnitTests/ArticleLoadingTests.m 12 files changed, 82 insertions(+), 28 deletions(-) Approvals: Fjalapeno: Looks good to me, but someone else must approve Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h index 2993426..a669565 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h @@ -16,7 +16,8 @@ MWKHistoryDiscoveryMethodLink, MWKHistoryDiscoveryMethodBackForward, MWKHistoryDiscoveryMethodSaved, -MWKHistoryDiscoveryMethodReload, +MWKHistoryDiscoveryMethodReloadFromNetwork, +MWKHistoryDiscoveryMethodReloadFromCache, MWKHistoryDiscoveryMethodUnknown }; diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.h b/MediaWikiKit/MediaWikiKit/MWKImageList.h index 9620ded..28aa906 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImageList.h +++ b/MediaWikiKit/MediaWikiKit/MWKImageList.h @@ -26,7 +26,7 @@ - (void)addImageURL:(NSString*)imageURL; -- (BOOL)hasImageURL:(NSString*)imageURL; +- (BOOL)hasImageURL:(NSURL*)imageURL; - (MWKImage*)imageWithURL:(NSString*)imageURL; diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.m b/MediaWikiKit/MediaWikiKit/MWKImageList.m index 63d5208..56ad161 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImageList.m +++ b/MediaWikiKit/MediaWikiKit/MWKImageList.m @@ -8,6 +8,7 @@ #import MediaWikiKit.h #import NSString+Extras.h +#import NSURL+Extras.h @interface MWKImageList () @@ -87,8 +88,13 @@ return [self.article.dataStore imageWithURL:imageURL article:self.article]; } -- (BOOL)hasImageURL:(NSString*)imageURL { -return [self imageWithURL:imageURL] != nil; +- (BOOL)hasImageURL:(NSURL*)imageURL { +NSString* imageURLString = [imageURL wmf_schemelessURLString]; +if (imageURLString imageURLString.length 0 [self.entries containsObject:imageURLString]) { +return YES; +} else { +return NO; +} } - (MWKImage*)imageWithURL:(NSString*)imageURL { @@ -185,6 +191,7 @@ } - (BOOL)addImageURLIfAbsent:(NSString*)imageURL { +imageURL = [imageURL wmf_schemelessURL]; if (imageURL imageURL.length 0 ![self.entries containsObject:imageURL]) { [self addImageURL:imageURL]; return YES; diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index af6fb6a..52f1d6e 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -69,6 +69,7 @@ 04530AF51935BF4D00022512 /* ModalMenuAndContentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04530AF41935BF4D00022512 /* ModalMenuAndContentViewController.m */; }; 04530AF81935C07500022512 /* ModalContentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04530AF71935C07500022512 /* ModalContentViewController.m */; }; 04530AFB1935C2B500022512 /* EmptySegue.m in Sources */ = {isa = PBXBuildFile; fileRef = 04530AFA1935C2B500022512 /* EmptySegue.m */; }; + 045AB8C31B1E15D9002839D7 /* NSURL+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = 045AB8C21B1E15D9002839D7 /* NSURL+Extras.m */; }; 045D872119FAD2FA0035C1F9 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 045D872019FAD2FA0035C1F9 /* AboutViewController.m */; }; 04616DFC1AE706C600815BCE /* WMFLocalizationProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 04616DFB1AE706C600815BCE /* WMFLocalizationProtocol.m */; }; 0462A6D11A1FE016009412D4 /* SearchResultAttributedString.m in Sources */ = {isa = PBXBuildFile; fileRef = 0462A6D01A1FE016009412D4 /* SearchResultAttributedString.m */; }; @@ -508,6 +509,8 @@ 04530AF71935C07500022512 /* ModalContentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModalContentViewController.m; sourceTree =
[MediaWiki-commits] [Gerrit] Fetch site info to get main page - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/215326 Change subject: Fetch site info to get main page .. Fetch site info to get main page Prevents a crash in the app when we don't know the main page for a given language code. This is done by fetching the site's siteinfo metadata, and extracting the mainpage field from it. The diff is large because: - I added new fetcher - I replaced isMain logic, which was quite pervasive - I refactored some stuff along the way. Also removes a lot of cruft: - Using SessionSingleton to check main pages (now checked directly on MWKArticle, using prexisting data from mobileview) - Removed hard-coded JSON file mapping language codes to main pages (as language codes did not match to ISO language codes used for iOS preferences) - Removed default NSUserDefault for current article, which was previously Main_Page (now we just load the default site's main page using aforementioned approach) - Moved setting of default NSUserDefaults to AppDelegate, to ensure they're registered deterministically at launch time—preventing race conditions between SessionSingleton init and default access - Cleaned up setting of search language/site (now a proper, settable property computed property pair) - Refactored wikipedia.org into WMFDefaultSiteDOmain constant - Refactored API networking utilities for easier reuse (WMFApiJsonResponseSerializer) Bug: T100687 Change-Id: Ie5b7bb2194212edce46349abc550404e0b71725d --- M MediaWikiKit/MediaWikiKit/MWKArticle.h M MediaWikiKit/MediaWikiKit/MWKArticle.m M MediaWikiKit/MediaWikiKit/MWKSite.h M MediaWikiKit/MediaWikiKit/MWKSite.m A MediaWikiKit/MediaWikiKit/MWKSiteInfo.h A MediaWikiKit/MediaWikiKit/MWKSiteInfo.m M MediaWikiKit/MediaWikiKit/MWKTitle.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/AppDelegate.m M Wikipedia/AssetsFile/WMFAssetsFile.h M Wikipedia/AssetsFile/WMFAssetsFile.m D Wikipedia/Categories/Alerts/AlertWebView.h D Wikipedia/Categories/Alerts/AlertWebView.m M Wikipedia/Categories/MWKArticle+WMFSharing.m D Wikipedia/Categories/MWKArticle+isMain.h D Wikipedia/Categories/MWKArticle+isMain.m M Wikipedia/Categories/MWKSection+DisplayHtml.m M Wikipedia/Networking/Fetchers/ArticleFetcher.m A Wikipedia/Networking/Fetchers/MWKSiteInfoFetcher.h A Wikipedia/Networking/Fetchers/MWKSiteInfoFetcher.m M Wikipedia/Networking/Serializers/MWKImageInfoResponseSerializer.h M Wikipedia/Networking/Serializers/MWKImageInfoResponseSerializer.m A Wikipedia/Networking/Serializers/WMFApiJsonResponseSerializer.h A Wikipedia/Networking/Serializers/WMFApiJsonResponseSerializer.m M Wikipedia/Networking/WMFNetworkUtilities.h M Wikipedia/Networking/WMFNetworkUtilities.m M Wikipedia/Protocols/WMFArticleProtocol.m M Wikipedia/Session/SessionSingleton.h M Wikipedia/Session/SessionSingleton.m M Wikipedia/View Controllers/Languages/LanguagesViewController.h M Wikipedia/View Controllers/Navigation/Center/CenterNavController.m M Wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M Wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m M Wikipedia/View Controllers/WebView/WebViewController.m M Wikipedia/mw-utils/WMFPageUtilities.h M Wikipedia/mw-utils/WMFPageUtilities.m A WikipediaUnitTests/MWKSiteInfoFetcherTests.m A WikipediaUnitTests/Utilities/XCTestCase+WMFLocaleTesting.h A WikipediaUnitTests/Utilities/XCTestCase+WMFLocaleTesting.m M WikipediaUnitTests/WMFAsyncTestCase.h M WikipediaUnitTests/WMFAsyncTestCase.m M WikipediaUnitTests/WMFDateFormatterTests.m 43 files changed, 725 insertions(+), 436 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/26/215326/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.h b/MediaWikiKit/MediaWikiKit/MWKArticle.h index 136b6fe..9798813 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.h +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.h @@ -40,6 +40,9 @@ @property (readonly, strong, nonatomic) MWKProtectionStatus* protection; // required @property (readonly, assign, nonatomic) BOOL editable; // required +/// Whether or not the receiver is the main page for its @c site. +@property (readonly, assign, nonatomic, getter = isMain) BOOL main; + @property (readwrite, copy, nonatomic) NSString* thumbnailURL; // optional; pulled separately via search @property (readwrite, copy, nonatomic) NSString* imageURL; // optional; pulled in article request diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.m b/MediaWikiKit/MediaWikiKit/MWKArticle.m index 424da87..889ebcd 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.m +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.m @@ -9,6 +9,16 @@ #import MediaWikiKit.h #import BlocksKit/BlocksKit.h +typedef NS_ENUM (NSUInteger, MWKArticleSchemaVersion) { +
[MediaWiki-commits] [Gerrit] add tests for article fetcher - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/215354 Change subject: add tests for article fetcher .. add tests for article fetcher Bug: T101078 Change-Id: I6cf93ba8578b958ef1b96f7b9dae411d432c8798 --- M MediaWikiKit/MediaWikiKit/MWKArticle.h M MediaWikiKit/MediaWikiKit/MWKArticle.m M MediaWikiKit/MediaWikiKit/MWKImageList.h M MediaWikiKit/MediaWikiKit/MWKImageList.m M MediaWikiKit/MediaWikiKit/MWKSection.h M MediaWikiKit/MediaWikiKit/MWKSection.m M MediaWikiKit/MediaWikiKit/MWKSectionList.h M MediaWikiKit/MediaWikiKit/MWKSectionList.m M MediaWikiKit/MediaWikiKit/MWKUser.h M MediaWikiKit/MediaWikiKit/MWKUser.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Networking/Fetchers/ArticleFetcher.h M Wikipedia/Networking/Fetchers/ArticleFetcher.m A WikipediaUnitTests/ArticleFetcherTests.m 14 files changed, 301 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/54/215354/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.h b/MediaWikiKit/MediaWikiKit/MWKArticle.h index 136b6fe..01733fc 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.h +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.h @@ -75,6 +75,9 @@ */ - (MWKImage*)importImageData:(NSData*)data image:(MWKImage*)image; +- (BOOL)isEqualToArticle:(MWKArticle*)article; +- (BOOL)isDeeplyEqualToArticle:(MWKArticle*)article; + - (void)save; - (void)saveWithoutSavingSectionText; - (void)remove; diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.m b/MediaWikiKit/MediaWikiKit/MWKArticle.m index 424da87..8fda60f 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.m +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.m @@ -8,6 +8,7 @@ #import MediaWikiKit.h #import BlocksKit/BlocksKit.h +#import WikipediaAppUtils.h @interface MWKArticle () @@ -59,24 +60,32 @@ #pragma mark - NSObject - (BOOL)isEqual:(id)object { -if (object == nil) { -return NO; -} else if (![object isKindOfClass:[MWKArticle class]]) { -return NO; +if (self == object) { +return YES; +} else if ([object isKindOfClass:[MWKArticle class]]) { +return [self isEqualToArticle:object]; } else { -MWKArticle* other = object; -return [self.site isEqual:other.site] - (self.redirected == other.redirected || [self.redirected isEqual:other.redirected]) - [self.lastmodified isEqual:other.lastmodified] - [self.lastmodifiedby isEqual:other.lastmodifiedby] - self.articleId == other.articleId - self.languagecount == other.languagecount - [self.displaytitle isEqualToString:other.displaytitle] - [self.protection isEqual:other.protection] - self.editable == other.editable - (self.thumbnailURL == other.thumbnailURL || [self.thumbnailURL isEqualToString:other.thumbnailURL]) - (self.imageURL == other.imageURL || [self.imageURL isEqualToString:other.imageURL]); +return NO; } +} + +- (BOOL)isEqualToArticle:(MWKArticle*)other { +return WMF_EQUAL(self.site, isEqualToSite:, other.site) +WMF_EQUAL(self.redirected, isEqual:, other.redirected) +WMF_EQUAL(self.lastmodified, isEqualToDate:, other.lastmodified) +WMF_IS_EQUAL(self.lastmodifiedby, other.lastmodifiedby) +WMF_EQUAL(self.displaytitle, isEqualToString:, other.displaytitle) +WMF_EQUAL(self.protection, isEqual:, other.protection) +WMF_EQUAL(self.thumbnailURL, isEqualToString:, other.thumbnailURL) +WMF_EQUAL(self.imageURL, isEqualToString:, other.imageURL) +self.articleId == other.articleId +self.languagecount == other.languagecount; +} + +- (BOOL)isDeeplyEqualToArticle:(MWKArticle*)article { +return [self isEqual:article] +WMF_IS_EQUAL(self.images, article.images) +WMF_IS_EQUAL(self.sections, article.sections); } - (NSString*)description { @@ -282,4 +291,34 @@ } } +- (NSString*)debugDescription { +return [NSString stringWithFormat:@%@ { \n +\tlastModifiedBy: %@, \n +\tlastModified: %@, \n +\tarticleId: %d, \n +\tlanguageCount: %d, \n +\tdisplayTitle: %@, \n +\tprotection: %@, \n +\teditable: %d, \n +\tthumbnailURL: %@, \n +\timageURL: %@, \n +\tsections: %@, \n +\timages: %@, \n +\tentityDescription: %@, \n +}, +self.description, +self.lastmodifiedby, +self.lastmodified, +self.articleId, +self.languagecount, +self.displaytitle, +self.protection, +self.editable, +self.thumbnailURL, +self.imageURL, +self.sections.debugDescription, +
[MediaWiki-commits] [Gerrit] hygiene: hash equality utils plus title site cleanup - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/215114 Change subject: hygiene: hash equality utils plus title site cleanup .. hygiene: hash equality utils plus title site cleanup This is a boyscout patch in preparation for T100687. - Update bitwise rotation implementation to something that performs better - Add macro to remove potential for error when duplicating properties (WMF_EQUAL_PROPERTIES) - Integrate bitwise rotation comparison updates to MWKSite MWKTitle - Deprecate clean up MWKSite MWKTitle cruft Change-Id: If5906e1ad8f6f39899e3efbb703ce660bceeb6d9 --- M MediaWikiKit/MediaWikiKit/MWKImageInfo.m M MediaWikiKit/MediaWikiKit/MWKSite.h M MediaWikiKit/MediaWikiKit/MWKSite.m M MediaWikiKit/MediaWikiKit/MWKTitle.h M MediaWikiKit/MediaWikiKit/MWKTitle.m M MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Categories/MWKArticle+WMFSharing.m M Wikipedia/Categories/NSArray+WMFExtensions.h M Wikipedia/Categories/NSArray+WMFExtensions.m M Wikipedia/Categories/NSString+Extras.h M Wikipedia/Categories/NSString+Extras.m M Wikipedia/Networking/Fetchers/ArticleFetcher.m M Wikipedia/View Controllers/History/HistoryViewController.m M Wikipedia/View Controllers/Navigation/Center/CenterNavController.h M Wikipedia/View Controllers/Navigation/Center/CenterNavController.m M Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M Wikipedia/View Controllers/WebView/WebViewController.m A Wikipedia/mw-utils/NSObjectUtilities.h A Wikipedia/mw-utils/WMFComparison.h A Wikipedia/mw-utils/WMFHashing.h A Wikipedia/mw-utils/WMFPageUtilities.h A Wikipedia/mw-utils/WMFPageUtilities.m M Wikipedia/mw-utils/WikipediaAppUtils.h M Wikipedia/mw-utils/WikipediaAppUtils.m M WikipediaUnitTests/CircularBitwiseRotationTests.m M WikipediaUnitTests/MWKArticle+WMFSharingTests.m 27 files changed, 390 insertions(+), 253 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/14/215114/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKImageInfo.m b/MediaWikiKit/MediaWikiKit/MWKImageInfo.m index 023ebb3..5d64ec1 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImageInfo.m +++ b/MediaWikiKit/MediaWikiKit/MWKImageInfo.m @@ -133,7 +133,7 @@ } - (NSUInteger)hash { -return [self.canonicalPageTitle hash] ^ CircularBitwiseRotation([self.imageURL hash], 1); +return self.canonicalPageTitle.hash ^ flipBitsWithAdditionalRotation(self.imageURL.hash, 1); } - (NSString*)description { diff --git a/MediaWikiKit/MediaWikiKit/MWKSite.h b/MediaWikiKit/MediaWikiKit/MWKSite.h index f57e3b3..4b8ea70 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSite.h +++ b/MediaWikiKit/MediaWikiKit/MWKSite.h @@ -1,26 +1,49 @@ // Created by Brion on 11/6/13. // Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! -#pragma once - #import Foundation/Foundation.h -// forward decl +NS_ASSUME_NONNULL_BEGIN + +extern NSString* const WMFDefaultSiteDomain; + @class MWKTitle; @class MWKUser; @interface MWKSite : NSObject -@property (readonly, copy, nonatomic) NSString* domain; -@property (readonly, copy, nonatomic) NSString* language; +@property (nonatomic, copy, readonly) NSString* domain; +@property (nonatomic, copy, readonly) NSString* language; -- (instancetype)initWithDomain:(NSString*)domain language:(NSString*)language; +- (instancetype)initWithDomain:(NSString*)domain language:(NSString*)language NS_DESIGNATED_INITIALIZER; +/// Convenience factory method wrapping the designated initializer. ++ (instancetype)siteWithDomain:(NSString*)domain language:(NSString*)language; + +/// @return A site with the default domain and the language code returned by @c locale. ++ (instancetype)siteWithLocale:(NSLocale*)locale; + +/// @return A site with the default domain and the current locale's language code. ++ (instancetype)siteWithCurrentLocale; + +- (BOOL)isEqualToSite:(MWKSite* __nullable)other; + +/// +/// @name Title Factory Convenience Methods +/// + +/** + * @return A title initialized with the receiver as its @c site. + * @see -[MWKTitle initWithString:site:] + */ - (MWKTitle*)titleWithString:(NSString*)string; + +/** + * @return A title initialized with the receiver as its @c site. + * @see -[MWKTitle initWithString:site:] + */ - (MWKTitle*)titleWithInternalLink:(NSString*)path; -+ (MWKSite*)siteWithDomain:(NSString*)domain language:(NSString*)language; - -- (BOOL)isEqualToSite:(MWKSite*)other; - @end + +NS_ASSUME_NONNULL_END diff --git a/MediaWikiKit/MediaWikiKit/MWKSite.m b/MediaWikiKit/MediaWikiKit/MWKSite.m index aa33a74..ecfd382 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSite.m +++ b/MediaWikiKit/MediaWikiKit/MWKSite.m @@ -2,7 +2,9 @@ // Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! #import MediaWikiKit.h -#import WikipediaAppUtils.h +#import
[MediaWiki-commits] [Gerrit] fix unit tests consolidate fixtures - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/214426 Change subject: fix unit tests consolidate fixtures .. fix unit tests consolidate fixtures - Changes to MWK ownership semantics were causing some tests to break. - Move all test fixtures into a single folder Change-Id: I7b9c98cd4f18135a9530464a4331047c3f646026 --- M MediaWikiKit/MediaWikiKit/MWKArticle.h M MediaWikiKit/MediaWikiKit/MWKSectionList.m M MediaWikiKit/MediaWikiKit/MWKSectionList_Private.h M MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m M MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/View Controllers/WebView/WebViewController_Private.h M Wikipedia/Wikipedia-Prefix.pch R WikipediaUnitTests/Fixtures/Obama.json R WikipediaUnitTests/Fixtures/TemplateIcon2x.png R WikipediaUnitTests/Fixtures/golden-gate.jpg R WikipediaUnitTests/Fixtures/organization-anon.json R WikipediaUnitTests/Fixtures/protection-empty.json R WikipediaUnitTests/Fixtures/protection-obama.json R WikipediaUnitTests/Fixtures/section0.json R WikipediaUnitTests/Fixtures/section1-end.json R WikipediaUnitTests/Fixtures/test-notes.txt R WikipediaUnitTests/Fixtures/user-anon.json R WikipediaUnitTests/Fixtures/user-loggedin.json M WikipediaUnitTests/MWKSectionListTests.m M WikipediaUnitTests/Utilities/WMFTestFixtureUtilities.h A WikipediaUnitTests/Utilities/XCTestCase+MWKFixtures.h A WikipediaUnitTests/Utilities/XCTestCase+MWKFixtures.m 23 files changed, 172 insertions(+), 95 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/26/214426/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.h b/MediaWikiKit/MediaWikiKit/MWKArticle.h index 975dc07..136b6fe 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.h +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.h @@ -6,12 +6,13 @@ // Copyright (c) 2014 Wikimedia Foundation. All rights reserved. // -static const NSInteger kMWKArticleSectionNone = -1; - #import UIKit/UIKit.h #import MWKSiteDataObject.h +static const NSInteger kMWKArticleSectionNone = -1; + + @class MWKDataStore; @class MWKSection; @class MWKSectionList; diff --git a/MediaWikiKit/MediaWikiKit/MWKSectionList.m b/MediaWikiKit/MediaWikiKit/MWKSectionList.m index ebca4c0..07f9874 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSectionList.m +++ b/MediaWikiKit/MediaWikiKit/MWKSectionList.m @@ -12,7 +12,6 @@ @interface MWKSectionList () @property (readwrite, weak, nonatomic) MWKArticle* article; -@property (strong, nonatomic) NSMutableArray* sections; @property (assign, nonatomic) unsigned long mutationState; @end diff --git a/MediaWikiKit/MediaWikiKit/MWKSectionList_Private.h b/MediaWikiKit/MediaWikiKit/MWKSectionList_Private.h index 94795ce..d0bc1f3 100644 --- a/MediaWikiKit/MediaWikiKit/MWKSectionList_Private.h +++ b/MediaWikiKit/MediaWikiKit/MWKSectionList_Private.h @@ -10,6 +10,9 @@ @interface MWKSectionList () +/// @warning For testing only. +@property (strong, nonatomic) NSMutableArray* sections; + /// Import list of sections from disk using the receiver's `article` and `dataStore`. - (void)importSectionsFromDisk; diff --git a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m index fac89f2..92fea02 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m @@ -18,7 +18,7 @@ #import MWKArticle.h #import MWKSection.h -#import MWKSectionList.h +#import MWKSectionList_Private.h #import MWKDataStore.h #import MWKImageList.h @@ -43,7 +43,7 @@ // create article w/ mock section to prevent crashing due to image import side effects MWKArticle* article = [[MWKArticle alloc] initWithTitle:nil dataStore:tmpDataStore]; -[article.sections setSections:mock([MWKSection class])]; +[article.sections setSections:[NSMutableArray arrayWithObject:mock([MWKSection class])]]; NSArray* dummySourceURLs = [@[@10px-a.jpg, @10px-b.jpg, @100px-a.jpg, @10px-c.jpg] bk_map :^id (id obj) { return MWKCreateImageURLWithPath(obj); diff --git a/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m b/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m index de2b12f..ccb522b 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKTitleTests.m @@ -32,7 +32,6 @@ - (void)testSimple { MWKTitle* title = [MWKTitle titleWithString:@Simple site:site]; -XCTAssertNil(title.namespace, @Namespace is nil); XCTAssertEqualObjects(title.prefixedDBKey, @Simple, @DB key form is full); XCTAssertEqualObjects(title.prefixedText, @Simple, @Text form is full); XCTAssertEqualObjects(title.prefixedURL, @Simple, @URL form is full); @@ -45,7 +44,6 @@ [MWKTitle titleWithString:@Fancy_title with_spaces site:site] ]; for (MWKTitle* title in inputs) { -
[MediaWiki-commits] [Gerrit] Image assets file updates - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/214425 Change subject: Image assets file updates .. Image assets file updates These changes result from simply clicking the .xcassets file in Xcode 6.3. Not sure why, but figured they're worth committing. Change-Id: Ic75f0af8c50516f409797cb9e57f15fa5bc5e187 --- M Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Contents.json M Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/Contents.json M Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/Contents.json M Wikipedia/Images.xcassets/by_white.imageset/Contents.json M Wikipedia/Images.xcassets/cc_white.imageset/Contents.json M Wikipedia/Images.xcassets/clear.imageset/Contents.json M Wikipedia/Images.xcassets/lead-default.imageset/Contents.json M Wikipedia/Images.xcassets/logo-onboarding-subtitle.imageset/Contents.json M Wikipedia/Images.xcassets/logo-onboarding.imageset/Contents.json M Wikipedia/Images.xcassets/logo-placeholder-nearby.imageset/Contents.json M Wikipedia/Images.xcassets/logo-placeholder-saved.imageset/Contents.json M Wikipedia/Images.xcassets/logo-placeholder-search.imageset/Contents.json M Wikipedia/Images.xcassets/sa_white.imageset/Contents.json M Wikipedia/Images.xcassets/text_field_x_circle_gray.imageset/Contents.json 14 files changed, 80 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/25/214425/1 diff --git a/Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Contents.json b/Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Contents.json index 5b30657..27c3658 100644 --- a/Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Contents.json +++ b/Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Contents.json @@ -4,6 +4,14 @@ idiom : universal, scale : 1x, filename : Wikipedia_wordmark_gray.png +}, +{ + idiom : universal, + scale : 2x +}, +{ + idiom : universal, + scale : 3x } ], info : { diff --git a/Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/Contents.json b/Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/Contents.json index 6617b40..8b2a5b6 100644 --- a/Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/Contents.json +++ b/Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/Contents.json @@ -9,6 +9,10 @@ idiom : universal, scale : 2x, filename : abuse-filter-disallo...@2x.png +}, +{ + idiom : universal, + scale : 3x } ], info : { diff --git a/Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/Contents.json b/Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/Contents.json index 56a5b72..52475d2 100644 --- a/Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/Contents.json +++ b/Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/Contents.json @@ -9,6 +9,10 @@ idiom : universal, scale : 2x, filename : abuse-filter-flag-wh...@2x.png +}, +{ + idiom : universal, + scale : 3x } ], info : { diff --git a/Wikipedia/Images.xcassets/by_white.imageset/Contents.json b/Wikipedia/Images.xcassets/by_white.imageset/Contents.json index 5c79d44..93fa126 100644 --- a/Wikipedia/Images.xcassets/by_white.imageset/Contents.json +++ b/Wikipedia/Images.xcassets/by_white.imageset/Contents.json @@ -4,6 +4,14 @@ idiom : universal, scale : 1x, filename : by_white.png +}, +{ + idiom : universal, + scale : 2x +}, +{ + idiom : universal, + scale : 3x } ], info : { diff --git a/Wikipedia/Images.xcassets/cc_white.imageset/Contents.json b/Wikipedia/Images.xcassets/cc_white.imageset/Contents.json index 206d564..ca7b201 100644 --- a/Wikipedia/Images.xcassets/cc_white.imageset/Contents.json +++ b/Wikipedia/Images.xcassets/cc_white.imageset/Contents.json @@ -4,6 +4,14 @@ idiom : universal, scale : 1x, filename : cc_white.png +}, +{ + idiom : universal, + scale : 2x +}, +{ + idiom : universal, + scale : 3x } ], info : { diff --git a/Wikipedia/Images.xcassets/clear.imageset/Contents.json b/Wikipedia/Images.xcassets/clear.imageset/Contents.json index 2bf10a1..a4c1fda 100644 --- a/Wikipedia/Images.xcassets/clear.imageset/Contents.json +++ b/Wikipedia/Images.xcassets/clear.imageset/Contents.json @@ -4,6 +4,14 @@ idiom : universal, scale : 1x, filename : clear.png +}, +{ + idiom : universal, + scale : 2x +}, +{ + idiom : universal, + scale : 3x } ], info : { diff --git a/Wikipedia/Images.xcassets/lead-default.imageset/Contents.json b/Wikipedia/Images.xcassets/lead-default.imageset/Contents.json index 7d2ab06..7444f23 100644 ---
[MediaWiki-commits] [Gerrit] set UIFileSharingEnabled based on build config - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/214089 Change subject: set UIFileSharingEnabled based on build config .. set UIFileSharingEnabled based on build config Writes to the app's Info.plist after build to enable iTunes file sharing. - Debug, Alpha, Beta: enable iTunes file sharing - This will allow alpha beta testers to easily import/export data - Release - If WMF_FORCE_ITUNES_FILE_SHARING env var is 1, enabled (used for TSG builds) - Otherwise, disabled Change-Id: Ia3a0b30a8a876d089cad1772d18eac94136bfe12 --- M Gemfile M Gemfile.lock M Makefile M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Wikipedia-Info.plist M fastlane/Appfile M fastlane/Fastfile A scripts/process_plist.sh 8 files changed, 82 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/89/214089/1 diff --git a/Gemfile b/Gemfile index 23be19d..b5ff0b2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source https://rubygems.org; gem 'cocoapods', '~ 0.36.1' -gem 'fastlane', '~ 1.0.2' +gem 'fastlane', '~ 1.3.1' gem 'git', '~ 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index b88636f..e5480e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,7 +20,7 @@ rack (= 1.0.0) rack-test (= 0.5.4) xpath (~ 2.0) -cert (0.2.0) +cert (0.2.1) fastlane_core (= 0.7.2) certified (1.0.0) claide (0.8.1) @@ -53,11 +53,11 @@ colored (1.2) commander (4.3.4) highline (~ 1.7.2) -credentials_manager (0.4.0) +credentials_manager (0.6.0) colored highline (= 1.7.1) security -cupertino (1.3.3) +cupertino (1.3.4) certified (~ 1.0.0) commander (~ 4.3) highline (= 1.7.1) @@ -66,14 +66,13 @@ security (~ 0.1.2) term-ansicolor (~ 1.0.7) terminal-table (~ 1.4.5) -deliver (0.9.4) +deliver (0.12.0) credentials_manager (= 0.3.0) excon fastimage (~ 1.6.3) - fastlane_core (= 0.5.2) + fastlane_core (= 0.7.2) nokogiri (~ 1.6.5) plist (~ 3.1.0) - prawn rubyzip (~ 1.1.6) domain_name (0.5.24) unf (= 0.0.5, 1.0.0) @@ -86,40 +85,41 @@ faraday (= 0.7.4, 0.10) fastimage (1.6.8) addressable (~ 2.3, = 2.3.5) -fastlane (1.0.2) +fastlane (1.3.1) aws-sdk (~ 1.0) - cert (= 0.2.0) + cert (= 0.2.1) cupertino (= 1.3.3) - deliver (= 0.9.4) - fastlane_core (= 0.7.2) - frameit (= 1.0.1) + deliver (= 0.11.0) + fastlane_core (= 0.7.5) + frameit (= 2.0.0) krausefx-shenzhen (= 0.14.2) nokogiri (~ 1.6) - pem (= 0.5.5) + pbxplorer (~ 1.0.0) + pem (= 0.6.1) produce (= 0.2.1) - sigh (= 0.5.1) + sigh (= 0.5.2) slack-notifier (~ 1.0) - snapshot (= 0.8.0) + snapshot (= 0.9.0) terminal-notifier (~ 1.6.2) terminal-table (~ 1.4.5) xcodeproj (~ 0.20) xcpretty (~ 0.1) -fastlane_core (0.7.2) +fastlane_core (0.7.5) babosa capybara (~ 2.4.3) colored commander (= 4.3.4) - credentials_manager (= 0.4.0) + credentials_manager (= 0.6.0) excon (~ 0.45.0) highline (= 1.7.2) json multi_json phantomjs (~ 1.9.8) poltergeist (~ 1.5.1) -frameit (1.0.1) +frameit (2.0.1) deliver ( 0.3) fastimage (~ 1.6.3) - fastlane_core (= 0.5.0) + fastlane_core (= 0.7.2) mini_magick (~ 4.0.2) fuzzy_match (2.0.4) git (1.2.9.1) @@ -165,9 +165,9 @@ mini_portile (~ 0.6.0) ntlm-http (0.1.1) open4 (1.3.4) -pdf-core (0.5.1) -pem (0.5.5) - fastlane_core (= 0.6.0) +pbxplorer (1.0.0) +pem (0.6.3) + fastlane_core (= 0.7.2) phantomjs (1.9.8.0) plist (3.1.0) poltergeist (1.5.1) @@ -175,9 +175,6 @@ cliver (~ 0.3.1) multi_json (~ 1.0) websocket-driver (= 0.2.0) -prawn (2.0.1) - pdf-core (~ 0.5.1) - ttfunk (~ 1.4.0) produce (0.2.1) fastlane_core (= 0.5.0) rack (1.6.1) @@ -185,18 +182,17 @@ rack (= 1.0) rubyzip (1.1.7) security (0.1.3) -sigh (0.5.1) +sigh (0.5.2) fastlane_core (= 0.7.2) plist (~ 3.1.0) -slack-notifier (1.2.0) -snapshot (0.8.0) +slack-notifier (1.2.1) +snapshot (0.9.0) fastimage (~ 1.6.3) - fastlane_core (= 0.5.0) + fastlane_core (= 0.7.2) term-ansicolor (1.0.7) terminal-notifier (1.6.3) terminal-table (1.4.5) thread_safe (0.3.5) -ttfunk (1.4.0) tzinfo (1.2.2) thread_safe (~ 0.1) unf (0.1.4) @@ -218,5 +214,5 @@ DEPENDENCIES cocoapods (~ 0.36.1) - fastlane (~ 1.0.2) + fastlane (~ 1.3.1) git (~ 1.2) diff --git a/Makefile b/Makefile index 48f30fd..8a20fb4 100644 --- a/Makefile +++ b/Makefile @@ -163,7 +163,6 @@
[MediaWiki-commits] [Gerrit] Fix build and analyzer warnings - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix build and analyzer warnings .. Fix build and analyzer warnings Bug T99260 Change-Id: Ibc9fd00c9916371f01ce086eaafbd639782a0708 --- M Wikipedia/Categories/NSDate-Utilities.m M Wikipedia/Custom Views/MenuLabel.m M Wikipedia/Networking/Fetchers/BaseFetcher/FetcherBase.m M Wikipedia/mw-utils/WikipediaAppUtils.m 4 files changed, 3 insertions(+), 7 deletions(-) Approvals: Bgerstle: Verified; Looks good to me, approved diff --git a/Wikipedia/Categories/NSDate-Utilities.m b/Wikipedia/Categories/NSDate-Utilities.m index a43b95f..ac8168a 100644 --- a/Wikipedia/Categories/NSDate-Utilities.m +++ b/Wikipedia/Categories/NSDate-Utilities.m @@ -94,7 +94,7 @@ } // Must have a time interval under 1 week. Thanks @aclark -return (abs([self timeIntervalSinceDate:aDate]) D_WEEK); +return (fabs([self timeIntervalSinceDate:aDate]) D_WEEK); } - (BOOL)isThisWeek { diff --git a/Wikipedia/Custom Views/MenuLabel.m b/Wikipedia/Custom Views/MenuLabel.m index 64c0b6e..d0869b7 100644 --- a/Wikipedia/Custom Views/MenuLabel.m +++ b/Wikipedia/Custom Views/MenuLabel.m @@ -8,15 +8,11 @@ @interface MenuLabel () -@property (strong, nonatomic) NSString* text; - @property (strong, nonatomic) MenuLabel* label; @property (nonatomic) CGFloat fontSize; @property (nonatomic) BOOL fontBold; - -@property (nonatomic) UIEdgeInsets padding; @end diff --git a/Wikipedia/Networking/Fetchers/BaseFetcher/FetcherBase.m b/Wikipedia/Networking/Fetchers/BaseFetcher/FetcherBase.m index 4ba2e74..408b38d 100644 --- a/Wikipedia/Networking/Fetchers/BaseFetcher/FetcherBase.m +++ b/Wikipedia/Networking/Fetchers/BaseFetcher/FetcherBase.m @@ -62,7 +62,7 @@ } - (NSDictionary*)dictionaryFromDataResponse:(id)responseObject { -NSDictionary* output = @{}; +NSDictionary* output = nil; // Convert the raw NSData response to a dictionary. if (![self isDataResponseValid:responseObject]) { // Fake out an error if bad response received. diff --git a/Wikipedia/mw-utils/WikipediaAppUtils.m b/Wikipedia/mw-utils/WikipediaAppUtils.m index 086a629..384c06b 100644 --- a/Wikipedia/mw-utils/WikipediaAppUtils.m +++ b/Wikipedia/mw-utils/WikipediaAppUtils.m @@ -95,7 +95,7 @@ } + (NSString*)relativeTimestamp:(NSDate*)date { -NSTimeInterval interval = abs([date timeIntervalSinceNow]); +NSTimeInterval interval = fabs([date timeIntervalSinceNow]); double minutes = interval / 60.0; double hours= minutes / 60.0; double days = hours / 24.0; -- To view, visit https://gerrit.wikimedia.org/r/211730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc9fd00c9916371f01ce086eaafbd639782a0708 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Core data performance improvements. Bug T99260 - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Core data performance improvements. Bug T99260 .. Core data performance improvements. Bug T99260 Separate core data fetches into batches. Reset context in-between fetches to reduce memory. Move to async operations to allow UI to update progress during saves. Change-Id: Iffdb31166dacde1caef5d89f2050f11b404a85c7 --- M Wikipedia/Data/OldDataSchemaMigrator.m 1 file changed, 98 insertions(+), 36 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/Wikipedia/Data/OldDataSchemaMigrator.m b/Wikipedia/Data/OldDataSchemaMigrator.m index 616cb07..609bb32 100644 --- a/Wikipedia/Data/OldDataSchemaMigrator.m +++ b/Wikipedia/Data/OldDataSchemaMigrator.m @@ -105,48 +105,110 @@ } - (void)migrateData { -[self.context performBlock:^{ -NSFetchRequest* req = [NSFetchRequest fetchRequestWithEntityName:@Saved]; -req.sortDescriptors = @[[[NSSortDescriptor alloc] initWithKey:@dateSaved ascending:YES]]; -NSError* err; -NSArray* savedEntries = [self.context executeFetchRequest:req error:err]; - -if (err) { -NSLog(@Error reading old Saved entries: %@, err); +dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ +if (![self migrateHistory]) { } -NSFetchRequest* req2 = [NSFetchRequest fetchRequestWithEntityName:@History]; -req2.sortDescriptors = @[[[NSSortDescriptor alloc] initWithKey:@dateVisited ascending:YES]]; -NSError* err2; -NSArray* historyEntries = [self.context executeFetchRequest:req2 error:err2]; - -if (err2) { -NSLog(@Error reading old History entries: %@, err2); -} - -NSUInteger totalArticlesToMigrate = [savedEntries count]; -__block NSUInteger numberOfArticlesMigrated = 0; - -void (^ incrementAndNotify)(void) = ^void (void) { -numberOfArticlesMigrated++; -dispatch_async(dispatch_get_main_queue(), ^{ -[self.progressDelegate oldDataSchema:self didUpdateProgressWithArticlesCompleted:numberOfArticlesMigrated total:totalArticlesToMigrate]; -}); -}; - -for (History* history in historyEntries) { -[self migrateHistory:history]; -} - -for (Saved* saved in savedEntries) { -[self migrateSaved:saved]; -[self migrateArticle:saved.article]; -incrementAndNotify(); +if (![self migrateSavedPages]) { } [self moveOldDataToBackupLocation]; -[self.progressDelegate oldDataSchemaDidFinishMigration:self]; + +dispatch_async(dispatch_get_main_queue(), ^{ +[self.progressDelegate oldDataSchemaDidFinishMigration:self]; +}); +}); +} + +- (BOOL)migrateHistory { +__block NSError* error; + +[self.context performBlockAndWait:^{ +NSFetchRequest* req2 = [NSFetchRequest fetchRequestWithEntityName:@History]; +req2.sortDescriptors = @[[[NSSortDescriptor alloc] initWithKey:@dateVisited ascending:YES]]; +NSArray* historyEntries = [self.context executeFetchRequest:req2 error:error]; + +if (error) { +NSLog(@Error reading old History entries: %@, error); +} + +for (History* history in historyEntries) { +@autoreleasepool { +[self migrateHistory:history]; +} +} + +[self.context reset]; }]; + + +return error == nil; +} + +- (BOOL)migrateSavedPages { +__block NSError* error; +__block NSUInteger totalArticlesToMigrate = 0; +__block NSUInteger numberOfArticlesMigrated = 0; + +[self.context performBlockAndWait:^{ +NSFetchRequest* req = [NSFetchRequest fetchRequestWithEntityName:@Saved]; +req.sortDescriptors = @[[[NSSortDescriptor alloc] initWithKey:@dateSaved ascending:YES]]; +totalArticlesToMigrate = [self.context countForFetchRequest:req error:error]; +NSLog(@total articles: %lu, totalArticlesToMigrate); +}]; + +NSUInteger fetchSize = 25; +__block BOOL moreSavedEntriesToProcess = YES; +__block NSUInteger fetchOffset = 0; + +if (totalArticlesToMigrate 0) { +while (moreSavedEntriesToProcess) { +NSFetchRequest* req = [NSFetchRequest fetchRequestWithEntityName:@Saved]; +req.sortDescriptors = @[[[NSSortDescriptor alloc] initWithKey:@dateSaved ascending:YES]]; +req.fetchLimit = fetchSize; +req.fetchOffset = fetchOffset; + +[self.context performBlock:^{ +NSError* innerError; +NSArray* savedEntries = [self.context executeFetchRequest:req error:innerError]; + +if (savedEntries) { +for (Saved* saved in savedEntries)
[MediaWiki-commits] [Gerrit] deploy adhoc to HA for store lane - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210760 Change subject: deploy adhoc to HA for store lane .. deploy adhoc to HA for store lane modify store lane so that it: - deploys the app to app store hockeyapp - resigns the IPA using ad-hoc cert - deploys ad hoc IPA to hockeyapp while I was at it... - removed Gemfile spec for deliver - removed stdlog output from changelog generation - removed skip_deploy option (should fix missing release notes in TF betas) Bug: T98512 Change-Id: I5895e812ed0d79ca257d8b866eff8c40c251dbcc --- M Gemfile M Gemfile.lock M fastlane/Fastfile M fastlane/lib/utils.rb 4 files changed, 49 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/60/210760/1 diff --git a/Gemfile b/Gemfile index 99c896f..23be19d 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,4 @@ gem 'cocoapods', '~ 0.36.1' gem 'fastlane', '~ 1.0.2' -gem 'deliver', :git = 'https://github.com/krausefx/deliver.git', :ref = '90b89eb04aba987b286c1ed701be72a93fbfa276' gem 'git', '~ 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 9ca2985..b88636f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,17 +1,3 @@ -GIT - remote: https://github.com/krausefx/deliver.git - revision: 90b89eb04aba987b286c1ed701be72a93fbfa276 - ref: 90b89eb04aba987b286c1ed701be72a93fbfa276 - specs: -deliver (0.10.0) - credentials_manager (= 0.3.0) - excon - fastimage (~ 1.6.3) - fastlane_core (= 0.7.2) - nokogiri (~ 1.6.5) - plist (~ 3.1.0) - rubyzip (~ 1.1.6) - GEM remote: https://rubygems.org/ specs: @@ -80,6 +66,15 @@ security (~ 0.1.2) term-ansicolor (~ 1.0.7) terminal-table (~ 1.4.5) +deliver (0.9.4) + credentials_manager (= 0.3.0) + excon + fastimage (~ 1.6.3) + fastlane_core (= 0.5.2) + nokogiri (~ 1.6.5) + plist (~ 3.1.0) + prawn + rubyzip (~ 1.1.6) domain_name (0.5.24) unf (= 0.0.5, 1.0.0) dotenv (2.0.1) @@ -170,6 +165,7 @@ mini_portile (~ 0.6.0) ntlm-http (0.1.1) open4 (1.3.4) +pdf-core (0.5.1) pem (0.5.5) fastlane_core (= 0.6.0) phantomjs (1.9.8.0) @@ -179,6 +175,9 @@ cliver (~ 0.3.1) multi_json (~ 1.0) websocket-driver (= 0.2.0) +prawn (2.0.1) + pdf-core (~ 0.5.1) + ttfunk (~ 1.4.0) produce (0.2.1) fastlane_core (= 0.5.0) rack (1.6.1) @@ -197,6 +196,7 @@ terminal-notifier (1.6.3) terminal-table (1.4.5) thread_safe (0.3.5) +ttfunk (1.4.0) tzinfo (1.2.2) thread_safe (~ 0.1) unf (0.1.4) @@ -218,6 +218,5 @@ DEPENDENCIES cocoapods (~ 0.36.1) - deliver! fastlane (~ 1.0.2) git (~ 1.2) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 6658405..a9c432a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -65,7 +65,7 @@ notify: '0', # Means do not notify status: '1', # Means do not make available for download ) -deliver skip_deploy: true, beta: true +deliver beta: true # uncomment when CI is able to push tags if ENV['WMF_BUMP'] @@ -87,30 +87,53 @@ notify: '0', # Means do not notify status: '1', # Means do not make available for download ) -deliver skip_deploy: true, beta: true +deliver beta: true end - desc Deploy a new version to the App Store + desc Upload AppStore build to iTC HockeyApp, plus a resigned AdHoc build to Hockey. lane :store do -# snapshot -sigh +# create app store build +sigh( + adhoc: false, + force: true, + filename: 'build/release.mobileprovision' +) ipa( configuration: Wikipedia, scheme: Wikipedia, ) hockey( - notes: '', - notify: '0', # Means do not notify - status: '1', # Means do not make available for download + notes: git_commit_log, + notify: '0', # Do not notify + status: '1', # Do not make available for download + release_type: '1' # 'store' release type ) -deliver skip_deploy: true, force: true +deliver( + force: true +) +# resign and deliver adhoc to HA +sigh( + adhoc: true, + force: true, + filename: 'build/adhoc.mobileprovision' +) +resign( + signing_identity: 'iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)', + provisioning_profile: 'build/adhoc.mobileprovision' +) +hockey( + notes: git_commit_log, + notify: '0', # Means do not notify + status: '2', # Means make available for download + release_type: '0' # 'beta' release type +) end after_all do |lane| - + end error do |lane, exception| - + end end diff --git a/fastlane/lib/utils.rb b/fastlane/lib/utils.rb index 82de744..ee5c409 100644 --- a/fastlane/lib/utils.rb +++ b/fastlane/lib/utils.rb @@ -25,7 +25,7 @@ #
[MediaWiki-commits] [Gerrit] ugly WIP: group preferred languages - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210823 Change subject: ugly WIP: group preferred languages .. ugly WIP: group preferred languages - [x] group languages by preferred and other - [ ] implement localize proper section headers - [ ] add new icon to bottom bar Bug: T97780 Change-Id: I7218a1a0016563808b1dab70ca6ff97c504cd5e9 --- M Wikipedia/View Controllers/Languages/LanguagesViewController.m 1 file changed, 75 insertions(+), 40 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/23/210823/1 diff --git a/Wikipedia/View Controllers/Languages/LanguagesViewController.m b/Wikipedia/View Controllers/Languages/LanguagesViewController.m index 03538da..ca0550c 100644 --- a/Wikipedia/View Controllers/Languages/LanguagesViewController.m +++ b/Wikipedia/View Controllers/Languages/LanguagesViewController.m @@ -12,17 +12,30 @@ #import UIViewController+Alert.h #import UIViewController+ModalPop.h #import UIView+ConstraintsScale.h +#import NSString+Extras.h #pragma mark - Defines -#define BACKGROUND_COLOR [UIColor colorWithWhite:1.0f alpha:1.0f] - -#pragma mark - Private properties +typedef NS_ENUM (NSInteger, WMFLanguagesTableSection) { +/// Section in the languages table containing preferred languages. +WMFLanguagesTableSectionPreferred = 0, +/// Section in the languages table containing languages other than the preferred ones. +WMFLanguagesTableSectionOther = 1, +/// Number of sections in the languages table +WMFLanguagesTableSectionCount +}; @interface LanguagesViewController () +/// Array of dictionaries which represent languages to choose from. @property (strong, nonatomic) NSArray* languagesData; -@property (strong, nonatomic) NSMutableArray* filteredLanguagesData; + +/// Languages in `languagesData` filtered by `filterString` that are contained in the user's preferred languages. +/// @note The user's preferred languages are currently dictated by `+[NSLocale preferredLanguages]`. +@property (strong, nonatomic) NSArray* preferredLanguages; + +/// Languages in `languagesData` filtered by `filterString` that aren't in `preferredLanguages` +@property (strong, nonatomic) NSArray* otherLanguages; @property (strong, nonatomic) NSString* filterString; @property (strong, nonatomic) UITextField* filterTextField; @@ -53,15 +66,9 @@ [super viewDidLoad]; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; - -self.languagesData = @[]; -self.filteredLanguagesData = @[].mutableCopy; - -self.view.backgroundColor = BACKGROUND_COLOR; - -self.tableView.contentInset = UIEdgeInsetsMake(15.0 * MENUS_SCALE_MULTIPLIER, 0, 0, 0); - -self.filterString = @; +self.view.backgroundColor = [UIColor whiteColor]; +self.tableView.contentInset = UIEdgeInsetsMake(15.0 * MENUS_SCALE_MULTIPLIER, 0, 0, 0); +self.filterString = @; } - (void)viewWillAppear:(BOOL)animated { @@ -140,24 +147,31 @@ } - (void)reloadTableDataFiltered { -if (self.filterString.length == 0) { -self.filteredLanguagesData = self.languagesData.mutableCopy; -[self.tableView reloadData]; -return; +NSArray* filteredLanguages; +if (!self.filterString.length) { +filteredLanguages = [self.languagesData copy]; +} else { +filteredLanguages = +[self.languagesData filteredArrayUsingPredicate: + [NSPredicate predicateWithBlock:^BOOL (NSDictionary* lang, NSDictionary* bindings) { +#warning TODO: use proper model object and refactor this into an instance method +return [lang[@name] wmf_isEqualToStringIgnoringCase:self.filterString] +|| [lang[@canonical_name] wmf_caseInsensitiveContainsString:self.filterString] +|| [lang[@code] wmf_isEqualToStringIgnoringCase:self.filterString]; +}]]; } -[self.filteredLanguagesData removeAllObjects]; +self.preferredLanguages = +[filteredLanguages filteredArrayUsingPredicate: + [NSPredicate predicateWithBlock:^BOOL (NSDictionary* lang, NSDictionary* bindings) { +return [[NSLocale preferredLanguages] containsObject:lang[@code]]; +}]]; -self.filteredLanguagesData = -[self.languagesData filteredArrayUsingPredicate: - [NSPredicate predicateWithFormat:@\ - SELF.name contains[c] %@\ - || \ - SELF.canonical_name contains[c] %@\ - || \ - SELF.code == [c] %@\ - , self.filterString, self.filterString, self.filterString] -].mutableCopy; +self.otherLanguages = +[filteredLanguages filteredArrayUsingPredicate: + [NSPredicate predicateWithBlock:^BOOL (id evaluatedObject, NSDictionary* bindings) { +return ![self.preferredLanguages containsObject:evaluatedObject]; +}]];
[MediaWiki-commits] [Gerrit] bump to 4.1.4.0, implement versioning in fastlane - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210393 Change subject: bump to 4.1.4.0, implement versioning in fastlane .. bump to 4.1.4.0, implement versioning in fastlane Versioning scheme: - Public/marketing version is manually maintained in the app's Info.plist - Build numbers are monotonically incremented by the fastlane alpha lane (and reset as necessary when release version is bumped) - After a successful alpha deployment, the version bumps are commited, tagged, and pushed to master Bug: T97812 Change-Id: I10ab4db69a169b5afb2b2d309f67c611e245278a --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Wikipedia-Info.plist M fastlane/.env M fastlane/Fastfile 4 files changed, 20 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/93/210393/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 2ab43f6..d19e5a1 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -3458,6 +3458,7 @@ SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = 1,2; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = apple-generic; }; name = Alpha; }; @@ -3470,6 +3471,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = iPhone Distribution; CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution; + CURRENT_PROJECT_VERSION = 0; FRAMEWORK_SEARCH_PATHS = $(inherited); GCC_OPTIMIZATION_LEVEL = 3; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -3513,7 +3515,7 @@ $(inherited), ); GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = WikipediaUnitTests/Info.plist; + INFOPLIST_FILE = WikipediaUnitTests/Supporting Files/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks; MTL_ENABLE_DEBUG_INFO = NO; @@ -3558,6 +3560,7 @@ SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = 1,2; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = apple-generic; }; name = Beta; }; @@ -3570,6 +3573,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = iPhone Distribution; CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution; + CURRENT_PROJECT_VERSION = 0; FRAMEWORK_SEARCH_PATHS = $(inherited); GCC_OPTIMIZATION_LEVEL = 3; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -3613,7 +3617,7 @@ $(inherited), ); GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = WikipediaUnitTests/Info.plist; + INFOPLIST_FILE = WikipediaUnitTests/Supporting Files/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks; MTL_ENABLE_DEBUG_INFO = NO; @@ -3711,6 +3715,7 @@ RUN_CLANG_STATIC_ANALYZER = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = 1,2; + VERSIONING_SYSTEM = apple-generic; }; name = Debug; }; @@ -3750,6 +3755,7 @@ SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = 1,2; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = apple-generic; }; name = Release; }; @@ -3762,7 +3768,7 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = iPhone Developer;
[MediaWiki-commits] [Gerrit] merge pull request #14 - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210561 Change subject: merge pull request #14 .. merge pull request #14 Cleaned up the Deliverfile Change-Id: I35a1e86d9dc30ea5028483e2c762480e3fcdc3f0 --- M fastlane/Deliverfile 1 file changed, 2 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/61/210561/1 diff --git a/fastlane/Deliverfile b/fastlane/Deliverfile index 540ea2b..b30e375 100644 --- a/fastlane/Deliverfile +++ b/fastlane/Deliverfile @@ -1,21 +1,6 @@ # vi: ft=ruby -## App Metadata ## -# Update the app description and metadata in the ./metadata folder -## Screenshots ## -# Store all screenshots in the ./screenshots folder separated -# by language. If you use snapshot, this happens automatically - -## IPA File ## -# This part is only relevant, if you want to submit a new binary -# If you don't use fastlane (https://github.com/KrauseFx/fastlane) -# you can set the path to your ipa file using: -# ipa ./app.ipa - -# to provide an ipa file for TestFlight distribution, use beta_ipa -# beta_ipa ./app.ipa - -## More Options ## +## Available Options ## # If you want to have even more control, check out the documentation # https://github.com/KrauseFx/deliver/blob/master/Deliverfile.md @@ -25,7 +10,7 @@ $:.unshift File.dirname(__FILE__) require 'lib/utils.rb' -ENV['DELIVER_WHAT_TO_TEST'] = git_commit_log +ENV['DELIVER_WHAT_TO_TEST'] = git_commit_log # automatically store the changelog automatic_release false -- To view, visit https://gerrit.wikimedia.org/r/210561 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35a1e86d9dc30ea5028483e2c762480e3fcdc3f0 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update icon. - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Update icon. .. Update icon. Used ruby script which is most easily run in ubuntu for creating various icon resolutions from icon svg. Renamed items in icon plist to use names generated by script. Bug: T97783 Change-Id: I3a69ef974b210de3698874fe40c343d3dfcde4b3 --- M Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json M Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Contents.json D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@3x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-72.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-76.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small-50.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-small...@2x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-sm...@3x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Spotlight-40.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x-1.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@3x.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/i...@2x.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_100.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_114.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_120.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_120_copy.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_144.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_152.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_180.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_29.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_29_copy.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_40.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_50.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_57.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_58.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_58_copy.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_72.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_76.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_80.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_80_copy.png A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon_87.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_app_icon_iphone.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_icon.png D Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_i...@2x.png D scripts/icon-svgs-to-pngs.sh A scripts/make-icons-from-svg.sh M svgs/icon-prod.svg 43 files changed, 75 insertions(+), 61 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json b/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json index bdf34f6..ee06e88 100644 --- a/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json @@ -3,115 +3,115 @@ { size : 29x29, idiom : iphone, - filename : ios7_settings_icon.png, + filename : icon_29.png, scale : 1x }, { size : 29x29, idiom : iphone, - filename : ios7_settings_i...@2x.png, + filename : icon_58.png, scale : 2x }, { size : 29x29, idiom : iphone, - filename : icon-sm...@3x.png, + filename : icon_87.png, scale : 3x }, { size : 40x40, idiom : iphone, - filename : icon-spotlight...@2x-1.png, + filename : icon_80.png, scale : 2x }, { size : 40x40, idiom : iphone, - filename : icon-spotlight...@3x.png, + filename : icon_120.png, scale : 3x }, { size : 57x57, idiom : iphone, - filename : Icon.png, + filename : icon_57.png, scale : 1x }, { size : 57x57, idiom : iphone, - filename : i...@2x.png, + filename : icon_114.png, scale : 2x }, { size : 60x60, idiom : iphone, - filename :
[MediaWiki-commits] [Gerrit] convert svgs-to-pngs using convert - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210613 Change subject: convert svgs-to-pngs using convert .. convert svgs-to-pngs using convert Change-Id: I1393b8aee0eb5b4a77bf000cd953271edbba4f56 --- M scripts/make-icons-from-svg.sh 1 file changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/13/210613/2 diff --git a/scripts/make-icons-from-svg.sh b/scripts/make-icons-from-svg.sh index eb3c672..0d6167d 100755 --- a/scripts/make-icons-from-svg.sh +++ b/scripts/make-icons-from-svg.sh @@ -1,12 +1,13 @@ -# This script takes icon-prod.svg and creates pngs used for AppIcon assets. -# -# Note: it's much easier to just run this in Ubuntu: -# - copy this script and icon-prod.svg to a folder -# - with terminal change to that folder -# - then run './make-icons-from-svg.sh' -# - the various png resolutions specified below will be output to the folder +#! env ruby -ruby -e '[29,40,50,57,58,80,100,72,76,87,114,120,144,152,180].each { |x| `inkscape --export-png ./icon_#{x}.png -w #{x} icon-prod.svg` }' +# This script uses convert (from imagemagick) to convert icon-prod.svg into pngs used for AppIcon assets. +# Be sure to run it from the project's root directory -ruby -e '[29,58,80,120].each { |x| `inkscape --export-png ./icon_#{x}_copy.png -w #{x} icon-prod.svg` }' +def convert(x) + puts Converting svgs/icon-prod.svg to #{x}x#{x} png... + `convert -density 500 -resize #{x}x#{x} svgs/icon-prod.svg ./icon_#{x}.png` +end +[29,40,50,57,58,80,100,72,76,87,114,120,144,152,180].each { |x| convert x } + +[29,58,80,120].each { |x| convert x } -- To view, visit https://gerrit.wikimedia.org/r/210613 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1393b8aee0eb5b4a77bf000cd953271edbba4f56 Gerrit-PatchSet: 2 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] merge pull request #13 - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210532 Change subject: merge pull request #13 .. merge pull request #13 - Removed {} from action calls - Some clean ups of the Fastfile - Also added `fastlane_version` to make sure a certain fastlane version is being used. It's a good thing to have, even if you use `bundle exec` Change-Id: If89b9d852fe341cabd055335f194dc0598a8f6b5 --- M fastlane/Fastfile 1 file changed, 19 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/32/210532/1 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 3b912f8..8bdd8cc 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -2,13 +2,10 @@ # https://github.com/KrauseFx/fastlane/tree/master/docs # vi: ft=ruby -# By default, fastlane will send which actions are used -# No personal data is shared, more information on https://github.com/fastlane/enhancer -# Uncomment the following line to opt out -# opt_out_usage - $:.unshift File.dirname(__FILE__) require 'lib/utils.rb' + +fastlane_version 1.0.0 default_platform :ios @@ -17,7 +14,7 @@ ensure_git_status_clean end - desc Runs linting (and eventually static analysis + desc Runs linting (and eventually static analysis) lane :analyze do return if test_disabled? make 'lint' @@ -27,7 +24,7 @@ lane :test do return if test_disabled? # TODO: lint test JS code -xctest({ +xctest( scheme: 'Wikipedia', destination: platform=iOS Simulator,name=iPhone 6,OS=8.3, reports: [ @@ -41,7 +38,7 @@ } ], clean: nil -}) +) end desc Bump the version, and submit a new **Wikipedia Alpha** Build to Apple TestFlight @@ -61,11 +58,11 @@ configuration: Alpha, scheme: Wikipedia Alpha, ) -hockey({ +hockey( notes: '', - notify: '0', #Means do not notify - status: '1', #Means do not make available for download -}) + notify: '0', # Means do not notify + status: '1', # Means do not make available for download +) deliver skip_deploy: true, beta: true end @@ -77,11 +74,11 @@ configuration: Beta, scheme: Wikipedia Beta, ) -hockey({ +hockey( notes: '', - notify: '0', #Means do not notify - status: '1', #Means do not make available for download -}) + notify: '0', # Means do not notify + status: '1', # Means do not make available for download +) deliver skip_deploy: true, beta: true end @@ -93,18 +90,19 @@ configuration: Wikipedia, scheme: Wikipedia, ) -hockey({ +hockey( notes: '', - notify: '0', #Means do not notify - status: '1', #Means do not make available for download -}) + notify: '0', # Means do not notify + status: '1', # Means do not make available for download +) deliver skip_deploy: true, force: true end after_all do |lane| + end error do |lane, exception| + end end - -- To view, visit https://gerrit.wikimedia.org/r/210532 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If89b9d852fe341cabd055335f194dc0598a8f6b5 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bug T98626 Typo - wrong case - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Bug T98626 Typo - wrong case .. Bug T98626 Typo - wrong case Change-Id: Ia756239d704f3e4e875cf1b4e7320acc2bb1ba49 --- M Wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Bgerstle: Verified; Looks good to me, approved diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 6007c20..636064b 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -2106,14 +2106,14 @@ } - (void)shareSnippet:(id)sender { -NSString* selectedText = [self selectedtext]; +NSString* selectedText = self.selectedText; [[NSNotificationCenter defaultCenter] postNotificationName:WebViewControllerWillShareNotification object:self userInfo:@{ WebViewControllerShareSelectedText: selectedText }]; } -- (NSString*)selectedtext { +- (NSString*)selectedText { NSString* selectedText = [[self.webView stringByEvaluatingJavaScriptFromString:kSelectedStringJS] wmf_shareSnippetFromText]; return selectedText.length kMinimumTextSelectionLength ? @ : selectedText; -- To view, visit https://gerrit.wikimedia.org/r/210387 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia756239d704f3e4e875cf1b4e7320acc2bb1ba49 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for Bug T96450 - history is rewritten when refreshing - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix for Bug T96450 - history is rewritten when refreshing .. Fix for Bug T96450 - history is rewritten when refreshing - Added new discovery method: MWKHistoryDiscoveryMethodReload - Use new discovery method throughout the code to determine what to do. - Add discoveryMethod ivar so it can be tracked throughout the process of displaying an article. - Fix case where navigating by long press on history would also destroy forward navigation. - Fix case where network connection unavailable banner would stay visible even after the connection was restored and a page successfully loaded - Move history updating to the last step of displaying an article so it no longer needs to be removed in case of failure. - Remove invalidate cache option when reloading page. Reloading ALWAYS invalidates the cache. (it was just bastardizing existing discovery enums to bend the cache invalidation logic to its will) - Removed straggling ivar didLastNavigateByBackOrForward - check for the discovery method instead (This was duplicative of the purpose of the MWKHistoryDiscoveryMethodBackForward) - Rename MWKHistoryDiscoveryMethod enum values (they were snake up-cased) - Use NS_ENUM macro - Add a method on MWKArticle to determine if it has been cached or not - Make -[UIViewController hideAlert] a no-op if the view isn't loaded Change-Id: I2ad1b980535ae6476062193a67ae4888907ba10d --- M MediaWikiKit/MediaWikiKit/MWKArticle.h M MediaWikiKit/MediaWikiKit/MWKArticle.m M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m M MediaWikiKit/MediaWikiKitTests/MWKHistoryListTests.m M MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Categories/Alerts/UIViewController+Alert.m M Wikipedia/Session/SessionSingleton.h M Wikipedia/View Controllers/History/HistoryViewController.m M Wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M Wikipedia/View Controllers/Navigation/Center/CenterNavController.m M Wikipedia/View Controllers/Nearby/NearbyViewController.m M Wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m M Wikipedia/View Controllers/References/ReferenceVC.m M Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M Wikipedia/View Controllers/SearchResults/SearchResultsController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m M Wikipedia/View Controllers/WebView/WebViewController.h M Wikipedia/View Controllers/WebView/WebViewController.m M Wikipedia/View Controllers/WebView/WebViewController_Private.h M WikipediaUnitTests/ArticleLoadingTests.m R WikipediaUnitTests/Utilities/WMFRandomFileUtilities.h R WikipediaUnitTests/Utilities/WMFRandomFileUtilities.m 25 files changed, 157 insertions(+), 136 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.h b/MediaWikiKit/MediaWikiKit/MWKArticle.h index 1cae18f..0c7bdd3 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.h +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.h @@ -81,4 +81,6 @@ - (void)saveWithoutSavingSectionText; - (void)remove; +- (BOOL)isCached; + @end diff --git a/MediaWikiKit/MediaWikiKit/MWKArticle.m b/MediaWikiKit/MediaWikiKit/MWKArticle.m index 087c230..b6355c8 100644 --- a/MediaWikiKit/MediaWikiKit/MWKArticle.m +++ b/MediaWikiKit/MediaWikiKit/MWKArticle.m @@ -221,6 +221,10 @@ return _sections; } +- (BOOL)isCached { +return [self.sections count] 0 ? YES : NO; +} + #pragma mark - protection status methods - (MWKProtectionStatus*)requiredProtectionStatus:(NSString*)key dict:(NSDictionary*)dict { diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h index 5bf1ff5..34cd119 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.h @@ -10,14 +10,15 @@ @class MWKTitle; -typedef enum { -MWK_DISCOVERY_METHOD_SEARCH, -MWK_DISCOVERY_METHOD_RANDOM, -MWK_DISCOVERY_METHOD_LINK, -MWK_DISCOVERY_METHOD_BACKFORWARD, -MWK_DISCOVERY_METHOD_SAVED, -MWK_DISCOVERY_METHOD_UNKNOWN // reserved -} MWKHistoryDiscoveryMethod; +typedef NS_ENUM (NSUInteger, MWKHistoryDiscoveryMethod){ +MWKHistoryDiscoveryMethodSearch, +MWKHistoryDiscoveryMethodRandom, +MWKHistoryDiscoveryMethodLink, +MWKHistoryDiscoveryMethodBackForward, +MWKHistoryDiscoveryMethodSaved, +MWKHistoryDiscoveryMethodReload, +MWKHistoryDiscoveryMethodUnknown +}; @interface MWKHistoryEntry : MWKSiteDataObject diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m index 0742f0d..d8afc72 100644 ---
[MediaWiki-commits] [Gerrit] bump fastlane to 1.0, simplify fastfile - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210206 Change subject: bump fastlane to 1.0, simplify fastfile .. bump fastlane to 1.0, simplify fastfile - Remove calls to produce (app records already exist) - Keep test actions in separate lane, and chain them manually in Jenkins I basically moved our fastlane folder to a tmp location, re-ran fastlane init, and added lanes for other configs/app-ids. Change-Id: Iab9e2f32f1a41f4b7a6b75db47948aa2f3047a9e --- M Gemfile M Gemfile.lock A fastlane/.env D fastlane/Android M fastlane/Appfile M fastlane/Deliverfile M fastlane/Fastfile D fastlane/Snapfile D fastlane/SnapshotHelper.js D fastlane/deliver/metadata.json M fastlane/lib/utils.rb A fastlane/metadata/en-US/description.txt A fastlane/metadata/en-US/keywords.txt A fastlane/metadata/en-US/privacy_url.txt A fastlane/metadata/en-US/software_url.txt A fastlane/metadata/en-US/support_url.txt A fastlane/metadata/en-US/title.txt A fastlane/metadata/en-US/version_whats_new.txt D fastlane/snapshot-iPad.js D fastlane/snapshot.js 20 files changed, 273 insertions(+), 388 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/06/210206/1 diff --git a/Gemfile b/Gemfile index 5b621c6..23be19d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source https://rubygems.org; gem 'cocoapods', '~ 0.36.1' -gem 'fastlane', '~ 0.12.0' -gem 'git', '= 1.2.8' +gem 'fastlane', '~ 1.0.2' +gem 'git', '~ 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 76c7ce4..b88636f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,8 +20,8 @@ rack (= 1.0.0) rack-test (= 0.5.4) xpath (~ 2.0) -cert (0.1.9) - fastlane_core (= 0.6.0) +cert (0.2.0) + fastlane_core (= 0.7.2) certified (1.0.0) claide (0.8.1) cliver (0.3.2) @@ -51,9 +51,9 @@ netrc (= 0.7.8) cocoapods-try (0.4.3) colored (1.2) -commander (4.3.3) +commander (4.3.4) highline (~ 1.7.2) -credentials_manager (0.3.0) +credentials_manager (0.4.0) colored highline (= 1.7.1) security @@ -66,7 +66,7 @@ security (~ 0.1.2) term-ansicolor (~ 1.0.7) terminal-table (~ 1.4.5) -deliver (0.9.3) +deliver (0.9.4) credentials_manager (= 0.3.0) excon fastimage (~ 1.6.3) @@ -77,9 +77,7 @@ rubyzip (~ 1.1.6) domain_name (0.5.24) unf (= 0.0.5, 1.0.0) -dotenv (0.11.1) - dotenv-deployment (~ 0.0.2) -dotenv-deployment (0.0.2) +dotenv (2.0.1) escape (0.0.4) excon (0.45.3) faraday (0.8.9) @@ -88,30 +86,30 @@ faraday (= 0.7.4, 0.10) fastimage (1.6.8) addressable (~ 2.3, = 2.3.5) -fastlane (0.12.5) +fastlane (1.0.2) aws-sdk (~ 1.0) - cert (= 0.1.7) + cert (= 0.2.0) cupertino (= 1.3.3) - deliver (= 0.9.3) - fastlane_core (= 0.6.2) - frameit (= 1.0.0) + deliver (= 0.9.4) + fastlane_core (= 0.7.2) + frameit (= 1.0.1) + krausefx-shenzhen (= 0.14.2) nokogiri (~ 1.6) - pem (= 0.5.4) - produce (= 0.2.0) - shenzhen (~ 0.12) - sigh (= 0.4.10) + pem (= 0.5.5) + produce (= 0.2.1) + sigh (= 0.5.1) slack-notifier (~ 1.0) - snapshot (= 0.7.0) + snapshot (= 0.8.0) terminal-notifier (~ 1.6.2) terminal-table (~ 1.4.5) xcodeproj (~ 0.20) xcpretty (~ 0.1) -fastlane_core (0.6.2) +fastlane_core (0.7.2) babosa capybara (~ 2.4.3) colored - commander (= 4.1.0) - credentials_manager (= 0.2.1) + commander (= 4.3.4) + credentials_manager (= 0.4.0) excon (~ 0.45.0) highline (= 1.7.2) json @@ -124,10 +122,23 @@ fastlane_core (= 0.5.0) mini_magick (~ 4.0.2) fuzzy_match (2.0.4) -git (1.2.8) +git (1.2.9.1) highline (1.7.2) i18n (0.7.0) json (1.8.2) +krausefx-shenzhen (0.14.2) + aws-sdk (~ 1.0) + commander (~ 4.3) + dotenv (= 0.7) + faraday (~ 0.8.9) + faraday_middleware (~ 0.9) + highline (= 1.7.2) + json (~ 1.8) + net-sftp (~ 2.1.2) + plist (~ 3.1.0) + rubyzip (~ 1.1) + security (~ 0.1.3) + terminal-table (~ 1.4.5) mechanize (2.5.1) domain_name (~ 0.5, = 0.5.1) mime-types (~ 1.17, = 1.17.2) @@ -155,7 +166,7 @@ ntlm-http (0.1.1) open4 (1.3.4) pdf-core (0.5.1) -pem (0.5.4) +pem (0.5.5) fastlane_core (= 0.6.0) phantomjs (1.9.8.0) plist (3.1.0) @@ -167,31 +178,18 @@ prawn (2.0.1) pdf-core (~ 0.5.1) ttfunk (~ 1.4.0) -produce (0.2.0) +produce (0.2.1) fastlane_core (= 0.5.0) -rack (1.6.0) +rack (1.6.1) rack-test (0.6.3) rack (= 1.0) rubyzip (1.1.7) security (0.1.3) -shenzhen (0.14.0) - aws-sdk (~ 1.0) - commander (~ 4.3) -
[MediaWiki-commits] [Gerrit] fix for missing file - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/210095 Change subject: fix for missing file .. fix for missing file Change-Id: Ie0f15812e141c9095b27bb3de36e37530efafdca --- M Wikipedia.xcodeproj/project.pbxproj M WikipediaUnitTests/MWKArticle+WMFSharingTests.m D WikipediaUnitTests/MWKArticle_ShareSnippetTests.m 3 files changed, 8 insertions(+), 52 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/95/210095/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 33754c2..dcad244 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -293,7 +293,6 @@ BCC185D81A9E5628005378F8 /* UILabel+WMFStyling.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185D71A9E5628005378F8 /* UILabel+WMFStyling.m */; }; BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */; }; BCC185E81A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */; }; - BCC9B2681AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B2671AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m */; }; BCCED2D01AE03BE20094EB7E /* MWKSectionListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */; }; BCDB75C41AB0E835593F /* WMFSubstringUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB75C31AB0E835593F /* WMFSubstringUtilsTests.m */; }; BCE912BA1ACC5E6900B74B42 /* NSIndexSet+BKReduce.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE912B91ACC5E6900B74B42 /* NSIndexSet+BKReduce.m */; }; @@ -902,7 +901,6 @@ BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIButton+FrameUtils.m; sourceTree = group; }; BCC185E61A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICollectionViewFlowLayout+AttributeUtils.h; sourceTree = group; }; BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICollectionViewFlowLayout+AttributeUtils.m; sourceTree = group; }; - BCC9B2671AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKArticle_ShareSnippetTests.m; sourceTree = group; }; BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSectionListTests.m; sourceTree = group; }; BCCED2D21AE041BD0094EB7E /* MWKSectionList_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWKSectionList_Private.h; sourceTree = group; }; BCDB75BC1AB0D3DE0005593F /* WMFImageInfoController_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFImageInfoController_Private.h; path = Image Gallery/WMFImageInfoController_Private.h; sourceTree = group; }; @@ -2074,7 +2072,6 @@ 0EBC56951AD5B22800E82CDD /* BITHockeyManagerWMFExtensionsTests.m */, BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */, BC49B3631AEECFD8009F55BE /* ArticleLoadingTests.m */, - BCC9B2671AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m */, BC92A7721AFA88D3003C4212 /* MWKSection+WMFSharingTests.m */, BCAFC5CF1AFD5E7D004615BA /* MWKArticle+WMFSharingTests.m */, ); @@ -2936,7 +2933,6 @@ 0EBC56961AD5B22800E82CDD /* BITHockeyManagerWMFExtensionsTests.m in Sources */, BC0FED6A1AAA0268002488D7 /* MWKDataStorePathTests.m in Sources */, BC0FED761AAA026C002488D7 /* NSString+WMFHTMLParsingTests.m in Sources */, - BCC9B2681AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m in Sources */, BCA676571AC05FE200A16160 /* XCTestCase+WMFBundleConvenience.m in Sources */, BC0FED671AAA0268002488D7 /* MWKTitleTests.m in Sources */,
[MediaWiki-commits] [Gerrit] use a different share snippet xpath for main pages - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/209812 Change subject: use a different share snippet xpath for main pages .. use a different share snippet xpath for main pages main pages wrap their sections (at least the first) in two divs. until we use TextExtracts page property, this will suffice as a workaround Bug: T98619 Change-Id: Ib998fd8ff9bd40c09214c372e283c0ade82051af --- M Wikipedia.xcodeproj/project.pbxproj D Wikipedia/Categories/MWKArticle+ShareSnippet.m R Wikipedia/Categories/MWKArticle+WMFSharing.h A Wikipedia/Categories/MWKArticle+WMFSharing.m M Wikipedia/Categories/MWKSection+WMFSharing.h M Wikipedia/Categories/MWKSection+WMFSharing.m M Wikipedia/Networking/Fetchers/ArticleFetcher.m M Wikipedia/Session/SessionSingleton.m M Wikipedia/View Controllers/ShareCard/WMFShareOptionsViewController.m A WikipediaUnitTests/Fixtures/MainPageMobileView.json A WikipediaUnitTests/MWKArticle+WMFSharingTests.m 11 files changed, 115 insertions(+), 65 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/12/209812/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index eaa3407..33754c2 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -242,6 +242,9 @@ BCA96E731AAA354D009A61FA /* WMFGradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA96E721AAA354D009A61FA /* WMFGradientView.m */; }; BCA96E771AAA35EE009A61FA /* UIView+WMFDefaultNib.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA96E761AAA35EE009A61FA /* UIView+WMFDefaultNib.m */; }; BCAC50C11AF3F7460015936C /* NSBundle+WMFInfoUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCAC50C01AF3F7460015936C /* NSBundle+WMFInfoUtils.m */; }; + BCAFC5D01AFD5E7D004615BA /* MWKArticle+WMFSharingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCAFC5CF1AFD5E7D004615BA /* MWKArticle+WMFSharingTests.m */; }; + BCAFC5D31AFD5F7E004615BA /* MWKArticle+WMFSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = BCAFC5D11AFD5F7E004615BA /* MWKArticle+WMFSharing.m */; }; + BCAFC5D61AFD625E004615BA /* MainPageMobileView.json in Resources */ = {isa = PBXBuildFile; fileRef = BCAFC5D51AFD625E004615BA /* MainPageMobileView.json */; }; BCB3AE861AC11320004AD205 /* NSPersistentStoreCoordinator+WMFTempCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB3AE851AC11320004AD205 /* NSPersistentStoreCoordinator+WMFTempCoordinator.m */; }; BCB3AE8A1AC11458004AD205 /* NSManagedObjectContext+WMFTempContext.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB3AE891AC11458004AD205 /* NSManagedObjectContext+WMFTempContext.m */; }; BCB3AEA71AC1DDE4004AD205 /* OldDataSchemaMigrator.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB3AEA61AC1DDE4004AD205 /* OldDataSchemaMigrator.m */; }; @@ -291,7 +294,6 @@ BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */; }; BCC185E81A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */; }; BCC9B2681AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B2671AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m */; }; - BCC9B26B1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B26A1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m */; }; BCCED2D01AE03BE20094EB7E /* MWKSectionListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */; }; BCDB75C41AB0E835593F /* WMFSubstringUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB75C31AB0E835593F /* WMFSubstringUtilsTests.m */; }; BCE912BA1ACC5E6900B74B42 /* NSIndexSet+BKReduce.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE912B91ACC5E6900B74B42 /* NSIndexSet+BKReduce.m */; }; @@ -791,6 +793,10 @@ BCA96E761AAA35EE009A61FA /* UIView+WMFDefaultNib.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIView+WMFDefaultNib.m; sourceTree = group; }; BCAC50BF1AF3F7460015936C /* NSBundle+WMFInfoUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSBundle+WMFInfoUtils.h; sourceTree = group; }; BCAC50C01AF3F7460015936C /* NSBundle+WMFInfoUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSBundle+WMFInfoUtils.m;
[MediaWiki-commits] [Gerrit] Remove superfluous appInstallID from URLs - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Remove superfluous appInstallID from URLs .. Remove superfluous appInstallID from URLs Change-Id: Ic20a8f2ad65af2cfeafc7fcc7be41087afc45edd --- M Wikipedia/Networking/Fetchers/ArticleFetcher.m 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Nuria: Looks good to me, but someone else must approve Bgerstle: Looks good to me, approved jenkins-bot: Verified Objections: Dr0ptp4kt: There's a problem with this change, please improve Deskana: There's a problem with this change, please improve diff --git a/Wikipedia/Networking/Fetchers/ArticleFetcher.m b/Wikipedia/Networking/Fetchers/ArticleFetcher.m index f06c38d..8c403e3 100644 --- a/Wikipedia/Networking/Fetchers/ArticleFetcher.m +++ b/Wikipedia/Networking/Fetchers/ArticleFetcher.m @@ -161,12 +161,6 @@ @image]) }.mutableCopy; -if ([SessionSingleton sharedInstance].shouldSendUsageReports) { -// !!!: (bgerstle Feb 4 2015) we're getting an unrecognized parameter warning for appInstallID -ReadingActionFunnel* funnel = [[ReadingActionFunnel alloc] init]; -params[@appInstallID] = funnel.appInstallID; -} - return params; } -- To view, visit https://gerrit.wikimedia.org/r/205980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic20a8f2ad65af2cfeafc7fcc7be41087afc45edd Gerrit-PatchSet: 3 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Deskana dga...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Joal j...@wikimedia.org Gerrit-Reviewer: Madhuvishy mviswanat...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Nuria nu...@wikimedia.org Gerrit-Reviewer: OliverKeyes oke...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Migration fixes - Bug: T96607 Sending migration failures ... - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Migration fixes - Bug: T96607 Sending migration failures to OTRS Adding build number to user agent string Adding logic to remove old backups after 30 days Refactor many methods to be instance methods to make the classes testable Add tests for removing .. Migration fixes - Bug: T96607 Sending migration failures to OTRS Adding build number to user agent string Adding logic to remove old backups after 30 days Refactor many methods to be instance methods to make the classes testable Add tests for removing and moving the store - but they don't work in the test bundle :( Change-Id: I2c9dccbfb04803dc4d80ee8dcae64b76f13a39e3 --- M OldDataSchema/Data/ArticleDataContextSingleton.h M OldDataSchema/Data/ArticleDataContextSingleton.m M Wikipedia/AppDelegate.m M Wikipedia/Data/OldDataSchemaMigrator.h M Wikipedia/Data/OldDataSchemaMigrator.m M Wikipedia/Data/OldDataSchemaMigrator_Private.h M Wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.h M Wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.m M Wikipedia/mw-utils/WikipediaAppUtils.m M WikipediaUnitTests/OldDataSchemaMigratorTests.m 10 files changed, 287 insertions(+), 145 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.h b/OldDataSchema/Data/ArticleDataContextSingleton.h index d533b7e..fd5b76a 100644 --- a/OldDataSchema/Data/ArticleDataContextSingleton.h +++ b/OldDataSchema/Data/ArticleDataContextSingleton.h @@ -1,5 +1,3 @@ -// Created by Monte Hurd on 11/27/13. -// Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! #import CoreData/CoreData.h @@ -7,10 +5,33 @@ + (ArticleDataContextSingleton *)sharedInstance; +/** + * The path to the DB + * + * @return The path + */ +- (NSString*)databasePath; + +/** + * Created lazily + */ @property (nonatomic, retain) NSManagedObjectContext *mainContext; +/** + * Create a new background context. You are responsible for its lifecycle + * and propagating changes to the store. + * + * @return A new background context + */ - (NSManagedObjectContext*)backgroundContext; +/** + * Automatically propagates changes to the store. + * Use this for background contexts to handle the save propagation for you. + * + * @param context The context to save + * @param completionBlock a completion block fired after the save operation + */ - (void)saveContextAndPropagateChangesToStore:(NSManagedObjectContext*)context completionBlock:(void(^)(NSError* error))completionBlock; @end diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.m b/OldDataSchema/Data/ArticleDataContextSingleton.m index e6182dc..7dd54fe 100644 --- a/OldDataSchema/Data/ArticleDataContextSingleton.m +++ b/OldDataSchema/Data/ArticleDataContextSingleton.m @@ -1,12 +1,8 @@ -// Created by Monte Hurd on 11/27/13. -// Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! #import ArticleDataContextSingleton.h #import NSManagedObjectModel+OldDataSchema.h -@interface ArticleDataContextSingleton (){ - -} +@interface ArticleDataContextSingleton () @property (nonatomic, retain) NSManagedObjectContext *masterContext; @@ -25,55 +21,66 @@ return sharedInstance; } -- (id)init -{ -self = [super init]; -if (self) { -[self setupMasterContext]; +- (NSString*)databasePath{ + +NSString *articlesDBPath = [[self documentRootPath] stringByAppendingString:@/articleData6.sqlite]; +return articlesDBPath; +} + +- (NSManagedObjectContext*)masterContext{ + +if(!_masterContext){ + +NSPersistentStoreCoordinator *persistentStoreCoordinator = +[[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[NSManagedObjectModel wmf_oldDataSchema]]; + +NSURL *url = [NSURL fileURLWithPath:[self databasePath]]; + +NSDictionary *options = @{ + NSMigratePersistentStoresAutomaticallyOption: @YES, + NSInferMappingModelAutomaticallyOption: @YES + }; +NSError *error = nil; +NSPersistentStore *persistentStore = [persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType + configuration:nil + URL:url + options:options + error:error]; +if (!persistentStore) { +
[MediaWiki-commits] [Gerrit] lint OldDataSchema and WikipediaUnitTests - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/209554 Change subject: lint OldDataSchema and WikipediaUnitTests .. lint OldDataSchema and WikipediaUnitTests Change-Id: If434950389a7e827a7cee2186df50be132a6a257 --- M OldDataSchema/Categories/NSManagedObject+WMFModelFactory.m M OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.h M OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.m M OldDataSchema/Data/ArticleDataContextSingleton.h M OldDataSchema/Data/ArticleDataContextSingleton.m M OldDataSchema/Data/Model/Article.h M OldDataSchema/Data/Model/DiscoveryContext.h M OldDataSchema/Data/Model/GalleryImage.h M OldDataSchema/Data/Model/History.h M OldDataSchema/Data/Model/Image.h M OldDataSchema/Data/Model/ImageData.h M OldDataSchema/Data/Model/Saved.h M OldDataSchema/Data/Model/Section.h M OldDataSchema/Data/Model/SectionImage.h M WikipediaUnitTests/BITHockeyManagerWMFExtensionsTests.m M WikipediaUnitTests/CircularBitwiseRotationTests.m M WikipediaUnitTests/MWKArticle_ShareSnippetTests.m M WikipediaUnitTests/NSArray+BKIndexTests.m M WikipediaUnitTests/NSArray+PredicateTests.m M WikipediaUnitTests/NSIndexSet+BKReduceTests.m M WikipediaUnitTests/NSMutableDictionary+MaybeSetTests.m M WikipediaUnitTests/NSString+FormattedAttributedStringTests.m M WikipediaUnitTests/NSString+WMFHTMLParsingTests.m M WikipediaUnitTests/OldDataSchemaMigratorTests.m M WikipediaUnitTests/Utilities/HCIsCollectionContainingInAnyOrder+WMFCollectionMatcherUtils.m M WikipediaUnitTests/Utilities/NSBundle+TestAssets.m M WikipediaUnitTests/Utilities/NSPersistentStoreCoordinator+WMFTempCoordinator.m M WikipediaUnitTests/WMFDateFormatterTests.m M WikipediaUnitTests/WMFErrorForApiErrorObjectTests.m M WikipediaUnitTests/WMFImageInfoControllerTests.m M WikipediaUnitTests/WMFJoinedPropertyParametersTests.m M scripts/uncrustify_all.sh 32 files changed, 263 insertions(+), 312 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/54/209554/1 diff --git a/OldDataSchema/Categories/NSManagedObject+WMFModelFactory.m b/OldDataSchema/Categories/NSManagedObject+WMFModelFactory.m index 5827b67..96d5d62 100644 --- a/OldDataSchema/Categories/NSManagedObject+WMFModelFactory.m +++ b/OldDataSchema/Categories/NSManagedObject+WMFModelFactory.m @@ -14,7 +14,7 @@ return NSStringFromClass(self); } -+ (instancetype)wmf_newWithContext:(NSManagedObjectContext *)context { ++ (instancetype)wmf_newWithContext:(NSManagedObjectContext*)context { return [[self alloc] initWithEntity:[NSEntityDescription entityForName:[self wmf_entityName] inManagedObjectContext:context] insertIntoManagedObjectContext:context]; diff --git a/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.h b/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.h index 0d006ea..f423e6f 100644 --- a/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.h +++ b/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.h @@ -7,8 +7,8 @@ @interface NSManagedObjectContext (SimpleFetch) --(NSManagedObject *)getEntityForName:(NSString *)entityName withPredicateFormat:(NSString *)predicateFormat, ...; +- (NSManagedObject*)getEntityForName:(NSString*)entityName withPredicateFormat:(NSString*)predicateFormat, ...; --(NSManagedObjectID *)getArticleIDForTitle:(NSString *)title domain:(NSString *)domain; +- (NSManagedObjectID*)getArticleIDForTitle:(NSString*)title domain:(NSString*)domain; @end diff --git a/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.m b/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.m index ef26e20..687a03d 100644 --- a/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.m +++ b/OldDataSchema/Categories/NSManagedObjectContext+SimpleFetch.m @@ -7,48 +7,47 @@ @implementation NSManagedObjectContext (SimpleFetch) --(NSManagedObject *)getEntityForName:(NSString *)entityName withPredicateFormat:(NSString *)predicateFormat, ... +- (NSManagedObject*)getEntityForName:(NSString*)entityName withPredicateFormat:(NSString*)predicateFormat, ... { // See: http://www.cocoawithlove.com/2009/05/variable-argument-lists-in-cocoa.html for variadic methods syntax reminder. va_list args; va_start(args, predicateFormat); -NSPredicate * predicate = [NSPredicate predicateWithFormat:predicateFormat arguments:args]; +NSPredicate* predicate = [NSPredicate predicateWithFormat:predicateFormat arguments:args]; va_end(args); -NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; -NSEntityDescription *entity = [NSEntityDescription entityForName: entityName - inManagedObjectContext: self]; +NSFetchRequest* fetchRequest = [[NSFetchRequest alloc] init]; +NSEntityDescription* entity = [NSEntityDescription entityForName:entityName +
[MediaWiki-commits] [Gerrit] fix parsing test - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/209529 Change subject: fix parsing test .. fix parsing test Change-Id: Ib2e35990c8f0c55e938c0c5a93c99883521d1dd5 --- M Wikipedia.xcodeproj/project.pbxproj A WikipediaUnitTests/MWKArticle_ShareSnippetTests.m M WikipediaUnitTests/NSString+WMFHTMLParsingTests.m D WikipediaUnitTests/WMFShareSnippetTests.m 4 files changed, 52 insertions(+), 59 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/29/209529/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 2fdbf1c..eaa3407 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -290,7 +290,7 @@ BCC185D81A9E5628005378F8 /* UILabel+WMFStyling.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185D71A9E5628005378F8 /* UILabel+WMFStyling.m */; }; BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */; }; BCC185E81A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */; }; - BCC9B2681AFA615000FF9593 /* WMFShareSnippetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B2671AFA615000FF9593 /* WMFShareSnippetTests.m */; }; + BCC9B2681AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B2671AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m */; }; BCC9B26B1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B26A1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m */; }; BCCED2D01AE03BE20094EB7E /* MWKSectionListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */; }; BCDB75C41AB0E835593F /* WMFSubstringUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB75C31AB0E835593F /* WMFSubstringUtilsTests.m */; }; @@ -896,7 +896,7 @@ BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIButton+FrameUtils.m; sourceTree = group; }; BCC185E61A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICollectionViewFlowLayout+AttributeUtils.h; sourceTree = group; }; BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICollectionViewFlowLayout+AttributeUtils.m; sourceTree = group; }; - BCC9B2671AFA615000FF9593 /* WMFShareSnippetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFShareSnippetTests.m; sourceTree = group; }; + BCC9B2671AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKArticle_ShareSnippetTests.m; sourceTree = group; }; BCC9B2691AFA61DB00FF9593 /* MWKArticle+ShareSnippet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWKArticle+ShareSnippet.h; sourceTree = group; }; BCC9B26A1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKArticle+ShareSnippet.m; sourceTree = group; }; BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSectionListTests.m; sourceTree = group; }; @@ -2069,7 +2069,7 @@ 0EBC56951AD5B22800E82CDD /* BITHockeyManagerWMFExtensionsTests.m */, BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */, BC49B3631AEECFD8009F55BE /* ArticleLoadingTests.m */, - BCC9B2671AFA615000FF9593 /* WMFShareSnippetTests.m */, + BCC9B2671AFA615000FF9593 /* MWKArticle_ShareSnippetTests.m */, BC92A7721AFA88D3003C4212 /* MWKSection+WMFSharingTests.m */, ); path = WikipediaUnitTests; @@ -2920,7 +2920,7 @@ 0EBC56961AD5B22800E82CDD /* BITHockeyManagerWMFExtensionsTests.m in Sources */, BC0FED6A1AAA0268002488D7 /* MWKDataStorePathTests.m in Sources */,
[MediaWiki-commits] [Gerrit] fix section share snippet XPath to only grab top-level p's - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/209298 Change subject: fix section share snippet XPath to only grab top-level p's .. fix section share snippet XPath to only grab top-level p's Refine regex as a stopgap until we can use a proper API for extracting article snippets. Also did some refactoring: - Moved snippet extraction into categories on MWKArticle MWKSection. Main reason for this was to keep the shareSnippet logic context-specifc (i.e. a global NSString category for parsing HTML is harder to guarantee than one specific to article sections). - Created WMFSharing protocol for simplicity and potential expansion in the future (just one method atm). - Minor style/comment tweaks Bug: T95476 Change-Id: I9977feb9a0029d6515efa43dd199f370d16e82b2 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Categories/MWKArticle+ShareSnippet.h M Wikipedia/Categories/MWKArticle+ShareSnippet.m A Wikipedia/Categories/MWKSection+WMFSharing.h A Wikipedia/Categories/MWKSection+WMFSharing.m M Wikipedia/Categories/NSString+WMFHTMLParsing.h M Wikipedia/Categories/NSString+WMFHTMLParsing.m M Wikipedia/View Controllers/ShareCard/WMFShareOptionsViewController.h M Wikipedia/View Controllers/ShareCard/WMFShareOptionsViewController.m A Wikipedia/View Controllers/ShareCard/WMFSharing.h A WikipediaUnitTests/MWKSection+WMFSharingTests.m M WikipediaUnitTests/NSString+WMFHTMLParsingTests.m 12 files changed, 167 insertions(+), 66 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/98/209298/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index a97cfe6..a46 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -227,6 +227,8 @@ BC86B93D1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93C1A929CC500B4C039 /* UICollectionViewFlowLayout+NSCopying.m */; }; BC86B9401A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m in Sources */ = {isa = PBXBuildFile; fileRef = BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */; }; BC90C4BE1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = BC90C4BD1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.m */; }; + BC92A7711AFA841C003C4212 /* MWKSection+WMFSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = BC92A7701AFA841C003C4212 /* MWKSection+WMFSharing.m */; }; + BC92A7731AFA88D3003C4212 /* MWKSection+WMFSharingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC92A7721AFA88D3003C4212 /* MWKSection+WMFSharingTests.m */; }; BC955BC71A82BEFD000EF9E4 /* MWKImageInfoFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = BC955BC61A82BEFD000EF9E4 /* MWKImageInfoFetcher.m */; }; BC955BCF1A82C2FA000EF9E4 /* AFHTTPRequestOperationManager+WMFConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = BC955BCE1A82C2FA000EF9E4 /* AFHTTPRequestOperationManager+WMFConfig.m */; }; BCA676491AC05EDF00A16160 /* WMFRandomFileUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA676481AC05EDF00A16160 /* WMFRandomFileUtilities.m */; }; @@ -759,6 +761,10 @@ BC86B93F1A929D7900B4C039 /* UICollectionViewFlowLayout+WMFItemSizeThatFits.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICollectionViewFlowLayout+WMFItemSizeThatFits.m; sourceTree = group; }; BC90C4BC1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWindow+WMFMainScreenWindow.h; sourceTree = group; }; BC90C4BD1AC219FE009F36D2 /* UIWindow+WMFMainScreenWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIWindow+WMFMainScreenWindow.m; sourceTree = group; }; + BC92A76E1AFA83D2003C4212 /* WMFSharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFSharing.h; path = ShareCard/WMFSharing.h; sourceTree = group; }; + BC92A76F1AFA841C003C4212 /* MWKSection+WMFSharing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWKSection+WMFSharing.h; sourceTree = group; }; + BC92A7701AFA841C003C4212 /* MWKSection+WMFSharing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSection+WMFSharing.m; sourceTree = group; }; + BC92A7721AFA88D3003C4212 /* MWKSection+WMFSharingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSection+WMFSharingTests.m;
[MediaWiki-commits] [Gerrit] refactor add more sanitation to article snippet heuristic - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/209297 Change subject: refactor add more sanitation to article snippet heuristic .. refactor add more sanitation to article snippet heuristic Weren't doing text sanitation on section text before sharing (similar to T95476). Moved share snippet generation to a category on MWKArticle. Could potentially make a Shareable protocol to allow sharing sections, etc. Bug: T96312 Change-Id: I56fa670f811ae46cde612da729911c17ac04ad78 --- M Wikipedia.xcodeproj/project.pbxproj A Wikipedia/Categories/MWKArticle+ShareSnippet.h A Wikipedia/Categories/MWKArticle+ShareSnippet.m M Wikipedia/View Controllers/ShareCard/WMFShareCardViewController.m M Wikipedia/View Controllers/ShareCard/WMFShareOptionsViewController.h M Wikipedia/View Controllers/ShareCard/WMFShareOptionsViewController.m A WikipediaUnitTests/WMFShareSnippetTests.m 7 files changed, 115 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/97/209297/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 1f303f8..a97cfe6 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -287,6 +287,8 @@ BCC185D81A9E5628005378F8 /* UILabel+WMFStyling.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185D71A9E5628005378F8 /* UILabel+WMFStyling.m */; }; BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */; }; BCC185E81A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */; }; + BCC9B2681AFA615000FF9593 /* WMFShareSnippetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B2671AFA615000FF9593 /* WMFShareSnippetTests.m */; }; + BCC9B26B1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC9B26A1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m */; }; BCCED2D01AE03BE20094EB7E /* MWKSectionListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */; }; BCDB75C41AB0E835593F /* WMFSubstringUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB75C31AB0E835593F /* WMFSubstringUtilsTests.m */; }; BCE912BA1ACC5E6900B74B42 /* NSIndexSet+BKReduce.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE912B91ACC5E6900B74B42 /* NSIndexSet+BKReduce.m */; }; @@ -885,6 +887,9 @@ BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIButton+FrameUtils.m; sourceTree = group; }; BCC185E61A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICollectionViewFlowLayout+AttributeUtils.h; sourceTree = group; }; BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICollectionViewFlowLayout+AttributeUtils.m; sourceTree = group; }; + BCC9B2671AFA615000FF9593 /* WMFShareSnippetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFShareSnippetTests.m; sourceTree = group; }; + BCC9B2691AFA61DB00FF9593 /* MWKArticle+ShareSnippet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWKArticle+ShareSnippet.h; sourceTree = group; }; + BCC9B26A1AFA61DB00FF9593 /* MWKArticle+ShareSnippet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKArticle+ShareSnippet.m; sourceTree = group; }; BCCED2CF1AE03BE20094EB7E /* MWKSectionListTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWKSectionListTests.m; sourceTree = group; }; BCCED2D21AE041BD0094EB7E /* MWKSectionList_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWKSectionList_Private.h; sourceTree = group; }; BCDB75BC1AB0D3DE0005593F /* WMFImageInfoController_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFImageInfoController_Private.h; path = Image Gallery/WMFImageInfoController_Private.h; sourceTree = group; }; @@ -1877,6 +1882,8 @@ 04B0E3E91AE8252800379AE0 /* NSURL+WMFRest.m */,
[MediaWiki-commits] [Gerrit] do text sanitation on selected text before sharing - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/209163 Change subject: do text sanitation on selected text before sharing .. do text sanitation on selected text before sharing We weren't doing sanitation on selected text before sharing, which was allowing things like citations to slip through. See added test case for wmf_shareSnippetFromText and its usage (as opposed to wmf_shareSnippetFromHTML). One drawback to this approach is that if a user *partially* selects a citation like this.[1 it will still be passed through. IMO we need a more comprehensive solution for how we select text for sharing (perhaps using selectors on HTML w/ Parsoid markup?). Bug: T95476 Change-Id: Id3e0d26c697d409baf6668118a8e695ff96ab4e9 --- M Wikipedia/Categories/NSString+WMFHTMLParsing.h M Wikipedia/Categories/NSString+WMFHTMLParsing.m M Wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M Wikipedia/View Controllers/ShareCard/WMFShareOptionsViewController.m M Wikipedia/View Controllers/WebView/WebViewController.h M Wikipedia/View Controllers/WebView/WebViewController.m M WikipediaUnitTests/NSString+WMFHTMLParsingTests.m 7 files changed, 67 insertions(+), 54 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/63/209163/1 diff --git a/Wikipedia/Categories/NSString+WMFHTMLParsing.h b/Wikipedia/Categories/NSString+WMFHTMLParsing.h index 94169f0..82062a8 100644 --- a/Wikipedia/Categories/NSString+WMFHTMLParsing.h +++ b/Wikipedia/Categories/NSString+WMFHTMLParsing.h @@ -25,11 +25,12 @@ /** * Parse the receiver as HTML and return a heuristically defined snippet. */ -- (NSString*)wmf_getStringSnippetWithoutHTML; +- (NSString*)wmf_shareSnippetFromHTML; + +/// @return A new string which has been sanitized to remove unnecesary characters and wiki markup. +- (NSString*)wmf_shareSnippetFromText; /** - * - * * @return Return string with internal whitespace segments reduced to single space. Accounts for end of sentence punctuation like commas, semicolons and periods. Trims leading and trailing whitespace as well. */ - (NSString*)wmf_getCollapsedWhitespaceStringAdjustedForTerminalPunctuation; diff --git a/Wikipedia/Categories/NSString+WMFHTMLParsing.m b/Wikipedia/Categories/NSString+WMFHTMLParsing.m index a89ad8f..63edc71 100644 --- a/Wikipedia/Categories/NSString+WMFHTMLParsing.m +++ b/Wikipedia/Categories/NSString+WMFHTMLParsing.m @@ -1,6 +1,7 @@ #import NSString+WMFHTMLParsing.h #import WikipediaAppUtils.h #import hpple/TFHpple.h +#import NSString+Extras.h static int const kMinimumLengthForPreTransformedHTMLForSnippet = 40; static int const kHighestIndexForSubstringAfterHTMLRemoved = 350; @@ -30,46 +31,43 @@ return [[self wmf_htmlTextNodes] componentsJoinedByString:delimiter]; } -- (NSString*)wmf_getStringSnippetWithoutHTML { +- (NSString*)wmf_shareSnippetFromHTML { if (self.length kMinimumLengthForPreTransformedHTMLForSnippet) { return nil; } -NSData* stringData = [self dataUsingEncoding:NSUTF8StringEncoding]; -TFHpple* parser = [TFHpple hppleWithHTMLData:stringData]; -NSArray* textNodes = [parser searchWithXPathQuery:@//p[1]//text()]; -NSMutableArray* results = @[].mutableCopy; -for (TFHppleElement* node in textNodes) { -[results addObject:node.raw]; -} -NSString* result = [results componentsJoinedByString:@]; -result = [result substringToIndex: - MIN(kHighestIndexForSubstringAfterHTMLRemoved, result.length)]; -result = [NSString wmf_stringSnippetSimplifiedInString:result]; -return result.length = kMinimumLengthForPreTransformedHTMLForSnippet ? - result : nil; +NSString* result = +[[TFHpple hppleWithHTMLData:[self dataUsingEncoding:NSUTF8StringEncoding]] + searchWithXPathQuery:@//p[1]//text()] +valueForKey:WMF_SAFE_KEYPATH([TFHppleElement new], raw)] + componentsJoinedByString:@] + wmf_safeSubstringToIndex:kHighestIndexForSubstringAfterHTMLRemoved] + wmf_shareSnippetFromText]; +return result.length = kMinimumLengthForPreTransformedHTMLForSnippet ? result : nil; } #pragma mark - String simplification and cleanup -+ (NSString*)wmf_stringSnippetSimplifiedInString:(NSString*)string { -NSString* result = [string stringByReplacingOccurrencesOfString:@amp; withString:@]; -result = [string stringByReplacingOccurrencesOfString:@gt; withString:@]; -result = [string stringByReplacingOccurrencesOfString:@lt; withString:@]; -result = [result wmf_stringByCollapsingConsecutiveNewlines]; -result = [result wmf_stringByRecursivelyRemovingParenthesizedContent]; -result = [result wmf_stringByRemovingBracketedContent]; -result = [result wmf_stringByRemovingWhiteSpaceBeforeCommasAndSemicolons]; -result = [result
[MediaWiki-commits] [Gerrit] Fix typo. - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix typo. .. Fix typo. Change-Id: Id2f9cad27024f41923e28b6cf9a6410e6aa110aa --- M MediaWikiKit/MediaWikiKit/MWKImage.h M MediaWikiKit/MediaWikiKit/MWKImage.m M Wikipedia/View Controllers/WebView/WebViewController.m M Wikipedia/Web Image Interception/URLCache.m 4 files changed, 6 insertions(+), 6 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.h b/MediaWikiKit/MediaWikiKit/MWKImage.h index 74d5f65..3040a63 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImage.h +++ b/MediaWikiKit/MediaWikiKit/MWKImage.h @@ -56,7 +56,7 @@ * @param normalized Set YES to normalize to the image * @return The primary focal rect */ -- (CGRect)primaryFocalRectNomrmalizedToImageSize:(BOOL)normalized; +- (CGRect)primaryFocalRectNormalizedToImageSize:(BOOL)normalized; /** * Returns a rect enclosing all focal rects @@ -66,7 +66,7 @@ * @return The rect enclosing all focal rects */ -- (CGRect)rectEnclosingAllFocalRectsNomrmalizedToImageSize:(BOOL)normalized; +- (CGRect)rectEnclosingAllFocalRectsNormalizedToImageSize:(BOOL)normalized; - (void)importImageData:(NSData*)data; diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.m b/MediaWikiKit/MediaWikiKit/MWKImage.m index c688925..af31202 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImage.m +++ b/MediaWikiKit/MediaWikiKit/MWKImage.m @@ -74,7 +74,7 @@ return normalized; } -- (CGRect)primaryFocalRectNomrmalizedToImageSize:(BOOL)normalized { +- (CGRect)primaryFocalRectNormalizedToImageSize:(BOOL)normalized { if (self.focalRectsInUnitCoordinatesAsStrings.count == 0) { return CGRectZero; } @@ -89,7 +89,7 @@ return rect; } -- (CGRect)rectEnclosingAllFocalRectsNomrmalizedToImageSize:(BOOL)normalized { +- (CGRect)rectEnclosingAllFocalRectsNormalizedToImageSize:(BOOL)normalized { __block CGRect enclosingRect = CGRectZero; [self.focalRectsInUnitCoordinatesAsStrings enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL* stop) { diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 87b0db3..2fbf833 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -1561,7 +1561,7 @@ NSInteger offsetY = 25; if (hasImage) { -CGRect focalRect = [article.image primaryFocalRectNomrmalizedToImageSize:NO]; +CGRect focalRect = [article.image primaryFocalRectNormalizedToImageSize:NO]; if (!CGRectEqualToRect(focalRect, CGRectZero)) { offsetY = [self leadImageFocalOffsetYPercentageFromTopOfRect:focalRect]; } diff --git a/Wikipedia/Web Image Interception/URLCache.m b/Wikipedia/Web Image Interception/URLCache.m index 8e9669a..2c5579a 100644 --- a/Wikipedia/Web Image Interception/URLCache.m +++ b/Wikipedia/Web Image Interception/URLCache.m @@ -111,7 +111,7 @@ kURLCacheKeyURL: image.sourceURL, kURLCacheKeyFileNameNoSizePrefix: image.fileNameNoSizePrefix, kURLCacheKeyIsLeadImage: @([image isLeadImage]), - kURLCacheKeyPrimaryFocalUnitRectString: NSStringFromCGRect([image primaryFocalRectNomrmalizedToImageSize:NO]) + kURLCacheKeyPrimaryFocalUnitRectString: NSStringFromCGRect([image primaryFocalRectNormalizedToImageSize:NO]) }]; } -- To view, visit https://gerrit.wikimedia.org/r/208673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id2f9cad27024f41923e28b6cf9a6410e6aa110aa Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wmf-ify and rename string categories - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/208830 Change subject: wmf-ify and rename string categories .. wmf-ify and rename string categories Use Apple stringBy... convention and/or shorten method names. Change-Id: I59a391cd88a8e77ec96219b829b7425bcd908513 --- M MediaWikiKit/MediaWikiKit/MWKDataStore.m M MediaWikiKit/MediaWikiKit/MWKImageList.m M Wikipedia/Categories/MWKSection+TOC.m M Wikipedia/Categories/NSString+Extras.h M Wikipedia/Categories/NSString+Extras.m M Wikipedia/EventLogging/EventLogger.m M Wikipedia/Networking/Fetchers/NearbyFetcher.m M Wikipedia/Networking/Fetchers/PageHistoryFetcher.m M Wikipedia/Networking/Fetchers/SearchResultFetcher.m M Wikipedia/View Controllers/PageHistory/PageHistoryResultCell.m M Wikipedia/View Controllers/SavedPages/NSAttributedString+WMFSavedPagesAttributedStrings.m M Wikipedia/View Controllers/SearchResults/SearchResultsController.m M Wikipedia/View Controllers/ShareCard/WMFShareCardViewController.m M Wikipedia/View Controllers/ShareCard/WMFShareOptionsViewController.m M Wikipedia/View Controllers/WebView/WebViewController.m M Wikipedia/Web Image Interception/URLCache.m 16 files changed, 49 insertions(+), 60 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/30/208830/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKDataStore.m b/MediaWikiKit/MediaWikiKit/MWKDataStore.m index 6d4abda..49a0841 100644 --- a/MediaWikiKit/MediaWikiKit/MWKDataStore.m +++ b/MediaWikiKit/MediaWikiKit/MWKDataStore.m @@ -100,7 +100,7 @@ } - (NSString*)safeFilenameWithImageURL:(NSString*)str { -str = [str getUrlWithoutScheme]; +str = [str wmf_schemelessURL]; if ([str hasPrefix:MWKDataStoreValidImageSitePrefix]) { NSString* suffix = [str substringFromIndex:[MWKDataStoreValidImageSitePrefix length]]; diff --git a/MediaWikiKit/MediaWikiKit/MWKImageList.m b/MediaWikiKit/MediaWikiKit/MWKImageList.m index f2ae92a..9e90a51 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImageList.m +++ b/MediaWikiKit/MediaWikiKit/MWKImageList.m @@ -47,7 +47,7 @@ } - (void)addImageURL:(NSString*)imageURL { -imageURL = [imageURL getUrlWithoutScheme]; +imageURL = [imageURL wmf_schemelessURL]; [entries addObject:imageURL]; entriesByURL[imageURL] = imageURL; diff --git a/Wikipedia/Categories/MWKSection+TOC.m b/Wikipedia/Categories/MWKSection+TOC.m index 01325f9..f1631a9 100644 --- a/Wikipedia/Categories/MWKSection+TOC.m +++ b/Wikipedia/Categories/MWKSection+TOC.m @@ -15,7 +15,7 @@ NSString* title = isLead ? self.article.title.prefixedText : self.line; -NSString* noHtmlTitle = [title getStringWithoutHTML]; +NSString* noHtmlTitle = [title wmf_stringByRemovingHTML]; id titleToUse = isLead ? [self getLeadSectionAttributedTitleForString : noHtmlTitle] : noHtmlTitle; diff --git a/Wikipedia/Categories/NSString+Extras.h b/Wikipedia/Categories/NSString+Extras.h index bc5b0b8..d7bef31 100644 --- a/Wikipedia/Categories/NSString+Extras.h +++ b/Wikipedia/Categories/NSString+Extras.h @@ -6,24 +6,30 @@ /// @return A substring of the receiver going up to @c index, or @c length, whichever is shorter. - (NSString*)wmf_safeSubstringToIndex:(NSUInteger)index; -- (NSString*)urlEncodedUTF8String; -+ (NSString*)sha1:(NSString*)dataFromString isFile:(BOOL)isFile; -- (NSString*)getUrlWithoutScheme; -- (NSString*)getImageMimeTypeForExtension; +- (NSString*)wmf_UTF8StringWithPercentEscapes; -- (NSDate*) getDateFromIso8601DateString; -- (NSString*)getStringWithoutHTML; +- (NSString*)wmf_schemelessURL; -- (NSString*)randomlyRepeatMaxTimes:(NSUInteger)maxTimes; +- (NSString*)wmf_imageMimeTypeForExtension; -- (NSString*)wikiTitleWithoutUnderscores; -- (NSString*)wikiTitleWithoutSpaces; +- (NSDate*)wmf_iso8601Date; -- (NSString*)capitalizeFirstLetter; +- (NSString*)wmf_stringByRemovingHTML; + +- (NSString*)wmf_randomlyRepeatMaxTimes:(NSUInteger)maxTimes; + +- (NSString*)wmf_stringByReplacingUndrescoresWithSpaces; + +- (NSString*)wmf_stringByReplacingSpacesWithUnderscores; + +- (NSString*)wmf_stringByCapitalizingFirstCharacter; - (BOOL)wmf_containsString:(NSString*)string; + - (BOOL)wmf_caseInsensitiveContainsString:(NSString*)string; + - (BOOL)wmf_containsString:(NSString*)string options:(NSStringCompareOptions)options; + - (BOOL)wmf_isEqualToStringIgnoringCase:(NSString*)string; @end diff --git a/Wikipedia/Categories/NSString+Extras.m b/Wikipedia/Categories/NSString+Extras.m index 2aafb2f..42f90c9 100644 --- a/Wikipedia/Categories/NSString+Extras.m +++ b/Wikipedia/Categories/NSString+Extras.m @@ -14,32 +14,15 @@ return [self substringToIndex:MIN(self.length, index)]; } -- (NSString*)urlEncodedUTF8String { -return (__bridge_transfer id)CFURLCreateStringByAddingPercentEscapes(0, (__bridge CFStringRef)self, 0, -
[MediaWiki-commits] [Gerrit] bump to 4.1.3.96 - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/208139 Change subject: bump to 4.1.3.96 .. bump to 4.1.3.96 Change-Id: I75549b6117eda57ea2dda0d69f4dd253aab4c3ea --- M Wikipedia/Wikipedia-Info.plist 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/39/208139/1 diff --git a/Wikipedia/Wikipedia-Info.plist b/Wikipedia/Wikipedia-Info.plist index 02726f5..7aedf2b 100644 --- a/Wikipedia/Wikipedia-Info.plist +++ b/Wikipedia/Wikipedia-Info.plist @@ -21,7 +21,7 @@ keyCFBundleSignature/key string/string keyCFBundleVersion/key - string4.1.0.2/string + string96/string keyLSRequiresIPhoneOS/key true/ keyNSLocationWhenInUseUsageDescription/key -- To view, visit https://gerrit.wikimedia.org/r/208139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75549b6117eda57ea2dda0d69f4dd253aab4c3ea Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add bundle info utils and fix About page - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/208165 Change subject: add bundle info utils and fix About page .. add bundle info utils and fix About page The About page was only showing the build number, not the entire version. So, I wrote some categories to show either the release version (e.g. 4.1.3) for release builds and debug version (4.1.3.96) for debug builds. Screenshots: - debug: https://www.dropbox.com/s/154vw45gkt78dn0/debug%20build%20about.png?dl=0 - release: https://www.dropbox.com/s/vzgd9sj7rvp6mki/release%20build%20about.png?dl=0 Bug: T97810 Change-Id: I1fa0277214e671520d555a6a3c7816edeee1c93d --- M Wikipedia.xcodeproj/project.pbxproj A Wikipedia/Categories/NSBundle+WMFInfoUtils.h A Wikipedia/Categories/NSBundle+WMFInfoUtils.m M Wikipedia/View Controllers/About/AboutViewController.m M Wikipedia/mw-utils/WikipediaAppUtils.m 5 files changed, 86 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/65/208165/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index df0f578..ee16ed9 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -241,6 +241,7 @@ BCA9575D1ABE473800B62AE8 /* OldDataSchemaMigratorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA9575C1ABE473800B62AE8 /* OldDataSchemaMigratorTests.m */; }; BCA96E731AAA354D009A61FA /* WMFGradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA96E721AAA354D009A61FA /* WMFGradientView.m */; }; BCA96E771AAA35EE009A61FA /* UIView+WMFDefaultNib.m in Sources */ = {isa = PBXBuildFile; fileRef = BCA96E761AAA35EE009A61FA /* UIView+WMFDefaultNib.m */; }; + BCAC50C11AF3F7460015936C /* NSBundle+WMFInfoUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCAC50C01AF3F7460015936C /* NSBundle+WMFInfoUtils.m */; }; BCB3AE861AC11320004AD205 /* NSPersistentStoreCoordinator+WMFTempCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB3AE851AC11320004AD205 /* NSPersistentStoreCoordinator+WMFTempCoordinator.m */; }; BCB3AE8A1AC11458004AD205 /* NSManagedObjectContext+WMFTempContext.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB3AE891AC11458004AD205 /* NSManagedObjectContext+WMFTempContext.m */; }; BCB3AEA71AC1DDE4004AD205 /* OldDataSchemaMigrator.m in Sources */ = {isa = PBXBuildFile; fileRef = BCB3AEA61AC1DDE4004AD205 /* OldDataSchemaMigrator.m */; }; @@ -785,6 +786,8 @@ BCA96E721AAA354D009A61FA /* WMFGradientView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFGradientView.m; sourceTree = group; }; BCA96E751AAA35EE009A61FA /* UIView+WMFDefaultNib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIView+WMFDefaultNib.h; sourceTree = group; }; BCA96E761AAA35EE009A61FA /* UIView+WMFDefaultNib.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIView+WMFDefaultNib.m; sourceTree = group; }; + BCAC50BF1AF3F7460015936C /* NSBundle+WMFInfoUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSBundle+WMFInfoUtils.h; sourceTree = group; }; + BCAC50C01AF3F7460015936C /* NSBundle+WMFInfoUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSBundle+WMFInfoUtils.m; sourceTree = group; }; BCB3AE841AC11320004AD205 /* NSPersistentStoreCoordinator+WMFTempCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSPersistentStoreCoordinator+WMFTempCoordinator.h; sourceTree = group; }; BCB3AE851AC11320004AD205 /* NSPersistentStoreCoordinator+WMFTempCoordinator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSPersistentStoreCoordinator+WMFTempCoordinator.m; sourceTree = group; }; BCB3AE881AC11458004AD205 /* NSManagedObjectContext+WMFTempContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSManagedObjectContext+WMFTempContext.h; sourceTree = group; }; @@ -1879,6 +1882,8 @@ 0EBC567E1AD442CC00E82CDD /* BITHockeyManager+WMFExtensions.m */, 04B0E3E81AE8252800379AE0 /* NSURL+WMFRest.h */, 04B0E3E91AE8252800379AE0 /* NSURL+WMFRest.m */, + BCAC50BF1AF3F7460015936C /* NSBundle+WMFInfoUtils.h */, + BCAC50C01AF3F7460015936C /* NSBundle+WMFInfoUtils.m */, ); path = Categories;
[MediaWiki-commits] [Gerrit] CI fixes - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/207848 Change subject: CI fixes .. CI fixes Change-Id: I5afbacdfb916c88b21162928762d965735d748d9 --- M .gitignore M Gemfile M Gemfile.lock M fastlane/Appfile M fastlane/Deliverfile M fastlane/Fastfile M fastlane/lib/utils.rb 7 files changed, 227 insertions(+), 147 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/48/207848/1 diff --git a/.gitignore b/.gitignore index 6dbb5fe..02159c8 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ *.hmap *.ipa *.xcuserstate +*.dSYM.zip # Icons Wikipedia/Images.xcassets/AppIcon.appiconset/*.png diff --git a/Gemfile b/Gemfile index 449e109..5b621c6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source https://rubygems.org; gem 'cocoapods', '~ 0.36.1' -gem 'fastlane', '~ 0.4.2' -gem 'git' +gem 'fastlane', '~ 0.12.0' +gem 'git', '= 1.2.8' diff --git a/Gemfile.lock b/Gemfile.lock index fb09ac8..76c7ce4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,9 +8,9 @@ thread_safe (~ 0.3, = 0.3.4) tzinfo (~ 1.1) addressable (2.3.8) -aws-sdk (1.63.0) - aws-sdk-v1 (= 1.63.0) -aws-sdk-v1 (1.63.0) +aws-sdk (1.64.0) + aws-sdk-v1 (= 1.64.0) +aws-sdk-v1 (1.64.0) json (~ 1.4) nokogiri (= 1.4.4) babosa (1.0.2) @@ -20,8 +20,9 @@ rack (= 1.0.0) rack-test (= 0.5.4) xpath (~ 2.0) -cert (0.1.3) - fastlane_core (= 0.2.0) +cert (0.1.9) + fastlane_core (= 0.6.0) +certified (1.0.0) claide (0.8.1) cliver (0.3.2) cocoapods (0.36.1) @@ -50,69 +51,92 @@ netrc (= 0.7.8) cocoapods-try (0.4.3) colored (1.2) -commander (4.3.2) - highline (~ 1.7.1) -credentials_manager (0.1.3) +commander (4.3.3) + highline (~ 1.7.2) +credentials_manager (0.3.0) colored - highline + highline (= 1.7.1) security -deliver (0.8.1) +cupertino (1.3.3) + certified (~ 1.0.0) + commander (~ 4.3) + highline (= 1.7.1) + mechanize (~ 2.5.1) + nokogiri (~ 1.6.3) + security (~ 0.1.2) + term-ansicolor (~ 1.0.7) + terminal-table (~ 1.4.5) +deliver (0.9.3) + credentials_manager (= 0.3.0) excon fastimage (~ 1.6.3) - fastlane_core (= 0.2.0) + fastlane_core (= 0.5.2) nokogiri (~ 1.6.5) plist (~ 3.1.0) prawn rubyzip (~ 1.1.6) +domain_name (0.5.24) + unf (= 0.0.5, 1.0.0) dotenv (0.11.1) dotenv-deployment (~ 0.0.2) dotenv-deployment (0.0.2) escape (0.0.4) -excon (0.45.1) +excon (0.45.3) faraday (0.8.9) multipart-post (~ 1.2.0) faraday_middleware (0.9.1) faraday (= 0.7.4, 0.10) fastimage (1.6.8) addressable (~ 2.3, = 2.3.5) -fastlane (0.4.2) +fastlane (0.12.5) aws-sdk (~ 1.0) - cert (= 0.1.3) - deliver (= 0.7.13) - fastlane_core (= 0.3.4) - frameit (= 0.2.3) - nokogiri (~ 1.6.5) - pem (= 0.3.8) - produce (= 0.1.6) - shenzhen (~ 0.12.1) - sigh (= 0.4.5) + cert (= 0.1.7) + cupertino (= 1.3.3) + deliver (= 0.9.3) + fastlane_core (= 0.6.2) + frameit (= 1.0.0) + nokogiri (~ 1.6) + pem (= 0.5.4) + produce (= 0.2.0) + shenzhen (~ 0.12) + sigh (= 0.4.10) slack-notifier (~ 1.0) - snapshot (= 0.4.0) + snapshot (= 0.7.0) terminal-notifier (~ 1.6.2) + terminal-table (~ 1.4.5) xcodeproj (~ 0.20) xcpretty (~ 0.1) -fastlane_core (0.3.4) +fastlane_core (0.6.2) babosa capybara (~ 2.4.3) colored commander (= 4.1.0) - credentials_manager (= 0.1.3) - highline + credentials_manager (= 0.2.1) + excon (~ 0.45.0) + highline (= 1.7.2) json multi_json phantomjs (~ 1.9.8) poltergeist (~ 1.5.1) -frameit (0.2.3) +frameit (1.0.1) deliver ( 0.3) fastimage (~ 1.6.3) - fastlane_core (= 0.2.0) + fastlane_core (= 0.5.0) mini_magick (~ 4.0.2) fuzzy_match (2.0.4) -git (1.2.9.1) -highline (1.7.1) +git (1.2.8) +highline (1.7.2) i18n (0.7.0) json (1.8.2) -mime-types (2.4.3) +mechanize (2.5.1) + domain_name (~ 0.5, = 0.5.1) + mime-types (~ 1.17, = 1.17.2) + net-http-digest_auth (~ 1.1, = 1.1.1) + net-http-persistent (~ 2.5, = 2.5.2) + nokogiri (~ 1.4) + ntlm-http (~ 0.1, = 0.1.1) + webrobots (~ 0.0, = 0.0.9) +mime-types (1.25.1) mini_magick (4.0.4) mini_portile (0.6.2) minitest (5.5.1) @@ -120,16 +144,19 @@ multi_json (1.11.0) multipart-post (1.2.0) nap (0.8.0) +net-http-digest_auth (1.4) +net-http-persistent (2.9.4) net-sftp (2.1.2) net-ssh (= 2.6.5) net-ssh (2.9.2) netrc (0.7.8) nokogiri
[MediaWiki-commits] [Gerrit] add README which links to wiki docs - change (translatewiki)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/207298 Change subject: add README which links to wiki docs .. add README which links to wiki docs Change-Id: I7267e8d425f63d214e7bfd758544275ab0b4eacc --- A README 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/98/207298/1 diff --git a/README b/README new file mode 100644 index 000..568c50b --- /dev/null +++ b/README @@ -0,0 +1 @@ +See documentation on wiki: https://translatewiki.net/wiki/Translating:WikimediaMobile. -- To view, visit https://gerrit.wikimedia.org/r/207298 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7267e8d425f63d214e7bfd758544275ab0b4eacc Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix T96603 - wrapping section html creation in an exception ... - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix T96603 - wrapping section html creation in an exception handler. .. Fix T96603 - wrapping section html creation in an exception handler. Also added a default text for sections that do not display properly. Change-Id: I2fcdea0ed819b8dc2e6c18a2a0d8a32629f98e7e --- M Wikipedia/View Controllers/WebView/WebViewController.m M Wikipedia/en.lproj/Localizable.strings M Wikipedia/qqq.lproj/Localizable.strings 3 files changed, 15 insertions(+), 5 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 5cb88f3..eeccf01 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -1560,13 +1560,21 @@ NSMutableArray* sectionTextArray = [[NSMutableArray alloc] init]; for (MWKSection* section in session.currentArticle.sections) { -NSString* html = section.text; -if (html) { -// Structural html added around section html just before display. -NSString* sectionHTMLWithID = [section displayHTML:html]; +NSString* html = nil; -[sectionTextArray addObject:sectionHTMLWithID]; +@try { +html = section.text; +}@catch (NSException* exception) { +NSAssert(html, @html was not created from section %@: %@, section.title, section.text); } + +if (!html) { +html = MWLocalizedString(@article-unable-to-load-section, nil);; +} + +// Structural html added around section html just before display. +NSString* sectionHTMLWithID = [section displayHTML:html]; +[sectionTextArray addObject:sectionHTMLWithID]; } // If article has no thumbnailImage, use the first section image instead. diff --git a/Wikipedia/en.lproj/Localizable.strings b/Wikipedia/en.lproj/Localizable.strings index 8b2f73e..b5d0aab 100644 --- a/Wikipedia/en.lproj/Localizable.strings +++ b/Wikipedia/en.lproj/Localizable.strings @@ -3,6 +3,7 @@ article-languages-downloading = Loading article languages...; article-languages-filter-placeholder = Language Filter; article-read-more-title = Read more; +article-unable-to-load-section = Unable to load this section. Try refreshing the article to see if it fixes the problem.; info-box-title = Quick facts; info-box-close-text = Close; diff --git a/Wikipedia/qqq.lproj/Localizable.strings b/Wikipedia/qqq.lproj/Localizable.strings index ffddc9a..4d60907 100644 --- a/Wikipedia/qqq.lproj/Localizable.strings +++ b/Wikipedia/qqq.lproj/Localizable.strings @@ -276,3 +276,4 @@ hockeyapp-alert-privacy = Alert dialog button text for HockeyApp privacy policy. $1 will be replaced programmatically with the constant string 'HockeyApp'; page-issues = Label for button that shows the Page issues dialog.; page-similar-titles = Label for button that shows a list of similar titles (disambiguation) for the current page; +article-unable-to-load-section = Displayed within the article content when a section fails to render for some reason.; -- To view, visit https://gerrit.wikimedia.org/r/206864 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fcdea0ed819b8dc2e6c18a2a0d8a32629f98e7e Gerrit-PatchSet: 5 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] prevent storing article titles that fail to load in history - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/206970 Change subject: prevent storing article titles that fail to load in history .. prevent storing article titles that fail to load in history We optimistically store titles in the history list when they're requested, but fail to remove them if that title fails to load. Unit tests to follow in another patch (or amendment to this one, you decide). Bit of a hacky solution, as this might be vulnerable to race conditions causing the wrong title to be removed from the history list. Bug: T95585 Change-Id: Icb8ca87023d983ffcafcef9e76600ab5ce37f4df --- M MediaWikiKit/MediaWikiKit/MWKHistoryList.h M MediaWikiKit/MediaWikiKit/MWKHistoryList.m M Wikipedia/View Controllers/WebView/WebViewController.m 3 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/70/206970/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryList.h b/MediaWikiKit/MediaWikiKit/MWKHistoryList.h index 08b07ac..66a686e 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryList.h +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryList.h @@ -16,6 +16,7 @@ @property (readonly) NSUInteger length; @property (readwrite) BOOL dirty; +- (MWKHistoryEntry*)mostRecentEntry; - (MWKHistoryEntry*)entryAtIndex:(NSUInteger)index; - (MWKHistoryEntry*)entryForTitle:(MWKTitle*)title; diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m index efad6f4..7ac6d68 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m @@ -17,6 +17,10 @@ return [entries count]; } +- (MWKHistoryEntry*)mostRecentEntry { +return [entries firstObject]; +} + - (MWKHistoryEntry*)entryAtIndex:(NSUInteger)index { return entries[index]; } diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 538e05e..5e8a542 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -1390,6 +1390,11 @@ case FETCH_FINAL_STATUS_FAILED: { +MWKHistoryEntry* lastEntry = session.userDataStore.historyList.mostRecentEntry; +if ([lastEntry.title.prefixedText isEqualToString:article.title.prefixedText]) { +[session.userDataStore.historyList removeEntry:lastEntry]; +[session.userDataStore save]; +} NSString* errorMsg = error.localizedDescription; [self showAlert:errorMsg type:ALERT_TYPE_TOP duration:-1]; @@ -1400,6 +1405,11 @@ case FETCH_FINAL_STATUS_CANCELLED: { +MWKHistoryEntry* lastEntry = session.userDataStore.historyList.mostRecentEntry; +if ([lastEntry.title.prefixedText isEqualToString:article.title.prefixedText]) { +[session.userDataStore.historyList removeEntry:lastEntry]; +[session.userDataStore save]; +} // Reminder: do not clear article data here or cancellation would blast last good saved article data! } break; -- To view, visit https://gerrit.wikimedia.org/r/206970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb8ca87023d983ffcafcef9e76600ab5ce37f4df Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add assertion macros - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/206858 Change subject: add assertion macros .. add assertion macros Add a suite of assertion macros which we can use to easily implement the assert in debug, fallback in production pattern. See WMFAssertions for more info. Change-Id: I4b73c463231743f858b693064a4ed30983e57ac9 --- M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/Wikipedia-Prefix.pch A Wikipedia/mw-utils/WMFAssertions.h A WikipediaUnitTests/WMFAssertionsTests.m A WikipediaUnitTests/WMFAssertionsWithActualHandlerTests.m 5 files changed, 192 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/58/206858/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index f302ee2..5da40d6 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -221,6 +221,7 @@ BC2375C11ABB14CC00B0BAA8 /* WMFArticleImageInjectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2375C01ABB14CC00B0BAA8 /* WMFArticleImageInjectionTests.m */; }; BC2CBB8E1AA10F400079A313 /* UIView+WMFFrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BC2CBB8D1AA10F400079A313 /* UIView+WMFFrameUtils.m */; }; BC31B2521AB1D9DC008138CA /* WMFImageInfoControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC31B2511AB1D9DC008138CA /* WMFImageInfoControllerTests.m */; }; + BC49B3601AEEB2EC009F55BE /* WMFAssertionsWithActualHandlerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BC49B35F1AEEB2EC009F55BE /* WMFAssertionsWithActualHandlerTests.m */; }; BC50C37F1A83C784006DC7AF /* WMFNetworkUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = BC50C37E1A83C784006DC7AF /* WMFNetworkUtilities.m */; }; BC50C3871A83CBDA006DC7AF /* MWKImageInfoResponseSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = BC50C3861A83CBDA006DC7AF /* MWKImageInfoResponseSerializer.m */; }; BC69C3141AB0C1FF0090B039 /* WMFImageInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC69C3131AB0C1FF0090B039 /* WMFImageInfoController.m */; }; @@ -293,6 +294,7 @@ BCE912BA1ACC5E6900B74B42 /* NSIndexSet+BKReduce.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE912B91ACC5E6900B74B42 /* NSIndexSet+BKReduce.m */; }; BCE912BD1ACC629B00B74B42 /* NSIndexSet+BKReduceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE912BC1ACC629B00B74B42 /* NSIndexSet+BKReduceTests.m */; }; BCE912D31ACCAF6900B74B42 /* OldDataSchemaBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BCE912D21ACCAF6500B74B42 /* OldDataSchemaBundle.bundle */; }; + BCEB3EE71AEE8DA000243308 /* WMFAssertionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCEB3EE61AEE8DA000243308 /* WMFAssertionsTests.m */; }; BCEC778F1AC9AEC800D9DDA5 /* MWKImage+AssociationTestUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCEC778E1AC9AEC800D9DDA5 /* MWKImage+AssociationTestUtils.m */; }; BCEC77921AC9B6AD00D9DDA5 /* HCIsCollectionContainingInAnyOrder+WMFCollectionMatcherUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCEC77911AC9B6AD00D9DDA5 /* HCIsCollectionContainingInAnyOrder+WMFCollectionMatcherUtils.m */; }; BCEC77951AC9C74700D9DDA5 /* NSArray+WMFShuffle.m in Sources */ = {isa = PBXBuildFile; fileRef = BCEC77941AC9C74700D9DDA5 /* NSArray+WMFShuffle.m */; }; @@ -741,6 +743,7 @@ BC2CBB8D1AA10F400079A313 /* UIView+WMFFrameUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIView+WMFFrameUtils.m; sourceTree = group; }; BC31B2511AB1D9DC008138CA /* WMFImageInfoControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFImageInfoControllerTests.m; sourceTree = group; }; BC4273521A7C736800068882 /* WikipediaUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WikipediaUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + BC49B35F1AEEB2EC009F55BE /* WMFAssertionsWithActualHandlerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFAssertionsWithActualHandlerTests.m; sourceTree = group; }; BC50C37D1A83C784006DC7AF /* WMFNetworkUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMFNetworkUtilities.h; sourceTree = group; }; BC50C37E1A83C784006DC7AF /* WMFNetworkUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFNetworkUtilities.m; sourceTree = group; };
[MediaWiki-commits] [Gerrit] refactor MWKTestCase and fix linting errors - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/205874 Change subject: refactor MWKTestCase and fix linting errors .. refactor MWKTestCase and fix linting errors Change-Id: Ia1040459bb3051ac875af46d3a71e4d9af216cb7 --- M MediaWikiKit/MediaWikiKitTests/MWKArticleStoreTestCase.m M MediaWikiKit/MediaWikiKitTests/MWKTestCase.m M Wikipedia/mw-bridge/CommunicationBridge.m 3 files changed, 8 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/74/205874/1 diff --git a/MediaWikiKit/MediaWikiKitTests/MWKArticleStoreTestCase.m b/MediaWikiKit/MediaWikiKitTests/MWKArticleStoreTestCase.m index f3c10ee..08c61a2 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKArticleStoreTestCase.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKArticleStoreTestCase.m @@ -7,6 +7,7 @@ // #import MWKArticleStoreTestCase.h +#import MWKDataStore+TemporaryDataStore.h @implementation MWKArticleStoreTestCase @@ -19,17 +20,13 @@ self.json1= [self loadJSON:@section1-end]; self.jsonAnon = [self loadJSON:@organization-anon]; -NSString* documentsFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]; -self.basePath = [documentsFolder stringByAppendingPathComponent:@unit-test-data]; - -self.dataStore = [[MWKDataStore alloc] initWithBasePath:self.basePath]; +self.dataStore = [MWKDataStore temporaryDataStore]; self.article = [self.dataStore articleWithTitle:self.title]; } - (void)tearDown { +[self.dataStore removeFolderAtBasePath]; [super tearDown]; - -[[NSFileManager defaultManager] removeItemAtPath:self.basePath error:nil]; } @end diff --git a/MediaWikiKit/MediaWikiKitTests/MWKTestCase.m b/MediaWikiKit/MediaWikiKitTests/MWKTestCase.m index 1c23c1d..a2c2558 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKTestCase.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKTestCase.m @@ -7,21 +7,17 @@ // #import MWKTestCase.h +#import NSBundle+TestAssets.h +#import XCTestCase+WMFBundleConvenience.h @implementation MWKTestCase - (NSData*)loadDataFile:(NSString*)name ofType:(NSString*)extension { -NSString* path = [[NSBundle bundleForClass:[self class]] pathForResource:name ofType:extension]; -return [NSData dataWithContentsOfFile:path]; +return [[self wmf_bundle] wmf_dataFromContentsOfFile:name ofType:extension]; } - (id)loadJSON:(NSString*)name { -NSData* data = [self loadDataFile:name ofType:@json]; -NSError* err = nil; -id dictOrArray = [NSJSONSerialization JSONObjectWithData:data options:0 error:err]; -assert(err == nil); -assert(dictOrArray); -return dictOrArray; +return [[self wmf_bundle] wmf_jsonFromContentsOfFile:name]; } @end diff --git a/Wikipedia/mw-bridge/CommunicationBridge.m b/Wikipedia/mw-bridge/CommunicationBridge.m index fa7e200..72bbeba 100644 --- a/Wikipedia/mw-bridge/CommunicationBridge.m +++ b/Wikipedia/mw-bridge/CommunicationBridge.m @@ -111,7 +111,6 @@ } - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType { - if ([self isBridgeURL:request.URL]) { NSDictionary* message = [self extractBridgePayload:request.URL]; NSString* messageType = message[@type]; @@ -139,8 +138,7 @@ [self disableQueueingAndRemoveQueuedMessages]; } --(void)disableQueueingAndRemoveQueuedMessages { - +- (void)disableQueueingAndRemoveQueuedMessages { self.shouldQueueMessages = NO; [self.queuedMessages removeAllObjects]; } -- To view, visit https://gerrit.wikimedia.org/r/205874 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia1040459bb3051ac875af46d3a71e4d9af216cb7 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for article centric strings not using article lang local... - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix for article centric strings not using article lang localizations. .. Fix for article centric strings not using article lang localizations. Native element localization is based on the device's lang. However, there are certain localization strings which appear in the context of an article. These should always use the article lang not the device lang. Among these strings: -Contents at the top of the table of contents. -Page issues and Similar pages buttons at top of articles. -Quick facts and Other information collapsed table headers. -Close collapsed table footer. -Read more, Edited by..., Other langs... and licence article footer text. -Read more results (were not being retrieved from current article's language wiki) This patch uses the current article's language when retrieving these localized strings and read more results. Bug reproduction steps: -from Read in other languages at the bottom of an enwiki article, pick Russian. -when it loads, you'll see the strings listed above all appear in English. Since all of these strings are within the context of the Russian article, they should be in Russian too. With this patch, they are. Note: some strings may still show in English if translations have not yet been received. (presently Page issues and Similar pages strings will still be English) T96809 Change-Id: I2e6c318dd9dc18a1e623c27279ebb4df9c987046 --- M Wikipedia/Categories/MWKSection+TOC.m M Wikipedia/Networking/Fetchers/SearchResultFetcher.h M Wikipedia/Networking/Fetchers/SearchResultFetcher.m M Wikipedia/Protocols/WMFLocalizationProtocol.m M Wikipedia/Session/SessionSingleton.h M Wikipedia/Session/SessionSingleton.m M Wikipedia/View Controllers/SearchResults/SearchResultsController.m M Wikipedia/View Controllers/TableOfContents/TOCViewController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.h M Wikipedia/View Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m M Wikipedia/View Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.m M Wikipedia/View Controllers/WebView/Footer/WMFWebViewFooterViewController.h M Wikipedia/View Controllers/WebView/Footer/WMFWebViewFooterViewController.m M Wikipedia/View Controllers/WebView/WebViewController.m M Wikipedia/mw-utils/WikipediaAppUtils.h M Wikipedia/mw-utils/WikipediaAppUtils.m 17 files changed, 73 insertions(+), 13 deletions(-) Approvals: Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/Wikipedia/Categories/MWKSection+TOC.m b/Wikipedia/Categories/MWKSection+TOC.m index 8929328..01325f9 100644 --- a/Wikipedia/Categories/MWKSection+TOC.m +++ b/Wikipedia/Categories/MWKSection+TOC.m @@ -35,7 +35,7 @@ NSFontAttributeName: [UIFont fontWithName:@Times New Roman size:24.0 * MENUS_SCALE_MULTIPLIER] }; -NSString* heading = MWLocalizedString(@table-of-contents-heading, nil); +NSString* heading = MWCurrentArticleLanguageLocalizedString(@table-of-contents-heading, nil); if ([[SessionSingleton sharedInstance].currentArticleSite.language isEqualToString:@en]) { heading = [heading uppercaseString]; diff --git a/Wikipedia/Networking/Fetchers/SearchResultFetcher.h b/Wikipedia/Networking/Fetchers/SearchResultFetcher.h index 003cff4..161b981 100644 --- a/Wikipedia/Networking/Fetchers/SearchResultFetcher.h +++ b/Wikipedia/Networking/Fetchers/SearchResultFetcher.h @@ -40,6 +40,7 @@ - (instancetype)initAndSearchForTerm:(NSString*)searchTerm searchType:(SearchType)searchType searchReason:(SearchReason)searchReason +language:(NSString *)language maxResults:(NSUInteger)maxResults withManager:(AFHTTPRequestOperationManager*)manager thenNotifyDelegate:(id FetchFinishedDelegate)delegate; diff --git a/Wikipedia/Networking/Fetchers/SearchResultFetcher.m b/Wikipedia/Networking/Fetchers/SearchResultFetcher.m index 0434995..7990b7a 100644 --- a/Wikipedia/Networking/Fetchers/SearchResultFetcher.m +++ b/Wikipedia/Networking/Fetchers/SearchResultFetcher.m @@ -22,6 +22,7 @@ @property (nonatomic, strong) NSString* searchSuggestion; @property (nonatomic, strong) NSRegularExpression* spaceCollapsingRegex; +@property (nonatomic, strong) NSString* language; @end @@ -30,6 +31,7 @@ - (instancetype)initAndSearchForTerm:(NSString*)searchTerm searchType:(SearchType)searchType searchReason:(SearchReason)searchReason +language:(NSString *)language maxResults:(NSUInteger)maxResults
[MediaWiki-commits] [Gerrit] Remove run-time css sync so we have more control over css de... - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Remove run-time css sync so we have more control over css deployment. .. Remove run-time css sync so we have more control over css deployment. Change-Id: I915ff69adb6a8e45c5ab5935ddf9fabb1a497b50 --- M Wikipedia/AssetsFile/WMFAssetsFile.h M Wikipedia/AssetsFile/WMFAssetsFile.m M Wikipedia/View Controllers/WebView/WebViewController.m 3 files changed, 3 insertions(+), 37 deletions(-) Approvals: Bgerstle: Verified; Looks good to me, approved diff --git a/Wikipedia/AssetsFile/WMFAssetsFile.h b/Wikipedia/AssetsFile/WMFAssetsFile.h index d597a8c..cd970d6 100644 --- a/Wikipedia/AssetsFile/WMFAssetsFile.h +++ b/Wikipedia/AssetsFile/WMFAssetsFile.h @@ -5,9 +5,6 @@ WMFAssetsFileTypeConfig, WMFAssetsFileTypeLanguages, WMFAssetsFileTypeMainPages, -WMFAssetsFileTypeCSS, -WMFAssetsFileTypeCSSAbuseFilter, -WMFAssetsFileTypeCSSPreview }; @interface WMFAssetsFile : NSObject diff --git a/Wikipedia/AssetsFile/WMFAssetsFile.m b/Wikipedia/AssetsFile/WMFAssetsFile.m index 36fe30f..e1db5a1 100644 --- a/Wikipedia/AssetsFile/WMFAssetsFile.m +++ b/Wikipedia/AssetsFile/WMFAssetsFile.m @@ -77,18 +77,6 @@ return @mainpages.json; break; -case WMFAssetsFileTypeCSS: -return @styles.css; -break; - -case WMFAssetsFileTypeCSSAbuseFilter: -return @abusefilter.css; -break; - -case WMFAssetsFileTypeCSSPreview: -return @preview.css; -break; - default: return nil; break; @@ -101,18 +89,6 @@ switch (self.fileType) { case WMFAssetsFileTypeConfig: urlString = @https://bits.wikimedia.org/static-current/extensions/MobileApp/config/ios.json;; -break; - -case WMFAssetsFileTypeCSS: -urlString = @https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enmodules=mobile.app.pagestyles.iosonly=stylesskin=vector;; -break; - -case WMFAssetsFileTypeCSSAbuseFilter: -urlString = @https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enmodules=mobile.app.pagestyles.iosonly=stylesskin=vector;; -break; - -case WMFAssetsFileTypeCSSPreview: -urlString = @https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enmodules=mobile.app.previewonly=stylesskin=vector;; break; default: diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index a6dc77c..b29d8fb 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -374,16 +374,9 @@ // Sync config/ios.json at most once per day. [[QueuesSingleton sharedInstance].assetsFetchManager.operationQueue cancelAllOperations]; -void (^ fetch)(WMFAssetsFileType) = ^void (WMFAssetsFileType type) { -(void)[[AssetsFileFetcher alloc] initAndFetchAssetsFileOfType:type - withManager:[QueuesSingleton sharedInstance].assetsFetchManager - maxAge:kWMFMaxAgeDefault]; -}; - -fetch(WMFAssetsFileTypeConfig); -fetch(WMFAssetsFileTypeCSS); -fetch(WMFAssetsFileTypeCSSAbuseFilter); -fetch(WMFAssetsFileTypeCSSPreview); +(void)[[AssetsFileFetcher alloc] initAndFetchAssetsFileOfType:WMFAssetsFileTypeConfig + withManager:[QueuesSingleton sharedInstance].assetsFetchManager + maxAge:kWMFMaxAgeDefault]; } #pragma mark Edit section -- To view, visit https://gerrit.wikimedia.org/r/205760 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I915ff69adb6a8e45c5ab5935ddf9fabb1a497b50 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for too much whitespace beneath article title on landscape. - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix for too much whitespace beneath article title on landscape. .. Fix for too much whitespace beneath article title on landscape. To reproduce bug: -load page with a lead image -restart the app -don't touch anything, just rotate landscape -there should be the proper amount of whitespace beneath the title -now rotate back to portrait and carefully tap once on some article whitespace -now rotate landscape, there will be too much space beneath title The problem was the com bridge's queueing flag was being set to YES when non-page load messages were being sent. Also, in the case a page load failed, the queueing flag was not being reset. T91118 Change-Id: I3993c5c7f12604344c9d627fd29c7a3bb63f25d8 --- M Wikipedia/mw-bridge/CommunicationBridge.m 1 file changed, 9 insertions(+), 3 deletions(-) Approvals: Bgerstle: Verified; Looks good to me, approved diff --git a/Wikipedia/mw-bridge/CommunicationBridge.m b/Wikipedia/mw-bridge/CommunicationBridge.m index 2bb3cfe..fa7e200 100644 --- a/Wikipedia/mw-bridge/CommunicationBridge.m +++ b/Wikipedia/mw-bridge/CommunicationBridge.m @@ -111,7 +111,6 @@ } - (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType { -self.shouldQueueMessages = YES; if ([self isBridgeURL:request.URL]) { NSDictionary* message = [self extractBridgePayload:request.URL]; @@ -120,15 +119,15 @@ [self fireEvent:messageType withPayload:payload]; return NO; } + return YES; } - (void)sendQueuedMessages { -self.shouldQueueMessages = NO; for (NSString* js in self.queuedMessages.copy) { [self sendRawMessage:js]; } -[self.queuedMessages removeAllObjects]; +[self disableQueueingAndRemoveQueuedMessages]; } - (void)webViewDidStartLoad:(UIWebView*)webView { @@ -137,6 +136,13 @@ - (void)webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error { NSLog(@webView failed to load: %@, error); +[self disableQueueingAndRemoveQueuedMessages]; +} + +-(void)disableQueueingAndRemoveQueuedMessages { + +self.shouldQueueMessages = NO; +[self.queuedMessages removeAllObjects]; } - (void)loadHTML:(NSString*)string withAssetsFile:(NSString*)fileName { -- To view, visit https://gerrit.wikimedia.org/r/205467 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3993c5c7f12604344c9d627fd29c7a3bb63f25d8 Gerrit-PatchSet: 4 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] merge release/4.1.1 - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/205287 Change subject: merge release/4.1.1 .. merge release/4.1.1 Here's a breakdown of the conflicts: - Wikipedia.xcodeproj/project.pbxproj Pretty simple, just some new files - Wikipedia/AppDelegate+DataMigrationProgressDelegate.h - Wikipedia/AppDelegate+DataMigrationProgressDelegate.m - Wikipedia/AppDelegate.m Some issues w/ refactoring the crash reporting refactor and data migration progress consolidation. I added a property to verify the alert view is the data migration alert, just to be doubly sure. - Wikipedia/Networking/Fetchers/MWKImageInfoFetcher.m - Wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m Had to refactor some stuff to incorporate the no canonical filename fallback that Corey added. - Wikipedia/Wikipedia-Info.plist Version bundle identifier conflict. - WikipediaUnitTests/OldDataSchemaMigratorTests.m New tests added - svgs/icon-prod.svg - wikipedia/Images.xcassets/AppIcon.appiconset/icon.svg - wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon120-1.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon180.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon80.png - wikipedia/Images.xcassets/AppIcon.appiconset/icon87.png Pretty sure all of these were just additions from Xcode 6.3 Change-Id: I4e0c130c3aa9e66b7e2af312294b3e21cfc26b7e Ticket: T96452 --- M MediaWikiKit/MediaWikiKit/MWKSectionList.m A MediaWikiKit/MediaWikiKit/MWKSectionList_Private.h M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/AppDelegate.m M Wikipedia/Data/DataMigrator.h M Wikipedia/Data/DataMigrator.m M Wikipedia/Data/OldDataSchemaMigrator.h M Wikipedia/Data/OldDataSchemaMigrator.m M Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Contents.json M Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/Contents.json M Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/Contents.json M Wikipedia/Images.xcassets/by_white.imageset/Contents.json M Wikipedia/Images.xcassets/cc_white.imageset/Contents.json M Wikipedia/Images.xcassets/clear.imageset/Contents.json M Wikipedia/Images.xcassets/lead-default.imageset/Contents.json M Wikipedia/Images.xcassets/logo-onboarding-subtitle.imageset/Contents.json M Wikipedia/Images.xcassets/logo-onboarding.imageset/Contents.json M Wikipedia/Images.xcassets/logo-placeholder-nearby.imageset/Contents.json M Wikipedia/Images.xcassets/logo-placeholder-saved.imageset/Contents.json M Wikipedia/Images.xcassets/logo-placeholder-search.imageset/Contents.json M Wikipedia/Images.xcassets/sa_white.imageset/Contents.json M Wikipedia/Images.xcassets/text_field_x_circle_gray.imageset/Contents.json M Wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.h M Wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.m M Wikipedia/View Controllers/Image Gallery/WMFImageInfoController.m M Wikipedia/View Controllers/SearchResults/SearchResultsController.m M Wikipedia/Wikipedia-Info.plist M Wikipedia/en.lproj/Localizable.strings M Wikipedia/qqq.lproj/Localizable.strings A WikipediaUnitTests/MWKSectionListTests.m M WikipediaUnitTests/OldDataSchemaMigratorTests.m A wikipedia/Images.xcassets/AppIcon.appiconset/icon.svg A wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon120-1.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon180.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon80.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon87.png 48 files changed, 479 insertions(+),
[MediaWiki-commits] [Gerrit] Fix for side to side scrolling of wide images with div overl... - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix for side to side scrolling of wide images with div overlays. .. Fix for side to side scrolling of wide images with div overlays. See the following enwiki articles sections: - Historic Counties of England Southern England - Poland Administrive Divisions More information (collapsed table) The images in the locations specified above were not able to be dragged side-to-side properly before this patch. T95787 Change-Id: Ic488e55b047afa549f31f2658fb51324f21c415f --- M Wikipedia/assets/bundle.js M www/js/transforms.js 2 files changed, 24 insertions(+), 14 deletions(-) Approvals: Fjalapeno: Looks good to me, but someone else must approve Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/Wikipedia/assets/bundle.js b/Wikipedia/assets/bundle.js index 23d1589..c492b8f 100644 --- a/Wikipedia/assets/bundle.js +++ b/Wikipedia/assets/bundle.js @@ -701,16 +701,21 @@ } } ); +function firstAncestorWithMultipleChildren (el) { +while ((el = el.parentElement) (el.childElementCount == 1)); +return el; +} + function addImageOverflowXContainer() { var image = this; if (image.width (window.screen.width * 0.8)){ -var div = document.createElement( 'div' ); -div.className = 'image_overflow_x_container'; -image.parentElement.insertBefore( div, image ); -// Reminder: appendChild removes image from its previous location -// so no need to do so explicitly. -// See: https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild -div.appendChild( image ); +var ancestor = firstAncestorWithMultipleChildren (image); +if(ancestor){ +var div = document.createElement( 'div' ); +div.className = 'image_overflow_x_container'; +ancestor.parentElement.insertBefore( div, ancestor ); +div.appendChild( ancestor ); +} } } diff --git a/www/js/transforms.js b/www/js/transforms.js index e95aafb..2c288bb 100644 --- a/www/js/transforms.js +++ b/www/js/transforms.js @@ -254,16 +254,21 @@ } } ); +function firstAncestorWithMultipleChildren (el) { +while ((el = el.parentElement) (el.childElementCount == 1)); +return el; +} + function addImageOverflowXContainer() { var image = this; if (image.width (window.screen.width * 0.8)){ -var div = document.createElement( 'div' ); -div.className = 'image_overflow_x_container'; -image.parentElement.insertBefore( div, image ); -// Reminder: appendChild removes image from its previous location -// so no need to do so explicitly. -// See: https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild -div.appendChild( image ); +var ancestor = firstAncestorWithMultipleChildren (image); +if(ancestor){ +var div = document.createElement( 'div' ); +div.className = 'image_overflow_x_container'; +ancestor.parentElement.insertBefore( div, ancestor ); +div.appendChild( ancestor ); +} } } -- To view, visit https://gerrit.wikimedia.org/r/203495 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic488e55b047afa549f31f2658fb51324f21c415f Gerrit-PatchSet: 6 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for weird staged file from last incoming translation set. - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fix for weird staged file from last incoming translation set. .. Fix for weird staged file from last incoming translation set. Change-Id: I0672305f7cd42ba6bd098734845708239f95460f --- M wikipedia/eo.lproj/Localizable.strings 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Fjalapeno: Looks good to me, but someone else must approve Bgerstle: Verified; Looks good to me, approved diff --git a/wikipedia/eo.lproj/Localizable.strings b/wikipedia/eo.lproj/Localizable.strings index 17b4728..c3363d8 100644 --- a/wikipedia/eo.lproj/Localizable.strings +++ b/wikipedia/eo.lproj/Localizable.strings @@ -90,6 +90,7 @@ navbar-title-mode-edit-wikitext-preview = Antaŭrigardi; navbar-title-mode-edit-wikitext-summary = Priskribu vian redakton; navbar-title-mode-edit-wikitext-save = Konservi; +// Fuzzy edit-summary-choice-linked-words = Aldonis ligilojn; edit-summary-choice-fixed-grammar = Ĝustigis gramatikon; edit-summary-choice-fixed-styling = Ĝustigis stilon; @@ -98,6 +99,7 @@ edit-summary-choice-added-missing-info = Aldonis mankantan informon; edit-summary-choice-added-clarification = Aldonis klarigon; edit-summary-choice-other = Alia; +// Fuzzy edit-summary-field-placeholder-text = Aliaj manieroj en kiuj vi plibonigis la artikolon; edit-summary-title = Kiel vi plibonigis la artikolon?; about-title = Pri; -- To view, visit https://gerrit.wikimedia.org/r/204154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0672305f7cd42ba6bd098734845708239f95460f Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fix for some compiler warnings - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/202805 Change subject: fix for some compiler warnings .. fix for some compiler warnings - wasn't properly implementing ImageInfoController delegate method (missed during refactor, thanks Xcode!) - WMFRangeUtils should've just been a header w/ static inline methods - Removing unused method declaration and C function in OldDataSchema Change-Id: I4fa8d18d0610f9dcc0933542a39a472c78ba049a --- M OldDataSchema/Data/ArticleDataContextSingleton.h M OldDataSchema/Data/ArticleDataContextSingleton.m M Wikipedia.xcodeproj/project.pbxproj M Wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m M Wikipedia/mw-utils/WMFRangeUtils.h D Wikipedia/mw-utils/WMFRangeUtils.m 6 files changed, 14 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/05/202805/1 diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.h b/OldDataSchema/Data/ArticleDataContextSingleton.h index 1f188ce..d533b7e 100644 --- a/OldDataSchema/Data/ArticleDataContextSingleton.h +++ b/OldDataSchema/Data/ArticleDataContextSingleton.h @@ -13,6 +13,4 @@ - (void)saveContextAndPropagateChangesToStore:(NSManagedObjectContext*)context completionBlock:(void(^)(NSError* error))completionBlock; -- (id)createArticleDataModel:(Class)modelClass; - @end diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.m b/OldDataSchema/Data/ArticleDataContextSingleton.m index 812f948..e6182dc 100644 --- a/OldDataSchema/Data/ArticleDataContextSingleton.m +++ b/OldDataSchema/Data/ArticleDataContextSingleton.m @@ -4,10 +4,6 @@ #import ArticleDataContextSingleton.h #import NSManagedObjectModel+OldDataSchema.h -id WMFCreateArticleDataModel(Class modelClass) { -return [[ArticleDataContextSingleton sharedInstance] createArticleDataModel:modelClass]; -} - @interface ArticleDataContextSingleton (){ } diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index fdf2f8c..e21aa5b 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -302,7 +302,6 @@ BCC185D81A9E5628005378F8 /* UILabel+WMFStyling.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185D71A9E5628005378F8 /* UILabel+WMFStyling.m */; }; BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* UIButton+FrameUtils.m */; }; BCC185E81A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */; }; - BCDB75BF1AB0DFC40005593F /* WMFRangeUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB75BE1AB0DFC40005593F /* WMFRangeUtils.m */; }; BCDB75C41AB0E835593F /* WMFSubstringUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCDB75C31AB0E835593F /* WMFSubstringUtilsTests.m */; }; BCE912BA1ACC5E6900B74B42 /* NSIndexSet+BKReduce.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE912B91ACC5E6900B74B42 /* NSIndexSet+BKReduce.m */; }; BCE912BD1ACC629B00B74B42 /* NSIndexSet+BKReduceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BCE912BC1ACC629B00B74B42 /* NSIndexSet+BKReduceTests.m */; }; @@ -922,7 +921,6 @@ BCC185E71A9FA498005378F8 /* UICollectionViewFlowLayout+AttributeUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICollectionViewFlowLayout+AttributeUtils.m; sourceTree = group; }; BCDB75BC1AB0D3DE0005593F /* WMFImageInfoController_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WMFImageInfoController_Private.h; path = Image Gallery/WMFImageInfoController_Private.h; sourceTree = group; }; BCDB75BD1AB0DFC40005593F /* WMFRangeUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMFRangeUtils.h; sourceTree = group; }; - BCDB75BE1AB0DFC40005593F /* WMFRangeUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFRangeUtils.m; sourceTree = group; }; BCDB75C31AB0E835593F /* WMFSubstringUtilsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFSubstringUtilsTests.m; sourceTree = group; }; BCE912B81ACC5E6900B74B42 /* NSIndexSet+BKReduce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSIndexSet+BKReduce.h; sourceTree = group; }; BCE912B91ACC5E6900B74B42 /* NSIndexSet+BKReduce.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
[MediaWiki-commits] [Gerrit] remove accidentally-committed xcuserdata - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/202905 Change subject: remove accidentally-committed xcuserdata .. remove accidentally-committed xcuserdata Change-Id: If17f71ea51b7d791082a00ad3138c31fa770f784 --- D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-BlocksKit.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-HockeySDK-HockeySDKResources.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-HockeySDK.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-Masonry.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-AFNetworking.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-BlocksKit.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-HockeySDK-HockeySDKResources.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-HockeySDK.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-Masonry.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-OCHamcrest.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-OCMockito.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests-hpple.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-WikipediaUnitTests.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-hpple.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods.xcscheme D Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/xcschememanagement.plist 17 files changed, 0 insertions(+), 1,116 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/05/202905/1 diff --git a/Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme deleted file mode 100644 index 0e6e751..000 --- a/Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme +++ /dev/null @@ -1,59 +0,0 @@ -?xml version=1.0 encoding=UTF-8? -Scheme - LastUpgradeVersion = 0510 - version = 1.3 - BuildAction - parallelizeBuildables = YES - buildImplicitDependencies = YES - BuildActionEntries - BuildActionEntry -buildForTesting = YES -buildForRunning = YES -buildForProfiling = YES -buildForArchiving = YES -buildForAnalyzing = YES -BuildableReference - BuildableIdentifier = primary - BlueprintIdentifier = 26B8AEECC1E03F1D80FE206C - BuildableName = libPods-AFNetworking.a - BlueprintName = Pods-AFNetworking - ReferencedContainer = container:Pods.xcodeproj -/BuildableReference - /BuildActionEntry - /BuildActionEntries - /BuildAction - TestAction - selectedDebuggerIdentifier = Xcode.DebuggerFoundation.Debugger.LLDB - selectedLauncherIdentifier = Xcode.DebuggerFoundation.Launcher.LLDB - shouldUseLaunchSchemeArgsEnv = YES - buildConfiguration = Debug - Testables - /Testables - /TestAction - LaunchAction - selectedDebuggerIdentifier = Xcode.DebuggerFoundation.Debugger.LLDB - selectedLauncherIdentifier = Xcode.DebuggerFoundation.Launcher.LLDB - launchStyle = 0 - useCustomWorkingDirectory = NO - buildConfiguration = Debug - ignoresPersistentStateOnLaunch = NO - debugDocumentVersioning = YES - allowLocationSimulation = YES - AdditionalOptions - /AdditionalOptions - /LaunchAction - ProfileAction - shouldUseLaunchSchemeArgsEnv = YES - savedToolIdentifier = - useCustomWorkingDirectory = NO - buildConfiguration = Release - debugDocumentVersioning = YES - /ProfileAction - AnalyzeAction - buildConfiguration = Debug - /AnalyzeAction - ArchiveAction - buildConfiguration = Release - revealArchiveInOrganizer = YES - /ArchiveAction -/Scheme diff --git a/Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-BlocksKit.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-BlocksKit.xcscheme deleted file mode 100644 index 931a5b0..000 --- a/Pods/Pods.xcodeproj/xcuserdata/bgerstle.xcuserdatad/xcschemes/Pods-BlocksKit.xcscheme +++ /dev/null @@ -1,59 +0,0 @@ -?xml version=1.0 encoding=UTF-8? -Scheme - LastUpgradeVersion = 0510 - version = 1.3 - BuildAction -
[MediaWiki-commits] [Gerrit] import imgs into xcassets and fix wikipedia group path - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/202928 Change subject: import imgs into xcassets and fix wikipedia group path .. import imgs into xcassets and fix wikipedia group path We had images in the Images group which should have been consolidated into the Images.xcassets catalog. There's also a logo-placeholder.svg which wasn't being used, so I removed it. Finally, the Wikipedia group was pointing at the old wikipedia (lowercase) path, but it still worked on case-insensitive filesystems. Change-Id: Id330bda0bc0fb02b7c4d4fc45ab0b2081ef0ed9e --- M Wikipedia.xcodeproj/project.pbxproj A Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Contents.json R Wikipedia/Images.xcassets/Wikipedia_wordmark_gray.imageset/Wikipedia_wordmark_gray.png A Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/Contents.json R Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/abuse-filter-disallowed.png R Wikipedia/Images.xcassets/abuse-filter-disallowed.imageset/abuse-filter-disallo...@2x.png A Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/Contents.json R Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/abuse-filter-flag-white.png R Wikipedia/Images.xcassets/abuse-filter-flag-white.imageset/abuse-filter-flag-wh...@2x.png A Wikipedia/Images.xcassets/by_white.imageset/Contents.json R Wikipedia/Images.xcassets/by_white.imageset/by_white.png A Wikipedia/Images.xcassets/cc_white.imageset/Contents.json R Wikipedia/Images.xcassets/cc_white.imageset/cc_white.png A Wikipedia/Images.xcassets/clear.imageset/Contents.json R Wikipedia/Images.xcassets/clear.imageset/clear.png A Wikipedia/Images.xcassets/lead-default.imageset/Contents.json R Wikipedia/Images.xcassets/lead-default.imageset/lead-default.png A Wikipedia/Images.xcassets/logo-onboarding-subtitle.imageset/Contents.json R Wikipedia/Images.xcassets/logo-onboarding-subtitle.imageset/logo-onboarding-subtitle.png R Wikipedia/Images.xcassets/logo-onboarding-subtitle.imageset/logo-onboarding-subti...@2x.png A Wikipedia/Images.xcassets/logo-onboarding.imageset/Contents.json R Wikipedia/Images.xcassets/logo-onboarding.imageset/logo-onboarding.png R Wikipedia/Images.xcassets/logo-onboarding.imageset/logo-onboard...@2x.png A Wikipedia/Images.xcassets/logo-placeholder-nearby.imageset/Contents.json R Wikipedia/Images.xcassets/logo-placeholder-nearby.imageset/logo-placeholder-nearby.png R Wikipedia/Images.xcassets/logo-placeholder-nearby.imageset/logo-placeholder-nea...@2x.png A Wikipedia/Images.xcassets/logo-placeholder-saved.imageset/Contents.json R Wikipedia/Images.xcassets/logo-placeholder-saved.imageset/logo-placeholder-saved.png R Wikipedia/Images.xcassets/logo-placeholder-saved.imageset/logo-placeholder-sa...@2x.png A Wikipedia/Images.xcassets/logo-placeholder-search.imageset/Contents.json R Wikipedia/Images.xcassets/logo-placeholder-search.imageset/logo-placeholder-search.png R Wikipedia/Images.xcassets/logo-placeholder-search.imageset/logo-placeholder-sea...@2x.png A Wikipedia/Images.xcassets/sa_white.imageset/Contents.json R Wikipedia/Images.xcassets/sa_white.imageset/sa_white.png A Wikipedia/Images.xcassets/text_field_x_circle_gray.imageset/Contents.json R Wikipedia/Images.xcassets/text_field_x_circle_gray.imageset/text_field_x_circle_gray.png R Wikipedia/Images.xcassets/text_field_x_circle_gray.imageset/text_field_x_circle_g...@2x.png D Wikipedia/Images/logo-placeholder.svg 38 files changed, 223 insertions(+), 3,328 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/28/202928/1 -- To view, visit https://gerrit.wikimedia.org/r/202928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id330bda0bc0fb02b7c4d4fc45ab0b2081ef0ed9e Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Bgerstle bgers...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] readme: WIP - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/202463 Change subject: readme: WIP .. readme: WIP Change-Id: I33df4b6b2917063e6e78b228c2f29e901eb153fa --- M Makefile M README.md A docs/cont-integration.md A docs/web-dev.md A docs/working-with-cocoapods.md A docs/working-with-ruby.md 6 files changed, 113 insertions(+), 93 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/63/202463/1 diff --git a/Makefile b/Makefile index 7d4142f..7e3862f 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,9 @@ #! get-homebrew: ##Install Homebrew using the bootstrapping script from http://brew.sh - @if [[ ! $$(brew -v 2/dev/null) =~ Homebrew ]]; then \ + @if [[ $$(brew -v 2/dev/null) =~ Homebrew ]]; then \ + echo Homebrew already installed!; \ + else \ ruby -e $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install); \ fi @@ -108,34 +110,20 @@ #! Web dependency management #! -web: ##Make web assets -web: css grunt - -CSS_ORIGIN = http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enonly=stylesskin=vectormodules= +CSS_ORIGIN = http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enonly=stylesskin=vectormodules=; WEB_ASSETS_DIR = Wikipedia/assets -define get_css_module -curl -s -L -o -endef +cd Wikipedia/assets/ { +curl -L -f -o 'styles.css' ${PREFIX}mobile.app.pagestyles.ios +curl -L -f -o 'abusefilter.css' ${PREFIX}mobile.app.pagestyles.ios +curl -L -f -o 'preview.css' ${PREFIX}mobile.app.preview +} -css: ##Download latest stylesheets - @echo Downloading CSS assets...; \ - mkdir -p $(WEB_ASSETS_DIR); \ - cd $(WEB_ASSETS_DIR); \ - $(get_css_module) 'styles.css' $(CSS_ORIGIN)mobile.app.pagestyles.ios /dev/null; \ - $(get_css_module) 'abusefilter.css' $(CSS_ORIGIN)mobile.app.pagestyles.ios /dev/null; \ - $(get_css_module) 'preview.css' $(CSS_ORIGIN)mobile.app.preview /dev/null NODE_VERSION = $(shell node -v 2/dev/null) NPM_VERSION = $(shell npm -version 2/dev/null) -grunt: ##Run grunt -grunt: npm - @cd www grunt cd .. - -npm: ##Install Javascript dependencies -npm: node-check - @cd www npm install cd .. +npm: ##TODO, run npm install get-node: ##Install node via Homebrew brew install node diff --git a/README.md b/README.md index e43452d..3364346 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -Wikipedia for iOS -- +# Wikipedia iOS +The official Wikipedia iOS client. -# Meta * OS target: iOS 6.0 or higher * Device target: iPhone, iPod, iPad * License: MIT-style @@ -14,88 +13,61 @@ * IRC chat: #wikimedia-mobile on irc.freenode.net * Team page: https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS -# Setup -Because of the nature of the project (read: lots of HTML), we have several layers of dependencies. Having said that, we have automated much of the setup so it's not too bad to set the project up and start contributing. +## Development Team +The app is primarily being developed by the Wikimedia Foundation's [Mobile Apps team](https://www.mediawiki.org/wiki/Wikimedia_Apps/Team), starting at the end of October 2013. We maintain iOS specific documentation [here](https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS). IRC is the best way to chat with us during Eastern and Pacific business hours (`#wikimedia-mobile` channel on freenode). -Specifically, many tasks have been implemented in the `Makefile`. Run `make` or `make help` to see a list of available tasks (or targets). For instance, simply run `make build-sim` to see if your machine is setup and ready to go. +## Building and Running +This project requires [Xcode 6](https://itunes.apple.com/us/app/xcode/id497799835) or higher. The easiest way to get it is from the [App Store](https://itunes.apple.com/us/app/xcode/id497799835?mt=12), but you can also download it from [developer.apple.com](https://developer.apple.com/) if you have an AppleID registered with an Apple developer account. -Read on to get started… +Once you have Xcode, you should be able to open `Wikipedia.xcworkspace` and run the app on the iOS Simulator (using the **Wikipedia** scheme and target). If you encounter any issues, please don't hesitate to let us know via a bug report or bugging us on IRC. -## Dependencies - -### Before you start - Homebrew -Many of the dependencies below are installed easiest via [Homebrew](http://brew.sh). it is recommended that you install it before proceeding. If you run into issues installing dependencies with homebrew, run `brew doctor` to get hints on how to fix them. - Bundler -[Bundler](http://bundler.io/) is optional, but **required** for using the Make File and is recommended for installing CocoaPods, along with any other RubyGem
[MediaWiki-commits] [Gerrit] Fixing unit tests and running tests in alpha lane T94421 - change (apps...wikipedia)
Bgerstle has submitted this change and it was merged. Change subject: Fixing unit tests and running tests in alpha lane T94421 .. Fixing unit tests and running tests in alpha lane T94421 Adding missing file to test bundle Save articles after import (I guess this behavior changed?) Stop double importing json (looks like a merge issue?) Check section 1 instead of section 0 (looks like that test json doesn't have a section 0?) No longer reseting repo at end of job, jenkins needs to extract reports. Removing commented out steps Enable precheck for all lanes You can see a unit test report generated here: http://buildmini.corp.wikimedia.org:8080/job/WikipediaTest/iOS_8_Unit_Test_Report/ You can also drill down into the reports here: http://buildmini.corp.wikimedia.org:8080/job/WikipediaTest/2/testReport/(root)/ Change-Id: Ic2dd182f9c90d98d4811720baf0116dfe2fa13f4 --- M MediaWikiKit/MediaWikiKitTests/MWKDataStoreStorageTests.m M Wikipedia.xcodeproj/project.pbxproj M fastlane/Fastfile 3 files changed, 25 insertions(+), 24 deletions(-) Approvals: Mhurd: Looks good to me, but someone else must approve Bgerstle: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWikiKit/MediaWikiKitTests/MWKDataStoreStorageTests.m b/MediaWikiKit/MediaWikiKitTests/MWKDataStoreStorageTests.m index 1cb4fa9..bcd4339 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKDataStoreStorageTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKDataStoreStorageTests.m @@ -33,6 +33,7 @@ - (void)testArticleStoreSection0 { XCTAssertNoThrow([self.article importMobileViewJSON:self.json0[@mobileview]]); +[self.article save]; MWKArticle* article; XCTAssertNoThrow(article = [self.dataStore articleWithTitle:self.title], @article can be loaded after saving it); @@ -46,23 +47,23 @@ } - (void)testArticleStoreSection1ToEnd { -XCTAssertNoThrow([self.article importMobileViewJSON:self.json0[@mobileview]]); XCTAssertNoThrow([self.article importMobileViewJSON:self.json1[@mobileview]]); +[self.article save]; MWKArticle* article; XCTAssertNoThrow(article = [self.dataStore articleWithTitle:self.title], @article can be loaded after saving it); NSFileManager* fm = [NSFileManager defaultManager]; XCTAssertTrue([fm fileExistsAtPath:[[self.dataStore pathForTitle:self.title] stringByAppendingPathComponent:@Article.plist]]); -XCTAssertTrue([fm fileExistsAtPath:[[self.dataStore pathForSectionId:0 title:self.title] stringByAppendingPathComponent:@Section.plist]]); -XCTAssertTrue([fm fileExistsAtPath:[[self.dataStore pathForSectionId:0 title:self.title] stringByAppendingPathComponent:@Section.html]]); +XCTAssertTrue([fm fileExistsAtPath:[[self.dataStore pathForSectionId:1 title:self.title] stringByAppendingPathComponent:@Section.plist]]); +XCTAssertTrue([fm fileExistsAtPath:[[self.dataStore pathForSectionId:1 title:self.title] stringByAppendingPathComponent:@Section.html]]); XCTAssertTrue([fm fileExistsAtPath:[[self.dataStore pathForSectionId:35 title:self.title] stringByAppendingPathComponent:@Section.plist]]); XCTAssertTrue([fm fileExistsAtPath:[[self.dataStore pathForSectionId:35 title:self.title] stringByAppendingPathComponent:@Section.html]]); } - (void)testArticleStoreReadSections { XCTAssertNoThrow([self.article importMobileViewJSON:self.json0[@mobileview]]); -XCTAssertNoThrow([self.article importMobileViewJSON:self.json1[@mobileview]]); +[self.article save]; MWKSectionList* sections = self.article.sections; XCTAssertNotNil(sections); diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 8079ece..aff6b95 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -204,6 +204,7 @@ 04F39590186CF80100B0D6FC /* TOCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F3958F186CF80100B0D6FC /* TOCViewController.m */; }; 08D631F71A69B1AB00D87AD0 /* WMFImageGalleryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 08D631F61A69B1AB00D87AD0 /* WMFImageGalleryViewController.m */; }; 0EA4402E1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EA4402D1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.m */; }; + 0EBC56681AD3656900E82CDD /* WMFAsyncTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = BC7ACB631AB34C9C00791497 /* WMFAsyncTestCase.m */; }; 701FF5EE601DEA3FCAB7EFD3 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D82982ED992F47428037BDF2 /* libPods.a */; }; 954BA118838BF8BA6B01C34A /* libPods-WikipediaUnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CE61C6963F825760822A28A /* libPods-WikipediaUnitTests.a */; }; BC0FED621AAA0263002488D7 /*
[MediaWiki-commits] [Gerrit] makefile fastlane follow-on - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/202649 Change subject: makefile fastlane follow-on .. makefile fastlane follow-on - fix some syntax rebase errors in the Makefile - add make fn to Fastfile which allows make goals to be invoked from the Fastfile - add linting to pre_check fn - DRY up the Fastfile a bit - commit some lint fixes Change-Id: Ic1ffbe0ffc1659a949a727ddd659cf0ee169054e --- M Makefile M MediaWikiKit/MediaWikiKit/MWKImage.m M Wikipedia/C Methods/WMFArticleParsing.m M Wikipedia/main.m M fastlane/Fastfile 5 files changed, 61 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/49/202649/1 diff --git a/Makefile b/Makefile index 7e3862f..48f30fd 100644 --- a/Makefile +++ b/Makefile @@ -110,20 +110,34 @@ #! Web dependency management #! -CSS_ORIGIN = http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enonly=stylesskin=vectormodules=; +web: ##Make web assets +web: css grunt + +CSS_ORIGIN = http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=falselang=enonly=stylesskin=vectormodules= WEB_ASSETS_DIR = Wikipedia/assets -cd Wikipedia/assets/ { -curl -L -f -o 'styles.css' ${PREFIX}mobile.app.pagestyles.ios -curl -L -f -o 'abusefilter.css' ${PREFIX}mobile.app.pagestyles.ios -curl -L -f -o 'preview.css' ${PREFIX}mobile.app.preview -} +define get_css_module +curl -s -L -o +endef +css: ##Download latest stylesheets + @echo Downloading CSS assets...; \ + mkdir -p $(WEB_ASSETS_DIR); \ + cd $(WEB_ASSETS_DIR); \ + $(get_css_module) 'styles.css' $(CSS_ORIGIN)mobile.app.pagestyles.ios /dev/null; \ + $(get_css_module) 'abusefilter.css' $(CSS_ORIGIN)mobile.app.pagestyles.ios /dev/null; \ + $(get_css_module) 'preview.css' $(CSS_ORIGIN)mobile.app.preview /dev/null NODE_VERSION = $(shell node -v 2/dev/null) NPM_VERSION = $(shell npm -version 2/dev/null) -npm: ##TODO, run npm install +grunt: ##Run grunt +grunt: npm + @cd www grunt cd .. + +npm: ##Install Javascript dependencies +npm: node-check + @cd www npm install cd .. get-node: ##Install node via Homebrew brew install node diff --git a/MediaWikiKit/MediaWikiKit/MWKImage.m b/MediaWikiKit/MediaWikiKit/MWKImage.m index 90b5335..96a0b49 100644 --- a/MediaWikiKit/MediaWikiKit/MWKImage.m +++ b/MediaWikiKit/MediaWikiKit/MWKImage.m @@ -206,6 +206,7 @@ - (MWKImage*)largestCachedVariant { return [self.article.images largestImageVariantForURL:self.sourceURL cachedOnly:YES]; } + - (MWKImage*)smallestCachedVariant { return [self.article.images smallestImageVariantForURL:self.sourceURL cachedOnly:YES]; } diff --git a/Wikipedia/C Methods/WMFArticleParsing.m b/Wikipedia/C Methods/WMFArticleParsing.m index 45a286f..8bee6ea 100644 --- a/Wikipedia/C Methods/WMFArticleParsing.m +++ b/Wikipedia/C Methods/WMFArticleParsing.m @@ -111,3 +111,4 @@ [image save]; } } + diff --git a/Wikipedia/main.m b/Wikipedia/main.m index bcaf60f..798ddc4 100644 --- a/Wikipedia/main.m +++ b/Wikipedia/main.m @@ -15,3 +15,4 @@ isUnitTesting ? nil : NSStringFromClass([AppDelegate class])); } } + diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c22ed23..d21e0bb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -4,16 +4,28 @@ ENV['XCODE_WORKSPACE'] = 'Wikipedia.xcworkspace' -before_all do - p ENV - reset_git_repo :force unless ENV['NO_RESET'] - ensure_git_status_clean unless ENV['NO_RESET'] - cocoapods - pre_check +# Returns true if the `NO_RESET` env var is set to 1 +def reset_disabled? + ENV['NO_RESET'] == '1' +end + +# Returns true if the `NO_DEPLOY` env var is set to 1 +def deploy_disabled? + ENV['NO_DEPLOY'] == '1' +end + +# Runs goals from the project's Makefile, this requires going up to the project directory. +# :args: Additional arguments to be passed to `make`. +# Returns The result of the `make` command +def make(args) + # Maybe we should write an uncrustify fastlane action?... + Dir.chdir '..' do +sh 'make ' + args + end end def pre_check - + make 'lint' xctest({ scheme: 'Wikipedia', destination: platform=iOS Simulator,name=iPhone 6,OS=8.2, @@ -21,15 +33,24 @@ report_path: build/reports/iOS82/report.xml, clean: nil }) +end +before_all do + p ENV + unless reset_disabled? +reset_git_repo :force +ensure_git_status_clean + end + pre_check end lane :test do - + # pre_check already being done in before_all + # we can put the pre_check impl here if/when fastlane adds support + # for inter-lane dependencies end lane :alpha do - # Download the Certificate for signing cert @@ -61,7 +82,7 @@ # verbose: nil, # this means 'Do Verbose'. }) - unless ENV['NO_DEPLOY'] + unless deploy_disabled? # Upload the DSYM to
[MediaWiki-commits] [Gerrit] commit Pods folder - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/202040 Change subject: commit Pods folder .. commit Pods folder Commits the Pods folder, which removes bundler cocoapods as build dependencies. This means the get-deps task doesn't do anything (as we don't have any deps that we're installing—as npm/node aren't easily installable). Bug: T94039 Change-Id: I3a52b2bb4d44beaa6979e0295247c0bd31099eb7 --- M .gitignore M Makefile A Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h A Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m A Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h A Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m A Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h A Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m A Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h A Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m A Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h A Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m A Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h A Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m A Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h A Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m A Pods/AFNetworking/LICENSE A Pods/AFNetworking/README.md A Pods/BlocksKit/BlocksKit/BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/BKMacros.h A Pods/BlocksKit/BlocksKit/Core/NSArray+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSArray+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSDictionary+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSIndexSet+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSInvocation+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSMutableArray+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSMutableDictionary+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSMutableIndexSet+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSMutableOrderedSet+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSMutableSet+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.h A Pods/BlocksKit/BlocksKit/Core/NSObject+BKAssociatedObjects.m A Pods/BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.h A Pods/BlocksKit/BlocksKit/Core/NSObject+BKBlockExecution.m A Pods/BlocksKit/BlocksKit/Core/NSObject+BKBlockObservation.h A Pods/BlocksKit/BlocksKit/Core/NSObject+BKBlockObservation.m A Pods/BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSOrderedSet+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSSet+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSSet+BlocksKit.m A Pods/BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.h A Pods/BlocksKit/BlocksKit/Core/NSTimer+BlocksKit.m A Pods/BlocksKit/LICENSE A Pods/BlocksKit/README.md A Pods/Headers/Private/AFNetworking/AFHTTPRequestOperation.h A Pods/Headers/Private/AFNetworking/AFHTTPRequestOperationManager.h A Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h A Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h A Pods/Headers/Private/AFNetworking/AFURLConnectionOperation.h A Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h A Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h A Pods/Headers/Private/BlocksKit/BKMacros.h A Pods/Headers/Private/BlocksKit/BlocksKit.h A Pods/Headers/Private/BlocksKit/NSArray+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSDictionary+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSIndexSet+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSInvocation+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSMutableArray+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSMutableDictionary+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSMutableIndexSet+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSMutableOrderedSet+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSMutableSet+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSObject+BKAssociatedObjects.h A Pods/Headers/Private/BlocksKit/NSObject+BKBlockExecution.h A Pods/Headers/Private/BlocksKit/NSObject+BKBlockObservation.h A Pods/Headers/Private/BlocksKit/NSOrderedSet+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSSet+BlocksKit.h A Pods/Headers/Private/BlocksKit/NSTimer+BlocksKit.h A Pods/Headers/Private/HockeySDK/BITActivityIndicatorButton.h A Pods/Headers/Private/HockeySDK/BITAppStoreHeader.h A Pods/Headers/Private/HockeySDK/BITAppVersionMetaInfo.h A Pods/Headers/Private/HockeySDK/BITArrowImageAnnotation.h A