GithubHelp home page GithubHelp logo

isabella232 / mobile-app-bootstrap-objc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tableau/mobile-app-bootstrap-objc

0.0 0.0 0.0 3.87 MB

An Objective-C template for creating iOS apps that embed Tableau vizzes

License: MIT License

Objective-C 98.79% JavaScript 1.21%

mobile-app-bootstrap-objc's Introduction

Mobile App Bootstrap: Objective-C preview

Community Supported

Provides an early look at example code for how to embed Tableau vizzes inside of a native iOS app.

Prerequisites

This objective-c version of the Mobile App Bootstrap only supports iOS.

Installation

Hopefully straightforward:

  1. Install Xcode
  2. Download the code for the app from this repository

Starting the Tableau Sample App

  1. Open Mobile App Bootstrap.xcodeproj in Xcode
  2. Choose/click "Run"

This should run the app in a simulator, depending on the scheme set in Xcode.

In order to run on a physical device, you'll need to adjust the Team signing profile in the Xcode project. From the Xcode project navigator, click the Mobile App Bootstrap project. Within the project info, click the Mobile App Bootstrap target, choose the General tab, and set a Team in the Signing section. This starts to get into app distribution, and Apple has extensive documentation with both a Quick Start and a more detailed guide.

Project Layout

The app is meant to be as simple as possible: a UITabBarController with 4 UIViewControllers, each containing a WKWebView. The UIViewControllers are separated into their own classes in this sample. The Home WebView opens a local web page bundled in the app, while the other 3 WebViews open visualizations hosted on Tableau Public.

Tableau Connected Clients are used, with a modified version of the Connected Clients library. Once this sample app is farther along (see Limitations, below), the modifications to the Connected Clients library will be submitted to its repo.

Customization Points

AppDelegate.m
Change https://public.tableau.com to your internal server.

Viz1ViewController.m, Viz2ViewController.m, Viz3ViewController.m
Change the viz URLs to point to your own visualizations. Consider including the URL query parameters in the sample URLs, described in more detail in comments in Viz1ViewController.m.

www/index.html
Modify to suit.

Limitations

This code is strictly an early look, and is sadly far from complete.

  • Links within WebViews
    Tapping a link in one of these WebViews will follow the link...but there isn't a Back button included with this sample.

  • Connected Clients
    Connected Clients are implemented, via a simple Token Manager. Unfortunately it doesn't yet perform re-authentication. So while it will keep the user signed in between app runs and device reboots, it will timeout based on Tableau Server's setting. On Server, this is configuralbe via its .yml file:
    wgserver.session.idle_limit: 240
    That value is in minutes, and affects all clients: Web, Desktop, and Mobile.

  • Sign In on Phone
    The Sign In experience on a phone is, charitably: nonoptimal. There's a way to inject some CSS into the WebView to make things lok nicer, via some JavaScript:
    "var styleNode = document.createElement('style'); styleNode.type = 'text/css'; styleNode.innerHTML = ' .tb-login{min-width:0 !important; width: " + width + "px; } .tb-login-site-picker-container {margin-left: 50px; margin-right: 50px; } '; document.getElementsByTagName('head')[0].appendChild(styleNode);"
    WebView has EvaluateJavascript for passing this in. Sadly, the sample code doesn't yet implement this.

  • Sign In approach
    In this sample, Sign In happen inside the same viz as the WebView...this might need to be broken out in a separate WebView that only processes Sign In.

Future Plans

Support

This collection is supported by the community and not officially 'blessed' by Tableau Engineering or Support. What does that mean? We didn't have a QA team test it. It's a tool for learning how to embed vizzes inside a mobile application. You should not expect that there are 0 bugs.

If you have problems getting it to work, feel free to email us with questions, but we can't promise quick responses. The Tableau Developer Community is also a great resource if you need help.

A standard disclaimer: mobile-app-bootstrap is made available AS-IS with no support and no warranty whatsoever. Despite efforts to write good and useful code there may be bugs that cause unexpected and undesirable behavior. The software is strictly โ€œuse at your own risk.โ€

The good news: This is intended to be a self-service tool. You are free to modify it in any way to meet your needs.

mobile-app-bootstrap-objc's People

Contributors

avertin avatar benlower avatar ronzilla avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.