Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19020] iOS 9: Support SFSafariViewController

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2015-07-14T02:59:31.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.1.0
ComponentsiOS
LabelsiOS9
ReporterFokke Zandbergen
AssigneeChee Kiat Ng
Created2015-06-15T08:35:17.000+0000
Updated2015-10-22T22:05:03.000+0000

Description

iOS9 comes with a new SFSafariViewController to display a modal version of Safari with a return button to close it. We should probably use this in openURL, maybe as an option so developers can still choose to open in Safari like it does now. {quote}You can use SFSafariViewController to display web content within your app. The Safari View Controller shares cookies and other website data with Safari, and has many of Safari's features, like Safari AutoFill and Safari Reader. Unlike Safari itself, the Safari View Controller UI is tailored for displaying a single page, featuring a Done button that'll take users right back where they were in your app. Consider replacing your WKWebView or UIWebView-based browsers with SFSafariViewController if your app displays web content but does not customize that content.{quote} https://developer.apple.com/library/safari/releasenotes/General/WhatsNewInSafari/Articles/Safari_9.html

Comments

  1. Ben Bahrenburg 2015-06-17

    Would recommend against changing the behavior of openUrl as it has a specific meaning in the underlying platform's framework. The SFViewController is pretty self containing making it an excellent candidate for a module ( https://github.com/benbahrenburg/Ti.SafariViewController ).
  2. Chee Kiat Ng 2015-07-01

    [~ben.bahrenburg@gmail.com], Do you have a sample code for the use of the module? Thanks.
  3. Ben Bahrenburg 2015-07-01

    Hi [~cng] I'm putting together sample code, and the yaml documentation. Should be ready in the next two days. Figure at that point can transfer over to AppC-Modules.
  4. Chee Kiat Ng 2015-07-14

    Reviewed and tested. Approved! Will be transferring into AppC-Modules.
  5. Hans Knöchel 2015-07-22

    Really a minor thing, but could we normalize the events "opened" and "closed" of the viewController to "open" and "close"? Benefit would be, that it is a familiar behavior to Ti.UI.Window which developers already know.
  6. Chee Kiat Ng 2015-09-09

    [~hansknoechel], can you do a PR for that? https://github.com/appcelerator-modules/Ti.SafariDialog After which, also do a PR for master to place this module in
    support/module/packaged
  7. Ben Bahrenburg 2015-09-09

    only difference is these events happen after the fact, which is why they are in the past tenses.
  8. Hans Knöchel 2015-09-09

    PR: https://github.com/appcelerator-modules/Ti.SafariDialog/pull/1 [~ben.bahrenburg@gmail.com] That ok for you?
  9. Hans Knöchel 2015-09-17

    PR to ship the module with Titanium SDK: https://github.com/appcelerator/titanium_mobile/pull/7200
  10. Sebastian Klaus 2015-09-18

    I found a little bug in the module. Should I create a new JIRA issue?
  11. Chee Kiat Ng 2015-09-18

    yes please. thanks!
  12. Sebastian Klaus 2015-09-18

  13. Harry Bryant 2015-10-22

    Verified fixed, using the example code provided, am able to use the new SFSafariViewController without issue. Tested on iOS 9.1 device and Simulator. Mac OSX El Capitan 10.11 (15A284) Studio: 4.3.3.201510201834 Ti SDK: 5.1.0.v20151021165224 Appc NPM: 4.2.1-6 Appc CLI: 5.2.0-24 Ti CLI: 5.0.4 Xcode 7.1(7B91b) Node v4.2.1 production *Closing ticket.*

JSON Source