• Stars
    star
    621
  • Rank 69,746 (Top 2 %)
  • Language
    Objective-C
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

React Native: Native App Tour Library

PRs Welcome

ReactNative: Native App Tour Library (Android/iOS)

If this project has helped you out, please support us with a star 🌟

This library is a React Native bridge around native app tour libraries. It allows show/guide beautiful tours:

Android: KeepSafe/TapTargetView
iOS: aromajoin/material-showcase-ios

📖 Getting started

$ npm install react-native-app-tour --save

Supported react-native 61 and above

  • iOS

iOS Prerequisite: Please make sure CocoaPods is installed on your system

- Add the following to your `Podfile` -> `ios/Podfile` and run pod update:
  use_native_modules!

  pod 'RNAppTour', :path => '../node_modules/react-native-app-tour/ios'

  use_frameworks! :linkage => :static

  pod 'MaterialShowcase'

  # Follow [Flipper iOS Setup Guidelines](https://fbflipper.com/docs/getting-started/ios-native)
  # This is required because iOSPhotoEditor is implemented using Swift and we have to use use_frameworks! in Podfile
  $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
    'CocoaAsyncSocket', 'ComponentKit', 'Flipper-DoubleConversion',
    'Flipper-Glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
    'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']

  pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
    installer.pod_targets.each do |pod|
        if $static_framework.include?(pod.name)
          def pod.build_type;
            Pod::BuildType.static_library
          end
        end
      end
  end

  • Please make sure Flipper iOS Setup Guidelines steps are added to Podfile, since MaterialShowcase is implemented using Swift and we have to use use_frameworks! in Podfile

  • Android

Please add below snippet into your app build.gradle

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

💬 ISSUES

  • If you install this package and get an error saying postinstall failed this most likely means
    • You are trying to run install modules from outside of project root (react-native-git-upgrade)
      • FIX: remove react-native-app-tour from package.json and rerun
    • Pods version is out of date.
      • pod repo update
  • If you encounter File not found in iOS issue while setup, please refer ISSUE - 3 issue which might help you in order to resolve.
  • If you have problems with Android Trying to resolve view with tag which doesn't exist or can't resolve tag. Please add props collapasable: false to your View

🎨 API's

  • AppTourView.for: AppTourTarget
let appTourTarget = AppTourView.for(Button, {...native-library-props})

AppTour.ShowFor(appTourTarget)
  • AppTourSequence
    • add(AppTourTarget)
    • remove(AppTourTarget)
    • removeAll
    • get(AppTourTarget)
    • getAll
let appTourSequence = new AppTourSequence()
this.appTourTargets.forEach(appTourTarget => {
appTourSequence.add(appTourTarget)
})

AppTour.ShowSequence(appTourSequence)
  • AppTour
    • ShowFor(AppTourTarget)
    • ShowSequence(AppTourTargets)

💡 Props

Note:

  • General(iOS & Android)
Prop Type Default Note
order: mandatory number Specify the order of tour target
title string Specify the title of tour
description string Specify the description of tour
outerCircleColor string: HEX-COLOR Specify a color for the outer circle
targetCircleColor string: HEX-COLOR Specify a color for the target circle
titleTextSize number 20 Specify the size (in sp) of the title text
titleTextColor string: HEX-COLOR Specify the color of the title text
descriptionTextSize number 10 Specify the size (in sp) of the description text
descriptionTextColor string: HEX-COLOR Specify the color of the description text
targetRadius number 60 Specify the target radius (in dp)
cancelable bool true Whether tapping anywhere dismisses the view
  • Android
Prop Type Default Note
collapsable: mandatory bool Specify collapsable false if your view just contains children. Please read view#collapsable for the details
outerCircleAlpha number 0.96f Specify the alpha amount for the outer circle
textColor string: HEX-COLOR Specify a color for both the title and description text
dimColor string: HEX-COLOR If set, will dim behind the view with 30% opacity of the given color
drawShadow bool true Whether to draw a drop shadow or not
tintTarget bool true Whether to tint the target view's color
transparentTarget bool true Specify whether the target is transparent (displays the content underneath)
  • iOS
Prop Type Default Note
backgroundPromptColor string: HEX-COLOR UIColor.blue Specify background prompt color
backgroundPromptColorAlpha number 0.96 Specify background prompt color alpha
titleTextAlignment string left Specify primary text alignment: Left, Right, Top, Bottom
descriptionTextAlignment string left Specify secondary text alignment: Left, Right, Top, Bottom
aniComeInDuration number 0.5 Specify animation come In Duration
aniGoOutDuration number 1.5 Specify animation Go Out Duration
aniRippleColor string: HEX-COLOR #FFFFFF Specify ripple color
aniRippleAlpha number 0.2 Specify ripple alpha

