├── .flowconfig ├── .gitignore ├── .npmignore ├── Example ├── .flowconfig ├── .gitignore ├── .watchmanconfig ├── android │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ ├── react.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── index.android.js ├── index.ios.js ├── ios │ ├── Example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Example.xcscheme │ ├── Example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── ExampleTests │ │ ├── ExampleTests.m │ │ └── Info.plist └── package.json ├── LICENSE ├── README.md ├── ToolTip.android.js ├── ToolTip.ios.js ├── ToolTipMenu.xcodeproj └── project.pbxproj ├── ToolTipMenu ├── RCTToolTipText.h ├── RCTToolTipText.m ├── RCTToolTipTextManager.h ├── RCTToolTipTextManager.m ├── ToolTipMenu.h └── ToolTipMenu.m ├── package.json └── screenshot.png /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*.web.js 5 | .*/*.android.js 6 | 7 | # Some modules have their own node_modules with overlap 8 | .*/node_modules/node-haste/.* 9 | 10 | # Ignore react-tools where there are overlaps, but don't ignore anything that 11 | # react-native relies on 12 | .*/node_modules/react-tools/src/vendor/core/ExecutionEnvironment.js 13 | .*/node_modules/react-tools/src/browser/eventPlugins/ResponderEventPlugin.js 14 | .*/node_modules/react-tools/src/browser/ui/React.js 15 | .*/node_modules/react-tools/src/core/ReactInstanceHandles.js 16 | .*/node_modules/react-tools/src/event/EventPropagators.js 17 | .*/node_modules/flux/lib/invariant.js 18 | 19 | # Ignore jest 20 | .*/node_modules/jest-cli/.* 21 | 22 | # Ignore examples 23 | .*/Examples/.* 24 | 25 | [include] 26 | 27 | [libs] 28 | node_modules/react-native/Libraries/react-native/react-native-interface.js 29 | interfaces.js 30 | 31 | [options] 32 | module.system=haste 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # node.js 26 | # 27 | node_modules/ 28 | npm-debug.log 29 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | Example 2 | -------------------------------------------------------------------------------- /Example/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*.web.js 5 | .*/*.android.js 6 | 7 | # Some modules have their own node_modules with overlap 8 | .*/node_modules/node-haste/.* 9 | 10 | # Ugh 11 | .*/node_modules/babel.* 12 | .*/node_modules/babylon.* 13 | .*/node_modules/invariant.* 14 | 15 | # Ignore react and fbjs where there are overlaps, but don't ignore 16 | # anything that react-native relies on 17 | .*/node_modules/fbjs-haste/.*/__tests__/.* 18 | .*/node_modules/fbjs-haste/__forks__/Map.js 19 | .*/node_modules/fbjs-haste/__forks__/Promise.js 20 | .*/node_modules/fbjs-haste/__forks__/fetch.js 21 | .*/node_modules/fbjs-haste/core/ExecutionEnvironment.js 22 | .*/node_modules/fbjs-haste/core/isEmpty.js 23 | .*/node_modules/fbjs-haste/crypto/crc32.js 24 | .*/node_modules/fbjs-haste/stubs/ErrorUtils.js 25 | .*/node_modules/react-haste/React.js 26 | .*/node_modules/react-haste/renderers/dom/ReactDOM.js 27 | .*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js 28 | 29 | # Ignore commoner tests 30 | .*/node_modules/commoner/test/.* 31 | 32 | # See https://github.com/facebook/flow/issues/442 33 | .*/react-tools/node_modules/commoner/lib/reader.js 34 | 35 | # Ignore jest 36 | .*/node_modules/jest-cli/.* 37 | 38 | # Ignore Website 39 | .*/website/.* 40 | 41 | [include] 42 | 43 | [libs] 44 | node_modules/react-native/Libraries/react-native/react-native-interface.js 45 | 46 | [options] 47 | module.system=haste 48 | 49 | munge_underscores=true 50 | 51 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 52 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' 53 | 54 | suppress_type=$FlowIssue 55 | suppress_type=$FlowFixMe 56 | suppress_type=$FixMe 57 | 58 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 59 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ 60 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 61 | 62 | [version] 63 | 0.19.0 64 | -------------------------------------------------------------------------------- /Example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | .idea 28 | .gradle 29 | local.properties 30 | 31 | # node.js 32 | # 33 | node_modules/ 34 | npm-debug.log 35 | -------------------------------------------------------------------------------- /Example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | /** 4 | * The react.gradle file registers two tasks: bundleDebugJsAndAssets and bundleReleaseJsAndAssets. 5 | * These basically call `react-native bundle` with the correct arguments during the Android build 6 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 7 | * bundle directly from the development server. Below you can see all the possible configurations 8 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 9 | * `apply from: "react.gradle"` line. 10 | * 11 | * project.ext.react = [ 12 | * // the name of the generated asset file containing your JS bundle 13 | * bundleAssetName: "index.android.bundle", 14 | * 15 | * // the entry file for bundle generation 16 | * entryFile: "index.android.js", 17 | * 18 | * // whether to bundle JS and assets in debug mode 19 | * bundleInDebug: false, 20 | * 21 | * // whether to bundle JS and assets in release mode 22 | * bundleInRelease: true, 23 | * 24 | * // the root of your project, i.e. where "package.json" lives 25 | * root: "../../", 26 | * 27 | * // where to put the JS bundle asset in debug mode 28 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 29 | * 30 | * // where to put the JS bundle asset in release mode 31 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 32 | * 33 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 34 | * // require('./image.png')), in debug mode 35 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 36 | * 37 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 38 | * // require('./image.png')), in release mode 39 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 40 | * 41 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 42 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 43 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 44 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 45 | * // for example, you might want to remove it from here. 46 | * inputExcludes: ["android/**", "ios/**"] 47 | * ] 48 | */ 49 | 50 | apply from: "react.gradle" 51 | 52 | android { 53 | compileSdkVersion 23 54 | buildToolsVersion "23.0.1" 55 | 56 | defaultConfig { 57 | applicationId "com.example" 58 | minSdkVersion 16 59 | targetSdkVersion 22 60 | versionCode 1 61 | versionName "1.0" 62 | ndk { 63 | abiFilters "armeabi-v7a", "x86" 64 | } 65 | } 66 | buildTypes { 67 | release { 68 | minifyEnabled false // Set this to true to enable Proguard 69 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 70 | } 71 | } 72 | } 73 | 74 | dependencies { 75 | compile fileTree(dir: "libs", include: ["*.jar"]) 76 | compile "com.android.support:appcompat-v7:23.0.1" 77 | compile "com.facebook.react:react-native:0.17.+" 78 | } 79 | -------------------------------------------------------------------------------- /Example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | 30 | # Do not strip any method/class that is annotated with @DoNotStrip 31 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 32 | -keepclassmembers class * { 33 | @com.facebook.proguard.annotations.DoNotStrip *; 34 | } 35 | 36 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 37 | void set*(***); 38 | *** get*(); 39 | } 40 | 41 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 42 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 43 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 44 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; } 45 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; } 46 | 47 | # okhttp 48 | 49 | -keepattributes Signature 50 | -keepattributes *Annotation* 51 | -keep class com.squareup.okhttp.** { *; } 52 | -keep interface com.squareup.okhttp.** { *; } 53 | -dontwarn com.squareup.okhttp.** 54 | 55 | # okio 56 | 57 | -keep class sun.misc.Unsafe { *; } 58 | -dontwarn java.nio.file.* 59 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 60 | -dontwarn okio.** 61 | -------------------------------------------------------------------------------- /Example/android/app/react.gradle: -------------------------------------------------------------------------------- 1 | import org.apache.tools.ant.taskdefs.condition.Os 2 | 3 | def config = project.hasProperty("react") ? project.react : []; 4 | 5 | def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" 6 | def entryFile = config.entryFile ?: "index.android.js" 7 | 8 | // because elvis operator 9 | def elvisFile(thing) { 10 | return thing ? file(thing) : null; 11 | } 12 | 13 | def reactRoot = elvisFile(config.root) ?: file("../../") 14 | def jsBundleDirDebug = elvisFile(config.jsBundleDirDebug) ?: 15 | file("$buildDir/intermediates/assets/debug") 16 | def jsBundleDirRelease = elvisFile(config.jsBundleDirRelease) ?: 17 | file("$buildDir/intermediates/assets/release") 18 | def resourcesDirDebug = elvisFile(config.resourcesDirDebug) ?: 19 | file("$buildDir/intermediates/res/merged/debug") 20 | def resourcesDirRelease = elvisFile(config.resourcesDirRelease) ?: 21 | file("$buildDir/intermediates/res/merged/release") 22 | def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] 23 | 24 | def jsBundleFileDebug = file("$jsBundleDirDebug/$bundleAssetName") 25 | def jsBundleFileRelease = file("$jsBundleDirRelease/$bundleAssetName") 26 | 27 | task bundleDebugJsAndAssets(type: Exec) { 28 | // create dirs if they are not there (e.g. the "clean" task just ran) 29 | doFirst { 30 | jsBundleDirDebug.mkdirs() 31 | resourcesDirDebug.mkdirs() 32 | } 33 | 34 | // set up inputs and outputs so gradle can cache the result 35 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 36 | outputs.dir jsBundleDirDebug 37 | outputs.dir resourcesDirDebug 38 | 39 | // set up the call to the react-native cli 40 | workingDir reactRoot 41 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 42 | commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 43 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 44 | } else { 45 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 46 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 47 | } 48 | 49 | enabled config.bundleInDebug ?: false 50 | } 51 | 52 | task bundleReleaseJsAndAssets(type: Exec) { 53 | // create dirs if they are not there (e.g. the "clean" task just ran) 54 | doFirst { 55 | jsBundleDirRelease.mkdirs() 56 | resourcesDirRelease.mkdirs() 57 | } 58 | 59 | // set up inputs and outputs so gradle can cache the result 60 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 61 | outputs.dir jsBundleDirRelease 62 | outputs.dir resourcesDirRelease 63 | 64 | // set up the call to the react-native cli 65 | workingDir reactRoot 66 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 67 | commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 68 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 69 | } else { 70 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 71 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 72 | } 73 | 74 | enabled config.bundleInRelease ?: true 75 | } 76 | 77 | gradle.projectsEvaluated { 78 | // hook bundleDebugJsAndAssets into the android build process 79 | bundleDebugJsAndAssets.dependsOn mergeDebugResources 80 | bundleDebugJsAndAssets.dependsOn mergeDebugAssets 81 | processDebugResources.dependsOn bundleDebugJsAndAssets 82 | 83 | // hook bundleReleaseJsAndAssets into the android build process 84 | bundleReleaseJsAndAssets.dependsOn mergeReleaseResources 85 | bundleReleaseJsAndAssets.dependsOn mergeReleaseAssets 86 | processReleaseResources.dependsOn bundleReleaseJsAndAssets 87 | } 88 | -------------------------------------------------------------------------------- /Example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Example/android/app/src/main/java/com/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.KeyEvent; 6 | 7 | import com.facebook.react.LifecycleState; 8 | import com.facebook.react.ReactInstanceManager; 9 | import com.facebook.react.ReactRootView; 10 | import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; 11 | import com.facebook.react.shell.MainReactPackage; 12 | import com.facebook.soloader.SoLoader; 13 | 14 | public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { 15 | 16 | private ReactInstanceManager mReactInstanceManager; 17 | private ReactRootView mReactRootView; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | mReactRootView = new ReactRootView(this); 23 | 24 | mReactInstanceManager = ReactInstanceManager.builder() 25 | .setApplication(getApplication()) 26 | .setBundleAssetName("index.android.bundle") 27 | .setJSMainModuleName("index.android") 28 | .addPackage(new MainReactPackage()) 29 | .setUseDeveloperSupport(BuildConfig.DEBUG) 30 | .setInitialLifecycleState(LifecycleState.RESUMED) 31 | .build(); 32 | 33 | mReactRootView.startReactApplication(mReactInstanceManager, "Example", null); 34 | 35 | setContentView(mReactRootView); 36 | } 37 | 38 | @Override 39 | public boolean onKeyUp(int keyCode, KeyEvent event) { 40 | if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) { 41 | mReactInstanceManager.showDevOptionsDialog(); 42 | return true; 43 | } 44 | return super.onKeyUp(keyCode, event); 45 | } 46 | 47 | @Override 48 | public void onBackPressed() { 49 | if (mReactInstanceManager != null) { 50 | mReactInstanceManager.onBackPressed(); 51 | } else { 52 | super.onBackPressed(); 53 | } 54 | } 55 | 56 | @Override 57 | public void invokeDefaultOnBackPressed() { 58 | super.onBackPressed(); 59 | } 60 | 61 | @Override 62 | protected void onPause() { 63 | super.onPause(); 64 | 65 | if (mReactInstanceManager != null) { 66 | mReactInstanceManager.onPause(); 67 | } 68 | } 69 | 70 | @Override 71 | protected void onResume() { 72 | super.onResume(); 73 | 74 | if (mReactInstanceManager != null) { 75 | mReactInstanceManager.onResume(this, this); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chirag04/react-native-tooltip/8f9385b8740b4cf0cc73fefc7307bc055cd5e438/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chirag04/react-native-tooltip/8f9385b8740b4cf0cc73fefc7307bc055cd5e438/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chirag04/react-native-tooltip/8f9385b8740b4cf0cc73fefc7307bc055cd5e438/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chirag04/react-native-tooltip/8f9385b8740b4cf0cc73fefc7307bc055cd5e438/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Example 3 | 4 | -------------------------------------------------------------------------------- /Example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /Example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chirag04/react-native-tooltip/8f9385b8740b4cf0cc73fefc7307bc055cd5e438/Example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /Example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /Example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /Example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'Example' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /Example/index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | */ 5 | 'use strict'; 6 | 7 | var React = require('react-native'); 8 | var { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View, 13 | } = React; 14 | 15 | var Example = React.createClass({ 16 | render: function() { 17 | return ( 18 | 19 | 20 | Welcome to React Native! 21 | 22 | 23 | To get started, edit index.android.js 24 | 25 | 26 | Shake or press menu button for dev menu 27 | 28 | 29 | ); 30 | } 31 | }); 32 | 33 | var styles = StyleSheet.create({ 34 | container: { 35 | flex: 1, 36 | justifyContent: 'center', 37 | alignItems: 'center', 38 | backgroundColor: '#F5FCFF', 39 | }, 40 | welcome: { 41 | fontSize: 20, 42 | textAlign: 'center', 43 | margin: 10, 44 | }, 45 | instructions: { 46 | textAlign: 'center', 47 | color: '#333333', 48 | marginBottom: 5, 49 | }, 50 | }); 51 | 52 | AppRegistry.registerComponent('Example', () => Example); 53 | -------------------------------------------------------------------------------- /Example/index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | */ 5 | 'use strict'; 6 | 7 | import React from 'react-native'; 8 | import ToolTip from 'react-native-tooltip'; 9 | 10 | const { 11 | AppRegistry, 12 | StyleSheet, 13 | Text, 14 | View, 15 | AlertIOS, 16 | } = React; 17 | 18 | const styles = StyleSheet.create({ 19 | container: { 20 | flex: 1, 21 | justifyContent: 'center', 22 | alignItems: 'center', 23 | backgroundColor: '#F5FCFF', 24 | }, 25 | welcome: { 26 | fontSize: 20, 27 | textAlign: 'center', 28 | margin: 10, 29 | }, 30 | instructions: { 31 | textAlign: 'center', 32 | color: '#333333', 33 | marginBottom: 5, 34 | }, 35 | }); 36 | 37 | class Example extends React.Component { 38 | handleCopyPress() { 39 | AlertIOS.alert(`Copy has been pressed!`); 40 | } 41 | 42 | handleOtherPress() { 43 | AlertIOS.alert(`Other has been pressed!`); 44 | } 45 | 46 | render() { 47 | return ( 48 | 49 | 57 | 58 | Press Here. 59 | 60 | 61 | 62 | ); 63 | } 64 | } 65 | 66 | AppRegistry.registerComponent('Example', () => Example); 67 | -------------------------------------------------------------------------------- /Example/ios/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 00E356F31AD99517003FC87E /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 25 | B6BFCA171C2C66EC00A8AD6A /* RCTToolTipText.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BFCA121C2C66EC00A8AD6A /* RCTToolTipText.m */; }; 26 | B6BFCA181C2C66EC00A8AD6A /* RCTToolTipTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BFCA141C2C66EC00A8AD6A /* RCTToolTipTextManager.m */; }; 27 | B6BFCA191C2C66EC00A8AD6A /* ToolTipMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BFCA161C2C66EC00A8AD6A /* ToolTipMenu.m */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 34 | proxyType = 2; 35 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 36 | remoteInfo = RCTActionSheet; 37 | }; 38 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 41 | proxyType = 2; 42 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 43 | remoteInfo = RCTGeolocation; 44 | }; 45 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 48 | proxyType = 2; 49 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 50 | remoteInfo = RCTImage; 51 | }; 52 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 53 | isa = PBXContainerItemProxy; 54 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 55 | proxyType = 2; 56 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 57 | remoteInfo = RCTNetwork; 58 | }; 59 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 60 | isa = PBXContainerItemProxy; 61 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 62 | proxyType = 2; 63 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 64 | remoteInfo = RCTVibration; 65 | }; 66 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 67 | isa = PBXContainerItemProxy; 68 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 69 | proxyType = 1; 70 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 71 | remoteInfo = Example; 72 | }; 73 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 74 | isa = PBXContainerItemProxy; 75 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 76 | proxyType = 2; 77 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 78 | remoteInfo = RCTSettings; 79 | }; 80 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 81 | isa = PBXContainerItemProxy; 82 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 83 | proxyType = 2; 84 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 85 | remoteInfo = RCTWebSocket; 86 | }; 87 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 88 | isa = PBXContainerItemProxy; 89 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 90 | proxyType = 2; 91 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 92 | remoteInfo = React; 93 | }; 94 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 95 | isa = PBXContainerItemProxy; 96 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 97 | proxyType = 2; 98 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 99 | remoteInfo = RCTLinking; 100 | }; 101 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 102 | isa = PBXContainerItemProxy; 103 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 104 | proxyType = 2; 105 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 106 | remoteInfo = RCTText; 107 | }; 108 | /* End PBXContainerItemProxy section */ 109 | 110 | /* Begin PBXFileReference section */ 111 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 112 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 113 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 114 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 115 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 116 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 117 | 00E356EE1AD99517003FC87E /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 118 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 119 | 00E356F21AD99517003FC87E /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = ""; }; 120 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 121 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 122 | 13B07F961A680F5B00A75B9A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 123 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = ""; }; 124 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Example/AppDelegate.m; sourceTree = ""; }; 125 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 126 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = ""; }; 127 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = ""; }; 128 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = ""; }; 129 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 130 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 131 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 132 | B6BFCA111C2C66EC00A8AD6A /* RCTToolTipText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTToolTipText.h; sourceTree = ""; }; 133 | B6BFCA121C2C66EC00A8AD6A /* RCTToolTipText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTToolTipText.m; sourceTree = ""; }; 134 | B6BFCA131C2C66EC00A8AD6A /* RCTToolTipTextManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTToolTipTextManager.h; sourceTree = ""; }; 135 | B6BFCA141C2C66EC00A8AD6A /* RCTToolTipTextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTToolTipTextManager.m; sourceTree = ""; }; 136 | B6BFCA151C2C66EC00A8AD6A /* ToolTipMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToolTipMenu.h; sourceTree = ""; }; 137 | B6BFCA161C2C66EC00A8AD6A /* ToolTipMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ToolTipMenu.m; sourceTree = ""; }; 138 | /* End PBXFileReference section */ 139 | 140 | /* Begin PBXFrameworksBuildPhase section */ 141 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 142 | isa = PBXFrameworksBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 149 | isa = PBXFrameworksBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 153 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 154 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 155 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 156 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 157 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 158 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 159 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 160 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 161 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | /* End PBXFrameworksBuildPhase section */ 166 | 167 | /* Begin PBXGroup section */ 168 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 172 | ); 173 | name = Products; 174 | sourceTree = ""; 175 | }; 176 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 180 | ); 181 | name = Products; 182 | sourceTree = ""; 183 | }; 184 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 188 | ); 189 | name = Products; 190 | sourceTree = ""; 191 | }; 192 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 196 | ); 197 | name = Products; 198 | sourceTree = ""; 199 | }; 200 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 204 | ); 205 | name = Products; 206 | sourceTree = ""; 207 | }; 208 | 00E356EF1AD99517003FC87E /* ExampleTests */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | 00E356F21AD99517003FC87E /* ExampleTests.m */, 212 | 00E356F01AD99517003FC87E /* Supporting Files */, 213 | ); 214 | path = ExampleTests; 215 | sourceTree = ""; 216 | }; 217 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | 00E356F11AD99517003FC87E /* Info.plist */, 221 | ); 222 | name = "Supporting Files"; 223 | sourceTree = ""; 224 | }; 225 | 139105B71AF99BAD00B5F7CC /* Products */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 229 | ); 230 | name = Products; 231 | sourceTree = ""; 232 | }; 233 | 139FDEE71B06529A00C62182 /* Products */ = { 234 | isa = PBXGroup; 235 | children = ( 236 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 237 | ); 238 | name = Products; 239 | sourceTree = ""; 240 | }; 241 | 13B07FAE1A68108700A75B9A /* Example */ = { 242 | isa = PBXGroup; 243 | children = ( 244 | B6BFCA101C2C66EC00A8AD6A /* ToolTipMenu */, 245 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 246 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 247 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 248 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 249 | 13B07FB61A68108700A75B9A /* Info.plist */, 250 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 251 | 13B07FB71A68108700A75B9A /* main.m */, 252 | ); 253 | name = Example; 254 | sourceTree = ""; 255 | }; 256 | 146834001AC3E56700842450 /* Products */ = { 257 | isa = PBXGroup; 258 | children = ( 259 | 146834041AC3E56700842450 /* libReact.a */, 260 | ); 261 | name = Products; 262 | sourceTree = ""; 263 | }; 264 | 78C398B11ACF4ADC00677621 /* Products */ = { 265 | isa = PBXGroup; 266 | children = ( 267 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 268 | ); 269 | name = Products; 270 | sourceTree = ""; 271 | }; 272 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 273 | isa = PBXGroup; 274 | children = ( 275 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 276 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 277 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 278 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 279 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 280 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 281 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 282 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 283 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 284 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 285 | ); 286 | name = Libraries; 287 | sourceTree = ""; 288 | }; 289 | 832341B11AAA6A8300B99B32 /* Products */ = { 290 | isa = PBXGroup; 291 | children = ( 292 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 293 | ); 294 | name = Products; 295 | sourceTree = ""; 296 | }; 297 | 83CBB9F61A601CBA00E9B192 = { 298 | isa = PBXGroup; 299 | children = ( 300 | 13B07FAE1A68108700A75B9A /* Example */, 301 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 302 | 00E356EF1AD99517003FC87E /* ExampleTests */, 303 | 83CBBA001A601CBA00E9B192 /* Products */, 304 | ); 305 | indentWidth = 2; 306 | sourceTree = ""; 307 | tabWidth = 2; 308 | }; 309 | 83CBBA001A601CBA00E9B192 /* Products */ = { 310 | isa = PBXGroup; 311 | children = ( 312 | 13B07F961A680F5B00A75B9A /* Example.app */, 313 | 00E356EE1AD99517003FC87E /* ExampleTests.xctest */, 314 | ); 315 | name = Products; 316 | sourceTree = ""; 317 | }; 318 | B6BFCA101C2C66EC00A8AD6A /* ToolTipMenu */ = { 319 | isa = PBXGroup; 320 | children = ( 321 | B6BFCA111C2C66EC00A8AD6A /* RCTToolTipText.h */, 322 | B6BFCA121C2C66EC00A8AD6A /* RCTToolTipText.m */, 323 | B6BFCA131C2C66EC00A8AD6A /* RCTToolTipTextManager.h */, 324 | B6BFCA141C2C66EC00A8AD6A /* RCTToolTipTextManager.m */, 325 | B6BFCA151C2C66EC00A8AD6A /* ToolTipMenu.h */, 326 | B6BFCA161C2C66EC00A8AD6A /* ToolTipMenu.m */, 327 | ); 328 | name = ToolTipMenu; 329 | path = "../node_modules/react-native-tooltip/ToolTipMenu"; 330 | sourceTree = ""; 331 | }; 332 | /* End PBXGroup section */ 333 | 334 | /* Begin PBXNativeTarget section */ 335 | 00E356ED1AD99517003FC87E /* ExampleTests */ = { 336 | isa = PBXNativeTarget; 337 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */; 338 | buildPhases = ( 339 | 00E356EA1AD99517003FC87E /* Sources */, 340 | 00E356EB1AD99517003FC87E /* Frameworks */, 341 | 00E356EC1AD99517003FC87E /* Resources */, 342 | ); 343 | buildRules = ( 344 | ); 345 | dependencies = ( 346 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 347 | ); 348 | name = ExampleTests; 349 | productName = ExampleTests; 350 | productReference = 00E356EE1AD99517003FC87E /* ExampleTests.xctest */; 351 | productType = "com.apple.product-type.bundle.unit-test"; 352 | }; 353 | 13B07F861A680F5B00A75B9A /* Example */ = { 354 | isa = PBXNativeTarget; 355 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */; 356 | buildPhases = ( 357 | 13B07F871A680F5B00A75B9A /* Sources */, 358 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 359 | 13B07F8E1A680F5B00A75B9A /* Resources */, 360 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 361 | ); 362 | buildRules = ( 363 | ); 364 | dependencies = ( 365 | ); 366 | name = Example; 367 | productName = "Hello World"; 368 | productReference = 13B07F961A680F5B00A75B9A /* Example.app */; 369 | productType = "com.apple.product-type.application"; 370 | }; 371 | /* End PBXNativeTarget section */ 372 | 373 | /* Begin PBXProject section */ 374 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 375 | isa = PBXProject; 376 | attributes = { 377 | LastUpgradeCheck = 0610; 378 | ORGANIZATIONNAME = Facebook; 379 | TargetAttributes = { 380 | 00E356ED1AD99517003FC87E = { 381 | CreatedOnToolsVersion = 6.2; 382 | TestTargetID = 13B07F861A680F5B00A75B9A; 383 | }; 384 | }; 385 | }; 386 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */; 387 | compatibilityVersion = "Xcode 3.2"; 388 | developmentRegion = English; 389 | hasScannedForEncodings = 0; 390 | knownRegions = ( 391 | en, 392 | Base, 393 | ); 394 | mainGroup = 83CBB9F61A601CBA00E9B192; 395 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 396 | projectDirPath = ""; 397 | projectReferences = ( 398 | { 399 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 400 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 401 | }, 402 | { 403 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 404 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 405 | }, 406 | { 407 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 408 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 409 | }, 410 | { 411 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 412 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 413 | }, 414 | { 415 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 416 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 417 | }, 418 | { 419 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 420 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 421 | }, 422 | { 423 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 424 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 425 | }, 426 | { 427 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 428 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 429 | }, 430 | { 431 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 432 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 433 | }, 434 | { 435 | ProductGroup = 146834001AC3E56700842450 /* Products */; 436 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 437 | }, 438 | ); 439 | projectRoot = ""; 440 | targets = ( 441 | 13B07F861A680F5B00A75B9A /* Example */, 442 | 00E356ED1AD99517003FC87E /* ExampleTests */, 443 | ); 444 | }; 445 | /* End PBXProject section */ 446 | 447 | /* Begin PBXReferenceProxy section */ 448 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 449 | isa = PBXReferenceProxy; 450 | fileType = archive.ar; 451 | path = libRCTActionSheet.a; 452 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 453 | sourceTree = BUILT_PRODUCTS_DIR; 454 | }; 455 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 456 | isa = PBXReferenceProxy; 457 | fileType = archive.ar; 458 | path = libRCTGeolocation.a; 459 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 460 | sourceTree = BUILT_PRODUCTS_DIR; 461 | }; 462 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 463 | isa = PBXReferenceProxy; 464 | fileType = archive.ar; 465 | path = libRCTImage.a; 466 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 467 | sourceTree = BUILT_PRODUCTS_DIR; 468 | }; 469 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 470 | isa = PBXReferenceProxy; 471 | fileType = archive.ar; 472 | path = libRCTNetwork.a; 473 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 474 | sourceTree = BUILT_PRODUCTS_DIR; 475 | }; 476 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 477 | isa = PBXReferenceProxy; 478 | fileType = archive.ar; 479 | path = libRCTVibration.a; 480 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 481 | sourceTree = BUILT_PRODUCTS_DIR; 482 | }; 483 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 484 | isa = PBXReferenceProxy; 485 | fileType = archive.ar; 486 | path = libRCTSettings.a; 487 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 488 | sourceTree = BUILT_PRODUCTS_DIR; 489 | }; 490 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 491 | isa = PBXReferenceProxy; 492 | fileType = archive.ar; 493 | path = libRCTWebSocket.a; 494 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 495 | sourceTree = BUILT_PRODUCTS_DIR; 496 | }; 497 | 146834041AC3E56700842450 /* libReact.a */ = { 498 | isa = PBXReferenceProxy; 499 | fileType = archive.ar; 500 | path = libReact.a; 501 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 502 | sourceTree = BUILT_PRODUCTS_DIR; 503 | }; 504 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 505 | isa = PBXReferenceProxy; 506 | fileType = archive.ar; 507 | path = libRCTLinking.a; 508 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 509 | sourceTree = BUILT_PRODUCTS_DIR; 510 | }; 511 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 512 | isa = PBXReferenceProxy; 513 | fileType = archive.ar; 514 | path = libRCTText.a; 515 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 516 | sourceTree = BUILT_PRODUCTS_DIR; 517 | }; 518 | /* End PBXReferenceProxy section */ 519 | 520 | /* Begin PBXResourcesBuildPhase section */ 521 | 00E356EC1AD99517003FC87E /* Resources */ = { 522 | isa = PBXResourcesBuildPhase; 523 | buildActionMask = 2147483647; 524 | files = ( 525 | ); 526 | runOnlyForDeploymentPostprocessing = 0; 527 | }; 528 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 529 | isa = PBXResourcesBuildPhase; 530 | buildActionMask = 2147483647; 531 | files = ( 532 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 533 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 534 | ); 535 | runOnlyForDeploymentPostprocessing = 0; 536 | }; 537 | /* End PBXResourcesBuildPhase section */ 538 | 539 | /* Begin PBXShellScriptBuildPhase section */ 540 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 541 | isa = PBXShellScriptBuildPhase; 542 | buildActionMask = 2147483647; 543 | files = ( 544 | ); 545 | inputPaths = ( 546 | ); 547 | name = "Bundle React Native code and images"; 548 | outputPaths = ( 549 | ); 550 | runOnlyForDeploymentPostprocessing = 0; 551 | shellPath = /bin/sh; 552 | shellScript = "../node_modules/react-native/packager/react-native-xcode.sh"; 553 | }; 554 | /* End PBXShellScriptBuildPhase section */ 555 | 556 | /* Begin PBXSourcesBuildPhase section */ 557 | 00E356EA1AD99517003FC87E /* Sources */ = { 558 | isa = PBXSourcesBuildPhase; 559 | buildActionMask = 2147483647; 560 | files = ( 561 | 00E356F31AD99517003FC87E /* ExampleTests.m in Sources */, 562 | ); 563 | runOnlyForDeploymentPostprocessing = 0; 564 | }; 565 | 13B07F871A680F5B00A75B9A /* Sources */ = { 566 | isa = PBXSourcesBuildPhase; 567 | buildActionMask = 2147483647; 568 | files = ( 569 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 570 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 571 | B6BFCA181C2C66EC00A8AD6A /* RCTToolTipTextManager.m in Sources */, 572 | B6BFCA191C2C66EC00A8AD6A /* ToolTipMenu.m in Sources */, 573 | B6BFCA171C2C66EC00A8AD6A /* RCTToolTipText.m in Sources */, 574 | ); 575 | runOnlyForDeploymentPostprocessing = 0; 576 | }; 577 | /* End PBXSourcesBuildPhase section */ 578 | 579 | /* Begin PBXTargetDependency section */ 580 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 581 | isa = PBXTargetDependency; 582 | target = 13B07F861A680F5B00A75B9A /* Example */; 583 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 584 | }; 585 | /* End PBXTargetDependency section */ 586 | 587 | /* Begin PBXVariantGroup section */ 588 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 589 | isa = PBXVariantGroup; 590 | children = ( 591 | 13B07FB21A68108700A75B9A /* Base */, 592 | ); 593 | name = LaunchScreen.xib; 594 | path = Example; 595 | sourceTree = ""; 596 | }; 597 | /* End PBXVariantGroup section */ 598 | 599 | /* Begin XCBuildConfiguration section */ 600 | 00E356F61AD99517003FC87E /* Debug */ = { 601 | isa = XCBuildConfiguration; 602 | buildSettings = { 603 | BUNDLE_LOADER = "$(TEST_HOST)"; 604 | FRAMEWORK_SEARCH_PATHS = ( 605 | "$(SDKROOT)/Developer/Library/Frameworks", 606 | "$(inherited)", 607 | ); 608 | GCC_PREPROCESSOR_DEFINITIONS = ( 609 | "DEBUG=1", 610 | "$(inherited)", 611 | ); 612 | INFOPLIST_FILE = ExampleTests/Info.plist; 613 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 614 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 615 | PRODUCT_NAME = "$(TARGET_NAME)"; 616 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 617 | }; 618 | name = Debug; 619 | }; 620 | 00E356F71AD99517003FC87E /* Release */ = { 621 | isa = XCBuildConfiguration; 622 | buildSettings = { 623 | BUNDLE_LOADER = "$(TEST_HOST)"; 624 | COPY_PHASE_STRIP = NO; 625 | FRAMEWORK_SEARCH_PATHS = ( 626 | "$(SDKROOT)/Developer/Library/Frameworks", 627 | "$(inherited)", 628 | ); 629 | INFOPLIST_FILE = ExampleTests/Info.plist; 630 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 631 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 632 | PRODUCT_NAME = "$(TARGET_NAME)"; 633 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 634 | }; 635 | name = Release; 636 | }; 637 | 13B07F941A680F5B00A75B9A /* Debug */ = { 638 | isa = XCBuildConfiguration; 639 | buildSettings = { 640 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 641 | DEAD_CODE_STRIPPING = NO; 642 | HEADER_SEARCH_PATHS = ( 643 | "$(inherited)", 644 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 645 | "$(SRCROOT)/../node_modules/react-native/React/**", 646 | ); 647 | INFOPLIST_FILE = Example/Info.plist; 648 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 649 | OTHER_LDFLAGS = "-ObjC"; 650 | PRODUCT_NAME = Example; 651 | }; 652 | name = Debug; 653 | }; 654 | 13B07F951A680F5B00A75B9A /* Release */ = { 655 | isa = XCBuildConfiguration; 656 | buildSettings = { 657 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 658 | HEADER_SEARCH_PATHS = ( 659 | "$(inherited)", 660 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 661 | "$(SRCROOT)/../node_modules/react-native/React/**", 662 | ); 663 | INFOPLIST_FILE = Example/Info.plist; 664 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 665 | OTHER_LDFLAGS = "-ObjC"; 666 | PRODUCT_NAME = Example; 667 | }; 668 | name = Release; 669 | }; 670 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 671 | isa = XCBuildConfiguration; 672 | buildSettings = { 673 | ALWAYS_SEARCH_USER_PATHS = NO; 674 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 675 | CLANG_CXX_LIBRARY = "libc++"; 676 | CLANG_ENABLE_MODULES = YES; 677 | CLANG_ENABLE_OBJC_ARC = YES; 678 | CLANG_WARN_BOOL_CONVERSION = YES; 679 | CLANG_WARN_CONSTANT_CONVERSION = YES; 680 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 681 | CLANG_WARN_EMPTY_BODY = YES; 682 | CLANG_WARN_ENUM_CONVERSION = YES; 683 | CLANG_WARN_INT_CONVERSION = YES; 684 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 685 | CLANG_WARN_UNREACHABLE_CODE = YES; 686 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 687 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 688 | COPY_PHASE_STRIP = NO; 689 | ENABLE_STRICT_OBJC_MSGSEND = YES; 690 | GCC_C_LANGUAGE_STANDARD = gnu99; 691 | GCC_DYNAMIC_NO_PIC = NO; 692 | GCC_OPTIMIZATION_LEVEL = 0; 693 | GCC_PREPROCESSOR_DEFINITIONS = ( 694 | "DEBUG=1", 695 | "$(inherited)", 696 | ); 697 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 698 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 699 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 700 | GCC_WARN_UNDECLARED_SELECTOR = YES; 701 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 702 | GCC_WARN_UNUSED_FUNCTION = YES; 703 | GCC_WARN_UNUSED_VARIABLE = YES; 704 | HEADER_SEARCH_PATHS = ( 705 | "$(inherited)", 706 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 707 | "$(SRCROOT)/../node_modules/react-native/React/**", 708 | ); 709 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 710 | MTL_ENABLE_DEBUG_INFO = YES; 711 | ONLY_ACTIVE_ARCH = YES; 712 | SDKROOT = iphoneos; 713 | }; 714 | name = Debug; 715 | }; 716 | 83CBBA211A601CBA00E9B192 /* Release */ = { 717 | isa = XCBuildConfiguration; 718 | buildSettings = { 719 | ALWAYS_SEARCH_USER_PATHS = NO; 720 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 721 | CLANG_CXX_LIBRARY = "libc++"; 722 | CLANG_ENABLE_MODULES = YES; 723 | CLANG_ENABLE_OBJC_ARC = YES; 724 | CLANG_WARN_BOOL_CONVERSION = YES; 725 | CLANG_WARN_CONSTANT_CONVERSION = YES; 726 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 727 | CLANG_WARN_EMPTY_BODY = YES; 728 | CLANG_WARN_ENUM_CONVERSION = YES; 729 | CLANG_WARN_INT_CONVERSION = YES; 730 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 731 | CLANG_WARN_UNREACHABLE_CODE = YES; 732 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 733 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 734 | COPY_PHASE_STRIP = YES; 735 | ENABLE_NS_ASSERTIONS = NO; 736 | ENABLE_STRICT_OBJC_MSGSEND = YES; 737 | GCC_C_LANGUAGE_STANDARD = gnu99; 738 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 739 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 740 | GCC_WARN_UNDECLARED_SELECTOR = YES; 741 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 742 | GCC_WARN_UNUSED_FUNCTION = YES; 743 | GCC_WARN_UNUSED_VARIABLE = YES; 744 | HEADER_SEARCH_PATHS = ( 745 | "$(inherited)", 746 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 747 | "$(SRCROOT)/../node_modules/react-native/React/**", 748 | ); 749 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 750 | MTL_ENABLE_DEBUG_INFO = NO; 751 | SDKROOT = iphoneos; 752 | VALIDATE_PRODUCT = YES; 753 | }; 754 | name = Release; 755 | }; 756 | /* End XCBuildConfiguration section */ 757 | 758 | /* Begin XCConfigurationList section */ 759 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { 760 | isa = XCConfigurationList; 761 | buildConfigurations = ( 762 | 00E356F61AD99517003FC87E /* Debug */, 763 | 00E356F71AD99517003FC87E /* Release */, 764 | ); 765 | defaultConfigurationIsVisible = 0; 766 | defaultConfigurationName = Release; 767 | }; 768 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */ = { 769 | isa = XCConfigurationList; 770 | buildConfigurations = ( 771 | 13B07F941A680F5B00A75B9A /* Debug */, 772 | 13B07F951A680F5B00A75B9A /* Release */, 773 | ); 774 | defaultConfigurationIsVisible = 0; 775 | defaultConfigurationName = Release; 776 | }; 777 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */ = { 778 | isa = XCConfigurationList; 779 | buildConfigurations = ( 780 | 83CBBA201A601CBA00E9B192 /* Debug */, 781 | 83CBBA211A601CBA00E9B192 /* Release */, 782 | ); 783 | defaultConfigurationIsVisible = 0; 784 | defaultConfigurationName = Release; 785 | }; 786 | /* End XCConfigurationList section */ 787 | }; 788 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 789 | } 790 | -------------------------------------------------------------------------------- /Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /Example/ios/Example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/ios/Example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTRootView.h" 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | NSURL *jsCodeLocation; 19 | 20 | /** 21 | * Loading JavaScript code - uncomment the one you want. 22 | * 23 | * OPTION 1 24 | * Load from development server. Start the server from the repository root: 25 | * 26 | * $ npm start 27 | * 28 | * To run on device, change `localhost` to the IP address of your computer 29 | * (you can get this by typing `ifconfig` into the terminal and selecting the 30 | * `inet` value under `en0:`) and make sure your computer and iOS device are 31 | * on the same Wi-Fi network. 32 | */ 33 | 34 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; 35 | 36 | /** 37 | * OPTION 2 38 | * Load from pre-bundled file on disk. The static bundle is automatically 39 | * generated by "Bundle React Native code and images" build step. 40 | */ 41 | 42 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 43 | 44 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 45 | moduleName:@"Example" 46 | initialProperties:nil 47 | launchOptions:launchOptions]; 48 | 49 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 50 | UIViewController *rootViewController = [UIViewController new]; 51 | rootViewController.view = rootView; 52 | self.window.rootViewController = rootViewController; 53 | [self.window makeKeyAndVisible]; 54 | return YES; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Example/ios/Example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Example/ios/Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSAllowsArbitraryLoads 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Example/ios/Example/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/ios/ExampleTests/ExampleTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 240 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface ExampleTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation ExampleTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Example/ios/ExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Example", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "react-native start" 7 | }, 8 | "dependencies": { 9 | "react-native": "^0.17.0", 10 | "react-native-tooltip": "file:../" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2016 Chirag Jain 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-tooltip 2 | 3 | A react-native component from displaying tooltip. Uses UIMenuController. 4 | 5 | ### Add it to your project 6 | 7 | 1. Run `npm install react-native-tooltip --save` 8 | 2. Open your project in XCode, right click on `Libraries` and click `Add 9 | Files to "Your Project Name"` [(Screenshot)](http://url.brentvatne.ca/jQp8) then [(Screenshot)](http://url.brentvatne.ca/1gqUD). 10 | 3. Add `libRNToolTipMenu.a` to `Build Phases -> Link Binary With Libraries` 11 | [(Screenshot)](http://url.brentvatne.ca/17Xfe). 12 | 4. Whenever you want to use it within React code: `var ToolTip = require('react-native-tooltip');` 13 | 14 | ## Usage 15 | 16 | ### Props 17 | 18 | - `actions`: Array of actions `[{text: 'Copy', onPress: () => Clipboard.set(this.someValue) }]` 19 | - `longPress`: Boolean indicating if the tooltip should be showing on longPress, false by default. 20 | - `arrowDirection`: String indicating the direction of the tooltip arrow. Possible values are: `up`, `down`, `left`, `right`, and `default`. Default is `default`, which means to point up or down at the object of focus based on its location on the screen. 21 | 22 | #### Props from TouchableHighlight.propTypes 23 | 24 | - `activeOpacity` 25 | - `onHideUnderlay` 26 | - `onShowUnderlay` 27 | - `style` 28 | - `underlayColor` 29 | 30 | You can see the list on the react native [website](https://facebook.github.io/react-native/docs/touchablehighlight.html#content) 31 | 32 | ### Example 33 | 34 | ```javascript 35 | import React from 'react'; 36 | import { 37 | AppRegistry, 38 | StyleSheet, 39 | PixelRatio, 40 | View, 41 | Text, 42 | } from 'react-native'; 43 | 44 | import ToolTip from 'react-native-tooltip'; 45 | 46 | export default class MyToolTip extends React.Component { 47 | state = { 48 | input: 'chirag' 49 | }; 50 | 51 | handleCopyPress = () => { 52 | AlertIOS.alert(`Copy has been pressed!`); 53 | }; 54 | 55 | handleOtherPress = () => { 56 | AlertIOS.alert(`Other has been pressed!`); 57 | }; 58 | 59 | handleHide = () => { 60 | console.log('Tooltip did hide'); 61 | }; 62 | 63 | handleShow = () => { 64 | console.log('tooltip did show'); 65 | }; 66 | 67 | render() { 68 | return ( 69 | 70 | 81 | 82 | Press Here. 83 | 84 | 85 | 86 | ); 87 | } 88 | } 89 | 90 | const styles = StyleSheet.create({ 91 | container: { 92 | flex: 1, 93 | justifyContent: 'center', 94 | alignItems: 'center', 95 | backgroundColor: '#F5FCFF', 96 | }, 97 | textinputContainer: { 98 | marginTop: 20, 99 | justifyContent: 'center', 100 | alignItems: 'center', 101 | }, 102 | textinput: { 103 | width: 60, 104 | marginVertical: 2, 105 | marginHorizontal: 2, 106 | borderWidth: 1 / PixelRatio.get(), 107 | borderRadius: 5, 108 | borderColor: '#c7c7cc', 109 | padding: 2, 110 | fontSize: 14, 111 | backgroundColor: 'white', 112 | }, 113 | }); 114 | 115 | AppRegistry.registerComponent('tooltip', () => tooltip); 116 | ``` 117 | 118 | ### Note 119 | 120 | It is also possible to open the menu programmatically, by calling `this.refs.theToolTip.showMenu();` ( `theToolTip` being the reference of the component). 121 | To hide menu `this.refs.theToolTip.hideMenu();` (Though tooltip hides by itself, while using with drawer on specific gesture tooltip does not hide by default.) 122 | 123 | ## Here is how it looks: 124 | ![Demo gif](https://github.com/chirag04/react-native-tooltip/blob/master/screenshot.png) 125 | 126 | ### Special thanks 127 | Special thanks to [jrichardlai](https://github.com/jrichardlai) for refactoring the api and make it awesome. 128 | -------------------------------------------------------------------------------- /ToolTip.android.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var warning = require('warning'); 4 | 5 | var ToolTip = { 6 | test: function() { 7 | warning("Not yet implemented for Android."); 8 | } 9 | }; 10 | 11 | module.exports = ToolTip; 12 | -------------------------------------------------------------------------------- /ToolTip.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React, {PureComponent} from 'react'; 4 | import PropTypes from 'prop-types'; 5 | import { 6 | requireNativeComponent, 7 | TouchableHighlight, 8 | View, 9 | NativeModules, 10 | findNodeHandle, 11 | } from 'react-native'; 12 | 13 | const ToolTipMenu = NativeModules.ToolTipMenu; 14 | const RCTToolTipText = requireNativeComponent('RCTToolTipText', null); 15 | 16 | export default class ToolTip extends PureComponent { 17 | static propTypes = { 18 | actions: PropTypes.arrayOf(PropTypes.shape({ 19 | text: PropTypes.string.isRequired, 20 | onPress: PropTypes.func 21 | })), 22 | arrowDirection: PropTypes.oneOf(['up', 'down', 'left', 'right', 'default']), 23 | longPress: PropTypes.bool, 24 | onHide: PropTypes.func, 25 | onShow: PropTypes.func, 26 | ...TouchableHighlight.propTypes 27 | }; 28 | 29 | static defaultProps = { 30 | arrowDirection: 'default', 31 | onHide: () => true, 32 | onShow: () => true 33 | }; 34 | 35 | showMenu = () => { 36 | ToolTipMenu.show(findNodeHandle(this.refs.toolTipText), this.getOptionTexts(), this.props.arrowDirection); 37 | this.props.onShow(); 38 | }; 39 | 40 | hideMenu = () => { 41 | ToolTipMenu.hide(); 42 | this.props.onHide(); 43 | }; 44 | 45 | getOptionTexts = () => { 46 | return this.props.actions.map((option) => option.text); 47 | }; 48 | 49 | // Assuming there is no actions with the same text 50 | getCallback = (optionText) => { 51 | const selectedOption = this.props.actions.find((option) => option.text === optionText); 52 | 53 | if (selectedOption) { 54 | return selectedOption.onPress; 55 | } 56 | 57 | return null; 58 | }; 59 | 60 | getTouchableHighlightProps = () => { 61 | const props = {}; 62 | 63 | Object.keys(TouchableHighlight.propTypes).forEach((key) => props[key] = this.props[key]); 64 | 65 | if (this.props.longPress) { 66 | props.onLongPress = this.showMenu; 67 | } else { 68 | props.onPress = this.showMenu; 69 | } 70 | 71 | return props; 72 | }; 73 | 74 | handleToolTipTextChange = (event) => { 75 | const callback = this.getCallback(event.nativeEvent.text); 76 | if (callback) { 77 | callback(event); 78 | } 79 | }; 80 | 81 | handleBlurToolTip = () => { 82 | this.hideMenu(); 83 | }; 84 | 85 | render() { 86 | return ( 87 | 88 | 91 | 92 | {this.props.children} 93 | 94 | 95 | 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /ToolTipMenu.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4681C0251B05271A004D67D4 /* ToolTipMenu.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4681C0241B05271A004D67D4 /* ToolTipMenu.h */; }; 11 | 4681C0271B05271A004D67D4 /* ToolTipMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4681C0261B05271A004D67D4 /* ToolTipMenu.m */; }; 12 | 4681C02D1B05271A004D67D4 /* libToolTipMenu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4681C0211B05271A004D67D4 /* libToolTipMenu.a */; }; 13 | 469F58B71B069FF300C571E8 /* RCTToolTipText.m in Sources */ = {isa = PBXBuildFile; fileRef = 469F58B61B069FF300C571E8 /* RCTToolTipText.m */; }; 14 | 469F58B91B06A00C00C571E8 /* RCTToolTipTextManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 469F58B81B06A00C00C571E8 /* RCTToolTipTextManager.m */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXContainerItemProxy section */ 18 | 4681C02E1B05271A004D67D4 /* PBXContainerItemProxy */ = { 19 | isa = PBXContainerItemProxy; 20 | containerPortal = 4681C0191B05271A004D67D4 /* Project object */; 21 | proxyType = 1; 22 | remoteGlobalIDString = 4681C0201B05271A004D67D4; 23 | remoteInfo = ToolTipMenu; 24 | }; 25 | /* End PBXContainerItemProxy section */ 26 | 27 | /* Begin PBXCopyFilesBuildPhase section */ 28 | 4681C01F1B05271A004D67D4 /* CopyFiles */ = { 29 | isa = PBXCopyFilesBuildPhase; 30 | buildActionMask = 2147483647; 31 | dstPath = "include/$(PRODUCT_NAME)"; 32 | dstSubfolderSpec = 16; 33 | files = ( 34 | 4681C0251B05271A004D67D4 /* ToolTipMenu.h in CopyFiles */, 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXCopyFilesBuildPhase section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 4681C0211B05271A004D67D4 /* libToolTipMenu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libToolTipMenu.a; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 4681C0241B05271A004D67D4 /* ToolTipMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ToolTipMenu.h; sourceTree = ""; }; 43 | 4681C0261B05271A004D67D4 /* ToolTipMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ToolTipMenu.m; sourceTree = ""; }; 44 | 4681C0321B05271A004D67D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | 469F58B31B069F9800C571E8 /* RCTToolTipText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTToolTipText.h; sourceTree = ""; }; 46 | 469F58B61B069FF300C571E8 /* RCTToolTipText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTToolTipText.m; sourceTree = ""; }; 47 | 469F58B81B06A00C00C571E8 /* RCTToolTipTextManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTToolTipTextManager.m; sourceTree = ""; }; 48 | 469F58BA1B06A01D00C571E8 /* RCTToolTipTextManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTToolTipTextManager.h; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 4681C01E1B05271A004D67D4 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | 4681C0291B05271A004D67D4 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 4681C02D1B05271A004D67D4 /* libToolTipMenu.a in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | /* End PBXFrameworksBuildPhase section */ 68 | 69 | /* Begin PBXGroup section */ 70 | 4681C0181B05271A004D67D4 = { 71 | isa = PBXGroup; 72 | children = ( 73 | 4681C0231B05271A004D67D4 /* ToolTipMenu */, 74 | 4681C0221B05271A004D67D4 /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 4681C0221B05271A004D67D4 /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 4681C0211B05271A004D67D4 /* libToolTipMenu.a */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 4681C0231B05271A004D67D4 /* ToolTipMenu */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 4681C0241B05271A004D67D4 /* ToolTipMenu.h */, 90 | 4681C0261B05271A004D67D4 /* ToolTipMenu.m */, 91 | 469F58B31B069F9800C571E8 /* RCTToolTipText.h */, 92 | 469F58B61B069FF300C571E8 /* RCTToolTipText.m */, 93 | 469F58BA1B06A01D00C571E8 /* RCTToolTipTextManager.h */, 94 | 469F58B81B06A00C00C571E8 /* RCTToolTipTextManager.m */, 95 | ); 96 | path = ToolTipMenu; 97 | sourceTree = ""; 98 | }; 99 | 4681C0311B05271A004D67D4 /* Supporting Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 4681C0321B05271A004D67D4 /* Info.plist */, 103 | ); 104 | name = "Supporting Files"; 105 | sourceTree = ""; 106 | }; 107 | /* End PBXGroup section */ 108 | 109 | /* Begin PBXNativeTarget section */ 110 | 4681C0201B05271A004D67D4 /* ToolTipMenu */ = { 111 | isa = PBXNativeTarget; 112 | buildConfigurationList = 4681C0351B05271A004D67D4 /* Build configuration list for PBXNativeTarget "ToolTipMenu" */; 113 | buildPhases = ( 114 | 4681C01D1B05271A004D67D4 /* Sources */, 115 | 4681C01E1B05271A004D67D4 /* Frameworks */, 116 | 4681C01F1B05271A004D67D4 /* CopyFiles */, 117 | ); 118 | buildRules = ( 119 | ); 120 | dependencies = ( 121 | ); 122 | name = ToolTipMenu; 123 | productName = ToolTipMenu; 124 | productReference = 4681C0211B05271A004D67D4 /* libToolTipMenu.a */; 125 | productType = "com.apple.product-type.library.static"; 126 | }; 127 | /* End PBXNativeTarget section */ 128 | 129 | /* Begin PBXProject section */ 130 | 4681C0191B05271A004D67D4 /* Project object */ = { 131 | isa = PBXProject; 132 | attributes = { 133 | LastUpgradeCheck = 0710; 134 | ORGANIZATIONNAME = "Chirag Jain"; 135 | TargetAttributes = { 136 | 4681C0201B05271A004D67D4 = { 137 | CreatedOnToolsVersion = 6.3.1; 138 | }; 139 | 4681C02B1B05271A004D67D4 = { 140 | CreatedOnToolsVersion = 6.3.1; 141 | }; 142 | }; 143 | }; 144 | buildConfigurationList = 4681C01C1B05271A004D67D4 /* Build configuration list for PBXProject "ToolTipMenu" */; 145 | compatibilityVersion = "Xcode 3.2"; 146 | developmentRegion = English; 147 | hasScannedForEncodings = 0; 148 | knownRegions = ( 149 | en, 150 | ); 151 | mainGroup = 4681C0181B05271A004D67D4; 152 | productRefGroup = 4681C0221B05271A004D67D4 /* Products */; 153 | projectDirPath = ""; 154 | projectRoot = ""; 155 | targets = ( 156 | 4681C0201B05271A004D67D4 /* ToolTipMenu */, 157 | ); 158 | }; 159 | /* End PBXProject section */ 160 | 161 | /* Begin PBXResourcesBuildPhase section */ 162 | 4681C02A1B05271A004D67D4 /* Resources */ = { 163 | isa = PBXResourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXSourcesBuildPhase section */ 172 | 4681C01D1B05271A004D67D4 /* Sources */ = { 173 | isa = PBXSourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 4681C0271B05271A004D67D4 /* ToolTipMenu.m in Sources */, 177 | 469F58B91B06A00C00C571E8 /* RCTToolTipTextManager.m in Sources */, 178 | 469F58B71B069FF300C571E8 /* RCTToolTipText.m in Sources */, 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | 4681C0281B05271A004D67D4 /* Sources */ = { 183 | isa = PBXSourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXSourcesBuildPhase section */ 190 | 191 | /* Begin PBXTargetDependency section */ 192 | 4681C02F1B05271A004D67D4 /* PBXTargetDependency */ = { 193 | isa = PBXTargetDependency; 194 | target = 4681C0201B05271A004D67D4 /* ToolTipMenu */; 195 | targetProxy = 4681C02E1B05271A004D67D4 /* PBXContainerItemProxy */; 196 | }; 197 | /* End PBXTargetDependency section */ 198 | 199 | /* Begin XCBuildConfiguration section */ 200 | 4681C0331B05271A004D67D4 /* Debug */ = { 201 | isa = XCBuildConfiguration; 202 | buildSettings = { 203 | ALWAYS_SEARCH_USER_PATHS = NO; 204 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 205 | CLANG_CXX_LIBRARY = "libc++"; 206 | CLANG_ENABLE_MODULES = YES; 207 | CLANG_ENABLE_OBJC_ARC = YES; 208 | CLANG_WARN_BOOL_CONVERSION = YES; 209 | CLANG_WARN_CONSTANT_CONVERSION = YES; 210 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 211 | CLANG_WARN_EMPTY_BODY = YES; 212 | CLANG_WARN_ENUM_CONVERSION = YES; 213 | CLANG_WARN_INT_CONVERSION = YES; 214 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 215 | CLANG_WARN_UNREACHABLE_CODE = YES; 216 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 217 | COPY_PHASE_STRIP = NO; 218 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 219 | ENABLE_STRICT_OBJC_MSGSEND = YES; 220 | ENABLE_TESTABILITY = YES; 221 | GCC_C_LANGUAGE_STANDARD = gnu99; 222 | GCC_DYNAMIC_NO_PIC = NO; 223 | GCC_NO_COMMON_BLOCKS = YES; 224 | GCC_OPTIMIZATION_LEVEL = 0; 225 | GCC_PREPROCESSOR_DEFINITIONS = ( 226 | "DEBUG=1", 227 | "$(inherited)", 228 | ); 229 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 230 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 231 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 232 | GCC_WARN_UNDECLARED_SELECTOR = YES; 233 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 234 | GCC_WARN_UNUSED_FUNCTION = YES; 235 | GCC_WARN_UNUSED_VARIABLE = YES; 236 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 237 | MTL_ENABLE_DEBUG_INFO = YES; 238 | ONLY_ACTIVE_ARCH = YES; 239 | SDKROOT = iphoneos; 240 | }; 241 | name = Debug; 242 | }; 243 | 4681C0341B05271A004D67D4 /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_EMPTY_BODY = YES; 255 | CLANG_WARN_ENUM_CONVERSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN_UNREACHABLE_CODE = YES; 259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 260 | COPY_PHASE_STRIP = NO; 261 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 262 | ENABLE_NS_ASSERTIONS = NO; 263 | ENABLE_STRICT_OBJC_MSGSEND = YES; 264 | GCC_C_LANGUAGE_STANDARD = gnu99; 265 | GCC_NO_COMMON_BLOCKS = YES; 266 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 267 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 268 | GCC_WARN_UNDECLARED_SELECTOR = YES; 269 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 270 | GCC_WARN_UNUSED_FUNCTION = YES; 271 | GCC_WARN_UNUSED_VARIABLE = YES; 272 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 273 | MTL_ENABLE_DEBUG_INFO = NO; 274 | SDKROOT = iphoneos; 275 | VALIDATE_PRODUCT = YES; 276 | }; 277 | name = Release; 278 | }; 279 | 4681C0361B05271A004D67D4 /* Debug */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | HEADER_SEARCH_PATHS = ""; 283 | OTHER_LDFLAGS = "-ObjC"; 284 | PRODUCT_NAME = "$(TARGET_NAME)"; 285 | SKIP_INSTALL = YES; 286 | }; 287 | name = Debug; 288 | }; 289 | 4681C0371B05271A004D67D4 /* Release */ = { 290 | isa = XCBuildConfiguration; 291 | buildSettings = { 292 | HEADER_SEARCH_PATHS = ""; 293 | OTHER_LDFLAGS = "-ObjC"; 294 | PRODUCT_NAME = "$(TARGET_NAME)"; 295 | SKIP_INSTALL = YES; 296 | }; 297 | name = Release; 298 | }; 299 | /* End XCBuildConfiguration section */ 300 | 301 | /* Begin XCConfigurationList section */ 302 | 4681C01C1B05271A004D67D4 /* Build configuration list for PBXProject "ToolTipMenu" */ = { 303 | isa = XCConfigurationList; 304 | buildConfigurations = ( 305 | 4681C0331B05271A004D67D4 /* Debug */, 306 | 4681C0341B05271A004D67D4 /* Release */, 307 | ); 308 | defaultConfigurationIsVisible = 0; 309 | defaultConfigurationName = Release; 310 | }; 311 | 4681C0351B05271A004D67D4 /* Build configuration list for PBXNativeTarget "ToolTipMenu" */ = { 312 | isa = XCConfigurationList; 313 | buildConfigurations = ( 314 | 4681C0361B05271A004D67D4 /* Debug */, 315 | 4681C0371B05271A004D67D4 /* Release */, 316 | ); 317 | defaultConfigurationIsVisible = 0; 318 | defaultConfigurationName = Release; 319 | }; 320 | /* End XCConfigurationList section */ 321 | }; 322 | rootObject = 4681C0191B05271A004D67D4 /* Project object */; 323 | } 324 | -------------------------------------------------------------------------------- /ToolTipMenu/RCTToolTipText.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @class RCTEventDispatcher; 5 | 6 | @interface RCTToolTipText : RCTView 7 | 8 | - (void)tappedMenuItem:(NSString *)text; 9 | 10 | - (void)didHideMenu:(NSNotification *)notification; 11 | 12 | - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher NS_DESIGNATED_INITIALIZER; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ToolTipMenu/RCTToolTipText.m: -------------------------------------------------------------------------------- 1 | #import "RCTToolTipText.h" 2 | #import 3 | #import 4 | 5 | @implementation RCTToolTipText 6 | { 7 | RCTEventDispatcher *_eventDispatcher; 8 | NSInteger _nativeEventCount; 9 | } 10 | 11 | - (id)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher 12 | { 13 | if ((self = [super initWithFrame:CGRectZero])) { 14 | _eventDispatcher = eventDispatcher; 15 | } 16 | 17 | return self; 18 | } 19 | 20 | RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) 21 | RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder) 22 | 23 | - (BOOL) canBecomeFirstResponder 24 | { 25 | return YES; 26 | } 27 | 28 | - (void)tappedMenuItem:(NSString *)text { 29 | _nativeEventCount++; 30 | [_eventDispatcher sendTextEventWithType:RCTTextEventTypeChange 31 | reactTag:self.reactTag 32 | text:text 33 | key:nil 34 | eventCount:_nativeEventCount]; 35 | } 36 | 37 | - (void)didHideMenu:(NSNotification *)notification { 38 | _nativeEventCount++; 39 | [_eventDispatcher sendTextEventWithType:RCTTextEventTypeBlur 40 | reactTag:self.reactTag 41 | text:nil 42 | key:nil 43 | eventCount:_nativeEventCount]; 44 | 45 | } 46 | 47 | - (BOOL)canPerformAction:(SEL)action withSender:(id)sender { 48 | NSString *sel = NSStringFromSelector(action); 49 | NSRange match = [sel rangeOfString:@"magic_"]; 50 | if (match.location == 0) { 51 | return YES; 52 | } 53 | return NO; 54 | } 55 | 56 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)sel { 57 | if ([super methodSignatureForSelector:sel]) { 58 | return [super methodSignatureForSelector:sel]; 59 | } 60 | return [super methodSignatureForSelector:@selector(tappedMenuItem:)]; 61 | } 62 | 63 | - (void)forwardInvocation:(NSInvocation *)invocation { 64 | NSString *sel = NSStringFromSelector([invocation selector]); 65 | NSRange match = [sel rangeOfString:@"magic_"]; 66 | if (match.location == 0) { 67 | [self tappedMenuItem:[sel substringFromIndex:6]]; 68 | } else { 69 | [super forwardInvocation:invocation]; 70 | } 71 | } 72 | 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /ToolTipMenu/RCTToolTipTextManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RCTToolTipTextManager : RCTViewManager 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /ToolTipMenu/RCTToolTipTextManager.m: -------------------------------------------------------------------------------- 1 | #import "RCTToolTipTextManager.h" 2 | 3 | #import "RCTToolTipText.h" 4 | #import 5 | 6 | @implementation RCTToolTipTextManager 7 | 8 | RCT_EXPORT_MODULE() 9 | 10 | + (BOOL)requiresMainQueueSetup 11 | { 12 | return YES; 13 | } 14 | 15 | - (UIView *)view 16 | { 17 | return [[RCTToolTipText alloc] initWithEventDispatcher:self.bridge.eventDispatcher]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ToolTipMenu/ToolTipMenu.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface ToolTipMenu : NSObject 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ToolTipMenu/ToolTipMenu.m: -------------------------------------------------------------------------------- 1 | #import "ToolTipMenu.h" 2 | #import "RCTToolTipText.h" 3 | #import 4 | 5 | @implementation ToolTipMenu 6 | 7 | @synthesize bridge = _bridge; 8 | 9 | RCT_EXPORT_MODULE() 10 | 11 | - (dispatch_queue_t)methodQueue 12 | { 13 | return dispatch_get_main_queue(); 14 | } 15 | 16 | RCT_EXPORT_METHOD(show:(nonnull NSNumber *)reactTag 17 | items: (NSArray *)items 18 | arrowDirection: (NSString *)arrowDirection) 19 | { 20 | UIView *view = [self.bridge.uiManager viewForReactTag:reactTag]; 21 | NSArray *buttons = items; 22 | NSMutableArray *menuItems = [NSMutableArray array]; 23 | for (NSString *buttonText in buttons) { 24 | NSString *sel = [NSString stringWithFormat:@"magic_%@", buttonText]; 25 | [menuItems addObject:[[UIMenuItem alloc] 26 | initWithTitle:buttonText 27 | action:NSSelectorFromString(sel)]]; 28 | } 29 | [view becomeFirstResponder]; 30 | UIMenuController *menuCont = [UIMenuController sharedMenuController]; 31 | [menuCont setTargetRect:view.frame inView:view.superview]; 32 | 33 | [[NSNotificationCenter defaultCenter] addObserver:view selector:@selector(didHideMenu:) name:UIMenuControllerDidHideMenuNotification object:nil]; 34 | 35 | 36 | if([arrowDirection isEqualToString: @"up"]){ 37 | menuCont.arrowDirection = UIMenuControllerArrowUp; 38 | } else if ([arrowDirection isEqualToString: @"right"]){ 39 | menuCont.arrowDirection = UIMenuControllerArrowRight; 40 | } else if ([arrowDirection isEqualToString: @"left"]) { 41 | menuCont.arrowDirection = UIMenuControllerArrowLeft; 42 | } else if ([arrowDirection isEqualToString: @"down"]) { 43 | menuCont.arrowDirection = UIMenuControllerArrowDown; 44 | } else { 45 | menuCont.arrowDirection = UIMenuControllerArrowDefault; 46 | } 47 | menuCont.menuItems = menuItems; 48 | [menuCont setMenuVisible:YES animated:YES]; 49 | } 50 | 51 | RCT_EXPORT_METHOD(hide){ 52 | UIMenuController *menuCont = [UIMenuController sharedMenuController]; 53 | [menuCont setMenuVisible:NO animated:NO]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-tooltip", 3 | "version": "5.2.0", 4 | "description": "A react-native wrapper for showing tooltips", 5 | "main": "ToolTip.ios.js", 6 | "author": { 7 | "name": "Chirag Jain", 8 | "email": "jain_chirag04@yahoo.com", 9 | "url": "http://chiragjain.tumblr.com" 10 | }, 11 | "license": "MIT", 12 | "repository": { 13 | "type": "git", 14 | "url": "git@github.com:chirag04/react-native-tooltip.git" 15 | }, 16 | "keywords": [ 17 | "react", 18 | "react-native", 19 | "react-component", 20 | "ios", 21 | "tooltip" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chirag04/react-native-tooltip/8f9385b8740b4cf0cc73fefc7307bc055cd5e438/screenshot.png --------------------------------------------------------------------------------