GithubHelp home page GithubHelp logo

itwin / mobile-samples Goto Github PK

View Code? Open in Web Editor NEW
8.0 30.0 3.0 17.22 MB

License: MIT License

Swift 24.14% Shell 1.14% HTML 0.42% SCSS 4.53% TypeScript 42.12% CSS 0.17% JavaScript 1.22% Kotlin 17.86% Python 5.20% Ruby 0.57% Java 1.00% Objective-C 0.68% Objective-C++ 0.91% C 0.03%

mobile-samples's Introduction

iTwin mobile-samples

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

Warning

This is pre-release software and provided as-is.

About this Repository

This repository contains sample Android, iOS, and ReactNative apps that make use of the iTwin Mobile SDK.

There are four iOS sample apps. All of them include a WKWebView running Typescript code to host the iTwin content.

  • MobileStarter is a UIKit app containing a full-screen iTwin web view.
  • SwiftUIStarter is a SwiftUI app that similarly contains a full-screen iTwin web view.
  • CameraSample demonstrates how to make calls to native iOS code to take or select a picture.
  • ThirdPartyAuth demonstrates how to use a third party for user authentication.

Each iOS sample app includes an Xcode project with a LocalSDK_ prefix. These Xcode projects are the same as the main ones, with the exception that they refer to a local filesystem copy of mobile-sdk-ios, instead of referring to the mobile-sdk-ios Swift Package on GitHub. You must have mobile-sdk-ios checked out alongside mobile-samples in order for these to work.

There are three Android sample apps. All of them include an Android WebView running TypeScript code to host the iTwin content

  • iTwinStarter is an app containing a full-screen iTwin web view.
  • CameraSample demonstrates how to make calls to native Android code to take or select a picture.
  • ThirdPartyAuth demonstrates how to use a third party for user authentication.

There is one React Native sample app:

  • iTwinRNStarter is a React Native app with a WebView running TypeScript code to host the iTwin content.

See iOS/README.md for instructions on building the iOS samples.

See Android/README.md for instructions on building the Android samples.

See ReactNative/README.md for instructions on building the React Native sample.

See OFFLINE.md for information about using iModels while offline.

Sample iModels

The Snapshot iModels directory contains sample snapshot iModels that can be copied onto the device to be opened from the apps. Right now, there is only one sample: Building Blocks.bim. On a Windows PC, you can use iTunes to copy the file to an iPhone or iPad, and on a Mac you can use Finder. You can use the Device File Explorer in Android Studio to copy the file to an Android device. Once it has been copied to the app's documents directory on the device, it will show up in the Local iModels screen of the app. If you are already on that screen while you copy the file, hit the refresh button in the upper right to refresh the list. If you copy the file to a system directory on the device instead of the app's documents directory, you can use the Choose File... button on the Local iModels screen.

mobile-samples's People

Contributors

carlh avatar dependabot[bot] avatar simihartstein avatar tcobbs-bentley avatar toddsouthenbentley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile-samples's Issues

gradle.xml contains a system-specific path

Inside gradle.xml the gradleHome variable contains a system-specific path.

After opening Android studio, I am required to change the gradle path to something that works on my system, which causes a change to the gradle.xml file.

We either need to change this to a path that is not system-specific (such as $GRADLE_HOME), or add this file to the .gitignore.

There are many discussions about whether the gradle.xml file should be added to the .gitignore without any conclusive answers... https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems

iModel download cancelation may contain a race condition

When you cancel an iModel download in the mobile sample apps, the UI almost immediately updates to indicate completion, while in reality the backend is still potentially waiting for a chunk to download before completing the cancelation. Immediately downloading the same file again may cause corruption (although that has yet to be determined).

IOS MobileStarter project

Dear Developer(s),
I've encountered an error message while working with the IOS MobileStarter project, and I'm unsure how to resolve it. Could you kindly take a look? Attached are screenshots of the dependency package versions and the error message.
mobile-samples version : mobile-samples-0.22.1
macos version : macOS Sonoma 14.3.1
xcode version : Xcode 15.2
微信图片_20240222095806
微信图片_20240222095818

Figure out license compliance for mobile-samples

We make use of a number of third-party libraries which use the MIT license. I believe that this means that we need to have a file somewhere in the repository that lists them, but I'm not sure.

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.