https://github.com/tidev/titanium-web-dialog
Use the SFSafariViewController (iOS) and Chrome Pages (Android) in Titanium.
https://github.com/tidev/titanium-web-dialog
android chrome-tabs cross-platform ios javascript native sfsafariviewcontroller titanium titanium-module
Last synced: 5 days ago
JSON representation
Use the SFSafariViewController (iOS) and Chrome Pages (Android) in Titanium.
- Host: GitHub
- URL: https://github.com/tidev/titanium-web-dialog
- Owner: tidev
- License: other
- Created: 2017-12-04T07:41:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-28T02:09:13.000Z (21 days ago)
- Last Synced: 2025-04-29T18:08:47.346Z (19 days ago)
- Topics: android, chrome-tabs, cross-platform, ios, javascript, native, sfsafariviewcontroller, titanium, titanium-module
- Language: Java
- Homepage:
- Size: 4.96 MB
- Stars: 30
- Watchers: 12
- Forks: 18
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Titanium Web Dialog
Use the native `SFSafariViewController` (iOS) and `Chrome Pages` (Android) within Appcelerator Titanium.
## Requirements
- Titanium SDK 9.0.0 or later
- iOS 9+ and Android 4.1+## iOS Note
The iOS part of this module is based on Ti.SafariDialog, which has been deprecated for a cross-platform solution. All API's of Ti.SafariDialog
still work here and have been extended by more features over time.## Android Note
In order to use the `close` event on Android it is recommended to have a short delay between `var WebDialog = require('ti.webdialog');` and `WebDialog.open({})`. Otherwise it might not fire the `close` event.## API's
### Top-Level
#### Methods
* `open(arguments)`
* `url` (String)
* `barColor` (String)
* `animated` (Boolean, iOS only)
* `entersReaderIfAvailable` (Boolean, iOS only)
* `barCollapsingEnabled` (Boolean)
* `title` (String, iOS only)
* `tintColor` (String, iOS only)
* `dismissButtonStyle` (`DISMISS_BUTTON_STYLE_*`, iOS only)
* `showTitle` (Boolean, Android only)
* `fadeTransition` (Boolean, Android only)
* `enableSharing` (Boolean, Android only) - Enable Share... menu item to share link
* `closeIcon` (String, Android only) - image path to show as close-button icon* `isSupported()` -> Boolean
* `isOpen()` (iOS only) -> Boolean
* `close()` (iOS only)#### Properties
* `DISMISS_BUTTON_STYLE_DONE` (iOS only)
* `DISMISS_BUTTON_STYLE_CLOSE` (iOS only)
* `DISMISS_BUTTON_STYLE_CANCEL` (iOS only)#### Events
* `open` -> `success` (Boolean), `url` (String)
* `close` -> `success` (Boolean), `url` (String)
* `load` -> `success` (Boolean), `url` (String) - iOS only
* `redirect` -> `url` (String) - iOS only
* `error` -> `message` (String) - Android only### `AuthenticationSession` (iOS only)
#### Methods
* `createAuthenticationSession(arguments)`
* `url` (String)
* `scheme` (String)#### Events
* `callback` -> `success` (Boolean), `callbackURL` (String)
## License
Apache 2.0
## Author
- [Hans Knöchel](https://github.com/hansemannn)
- [Prashant Saini](https://github.com/prashantsaini1)