Skip to content

Commit

Permalink
Merge 18.9.0.1 and 18.9.0.2 betas (#17695)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio authored Dec 21, 2021
2 parents 479b8ca + 9842bcf commit d894bd3
Show file tree
Hide file tree
Showing 80 changed files with 1,953 additions and 1,737 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git (1.9.1)
git (1.10.0)
rchardet (~> 1.8)
google-apis-androidpublisher_v3 (0.14.0)
google-apis-core (>= 0.4, < 2.a)
Expand Down Expand Up @@ -347,4 +347,4 @@ DEPENDENCIES
xcpretty-travis-formatter

BUNDLED WITH
2.2.31
2.2.32
4 changes: 0 additions & 4 deletions Scripts/update-translations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,3 @@
# Clean up after ourselves
FileUtils.rm_f backup_destination
end

extract_framework_translations_script_path = File.join(script_root, 'extract-framework-translations.swift')

system extract_framework_translations_script_path if strings_filter.empty?
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ protocol AuthenticationHandler {

func presentLoginEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, windowManager: WindowManager, onDismiss: @escaping () -> Void) -> Bool

func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?)

// WPAuthenticator style overrides
var statusBarStyle: UIStatusBarStyle { get }
var prologueViewController: UIViewController? { get }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ private extension CommentDetailViewController {
self?.updateComment()
})

CommentAnalytics.trackCommentEditorOpened(comment: comment)
let navigationControllerToPresent = UINavigationController(rootViewController: editCommentTableViewController)
navigationControllerToPresent.modalPresentationStyle = .fullScreen
present(navigationControllerToPresent, animated: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extension WordPressAuthenticationManager {
private func authenticatorConfiguation() -> WordPressAuthenticatorConfiguration {
// SIWA can not be enabled for internal builds
// Ref https://github.com/wordpress-mobile/WordPress-iOS/pull/12332#issuecomment-521994963
let enableSignInWithApple = AppConfiguration.allowSignUp && !(BuildConfiguration.current ~= [.a8cBranchTest, .a8cPrereleaseTesting])
let enableSignInWithApple = !(BuildConfiguration.current ~= [.a8cBranchTest, .a8cPrereleaseTesting])

return WordPressAuthenticatorConfiguration(wpcomClientId: ApiCredentials.client,
wpcomSecret: ApiCredentials.secret,
Expand Down Expand Up @@ -387,6 +387,11 @@ extension WordPressAuthenticationManager: WordPressAuthenticatorDelegate {
/// Presents the Signup Epilogue, in the specified NavigationController.
///
func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?) {
if let authenticationHandler = authenticationHandler {
authenticationHandler.presentSignupEpilogue(in: navigationController, for: credentials, service: service)
return
}

let storyboard = UIStoryboard(name: "SignupEpilogue", bundle: .main)
guard let epilogueViewController = storyboard.instantiateInitialViewController() as? SignupEpilogueViewController else {
fatalError()
Expand Down
29 changes: 16 additions & 13 deletions WordPress/Classes/ViewRelated/Reader/ReaderCommentsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ - (BOOL)shouldDisplaySuggestionsTableView

- (void)refreshAndSync
{
[self refreshFollowButton];
[self refreshPostHeaderView];
[self refreshSubscriptionStatusIfNeeded];
[self refreshReplyTextView];
Expand Down Expand Up @@ -1245,6 +1246,20 @@ - (NSFetchRequest *)fetchRequest

- (void)configureCell:(UITableViewCell *)aCell atIndexPath:(NSIndexPath *)indexPath
{
// When backgrounding, the app takes a snapshot, which triggers a layout pass,
// which refreshes the cells, and for some reason triggers an assertion failure
// in NSMutableAttributedString(data:,options:,documentAttributes:) when
// the NSDocumentTypeDocumentAttribute option is NSHTMLTextDocumentType.
// *** Assertion failure in void _prepareForCAFlush(UIApplication *__strong)(),
// /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UIApplication.m:2377
// *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
// reason: 'unexpected start state'
// This seems like a framework bug, so to avoid it skip configuring cells
// while the app is backgrounded.
if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
return;
}

Comment *comment = [self.tableViewHandler.resultsController objectAtIndexPath:indexPath];

if ([self newCommentThreadEnabled]) {
Expand Down Expand Up @@ -1306,19 +1321,7 @@ - (void)configureCell:(UITableViewCell *)aCell atIndexPath:(NSIndexPath *)indexP
};
}

// When backgrounding, the app takes a snapshot, which triggers a layout pass,
// which refreshes the cells, and for some reason triggers an assertion failure
// in NSMutableAttributedString(data:,options:,documentAttributes:) when
// the NSDocumentTypeDocumentAttribute option is NSHTMLTextDocumentType.
// *** Assertion failure in void _prepareForCAFlush(UIApplication *__strong)(),
// /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UIApplication.m:2377
// *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
// reason: 'unexpected start state'
// This seems like a framework bug, so to avoid it skip configuring cells
// while the app is backgrounded.
if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
return;
}


NSAttributedString *attrStr = [self cacheContentForComment:comment];
[cell configureCellWithComment:comment attributedString:attrStr];
Expand Down
12 changes: 12 additions & 0 deletions WordPress/Jetpack/Classes/JetpackAuthenticationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ struct JetpackAuthenticationManager: AuthenticationHandler {
return true
}

// If the user signs up using the Jetpack app (through SIWA, for example)
// We show right away the screen explaining that they do not have Jetpack sites
func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?) {
let windowManager = WordPressAppDelegate.shared?.windowManager

windowManager?.dismissFullscreenSignIn()

let viewModel = JetpackNoSitesErrorViewModel()
let controller = errorViewController(with: viewModel)
windowManager?.show(controller, completion: nil)
}

// MARK: - Private: Helpers
private func isValidJetpack(for site: WordPressComSiteInfo) -> Bool {
return site.hasJetpack &&
Expand Down
4 changes: 4 additions & 0 deletions WordPress/Jetpack/JetpackDebug.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:wordpress.com</string>
Expand Down
4 changes: 4 additions & 0 deletions WordPress/Jetpack/JetpackRelease.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:wordpress.com</string>
Expand Down
Loading

0 comments on commit d894bd3

Please sign in to comment.