🔧 Breaking Changes

  • V0.0.4

    • Generalized props across platforms @congnguyen91
    • Migrated License to Apache 2.0
  • V0.0.10

    • Added order as a mandatory property to each target
    • Each component which is to be rendered in the tour should have a key prop. It is mandatory.

Credits

🤔 How to contribute

Have an idea? Found a bug? Please raise to ISSUES. Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.

💫 Where is this library used?

If you are using this library in one of your projects, add it in this list below.

📜 License

This library is provided under the Apache 2 License.

RNAppTour @ prscX

💖 Support my projects

I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • Starring and sharing the projects you like 🚀

  • If you're feeling especially charitable, please follow prscX on GitHub.

    Buy Me A Coffee

    Thanks! ❤️
    prscX.github.io
    </ Pranav >

More Repositories

1

react-native-photo-editor

React Native: Native Photo Editor
Java
1,102
star
2

react-native-bottom-action-sheet

React Native: Native Bottom Action Sheet
JavaScript
634
star
3

react-native-spruce

React Native Bridge for Native Spruce Animation Library
JavaScript
532
star
4

react-native-popover-menu

React Native: Native Popover Menu
JavaScript
479
star
5

awesome-react-native-native-modules

A curated list of Awesome ReactNative: Native Modules Guidelines/Components/News/Tools/Learning Materials
437
star
6

react-native-shine-button

React Native: Native Shine Button - Effects like shining
Java
357
star
7

react-native-file-selector

React Native: Native File Selector
Java
306
star
8

react-native-tooltips

React Native: Native Tooltip View
JavaScript
267
star
9

react-native-iconic

React Native - Native Animated Icons with different states
Java
223
star
10

react-native-fluidic-slider

React Native: Native Fluidic Slider
Objective-C
196
star
11

react-native-styled-dialogs

React Native: Native Styled Dialogs
Objective-C
174
star
12

react-native-morphing-text

React Native: Native Morphing Text
Swift
160
star
13

react-native-toasty

React Native: Native Toast
JavaScript
156
star
14

react-native-siri-wave-view

React Native: Native Siri Wave View
Objective-C
145
star
15

react-native-download-button

React Native: Native Download Button: with pretty cool animation
Java
123
star
16

react-native-lock-screen

React Native: Lock Screen
JavaScript
114
star
17

react-native-selection-menu

React Native: Native Selection Menu
Java
110
star
18

react-native-voice-recorder

React Native: Native Audio Recorder View
Java
93
star
19

react-native-notification-banner

React Native: Native Notification Banner
JavaScript
90
star
20

react-native-material-shadows

React Native: Native Material Shadows
Java
86
star
21

PXSiriWave9

iOS: Siri Waveform effect similar to 9
Objective-C
64
star
22

react-native-chip-view

React Native: Material Chip View
JavaScript
43
star
23

react-native-number-selector

ReactNative: Native Number Picker
Java
39
star
24

react-native-number-stepper

ReactNative: Number Stepper
JavaScript
35
star
25

react-native-richtext

React Native: Native Rich Text Editor
Swift
31
star
26

prettier-pack

Prettier + ESLint + Husky + Lint + Flow + React + React Native
JavaScript
31
star
27

react-native-about-libraries

React Native: It offers information about install packages
JavaScript
31
star
28

react-native-easy-permissions

React Native: Native Easy Permissions
Objective-C
31
star
29

react-native-file-type

React Native: Detect the file type of a Buffer/Uint8Array by reading from Local Storage
Java
27
star
30

react-native-text-switch

ReactNative: Native Text Switch
Objective-C
26
star
31

vs-essential-plugins

Essential Prepackaged VSCode Plugins for ReactNative
JavaScript
25
star
32

react-native-bottom-sheet-text-view

React Native: Native Bottom Sheet - Text View
Objective-C
22
star
33

react-native-add-shortcuts

React Native: Native Add Shortcuts
Java
21
star
34

PXMultiSelector.iOS

iOS: Multi Selector List
20
star
35

react-native-local-authenticate

React Native: Local Authentication
Java
15
star
36

react-native-image-helper

React Native: Native Image Helper
Java
9
star
37

pod-installer

POD Installer
JavaScript
6
star
38

react-native-whats-new

React Native: Native Whats New Kit
Java
6
star
39

simplified-promise

Enhance Simplicity of JS Promise
JavaScript
4
star
40

BottomSheetTextView.iOS

Android - BottomSheet TextView
Objective-C
2
star
41

BottomSheetTextView.Android

Android - BottomSheet TextView
Java
1
star
42

prscX.github.io

prscX Profile Page
CSS
1
star