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

Enable additional middleware scenarios#1147

Merged
bviglietta merged 2 commits into
microsoft:developfrom
bviglietta:likebutton
Oct 18, 2016
Merged

Enable additional middleware scenarios#1147
bviglietta merged 2 commits into
microsoft:developfrom
bviglietta:likebutton

Conversation

@bviglietta

Copy link
Copy Markdown
Contributor
  • Include AudioToolbox.dll in apps using middleware
  • Allow UIView animation with spring
  • Streamline app protocol activation via Safari view controller

- Allow UIView animation with spring
- Streamline app protocol activation via Safari view controller
@bviglietta

Copy link
Copy Markdown
Contributor Author

@pradipd is added to the review. #Closed

}

- (void)dealloc {
_webView.delegate = nil;

@pradipd pradipd Oct 13, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_webView [](start = 4, length = 8)

Do you have to check if this is null? #ByDesign

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if it's null, this will be a no-op.


In reply to: 83332466 [](ancestors = 83332466)

@DHowett-MSFT DHowett-MSFT Oct 13, 2016

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we own our webview, doesn't it not matter that its delegate is being nil'd out? It won't have a word to say about it in just a few more seconds. #ByDesign

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but the UIWebView docs specify very sternly that the delegate field must be reset to nil before deallocating the UIWebView, so maybe I should just comply?

In looking at this question, I did discover that UIWebView has a retain cycle involving its callbacks, so that's something that needs to be fixed.


In reply to: 83337136 [](ancestors = 83337136)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[UIWebView issue addressed in second commit.]


In reply to: 83342864 [](ancestors = 83342864,83337136)

@bbowman

bbowman commented Oct 13, 2016

Copy link
Copy Markdown
Member

:shipit:

// Check whether this request is for the redirect URL that we're watching out for
// (modulo the query string and fragment, which are allowed to vary)

if ([url.scheme isEqualToString:_redirectUrl.scheme] && [url.host isEqualToString:_redirectUrl.host] &&

@aballway aballway Oct 17, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instead of having a flag variable recombine the ifs #ByDesign

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could, but I feel the code would be less clear that way.


In reply to: 83669085 [](ancestors = 83669085)

// straight to the application delegate.
// Asking the WebView to open such a URL would work, since it would send an activation request
// to this app, but that would cause an extraneous confirmation dialog from Windows.
if (appCanOpenURL(url)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if appCanOpenURL returns FALSE, should OpenWithAppDelegate be set to NO?

If not, do we even need to call appCanOpenURL if OpenWithAppDelegate is already YES?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First question: no, openWithAppDelegate should be set to YES if either condition is true.

Second question: That's a good point. We can skip the call to appCanOpenURL if openWithAppDelegate is already YES.


In reply to: 83742017 [](ancestors = 83742017)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification.
I'm fine leaving as is or changing it to skip the appCanOpenURL call.
either way is fine.


In reply to: 83745451 [](ancestors = 83745451,83742017)

@pradipd

pradipd commented Oct 18, 2016

Copy link
Copy Markdown
Contributor

:shipit:

@bviglietta bviglietta merged commit 1ee2d24 into microsoft:develop Oct 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants