├── Example
├── .watchmanconfig
├── .editorconfig
├── app.json
├── .eslintrc.js
├── assets
│ └── dark.jpg
├── babel.config.js
├── android
│ ├── app
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── drawable
│ │ │ │ │ └── paste.png
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ │ └── AndroidManifest.xml
│ │ ├── debug.keystore
│ │ ├── proguard-rules.pro
│ │ ├── build_defs.bzl
│ │ ├── BUCK
│ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── settings.gradle
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradlew.bat
│ └── gradlew
├── ios
│ ├── Resources
│ │ └── paste.png
│ ├── Example
│ │ ├── Images.xcassets
│ │ │ ├── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── Info.plist
│ │ ├── AppDelegate.m
│ │ └── LaunchScreen.storyboard
│ ├── Example.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Podfile
│ └── Example.xcodeproj
│ │ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Example.xcscheme
│ │ └── project.pbxproj
├── .buckconfig
├── .gitattributes
├── .prettierrc.js
├── index.js
├── __tests__
│ └── App-test.js
├── metro.config.js
├── package.json
├── components
│ ├── Top.js
│ ├── Bottom.js
│ └── Center.js
├── .gitignore
├── .flowconfig
└── App.js
├── .gitattributes
├── android
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── res
│ │ └── values
│ │ │ └── styles.xml
│ │ └── java
│ │ └── ui
│ │ └── popovermenu
│ │ ├── RNPopoverMenuPackage.java
│ │ └── RNPopoverMenuModule.java
├── .classpath
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── .project
└── build.gradle
├── ios
├── RNPopoverMenu.h
├── RNPopoverMenu.xcworkspace
│ └── contents.xcworkspacedata
├── RNPopoverMenu.podspec
├── RNPopoverMenu.m
└── RNPopoverMenu.xcodeproj
│ └── project.pbxproj
├── js
├── Menu.js
└── RNPopoverMenu.js
├── package.json
├── .gitignore
├── LICENSE
└── README.md
/Example/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
--------------------------------------------------------------------------------
/Example/.editorconfig:
--------------------------------------------------------------------------------
1 | # Windows files
2 | [*.bat]
3 | end_of_line = crlf
4 |
--------------------------------------------------------------------------------
/Example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Example",
3 | "displayName": "Example"
4 | }
--------------------------------------------------------------------------------
/Example/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/Example/assets/dark.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/assets/dark.jpg
--------------------------------------------------------------------------------
/Example/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Example
3 |
4 |
--------------------------------------------------------------------------------
/Example/ios/Resources/paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/ios/Resources/paste.png
--------------------------------------------------------------------------------
/Example/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/debug.keystore
--------------------------------------------------------------------------------
/Example/ios/Example/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/Example/.gitattributes:
--------------------------------------------------------------------------------
1 | # Windows files should use crlf line endings
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | *.bat text eol=crlf
4 |
--------------------------------------------------------------------------------
/Example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/drawable/paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/drawable/paste.png
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/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/prscX/react-native-popover-menu/HEAD/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/prscX/react-native-popover-menu/HEAD/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/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Example/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | bracketSpacing: false,
3 | jsxBracketSameLine: true,
4 | singleQuote: true,
5 | trailingComma: 'all',
6 | arrowParens: 'avoid',
7 | };
8 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/prscX/react-native-popover-menu/HEAD/Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/ios/RNPopoverMenu.h:
--------------------------------------------------------------------------------
1 |
2 | #import "RCTUIManager.h"
3 |
4 | #import "FTPopOverMenu.h"
5 | #import "RNImageHelper.h"
6 |
7 | @interface RNPopoverMenu : NSObject
8 |
9 | @end
10 |
11 |
--------------------------------------------------------------------------------
/Example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Example'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/Example/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/Example/ios/Example/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : UIResponder
5 |
6 | @property (nonatomic, strong) UIWindow *window;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/Example/ios/Example/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char * argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/Example/ios/Example.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/RNPopoverMenu.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Example/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create( );
14 | });
15 |
--------------------------------------------------------------------------------
/android/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Example/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: true,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/js/Menu.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react"
2 | import { ViewPropTypes } from "react-native"
3 |
4 | import PropTypes from "prop-types"
5 |
6 |
7 | class Menu extends Component {
8 |
9 | }
10 |
11 | Menu.propTypes = {
12 | ...ViewPropTypes,
13 |
14 | label: PropTypes.string,
15 | icon: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object])
16 | };
17 |
18 | Menu.defaultProps = {
19 | };
20 |
21 | export { Menu };
22 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/java/com/example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "Example";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | arguments=
2 | auto.sync=false
3 | build.scans.enabled=false
4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.0))
5 | connection.project.dir=
6 | eclipse.preferences.version=1
7 | gradle.user.home=
8 | java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
9 | jvm.arguments=
10 | offline.mode=false
11 | override.workspace.settings=true
12 | show.console.view=true
13 | show.executions.view=true
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "name": "react-native-popover-menu",
4 | "version": "2.0.2",
5 | "description": "React Native: Native Popover Menu",
6 | "main": "js/RNPopoverMenu.js",
7 | "scripts": {
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "keywords": ["react-native"],
11 | "author": "Pranav Raj Singh Chauhan",
12 | "license": "Apache License",
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/prscX/react-native-popover-menu.git"
16 | },
17 | "dependencies": {
18 | },
19 | "devDependencies": {
20 | "prettier-pack": "0.0.11"
21 | },
22 | "peerDependencies": {}
23 | }
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # OSX
3 | #
4 | .DS_Store
5 |
6 | # node.js
7 | #
8 | node_modules/
9 | npm-debug.log
10 | yarn-error.log
11 |
12 |
13 | # Xcode
14 | #
15 | build/
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 | xcuserdata
25 | *.xccheckout
26 | *.moved-aside
27 | DerivedData
28 | *.hmap
29 | *.ipa
30 | *.xcuserstate
31 | project.xcworkspace
32 |
33 |
34 | # Android/IntelliJ
35 | #
36 | build/
37 | .idea
38 | .gradle
39 | local.properties
40 | *.iml
41 |
42 | # BUCK
43 | buck-out/
44 | \.buckd/
45 | *.keystore
46 |
47 |
48 | .history/*
--------------------------------------------------------------------------------
/Example/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | react-native-popover-menu
4 | Project react-native-popover-menu created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '10.0'
5 |
6 | target 'Example' do
7 | config = use_native_modules!
8 |
9 | use_react_native!(
10 | :path => config[:reactNativePath],
11 | # to enable hermes on iOS, change `false` to `true` and then install pods
12 | :hermes_enabled => false
13 | )
14 |
15 | target 'ExampleTests' do
16 | inherit! :complete
17 | # Pods for testing
18 | end
19 |
20 | # Enables Flipper.
21 | #
22 | # Note that if you have use_frameworks! enabled, Flipper will not work and
23 | # you should disable the next line.
24 | use_flipper!()
25 |
26 | post_install do |installer|
27 | react_native_post_install(installer)
28 | end
29 | end
--------------------------------------------------------------------------------
/Example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Example",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "start": "react-native start",
9 | "test": "jest",
10 | "lint": "eslint ."
11 | },
12 | "dependencies": {
13 | "react": "17.0.1",
14 | "react-native": "0.64.2",
15 | "react-native-vector-icons": "8.1.0",
16 | "react-native-image-helper": "0.0.3",
17 | "react-native-popover-menu": "../"
18 | },
19 | "devDependencies": {
20 | "@babel/core": "^7.14.6",
21 | "@babel/runtime": "^7.14.6",
22 | "@react-native-community/eslint-config": "^3.0.0",
23 | "babel-jest": "^27.0.5",
24 | "eslint": "^7.29.0",
25 | "jest": "^27.0.5",
26 | "metro-react-native-babel-preset": "^0.66.0",
27 | "react-test-renderer": "17.0.1"
28 | },
29 | "jest": {
30 | "preset": "react-native"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Example/components/Top.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { StyleSheet, View, Button } from "react-native";
3 |
4 | class Top extends Component {
5 | render() {
6 | return (
7 |
8 | {
11 | this.ref1 = ref
12 | }}
13 | onPress={() => {
14 | this.props.onPress(this.ref1)
15 | }}
16 | />
17 | {
20 | this.ref2 = ref
21 | }}
22 | onPress={() => {
23 | this.props.onPress(this.ref2)
24 | }}
25 | />
26 |
27 | );
28 | }
29 | }
30 |
31 | const styles = StyleSheet.create({
32 | container: {
33 | flexDirection: "row",
34 | justifyContent: "space-between"
35 | }
36 | });
37 |
38 | export default Top;
39 |
--------------------------------------------------------------------------------
/Example/components/Bottom.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { StyleSheet, View, Button } from "react-native";
3 |
4 | class Bottom extends Component {
5 | render() {
6 | return (
7 |
8 | {
11 | this.ref1 = ref
12 | }}
13 | onPress={() => {
14 | this.props.onPress(this.ref1)
15 | }}
16 | />
17 | {
20 | this.ref2 = ref
21 | }}
22 | onPress={() => {
23 | this.props.onPress(this.ref2)
24 | }}
25 | />
26 |
27 | );
28 | }
29 | }
30 |
31 | const styles = StyleSheet.create({
32 | container: {
33 | flexDirection: "row",
34 | justifyContent: "space-between"
35 | }
36 | });
37 |
38 | export default Bottom;
39 |
--------------------------------------------------------------------------------
/ios/RNPopoverMenu.podspec:
--------------------------------------------------------------------------------
1 |
2 | require 'json'
3 |
4 | package = JSON.parse(File.read(File.join(__dir__, '../package.json')))
5 |
6 | Pod::Spec.new do |s|
7 | s.name = "RNPopoverMenu"
8 | s.version = package['version']
9 | s.summary = "RNPopoverMenu"
10 | s.description = <<-DESC
11 | This library is a React Native bridge around native popover libraries. It allows show/guide beautiful popover menus.
12 | DESC
13 | s.homepage = "https://github.com/prscX/react-native-popover-menu"
14 | s.license = { type: "Apache License", file: "../LICENSE" }
15 | s.author = { "author" => "Pranav Raj Singh Chauhan" }
16 | s.platforms = { ios: "7.0" }
17 | s.source = { :git => 'https://github.com/prscX/react-native-popover-menu.git', :tag => s.version }
18 | s.source_files = "**/*.{h,m}"
19 | s.requires_arc = true
20 |
21 | s.dependency 'React-Core'
22 | s.dependency 'FTPopOverMenu', '~> 2.1.1'
23 | s.dependency 'RNImageHelper'
24 | end
25 |
--------------------------------------------------------------------------------
/android/src/main/java/ui/popovermenu/RNPopoverMenuPackage.java:
--------------------------------------------------------------------------------
1 |
2 | package ui.popovermenu;
3 |
4 | import com.facebook.react.ReactPackage;
5 | import com.facebook.react.bridge.JavaScriptModule;
6 | import com.facebook.react.bridge.NativeModule;
7 | import com.facebook.react.bridge.ReactApplicationContext;
8 | import com.facebook.react.uimanager.ViewManager;
9 |
10 | import java.util.Arrays;
11 | import java.util.Collections;
12 | import java.util.List;
13 |
14 | public class RNPopoverMenuPackage implements ReactPackage {
15 | @Override
16 | public List createNativeModules(ReactApplicationContext reactContext) {
17 | return Arrays.asList(new RNPopoverMenuModule(reactContext));
18 | }
19 |
20 | // Deprecated from RN 0.47
21 | public List> createJSModules() {
22 | return Collections.emptyList();
23 | }
24 |
25 | @Override
26 | public List createViewManagers(ReactApplicationContext reactContext) {
27 | return Collections.emptyList();
28 | }
29 | }
--------------------------------------------------------------------------------
/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 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 | yarn-error.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | *.keystore
42 | !debug.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # CocoaPods
59 | /ios/Pods/
60 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
15 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/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 | ext {
5 | buildToolsVersion = "29.0.3"
6 | minSdkVersion = 21
7 | compileSdkVersion = 29
8 | targetSdkVersion = 29
9 | ndkVersion = "20.1.5948944"
10 | }
11 | repositories {
12 | google()
13 | jcenter()
14 | }
15 | dependencies {
16 | classpath('com.android.tools.build:gradle:4.2.1')
17 | // NOTE: Do not place your application dependencies here; they belong
18 | // in the individual module build.gradle files
19 | }
20 | }
21 |
22 | allprojects {
23 | repositories {
24 | mavenLocal()
25 | maven {
26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27 | url("$rootDir/../node_modules/react-native/android")
28 | }
29 | maven {
30 | // Android JSC is installed from npm
31 | url("$rootDir/../node_modules/jsc-android/dist")
32 | }
33 |
34 | google()
35 | jcenter()
36 | maven { url 'https://www.jitpack.io' }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Example/components/Center.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { StyleSheet, View, Button } from "react-native";
3 |
4 | class Center extends Component {
5 | render() {
6 | return (
7 |
8 | {
11 | this.ref1 = ref
12 | }}
13 | onPress={() => {
14 | this.props.onPress(this.ref1)
15 | }}
16 | />
17 | {
20 | this.ref2 = ref
21 | }}
22 | onPress={() => {
23 | this.props.onPress(this.ref2)
24 | }}
25 | />
26 | {
29 | this.ref3 = ref
30 | }}
31 | onPress={() => {
32 | this.props.onPress(this.ref3)
33 | }}
34 | />
35 |
36 | );
37 | }
38 | }
39 |
40 | const styles = StyleSheet.create({
41 | container: {
42 | flexDirection: "row",
43 | justifyContent: "space-between"
44 | }
45 | });
46 |
47 | export default Center;
48 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | def safeExtGet(prop, fallback) {
4 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
5 | }
6 |
7 | buildscript {
8 | if (project == rootProject) {
9 | repositories {
10 | google()
11 | jcenter()
12 | maven { url 'https://www.jitpack.io' }
13 | }
14 |
15 | dependencies {
16 | classpath('com.android.tools.build:gradle:4.2.1')
17 | }
18 | }
19 | }
20 |
21 | apply plugin: 'com.android.library'
22 |
23 | android {
24 | compileSdkVersion safeExtGet('compileSdkVersion', 28)
25 | buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
26 |
27 | defaultConfig {
28 | minSdkVersion safeExtGet('minSdkVersion', 16)
29 | targetSdkVersion safeExtGet('targetSdkVersion', 28)
30 | versionCode 1
31 | versionName "1.0"
32 | }
33 | lintOptions {
34 | abortOnError false
35 | }
36 | }
37 |
38 | repositories {
39 | google()
40 | mavenCentral()
41 | maven { url "https://maven.google.com" }
42 | }
43 |
44 | dependencies {
45 | implementation 'com.facebook.react:react-native:+'
46 | implementation project(':react-native-vector-icons')
47 | implementation 'com.github.zawadz88.materialpopupmenu:material-popup-menu:4.1.0'
48 | }
49 |
--------------------------------------------------------------------------------
/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 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.75.1
29 |
--------------------------------------------------------------------------------
/Example/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.example",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.example",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/Example/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; Flow doesn't support platforms
12 | .*/Libraries/Utilities/LoadingView.js
13 |
14 | [untyped]
15 | .*/node_modules/@react-native-community/cli/.*/.*
16 |
17 | [include]
18 |
19 | [libs]
20 | node_modules/react-native/interface.js
21 | node_modules/react-native/flow/
22 |
23 | [options]
24 | emoji=true
25 |
26 | esproposal.optional_chaining=enable
27 | esproposal.nullish_coalescing=enable
28 |
29 | exact_by_default=true
30 |
31 | module.file_ext=.js
32 | module.file_ext=.json
33 | module.file_ext=.ios.js
34 |
35 | munge_underscores=true
36 |
37 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
38 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
39 |
40 | suppress_type=$FlowIssue
41 | suppress_type=$FlowFixMe
42 | suppress_type=$FlowFixMeProps
43 | suppress_type=$FlowFixMeState
44 |
45 | [lints]
46 | sketchy-null-number=warn
47 | sketchy-null-mixed=warn
48 | sketchy-number=warn
49 | untyped-type-import=warn
50 | nonstrict-import=warn
51 | deprecated-type=warn
52 | unsafe-getters-setters=warn
53 | unnecessary-invariant=warn
54 | signature-verification-failure=warn
55 |
56 | [strict]
57 | deprecated-type
58 | nonstrict-import
59 | sketchy-null
60 | unclear-type
61 | unsafe-getters-setters
62 | untyped-import
63 | untyped-type-import
64 |
65 | [version]
66 | ^0.137.0
67 |
--------------------------------------------------------------------------------
/Example/ios/Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIAppFonts
6 |
7 | AntDesign.ttf
8 | Entypo.ttf
9 | EvilIcons.ttf
10 | Feather.ttf
11 | FontAwesome.ttf
12 | FontAwesome5_Brands.ttf
13 | FontAwesome5_Regular.ttf
14 | FontAwesome5_Solid.ttf
15 | Foundation.ttf
16 | Ionicons.ttf
17 | MaterialIcons.ttf
18 | MaterialCommunityIcons.ttf
19 | SimpleLineIcons.ttf
20 | Octicons.ttf
21 | Zocial.ttf
22 |
23 | CFBundleDevelopmentRegion
24 | en
25 | CFBundleDisplayName
26 | Example
27 | CFBundleExecutable
28 | $(EXECUTABLE_NAME)
29 | CFBundleIdentifier
30 | $(PRODUCT_BUNDLE_IDENTIFIER)
31 | CFBundleInfoDictionaryVersion
32 | 6.0
33 | CFBundleName
34 | $(PRODUCT_NAME)
35 | CFBundlePackageType
36 | APPL
37 | CFBundleShortVersionString
38 | 1.0
39 | CFBundleSignature
40 | ????
41 | CFBundleVersion
42 | 1
43 | LSRequiresIPhoneOS
44 |
45 | NSAppTransportSecurity
46 |
47 | NSExceptionDomains
48 |
49 | localhost
50 |
51 | NSExceptionAllowsInsecureHTTPLoads
52 |
53 |
54 |
55 |
56 | NSLocationWhenInUseUsageDescription
57 |
58 | UILaunchStoryboardName
59 | LaunchScreen
60 | UIRequiredDeviceCapabilities
61 |
62 | armv7
63 |
64 | UISupportedInterfaceOrientations
65 |
66 | UIInterfaceOrientationPortrait
67 | UIInterfaceOrientationLandscapeLeft
68 | UIInterfaceOrientationLandscapeRight
69 |
70 | UIViewControllerBasedStatusBarAppearance
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Example/ios/Example/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 | #import
5 | #import
6 |
7 | #ifdef FB_SONARKIT_ENABLED
8 | #import
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import
14 |
15 | static void InitializeFlipper(UIApplication *application) {
16 | FlipperClient *client = [FlipperClient sharedClient];
17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
20 | [client addPlugin:[FlipperKitReactPlugin new]];
21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
22 | [client start];
23 | }
24 | #endif
25 |
26 | @implementation AppDelegate
27 |
28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
29 | {
30 | #ifdef FB_SONARKIT_ENABLED
31 | InitializeFlipper(application);
32 | #endif
33 |
34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
36 | moduleName:@"Example"
37 | initialProperties:nil];
38 |
39 | if (@available(iOS 13.0, *)) {
40 | rootView.backgroundColor = [UIColor systemBackgroundColor];
41 | } else {
42 | rootView.backgroundColor = [UIColor whiteColor];
43 | }
44 |
45 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
46 | UIViewController *rootViewController = [UIViewController new];
47 | rootViewController.view = rootView;
48 | self.window.rootViewController = rootViewController;
49 | [self.window makeKeyAndVisible];
50 | return YES;
51 | }
52 |
53 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
54 | {
55 | #if DEBUG
56 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
57 | #else
58 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
59 | #endif
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/java/com/example/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactInstanceManager;
8 | import com.facebook.react.ReactNativeHost;
9 | import com.facebook.react.ReactPackage;
10 | import com.facebook.soloader.SoLoader;
11 | import java.lang.reflect.InvocationTargetException;
12 | import java.util.List;
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 |
16 | private final ReactNativeHost mReactNativeHost =
17 | new ReactNativeHost(this) {
18 | @Override
19 | public boolean getUseDeveloperSupport() {
20 | return BuildConfig.DEBUG;
21 | }
22 |
23 | @Override
24 | protected List getPackages() {
25 | @SuppressWarnings("UnnecessaryLocalVariable")
26 | List packages = new PackageList(this).getPackages();
27 | // Packages that cannot be autolinked yet can be added manually here, for example:
28 | // packages.add(new MyReactNativePackage());
29 | return packages;
30 | }
31 |
32 | @Override
33 | protected String getJSMainModuleName() {
34 | return "index";
35 | }
36 | };
37 |
38 | @Override
39 | public ReactNativeHost getReactNativeHost() {
40 | return mReactNativeHost;
41 | }
42 |
43 | @Override
44 | public void onCreate() {
45 | super.onCreate();
46 | SoLoader.init(this, /* native exopackage */ false);
47 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
48 | }
49 |
50 | /**
51 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like
52 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
53 | *
54 | * @param context
55 | * @param reactInstanceManager
56 | */
57 | private static void initializeFlipper(
58 | Context context, ReactInstanceManager reactInstanceManager) {
59 | if (BuildConfig.DEBUG) {
60 | try {
61 | /*
62 | We use reflection here to pick up the class that initializes Flipper,
63 | since Flipper library is not available in release mode
64 | */
65 | Class> aClass = Class.forName("com.example.ReactNativeFlipper");
66 | aClass
67 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
68 | .invoke(null, context, reactInstanceManager);
69 | } catch (ClassNotFoundException e) {
70 | e.printStackTrace();
71 | } catch (NoSuchMethodException e) {
72 | e.printStackTrace();
73 | } catch (IllegalAccessException e) {
74 | e.printStackTrace();
75 | } catch (InvocationTargetException e) {
76 | e.printStackTrace();
77 | }
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/Example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/Example/ios/Example/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/js/RNPopoverMenu.js:
--------------------------------------------------------------------------------
1 | import React, { PureComponent } from "react";
2 | import { findNodeHandle, ViewPropTypes, NativeModules } from "react-native";
3 | import PropTypes from "prop-types";
4 |
5 | import RNImageHelper from "react-native-image-helper"
6 |
7 | import { Menu } from "./Menu";
8 |
9 | const { RNPopoverMenu } = NativeModules;
10 |
11 | class Popover extends PureComponent {
12 | static propTypes = {
13 | ...ViewPropTypes,
14 |
15 | visible: PropTypes.bool,
16 | tintColor: PropTypes.string,
17 | textColor: PropTypes.string,
18 | borderWidth: PropTypes.number,
19 | borderColor: PropTypes.string,
20 | separatorColor: PropTypes.string,
21 | menuWidth: PropTypes.number,
22 | rowHeight: PropTypes.number,
23 | textMargin: PropTypes.number,
24 | iconMargin: PropTypes.number,
25 | selectedRowBackgroundColor: PropTypes.string,
26 | roundedArrow: PropTypes.bool,
27 | menus: PropTypes.array,
28 | onDone: PropTypes.func,
29 | reference: PropTypes.object,
30 | theme: PropTypes.string,
31 | shadowColor: PropTypes.string,
32 | shadowOpacity: PropTypes.number,
33 | shadowRadius: PropTypes.number,
34 | shadowOffsetX: PropTypes.number,
35 | shadowOffsetY: PropTypes.number
36 | };
37 |
38 | static defaultProps = {
39 | visible: false,
40 | title: "",
41 | tintColor: "#FFFFFF",
42 | textColor: "",
43 | borderColor: "",
44 | separatorColor: "",
45 | borderWidth: 1,
46 | selectedRowBackgroundColor: '',
47 | roundedArrow: true,
48 | textMargin: 6,
49 | iconMargin: 6,
50 | menuWidth: 120,
51 | rowHeight: 40,
52 | menus: [],
53 | theme: "light",
54 | shadowColor: '#000000',
55 | shadowOpacity: 0,
56 | shadowRadius: 5,
57 | shadowOffsetX: 0,
58 | shadowOffsetY: 2
59 | };
60 |
61 | static Show(ref, props) {
62 |
63 | // unified default props handler
64 | Object.keys(Popover.defaultProps).map((id) => {
65 | if(props[id] === undefined) props[id] = Popover.defaultProps[id];
66 | });
67 |
68 |
69 | props.menus &&
70 | props.menus.forEach(menu => {
71 | menu.menus &&
72 | menu.menus.forEach(subMenu => {
73 | if (subMenu.icon && subMenu.icon.props) {
74 | subMenu.icon = subMenu.icon.props;
75 |
76 | let vectorIcon = RNImageHelper.Resolve(
77 | subMenu.icon.family,
78 | subMenu.icon.name
79 | );
80 | subMenu.icon = Object.assign({}, subMenu.icon, vectorIcon);
81 | } else if (subMenu.icon !== undefined) {
82 | subMenu.icon = {
83 | name: subMenu.icon,
84 | family: "",
85 | glyph: "",
86 | color: "",
87 | size: 0
88 | };
89 | }
90 | });
91 |
92 | if (menu.icon && menu.icon.props) {
93 | menu.icon = menu.icon.props;
94 |
95 | let vectorIcon = RNImageHelper.Resolve(menu.icon.family, menu.icon.name);
96 | menu.icon = Object.assign({}, menu.icon, vectorIcon);
97 | } else if (menu.icon !== undefined) {
98 | menu.icon = {
99 | name: menu.icon,
100 | family: "",
101 | glyph: "",
102 | color: "",
103 | size: 0
104 | };
105 | }
106 | });
107 |
108 | RNPopoverMenu.Show(
109 | findNodeHandle(ref),
110 | { ...props },
111 | (index, menuIndex) => {
112 | props.onDone && props.onDone(index, menuIndex);
113 | }
114 | );
115 | }
116 |
117 | componentDidMount() {
118 | this._show();
119 | }
120 |
121 | componentDidUpdate() {
122 | this._show();
123 | }
124 |
125 | _show() {
126 | let menus = [];
127 |
128 | React.Children.map(
129 | this.props.children,
130 | (mainItem, mainIndex, mainItems) => {
131 | let subMenus = [];
132 | React.Children.map(mainItem.props.children, (item, index, items) => {
133 | subMenus.push({
134 | label: item.props.label,
135 | icon: item.props.icon
136 | });
137 | });
138 |
139 | menus.push({
140 | label: mainItem.props.label,
141 | menus: subMenus
142 | });
143 | }
144 | );
145 |
146 | if (this.props.visible) {
147 | Popover.Show(this.props.reference, {
148 | tintColor: this.props.tintColor,
149 | textColor: this.props.textColor,
150 | borderWidth: this.props.borderWidth,
151 | borderColor: this.props.borderColor,
152 | menuWidth: this.props.menuWidth,
153 | rowHeight: this.props.rowHeight,
154 | textMargin: this.props.textMargin,
155 | iconMargin: this.props.iconMargin,
156 | roundedArrow: this.props.roundedArrow,
157 | selectedRowBackgroundColor: this.props.selectedRowBackgroundColor,
158 | menus: menus,
159 | theme: this.props.theme,
160 | separatorColor: this.props.separatorColor,
161 | shadowColor: this.props.shadowColor,
162 | shadowOpacity: this.props.shadowOpacity,
163 | shadowRadius: this.props.shadowRadius,
164 | shadowOffsetX: this.props.shadowOffsetX,
165 | shadowOffsetY: this.props.shadowOffsetY,
166 | onDone: this.props.onDone
167 | });
168 | }
169 | }
170 |
171 | render() {
172 | return null;
173 | }
174 | }
175 |
176 |
177 | Popover.Menu = Menu;
178 |
179 | export default Popover;
180 |
--------------------------------------------------------------------------------
/ios/RNPopoverMenu.m:
--------------------------------------------------------------------------------
1 |
2 | #import "RNPopoverMenu.h"
3 |
4 | @implementation RNPopoverMenu
5 |
6 | @synthesize bridge = _bridge;
7 |
8 | - (dispatch_queue_t)methodQueue {
9 | return dispatch_get_main_queue();
10 | }
11 |
12 | RCT_EXPORT_MODULE()
13 |
14 |
15 | RCT_EXPORT_METHOD(Show:(nonnull NSNumber *)view props:(nonnull NSDictionary *)props onDone:(RCTResponseSenderBlock)onDone) {
16 | UIViewController *vc = [UIApplication sharedApplication].delegate.window.rootViewController;
17 |
18 | UIView *target = [self.bridge.uiManager viewForReactTag: view];
19 |
20 | NSString *title = [props objectForKey: @"title"];
21 | NSString *tintColor = [props objectForKey: @"tintColor"];
22 | NSString *textColor = [props objectForKey: @"textColor"];
23 | NSString *borderColor = [props objectForKey: @"borderColor"];
24 | NSNumber *borderWidth = [props objectForKey: @"borderWidth"];
25 | NSNumber *textMargin = [props objectForKey: @"textMargin"];
26 | NSNumber *iconMargin = [props objectForKey: @"iconMargin"];
27 | NSString *selectedRowBackgroundColor = [props objectForKey: @"selectedRowBackgroundColor"];
28 | NSNumber *roundedArrow = [props objectForKey: @"roundedArrow"];
29 | NSString *separatorColor = [props objectForKey: @"separatorColor"];
30 | NSString *shadowColor = [props objectForKey: @"shadowColor"];
31 | NSNumber *shadowOpacity = [props objectForKey: @"shadowOpacity"];
32 | NSNumber *shadowRadius = [props objectForKey: @"shadowRadius"];
33 | NSNumber *shadowOffsetX = [props objectForKey: @"shadowOffsetX"];
34 | NSNumber *shadowOffsetY = [props objectForKey: @"shadowOffsetY"];
35 |
36 | NSNumber *menuWidth = [props objectForKey: @"menuWidth"];
37 | NSNumber *rowHeight = [props objectForKey: @"rowHeight"];
38 |
39 | NSArray *menus = [props objectForKey: @"menus"];
40 |
41 | NSMutableArray *menuTitles = [[NSMutableArray alloc] init];
42 | NSMutableArray *menuIcons = [[NSMutableArray alloc] init];
43 |
44 | for (NSDictionary *menu in menus) {
45 | NSArray *subMenus = [menu objectForKey: @"menus"];
46 | title = [menu objectForKey: @"label"];
47 |
48 | for (NSDictionary *subMenu in subMenus) {
49 | [menuTitles addObject: [subMenu objectForKey: @"label"]];
50 |
51 | NSDictionary *icon = [subMenu objectForKey: @"icon"];
52 | if (icon == nil) {
53 | [menuIcons addObject: [NSNull null]];
54 | continue;
55 | }
56 |
57 | [menuIcons addObject: [RNImageHelper GenerateImage: icon]];
58 | }
59 | }
60 |
61 | UIColor *tintColr;
62 | if ([tintColor length] > 0) {
63 | tintColr = [RNImageHelper ColorFromHexCode: tintColor];
64 | } else {
65 | tintColr = [UIColor clearColor];
66 | }
67 |
68 | UIColor *textColr;
69 | if ([textColor length] > 0) {
70 | textColr = [RNImageHelper ColorFromHexCode: textColor];
71 | }
72 |
73 | UIColor *selectedRowBackgroundColr;
74 | if ([selectedRowBackgroundColor length] > 0) {
75 | selectedRowBackgroundColr = [RNImageHelper ColorFromHexCode: selectedRowBackgroundColor];
76 | }
77 |
78 | UIColor *borderColr;
79 | if ([borderColor length] > 0) {
80 | borderColr = [RNImageHelper ColorFromHexCode: borderColor];
81 | } else {
82 | borderColr = [UIColor clearColor];
83 | }
84 |
85 | UIColor *separatorColr;
86 | if ([separatorColor length] > 0) {
87 | separatorColr = [RNImageHelper ColorFromHexCode: separatorColor];
88 | } else {
89 | separatorColr = [UIColor grayColor];
90 | }
91 |
92 | UIColor *shadowColr;
93 | if ([shadowColor length] > 0) {
94 | shadowColr = [RNImageHelper ColorFromHexCode: shadowColor];
95 | } else {
96 | shadowColr = [UIColor blackColor];
97 | }
98 |
99 |
100 | FTPopOverMenuConfiguration *configuration = [FTPopOverMenuConfiguration defaultConfiguration];
101 | configuration.menuRowHeight = [rowHeight longValue];
102 | configuration.menuWidth = [menuWidth longValue];
103 | configuration.textColor = textColr;
104 | configuration.menuTextMargin = [textMargin longValue];
105 | configuration.menuIconMargin = [iconMargin longValue];
106 | configuration.selectedCellBackgroundColor = selectedRowBackgroundColr;
107 | configuration.allowRoundedArrow = [roundedArrow boolValue];
108 | // configuration.textFont = ...
109 | configuration.backgroundColor = tintColr;
110 | configuration.borderColor = borderColr;
111 | configuration.borderWidth = [borderWidth longValue];
112 | configuration.separatorColor = separatorColr;
113 | configuration.shadowColor = shadowColr;
114 | configuration.shadowOpacity = [shadowOpacity floatValue];
115 | configuration.shadowRadius = [shadowRadius longValue];
116 | configuration.shadowOffsetX = [shadowOffsetX longValue];
117 | configuration.shadowOffsetY = [shadowOffsetY longValue];
118 |
119 | // configuration.textAlignment = ...
120 | // configuration.ignoreImageOriginalColor = ...;// set 'ignoreImageOriginalColor' to YES, images color will be same as textColor
121 | // configuration.allowRoundedArrow = ...// Default is 'NO', if sets to 'YES', the arrow will be drawn with round corner.
122 |
123 | [FTPopOverMenu showForSender:target withMenuArray:menuTitles imageArray:menuIcons configuration: configuration doneBlock:^(NSInteger selectedIndex) {
124 | onDone(@[[NSNumber numberWithLong: selectedIndex]]);
125 | } dismissBlock:^{
126 | }];
127 | }
128 |
129 | @end
130 |
--------------------------------------------------------------------------------
/Example/App.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, {Component} from 'react';
8 | import {
9 | Platform,
10 | StyleSheet,
11 | Text,
12 | View,
13 | TouchableHighlight,
14 | ImageBackground,
15 | } from 'react-native';
16 |
17 | import RNPopover from 'react-native-popover-menu';
18 | import Icon from 'react-native-vector-icons/FontAwesome';
19 |
20 | import Top from './components/Top';
21 | import Center from './components/Center';
22 | import Bottom from './components/Bottom';
23 |
24 | export default class App extends Component<{}> {
25 | constructor(props) {
26 | super(props);
27 |
28 | this.state = {
29 | visible: false,
30 | };
31 | }
32 |
33 | _onPress = ref => {
34 | let copy = (
35 |
36 | );
37 | let paste = (
38 |
39 | );
40 | let share = (
41 |
42 | );
43 |
44 | let meunsIOS = [
45 | {
46 | label: 'Editing',
47 | menus: [
48 | {
49 | label: 'Copy',
50 | icon: copy,
51 | },
52 | {
53 | label: 'Paste',
54 | icon: 'paste.png',
55 | },
56 | {
57 | label: 'Share',
58 | icon: share,
59 | },
60 | {
61 | label: 'Share me please',
62 | },
63 | ],
64 | },
65 | ];
66 |
67 | let menusAndroid = [
68 | {
69 | label: 'Editing',
70 | menus: [
71 | {
72 | label: 'Copy',
73 | icon: copy,
74 | },
75 | {
76 | label: 'Paste',
77 | icon: 'paste.png',
78 | },
79 | ],
80 | },
81 | {
82 | label: 'Other',
83 | menus: [
84 | {
85 | label: 'Share',
86 | icon: share,
87 | },
88 | ],
89 | },
90 | {
91 | label: '',
92 | menus: [
93 | {
94 | label: 'Share me please',
95 | },
96 | ],
97 | },
98 | ];
99 |
100 | let menus;
101 | if (Platform.OS === 'android') {
102 | menus = menusAndroid;
103 | } else if (Platform.OS === 'ios') {
104 | menus = meunsIOS;
105 | }
106 |
107 | RNPopover.Show(ref, {
108 | menus: menus,
109 | onDone: selection => {
110 | console.log('selected item index: ' + selection);
111 | },
112 | onCancel: () => {
113 | console.log('popover canceled');
114 | },
115 | tintColor: '#888888',
116 | textColor: '#FFFFFF',
117 | });
118 | };
119 |
120 | _show(ref) {
121 | this.ref = ref;
122 |
123 | this.setState({
124 | visible: true,
125 | });
126 | }
127 |
128 | render() {
129 | let copy = (
130 |
131 | );
132 | let paste = (
133 |
134 | );
135 | let share = (
136 |
137 | );
138 |
139 | let popover;
140 | if (Platform.OS === 'android') {
141 | popover = (
142 | {
146 | console.log(
147 | 'selection: ' + mainMenuSelection + ', ' + subMenuSelection,
148 | );
149 | }}>
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 | );
159 | } else if (Platform.OS === 'ios') {
160 | popover = (
161 | {
165 | console.log('selection: ' + selection);
166 | }}>
167 |
168 |
169 |
170 |
171 |
172 |
173 | );
174 | }
175 |
176 | return (
177 |
180 | {
183 | this._onPress(ref);
184 | // this._show(ref);
185 | }}
186 | />
187 | {
190 | this._onPress(ref);
191 | // this._show(ref);
192 | }}
193 | />
194 | {
197 | this._onPress(ref);
198 | // this._show(ref);
199 | }}
200 | />
201 | {popover}
202 |
203 | );
204 | }
205 | }
206 |
207 | const styles = StyleSheet.create({
208 | backgroundImage: {
209 | flex: 1,
210 | width: null,
211 | height: null,
212 | flexDirection: 'column',
213 | justifyContent: 'space-between',
214 | },
215 | textStyle: {
216 | color: '#FFFFFF',
217 | },
218 | top: {
219 | flex: 1,
220 | },
221 | center: {
222 | flex: 1,
223 | },
224 | bottom: {
225 | flex: 1,
226 | },
227 | });
228 |
--------------------------------------------------------------------------------
/Example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/android/src/main/java/ui/popovermenu/RNPopoverMenuModule.java:
--------------------------------------------------------------------------------
1 |
2 | package ui.popovermenu;
3 |
4 | import android.annotation.TargetApi;
5 | import android.app.Activity;
6 | import android.content.res.ColorStateList;
7 | import android.content.res.Resources;
8 | import android.graphics.Bitmap;
9 | import android.graphics.BitmapFactory;
10 | import android.graphics.Canvas;
11 | import android.graphics.Color;
12 | import android.graphics.Paint;
13 | import android.graphics.PorterDuff;
14 | import android.graphics.Rect;
15 | import android.graphics.Typeface;
16 | import android.graphics.drawable.BitmapDrawable;
17 | import android.graphics.drawable.Drawable;
18 | import android.graphics.drawable.DrawableContainer;
19 | import android.os.StrictMode;
20 | import androidx.annotation.DrawableRes;
21 | import androidx.appcompat.widget.AppCompatDrawableManager;
22 | import androidx.appcompat.widget.AppCompatImageView;
23 | import android.util.Log;
24 | import android.view.View;
25 | import android.view.ViewGroup;
26 | import android.widget.LinearLayout;
27 | import android.widget.TextView;
28 |
29 | import com.facebook.react.bridge.Callback;
30 | import com.facebook.react.bridge.ReactApplicationContext;
31 | import com.facebook.react.bridge.ReactContextBaseJavaModule;
32 | import com.facebook.react.bridge.ReactMethod;
33 | import com.facebook.react.bridge.ReadableArray;
34 | import com.facebook.react.bridge.ReadableMap;
35 |
36 | import com.facebook.react.views.text.ReactFontManager;
37 | import com.github.zawadz88.materialpopupmenu.MaterialPopupMenuBuilder;
38 | import com.github.zawadz88.materialpopupmenu.MaterialPopupMenuBuilder.*;
39 | import com.github.zawadz88.materialpopupmenu.MaterialPopupMenu;
40 | import com.oblador.vectoricons.VectorIconsModule;
41 |
42 | import java.lang.reflect.Method;
43 | import java.net.URL;
44 | import java.util.ArrayList;
45 |
46 | import kotlin.Function;
47 | import kotlin.Unit;
48 | import kotlin.jvm.functions.Function0;
49 | import kotlin.jvm.functions.Function1;
50 |
51 |
52 | public class RNPopoverMenuModule extends ReactContextBaseJavaModule {
53 |
54 | public RNPopoverMenuModule(ReactApplicationContext reactContext) {
55 | super(reactContext);
56 | }
57 |
58 | @Override
59 | public String getName() {
60 | return "RNPopoverMenu";
61 | }
62 |
63 |
64 | @TargetApi(21)
65 | @ReactMethod
66 | public void Show(final int view, final ReadableMap props, final Callback onDone) {
67 |
68 | final RNPopoverMenuModule me = this;
69 | final Activity activity = getCurrentActivity();
70 | final View viewGroup = activity.findViewById(view);
71 |
72 | String title = props.getString("title");
73 | String tintColor = props.getString("tintColor");
74 |
75 | int menuWidth = props.getInt("menuWidth");
76 | int rowHeight = props.getInt("rowHeight");
77 |
78 | final ReadableArray menus = props.getArray("menus");
79 |
80 | final MaterialPopupMenuBuilder popupMenuBuilder = new MaterialPopupMenuBuilder();
81 |
82 | if (props.getString("theme").equalsIgnoreCase("dark")) {
83 | popupMenuBuilder.setStyle(R.style.Widget_MPM_Menu_Dark_CustomBackground);
84 | }
85 |
86 | for (int i = 0; i < menus.size(); i++) {
87 | final int index = i;
88 |
89 | Function1 secFunc = new Function1() {
90 | @Override
91 | public Object invoke(Object o) {
92 |
93 | SectionHolder sectionHolder = (SectionHolder) o;
94 |
95 | ReadableMap menu = menus.getMap(index);
96 |
97 | if (menu.hasKey("label") && !menu.isNull("label")) {
98 | ((SectionHolder) o).setTitle(menu.getString("label"));
99 | }
100 |
101 | if (menu.hasKey("menus") && !menu.isNull("menus")) {
102 | ReadableArray subMenus = menu.getArray("menus");
103 |
104 | for (int j = 0; j < subMenus.size(); j++) {
105 |
106 | final int menuIndex = j;
107 | final ReadableMap subMenu = subMenus.getMap(j);
108 |
109 | final Function1 itemFunc = new Function1() {
110 | @Override
111 | public Object invoke(Object o) {
112 | CustomItemHolder item = (CustomItemHolder) o;
113 | item.setLayoutResId(R.layout.mpm_popup_menu_item);
114 |
115 | final Function1 customItemLayout = new Function1() {
116 | @Override
117 | public Object invoke(Object o) {
118 | LinearLayout layout = (LinearLayout) o;
119 |
120 | AppCompatImageView imageView = (AppCompatImageView) layout.findViewById(R.id.mpm_popup_menu_item_icon);
121 | if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
122 | imageView.setImageTintMode(PorterDuff.Mode.DST);
123 | }
124 |
125 | TextView textView = (TextView) layout.findViewById(R.id.mpm_popup_menu_item_label);
126 |
127 | if (subMenu.hasKey("label") && !subMenu.isNull("label")) {
128 | textView.setText(subMenu.getString("label"));
129 | }
130 | if (subMenu.hasKey("icon") && !subMenu.isNull("icon")) {
131 | ReadableMap icon = subMenu.getMap("icon");
132 | Drawable drawable = null;
133 |
134 | try {
135 | Class> clazz = Class.forName("prscx.imagehelper.RNImageHelperModule"); //Controller A or B
136 | Class params[] = {ReadableMap.class};
137 | Method method = clazz.getDeclaredMethod("GenerateImage", params);
138 |
139 | drawable = (Drawable) method.invoke(null, icon);
140 | Log.d("", "");
141 | } catch (Exception e) {
142 | Log.d("", "");
143 | }
144 |
145 | if (drawable != null) {
146 | imageView.setVisibility(View.VISIBLE);
147 | imageView.setImageDrawable(drawable);
148 | }
149 | }
150 |
151 | return o;
152 | }
153 | };
154 |
155 |
156 | item.setViewBoundCallback(customItemLayout);
157 |
158 | final Function0 onDoneCallback = new Function0() {
159 | @Override
160 | public Object invoke() {
161 | onDone.invoke(index, menuIndex);
162 |
163 | return null;
164 | }
165 | };
166 |
167 | item.setCallback(onDoneCallback);
168 |
169 | return item;
170 | }
171 | };
172 |
173 |
174 | ((SectionHolder) o).customItem(itemFunc);
175 | }
176 | }
177 |
178 | return o;
179 | }
180 | };
181 |
182 | popupMenuBuilder.section(secFunc);
183 | }
184 |
185 |
186 | this.getCurrentActivity().runOnUiThread(new Runnable() {
187 | @Override
188 | public void run() {
189 | MaterialPopupMenu menu = popupMenuBuilder.build();
190 | menu.show(activity, viewGroup);
191 |
192 | // final Function0 onCancelCallback = new Function0() {
193 | // @Override
194 | // public Object invoke() {
195 | // onCancel.invoke();
196 |
197 | // return null;
198 | // }
199 | // };
200 |
201 | // menu.setOnDismissListener(onCancelCallback);
202 | }
203 | });
204 | }
205 | }
206 |
--------------------------------------------------------------------------------
/Example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation. If none specified and
19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20 | * // default. Can be overridden with ENTRY_FILE environment variable.
21 | * entryFile: "index.android.js",
22 | *
23 | * // https://reactnative.dev/docs/performance#enable-the-ram-format
24 | * bundleCommand: "ram-bundle",
25 | *
26 | * // whether to bundle JS and assets in debug mode
27 | * bundleInDebug: false,
28 | *
29 | * // whether to bundle JS and assets in release mode
30 | * bundleInRelease: true,
31 | *
32 | * // whether to bundle JS and assets in another build variant (if configured).
33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34 | * // The configuration property can be in the following formats
35 | * // 'bundleIn${productFlavor}${buildType}'
36 | * // 'bundleIn${buildType}'
37 | * // bundleInFreeDebug: true,
38 | * // bundleInPaidRelease: true,
39 | * // bundleInBeta: true,
40 | *
41 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
42 | * // for example: to disable dev mode in the staging build type (if configured)
43 | * devDisabledInStaging: true,
44 | * // The configuration property can be in the following formats
45 | * // 'devDisabledIn${productFlavor}${buildType}'
46 | * // 'devDisabledIn${buildType}'
47 | *
48 | * // the root of your project, i.e. where "package.json" lives
49 | * root: "../../",
50 | *
51 | * // where to put the JS bundle asset in debug mode
52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53 | *
54 | * // where to put the JS bundle asset in release mode
55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56 | *
57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
58 | * // require('./image.png')), in debug mode
59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60 | *
61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
62 | * // require('./image.png')), in release mode
63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64 | *
65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69 | * // for example, you might want to remove it from here.
70 | * inputExcludes: ["android/**", "ios/**"],
71 | *
72 | * // override which node gets called and with what additional arguments
73 | * nodeExecutableAndArgs: ["node"],
74 | *
75 | * // supply additional arguments to the packager
76 | * extraPackagerArgs: []
77 | * ]
78 | */
79 |
80 | project.ext.react = [
81 | enableHermes: false, // clean and rebuild if changing
82 | ]
83 |
84 | apply from: "../../node_modules/react-native/react.gradle"
85 | apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
86 |
87 | /**
88 | * Set this to true to create two separate APKs instead of one:
89 | * - An APK that only works on ARM devices
90 | * - An APK that only works on x86 devices
91 | * The advantage is the size of the APK is reduced by about 4MB.
92 | * Upload all the APKs to the Play Store and people will download
93 | * the correct one based on the CPU architecture of their device.
94 | */
95 | def enableSeparateBuildPerCPUArchitecture = false
96 |
97 | /**
98 | * Run Proguard to shrink the Java bytecode in release builds.
99 | */
100 | def enableProguardInReleaseBuilds = false
101 |
102 | /**
103 | * The preferred build flavor of JavaScriptCore.
104 | *
105 | * For example, to use the international variant, you can use:
106 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
107 | *
108 | * The international variant includes ICU i18n library and necessary data
109 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
110 | * give correct results when using with locales other than en-US. Note that
111 | * this variant is about 6MiB larger per architecture than default.
112 | */
113 | def jscFlavor = 'org.webkit:android-jsc:+'
114 |
115 | /**
116 | * Whether to enable the Hermes VM.
117 | *
118 | * This should be set on project.ext.react and mirrored here. If it is not set
119 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
120 | * and the benefits of using Hermes will therefore be sharply reduced.
121 | */
122 | def enableHermes = project.ext.react.get("enableHermes", false);
123 |
124 | android {
125 | ndkVersion rootProject.ext.ndkVersion
126 |
127 | compileSdkVersion rootProject.ext.compileSdkVersion
128 |
129 | compileOptions {
130 | sourceCompatibility JavaVersion.VERSION_1_8
131 | targetCompatibility JavaVersion.VERSION_1_8
132 | }
133 |
134 | defaultConfig {
135 | applicationId "com.example"
136 | minSdkVersion rootProject.ext.minSdkVersion
137 | targetSdkVersion rootProject.ext.targetSdkVersion
138 | versionCode 1
139 | versionName "1.0"
140 | }
141 | splits {
142 | abi {
143 | reset()
144 | enable enableSeparateBuildPerCPUArchitecture
145 | universalApk false // If true, also generate a universal APK
146 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
147 | }
148 | }
149 | signingConfigs {
150 | debug {
151 | storeFile file('debug.keystore')
152 | storePassword 'android'
153 | keyAlias 'androiddebugkey'
154 | keyPassword 'android'
155 | }
156 | }
157 | buildTypes {
158 | debug {
159 | signingConfig signingConfigs.debug
160 | }
161 | release {
162 | // Caution! In production, you need to generate your own keystore file.
163 | // see https://reactnative.dev/docs/signed-apk-android.
164 | signingConfig signingConfigs.debug
165 | minifyEnabled enableProguardInReleaseBuilds
166 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
167 | }
168 | }
169 |
170 | // applicationVariants are e.g. debug, release
171 | applicationVariants.all { variant ->
172 | variant.outputs.each { output ->
173 | // For each separate APK per architecture, set a unique version code as described here:
174 | // https://developer.android.com/studio/build/configure-apk-splits.html
175 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
176 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
177 | def abi = output.getFilter(OutputFile.ABI)
178 | if (abi != null) { // null for the universal-debug, universal-release variants
179 | output.versionCodeOverride =
180 | defaultConfig.versionCode * 1000 + versionCodes.get(abi)
181 | }
182 |
183 | }
184 | }
185 | }
186 |
187 | dependencies {
188 | implementation fileTree(dir: "libs", include: ["*.jar"])
189 | //noinspection GradleDynamicVersion
190 | implementation "com.facebook.react:react-native:+" // From node_modules
191 |
192 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
193 |
194 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
195 | exclude group:'com.facebook.fbjni'
196 | }
197 |
198 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
199 | exclude group:'com.facebook.flipper'
200 | exclude group:'com.squareup.okhttp3', module:'okhttp'
201 | }
202 |
203 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
204 | exclude group:'com.facebook.flipper'
205 | }
206 |
207 | if (enableHermes) {
208 | def hermesPath = "../../node_modules/hermes-engine/android/";
209 | debugImplementation files(hermesPath + "hermes-debug.aar")
210 | releaseImplementation files(hermesPath + "hermes-release.aar")
211 | } else {
212 | implementation jscFlavor
213 | }
214 | }
215 |
216 | // Run this once to be able to run the application with BUCK
217 | // puts all compile dependencies into folder libs for BUCK to use
218 | task copyDownloadableDepsToLibs(type: Copy) {
219 | from configurations.compile
220 | into 'libs'
221 | }
222 |
223 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
224 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright @ [Pranav Raj Singh Chauhan]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | ReactNative: Native Popover Menu (Android/iOS)
16 |
17 | If this project has helped you out, please support us with a star 🌟
18 |
19 |
20 | This library is a React Native bridge around native popover libraries. It allows show/guide beautiful popover menus:
21 |
22 | | **Android: [zawadz88/MaterialPopupMenu](https://github.com/zawadz88/MaterialPopupMenu)** |
23 | | ----------------- |
24 | | |
25 |
26 |
27 | | **iOS: [liufengting/FTPopOverMenu](https://github.com/liufengting/FTPopOverMenu)** |
28 | | ----------------- |
29 | | |
30 |
31 |
32 | ## 📖 Getting started
33 |
34 | `$ npm install react-native-popover-menu --save`
35 |
36 | ## **RN61 >= RNBAS V2 >**
37 |
38 | - Add `react-native-image-helper` your app package.json
39 |
40 | `$ npm install react-native-image-helper --save`
41 |
42 | - Add `react-native-vector-icons` to your app package.json and configure it as per their installation steps
43 |
44 | `$ npm install react-native-vector-icons --save`
45 |
46 |
47 | - **iOS**
48 |
49 | > **iOS Prerequisite:** Please make sure `CocoaPods` is installed on your system
50 |
51 | - Add the following to your `Podfile` -> `ios/Podfile` and run pod update:
52 |
53 |
54 | ```
55 | use_native_modules!
56 |
57 | pod 'RNPopoverMenu', :path => '../node_modules/react-native-popover-menu/ios'
58 |
59 | post_install do |installer|
60 | installer.pods_project.targets.each do |target|
61 | target.build_configurations.each do |config|
62 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
63 | end
64 | end
65 | end
66 | ```
67 |
68 | - **Android**
69 |
70 | Please add below snippet into your app `build.gradle`
71 |
72 | ```
73 | allprojects {
74 | repositories {
75 | maven { url 'https://jitpack.io' }
76 | }
77 | }
78 | ```
79 |
80 |
81 | ## **RN61 >= RNPM V1 >**
82 |
83 | > RN60 above please use `react-native-popover-menu` V1 and above
84 |
85 | - **iOS**
86 |
87 | > **iOS Prerequisite:** Please make sure `CocoaPods` is installed on your system
88 |
89 | - Add the following to your `Podfile` -> `ios/Podfile` and run pod update:
90 |
91 |
92 | ```
93 | use_native_modules!
94 |
95 | pod 'RNPopoverMenu', :path => '../node_modules/react-native-popover-menu/ios'
96 |
97 | post_install do |installer|
98 | installer.pods_project.targets.each do |target|
99 | target.build_configurations.each do |config|
100 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
101 | end
102 | end
103 | end
104 | ```
105 |
106 | - **Android**
107 |
108 | Please add below snippet into your app `build.gradle`
109 |
110 | ```
111 | allprojects {
112 | repositories {
113 | maven { url 'https://jitpack.io' }
114 | }
115 | }
116 | ```
117 |
118 |
119 | ## **RN61 < RNPO V1 <**
120 |
121 | > RN60 below please use `react-native-popover-menu` V.0.*
122 |
123 | `$ react-native link react-native-popover-menu`
124 |
125 | `$ react-native link react-native-vector-icons`
126 |
127 | - **Android**
128 |
129 | Please add below snippet into your app build.gradle
130 |
131 | ```
132 |
133 | buildscript {
134 | repositories {
135 | jcenter()
136 | maven { url "https://maven.google.com" }
137 | }
138 | ...
139 | }
140 |
141 | allprojects {
142 | repositories {
143 | mavenLocal()
144 | jcenter()
145 | maven { url "https://maven.google.com" }
146 | ...
147 | }
148 | }
149 |
150 | dependencies {
151 | implementation 'com.android.support:appcompat-v7:28.0.0'
152 | }
153 |
154 | ```
155 |
156 | > **Note:** This library is supported Android SDK 28 > above
157 |
158 | - **iOS**
159 | - After `react-native link react-native-popover-menu`, please verify `node_modules/react-native-popover-menu/ios/` contains `Pods` folder. If does not exist please execute `pod install` command on `node_modules/react-native-popover-menu/ios/`, if any error => try `pod repo update` then `pod install`
160 |
161 |
162 |
163 | ## 💻 Usage
164 |
165 | ```javascript
166 | import RNPopover from 'react-native-popover-menu';
167 |
168 | import Icon from 'react-native-vector-icons'
169 |
170 | ```
171 |
172 | - React Way
173 |
174 | ```javascript
175 |
176 | let copy =
177 | let paste =
178 | let share =
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 | ;
189 | ```
190 |
191 | - API Way
192 |
193 | ```javascript
194 |
195 |
196 | let copy =
197 | let paste =
198 | let share =
199 |
200 | let menus = [
201 | {
202 | label: "Editing",
203 | menus: [
204 | { label: "Copy", icon: copy },
205 | { label: "Paste", icon: paste }
206 | ]
207 | },
208 | {
209 | label: "Other",
210 | menus: [
211 | { label: "Share", icon: share }
212 | ]
213 | },
214 | {
215 | label: "",
216 | menus: [
217 | { label: "Share me please" }
218 | ]
219 | }
220 | ]
221 |
222 | RNPopover.Show(this.ref, {
223 | title: "",
224 | menus: menus,
225 | onDone: selection => { }
226 | });
227 |
228 | ```
229 |
230 | > **Note:**
231 | > - We have added `family` prop for `Icon` class, please make sure that you pass the props
232 |
233 |
234 | ## 💡 Props
235 |
236 | - **Props: Generic**
237 |
238 | | Prop | Type | Default | Note |
239 | | ----------------- | ---------- | ------- | ---------------------------------------------------------------------------------------------------------- |
240 | | `title` | `string` | | Title of popover section
241 | | `menus` | `array` | | Array of Menus | |
242 | | `onDone(sectionSelection, menuSelection)` | `func` | | It is called when menu is selected | |
243 |
244 |
245 | - **Props: Android**
246 |
247 | | Prop | Type | Default | Note |
248 | | ----------------- | ---------- | ------- | ---------------------------------------------------------------------------------------------------------- |
249 | | `theme` | `string` | light | Light & Dark theme support only on Android Platform
250 |
251 | - **Props: iOS**
252 |
253 |
254 | | Prop | Type | Default | Note |
255 | | ----------------- | ---------- | ------- | ---------------------------------------------------------------------------------------------------------- |
256 | | `tintColor` | `string` | '#FFFFFF' | Color of tint
257 | | `menuWidth` | `number` | | Specify menu width of the Popover |
258 | | `rowHeight` | `number` | | Height of the menu row |
259 | | `rowHeight` | `number` | | Height of the menu row |
260 | | `textMargin` | `number` | | Specify text margin from icon |
261 | | `iconMargin` | `number` | | Specify icon margin from border |
262 | | `selectedRowBackgroundColor` | `string` | | Specify selected row background color |
263 | | `roundedArrow` | `bool` | | Specify whether rounded arrow required or not |
264 | | `textColor` | `string` | | Specify text color |
265 | | `borderColor` | `string` | | Specify border color |
266 | | `borderWidth` | `number` | | Specify border width |
267 | | `separatorColor` | `string` | | Specify the menu separator color |
268 | | `shadowColor` | `string` | | Specify the shadow color |
269 | | `shadowOpacity` | `float` | | Specify shadow opacity between 0 and 1. 0 disables the shadow. |
270 | | `shadowRadius` | `number` | | Specify shadow radius |
271 | | `shadowOffsetX` | `number` | | Specify the horizontal shadow offset |
272 | | `shadowOffsetY` | `number` | | Specify the vertical shadow offset |
273 |
274 |
275 | ## Icons
276 |
277 | - **RN Vector Icons:** It supports [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons) library. Please find below snippet for the usage:
278 |
279 | ```javascript
280 | let facebook =
281 |
282 |
283 | ```
284 |
285 | > **Note:**
286 | > - We have added `family` prop for `Icon` class, please make sure that you pass the props
287 |
288 |
289 | - **Custom Icons**
290 |
291 | > **Note:**
292 | > Since we are using native libraries, we have not found a solution in order to render RN Images in production, therefore please copy all your image assets in platform specific folders:
293 |
294 | - Android: Please copy your image assets in app resource drawable folder
295 | - iOS: Please copy your image assets in app resources folder
296 |
297 | > Please refer example application for the image usage.
298 |
299 |
300 | ## ✨ Credits
301 |
302 | - Android: [zawadz88/MaterialPopupMenu](https://github.com/zawadz88/MaterialPopupMenu)
303 | - iOS: [liufengting/FTPopOverMenu](https://github.com/liufengting/FTPopOverMenu)
304 |
305 |
306 | ## 🤔 How to contribute
307 | Have an idea? Found a bug? Please raise to [ISSUES](https://github.com/prscX/react-native-popover-menu/issues).
308 | Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.
309 |
310 | ## 💫 Where is this library used?
311 | If you are using this library in one of your projects, add it in this list below. ✨
312 |
313 |
314 | ## 📜 License
315 | This library is provided under the Apache License.
316 |
317 | RNPopoverMenu @ [prscX](https://github.com/prscX)
318 |
319 | ## 💖 Support my projects
320 | I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
321 |
322 | However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
323 | * Starring and sharing the projects you like 🚀
324 | * If you're feeling especially charitable, please follow [prscX](https://github.com/prscX) on GitHub.
325 |
326 |
327 |
328 | Thanks! ❤️
329 |
330 | [prscX.github.io](https://prscx.github.io)
331 |
332 | Pranav >
333 |
--------------------------------------------------------------------------------
/ios/RNPopoverMenu.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 9E75914C5F3F7559410B1F01 /* libPods-RNPopoverMenu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A1B2375F26251817A6457EA /* libPods-RNPopoverMenu.a */; };
11 | B3E7B58A1CC2AC0600A0062D /* RNPopoverMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNPopoverMenu.m */; };
12 | CE1CAB7F20C135C400CC6A88 /* libFTPopOverMenu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE1CAB7C20C135BF00CC6A88 /* libFTPopOverMenu.a */; };
13 | /* End PBXBuildFile section */
14 |
15 | /* Begin PBXContainerItemProxy section */
16 | CE1CAB7B20C135BF00CC6A88 /* PBXContainerItemProxy */ = {
17 | isa = PBXContainerItemProxy;
18 | containerPortal = CE1CAB7620C135BF00CC6A88 /* Pods.xcodeproj */;
19 | proxyType = 2;
20 | remoteGlobalIDString = CA104838A77246FCC6400422D1977027;
21 | remoteInfo = FTPopOverMenu;
22 | };
23 | CE1CAB7D20C135BF00CC6A88 /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = CE1CAB7620C135BF00CC6A88 /* Pods.xcodeproj */;
26 | proxyType = 2;
27 | remoteGlobalIDString = 161B9FDD9B4922F493FC2F2215AC915D;
28 | remoteInfo = "Pods-RNPopoverMenu";
29 | };
30 | /* End PBXContainerItemProxy section */
31 |
32 | /* Begin PBXCopyFilesBuildPhase section */
33 | 58B511D91A9E6C8500147676 /* CopyFiles */ = {
34 | isa = PBXCopyFilesBuildPhase;
35 | buildActionMask = 2147483647;
36 | dstPath = "include/$(PRODUCT_NAME)";
37 | dstSubfolderSpec = 16;
38 | files = (
39 | );
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXCopyFilesBuildPhase section */
43 |
44 | /* Begin PBXFileReference section */
45 | 134814201AA4EA6300B7C361 /* libRNPopoverMenu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNPopoverMenu.a; sourceTree = BUILT_PRODUCTS_DIR; };
46 | 22DD7C199DACB7CD866BC1A8 /* Pods-RNPopoverMenu.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPopoverMenu.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNPopoverMenu/Pods-RNPopoverMenu.release.xcconfig"; sourceTree = ""; };
47 | 8A1B2375F26251817A6457EA /* libPods-RNPopoverMenu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPopoverMenu.a"; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 985631E79BC598F4F7889139 /* Pods-RNPopoverMenu.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPopoverMenu.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNPopoverMenu/Pods-RNPopoverMenu.debug.xcconfig"; sourceTree = ""; };
49 | B3E7B5881CC2AC0600A0062D /* RNPopoverMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPopoverMenu.h; sourceTree = ""; };
50 | B3E7B5891CC2AC0600A0062D /* RNPopoverMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPopoverMenu.m; sourceTree = ""; };
51 | CE1CAB7620C135BF00CC6A88 /* Pods.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Pods.xcodeproj; path = Pods/Pods.xcodeproj; sourceTree = ""; };
52 | CEF11505202072E10020BD9D /* FTPopTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTPopTableViewController.m; sourceTree = ""; };
53 | CEF11506202072E10020BD9D /* FTPopMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPopMenu.h; sourceTree = ""; };
54 | CEF11507202072E10020BD9D /* UIViewController+FTPopMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+FTPopMenu.h"; sourceTree = ""; };
55 | CEF11508202072E10020BD9D /* FTPopTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPopTableViewController.h; sourceTree = ""; };
56 | CEF11509202072E10020BD9D /* FTPopMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTPopMenu.m; sourceTree = ""; };
57 | CEF1150A202072E10020BD9D /* UIViewController+FTPopMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+FTPopMenu.m"; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | CE1CAB7F20C135C400CC6A88 /* libFTPopOverMenu.a in Frameworks */,
66 | 9E75914C5F3F7559410B1F01 /* libPods-RNPopoverMenu.a in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | /* End PBXFrameworksBuildPhase section */
71 |
72 | /* Begin PBXGroup section */
73 | 065388F27319BB3A33189C25 /* Pods */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 985631E79BC598F4F7889139 /* Pods-RNPopoverMenu.debug.xcconfig */,
77 | 22DD7C199DACB7CD866BC1A8 /* Pods-RNPopoverMenu.release.xcconfig */,
78 | );
79 | name = Pods;
80 | sourceTree = "";
81 | };
82 | 134814211AA4EA7D00B7C361 /* Products */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 134814201AA4EA6300B7C361 /* libRNPopoverMenu.a */,
86 | );
87 | name = Products;
88 | sourceTree = "";
89 | };
90 | 1FB11D3266EEB0553690E38E /* Frameworks */ = {
91 | isa = PBXGroup;
92 | children = (
93 | CE1CAB7620C135BF00CC6A88 /* Pods.xcodeproj */,
94 | 8A1B2375F26251817A6457EA /* libPods-RNPopoverMenu.a */,
95 | );
96 | name = Frameworks;
97 | sourceTree = "";
98 | };
99 | 58B511D21A9E6C8500147676 = {
100 | isa = PBXGroup;
101 | children = (
102 | CEF11504202072E10020BD9D /* FTPopMenu */,
103 | B3E7B5881CC2AC0600A0062D /* RNPopoverMenu.h */,
104 | B3E7B5891CC2AC0600A0062D /* RNPopoverMenu.m */,
105 | 134814211AA4EA7D00B7C361 /* Products */,
106 | 065388F27319BB3A33189C25 /* Pods */,
107 | 1FB11D3266EEB0553690E38E /* Frameworks */,
108 | );
109 | sourceTree = "";
110 | };
111 | CE1CAB7720C135BF00CC6A88 /* Products */ = {
112 | isa = PBXGroup;
113 | children = (
114 | CE1CAB7C20C135BF00CC6A88 /* libFTPopOverMenu.a */,
115 | CE1CAB7E20C135BF00CC6A88 /* libPods-RNPopoverMenu.a */,
116 | );
117 | name = Products;
118 | sourceTree = "";
119 | };
120 | CEF11504202072E10020BD9D /* FTPopMenu */ = {
121 | isa = PBXGroup;
122 | children = (
123 | CEF11505202072E10020BD9D /* FTPopTableViewController.m */,
124 | CEF11506202072E10020BD9D /* FTPopMenu.h */,
125 | CEF11507202072E10020BD9D /* UIViewController+FTPopMenu.h */,
126 | CEF11508202072E10020BD9D /* FTPopTableViewController.h */,
127 | CEF11509202072E10020BD9D /* FTPopMenu.m */,
128 | CEF1150A202072E10020BD9D /* UIViewController+FTPopMenu.m */,
129 | );
130 | name = FTPopMenu;
131 | path = FTPopMenu/FTPopMenu;
132 | sourceTree = "";
133 | };
134 | /* End PBXGroup section */
135 |
136 | /* Begin PBXNativeTarget section */
137 | 58B511DA1A9E6C8500147676 /* RNPopoverMenu */ = {
138 | isa = PBXNativeTarget;
139 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNPopoverMenu" */;
140 | buildPhases = (
141 | A86A64A57896037A6245B112 /* [CP] Check Pods Manifest.lock */,
142 | 58B511D71A9E6C8500147676 /* Sources */,
143 | 58B511D81A9E6C8500147676 /* Frameworks */,
144 | 58B511D91A9E6C8500147676 /* CopyFiles */,
145 | );
146 | buildRules = (
147 | );
148 | dependencies = (
149 | );
150 | name = RNPopoverMenu;
151 | productName = RCTDataManager;
152 | productReference = 134814201AA4EA6300B7C361 /* libRNPopoverMenu.a */;
153 | productType = "com.apple.product-type.library.static";
154 | };
155 | /* End PBXNativeTarget section */
156 |
157 | /* Begin PBXProject section */
158 | 58B511D31A9E6C8500147676 /* Project object */ = {
159 | isa = PBXProject;
160 | attributes = {
161 | LastUpgradeCheck = 0830;
162 | ORGANIZATIONNAME = Facebook;
163 | TargetAttributes = {
164 | 58B511DA1A9E6C8500147676 = {
165 | CreatedOnToolsVersion = 6.1.1;
166 | };
167 | };
168 | };
169 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNPopoverMenu" */;
170 | compatibilityVersion = "Xcode 3.2";
171 | developmentRegion = English;
172 | hasScannedForEncodings = 0;
173 | knownRegions = (
174 | en,
175 | );
176 | mainGroup = 58B511D21A9E6C8500147676;
177 | productRefGroup = 58B511D21A9E6C8500147676;
178 | projectDirPath = "";
179 | projectReferences = (
180 | {
181 | ProductGroup = CE1CAB7720C135BF00CC6A88 /* Products */;
182 | ProjectRef = CE1CAB7620C135BF00CC6A88 /* Pods.xcodeproj */;
183 | },
184 | );
185 | projectRoot = "";
186 | targets = (
187 | 58B511DA1A9E6C8500147676 /* RNPopoverMenu */,
188 | );
189 | };
190 | /* End PBXProject section */
191 |
192 | /* Begin PBXReferenceProxy section */
193 | CE1CAB7C20C135BF00CC6A88 /* libFTPopOverMenu.a */ = {
194 | isa = PBXReferenceProxy;
195 | fileType = archive.ar;
196 | path = libFTPopOverMenu.a;
197 | remoteRef = CE1CAB7B20C135BF00CC6A88 /* PBXContainerItemProxy */;
198 | sourceTree = BUILT_PRODUCTS_DIR;
199 | };
200 | CE1CAB7E20C135BF00CC6A88 /* libPods-RNPopoverMenu.a */ = {
201 | isa = PBXReferenceProxy;
202 | fileType = archive.ar;
203 | path = "libPods-RNPopoverMenu.a";
204 | remoteRef = CE1CAB7D20C135BF00CC6A88 /* PBXContainerItemProxy */;
205 | sourceTree = BUILT_PRODUCTS_DIR;
206 | };
207 | /* End PBXReferenceProxy section */
208 |
209 | /* Begin PBXShellScriptBuildPhase section */
210 | A86A64A57896037A6245B112 /* [CP] Check Pods Manifest.lock */ = {
211 | isa = PBXShellScriptBuildPhase;
212 | buildActionMask = 2147483647;
213 | files = (
214 | );
215 | inputPaths = (
216 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
217 | "${PODS_ROOT}/Manifest.lock",
218 | );
219 | name = "[CP] Check Pods Manifest.lock";
220 | outputPaths = (
221 | "$(DERIVED_FILE_DIR)/Pods-RNPopoverMenu-checkManifestLockResult.txt",
222 | );
223 | runOnlyForDeploymentPostprocessing = 0;
224 | shellPath = /bin/sh;
225 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
226 | showEnvVarsInLog = 0;
227 | };
228 | /* End PBXShellScriptBuildPhase section */
229 |
230 | /* Begin PBXSourcesBuildPhase section */
231 | 58B511D71A9E6C8500147676 /* Sources */ = {
232 | isa = PBXSourcesBuildPhase;
233 | buildActionMask = 2147483647;
234 | files = (
235 | B3E7B58A1CC2AC0600A0062D /* RNPopoverMenu.m in Sources */,
236 | );
237 | runOnlyForDeploymentPostprocessing = 0;
238 | };
239 | /* End PBXSourcesBuildPhase section */
240 |
241 | /* Begin XCBuildConfiguration section */
242 | 58B511ED1A9E6C8500147676 /* Debug */ = {
243 | isa = XCBuildConfiguration;
244 | buildSettings = {
245 | ALWAYS_SEARCH_USER_PATHS = NO;
246 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
247 | CLANG_CXX_LIBRARY = "libc++";
248 | CLANG_ENABLE_MODULES = YES;
249 | CLANG_ENABLE_OBJC_ARC = YES;
250 | CLANG_WARN_BOOL_CONVERSION = YES;
251 | CLANG_WARN_CONSTANT_CONVERSION = YES;
252 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
253 | CLANG_WARN_EMPTY_BODY = YES;
254 | CLANG_WARN_ENUM_CONVERSION = YES;
255 | CLANG_WARN_INFINITE_RECURSION = YES;
256 | CLANG_WARN_INT_CONVERSION = YES;
257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
258 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
259 | CLANG_WARN_UNREACHABLE_CODE = YES;
260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
261 | COPY_PHASE_STRIP = NO;
262 | ENABLE_STRICT_OBJC_MSGSEND = YES;
263 | ENABLE_TESTABILITY = YES;
264 | GCC_C_LANGUAGE_STANDARD = gnu99;
265 | GCC_DYNAMIC_NO_PIC = NO;
266 | GCC_NO_COMMON_BLOCKS = YES;
267 | GCC_OPTIMIZATION_LEVEL = 0;
268 | GCC_PREPROCESSOR_DEFINITIONS = (
269 | "DEBUG=1",
270 | "$(inherited)",
271 | );
272 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
273 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
274 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
275 | GCC_WARN_UNDECLARED_SELECTOR = YES;
276 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
277 | GCC_WARN_UNUSED_FUNCTION = YES;
278 | GCC_WARN_UNUSED_VARIABLE = YES;
279 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
280 | MTL_ENABLE_DEBUG_INFO = YES;
281 | ONLY_ACTIVE_ARCH = YES;
282 | SDKROOT = iphoneos;
283 | };
284 | name = Debug;
285 | };
286 | 58B511EE1A9E6C8500147676 /* Release */ = {
287 | isa = XCBuildConfiguration;
288 | buildSettings = {
289 | ALWAYS_SEARCH_USER_PATHS = NO;
290 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
291 | CLANG_CXX_LIBRARY = "libc++";
292 | CLANG_ENABLE_MODULES = YES;
293 | CLANG_ENABLE_OBJC_ARC = YES;
294 | CLANG_WARN_BOOL_CONVERSION = YES;
295 | CLANG_WARN_CONSTANT_CONVERSION = YES;
296 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
297 | CLANG_WARN_EMPTY_BODY = YES;
298 | CLANG_WARN_ENUM_CONVERSION = YES;
299 | CLANG_WARN_INFINITE_RECURSION = YES;
300 | CLANG_WARN_INT_CONVERSION = YES;
301 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
302 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
303 | CLANG_WARN_UNREACHABLE_CODE = YES;
304 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
305 | COPY_PHASE_STRIP = YES;
306 | ENABLE_NS_ASSERTIONS = NO;
307 | ENABLE_STRICT_OBJC_MSGSEND = YES;
308 | GCC_C_LANGUAGE_STANDARD = gnu99;
309 | GCC_NO_COMMON_BLOCKS = YES;
310 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
311 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
312 | GCC_WARN_UNDECLARED_SELECTOR = YES;
313 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
314 | GCC_WARN_UNUSED_FUNCTION = YES;
315 | GCC_WARN_UNUSED_VARIABLE = YES;
316 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
317 | MTL_ENABLE_DEBUG_INFO = NO;
318 | SDKROOT = iphoneos;
319 | VALIDATE_PRODUCT = YES;
320 | };
321 | name = Release;
322 | };
323 | 58B511F01A9E6C8500147676 /* Debug */ = {
324 | isa = XCBuildConfiguration;
325 | baseConfigurationReference = 985631E79BC598F4F7889139 /* Pods-RNPopoverMenu.debug.xcconfig */;
326 | buildSettings = {
327 | HEADER_SEARCH_PATHS = (
328 | "$(inherited)",
329 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
330 | "$(SRCROOT)/../../../React/**",
331 | "$(SRCROOT)/../../react-native/React/**",
332 | );
333 | LIBRARY_SEARCH_PATHS = "$(inherited)";
334 | OTHER_LDFLAGS = "-ObjC";
335 | PRODUCT_NAME = RNPopoverMenu;
336 | SKIP_INSTALL = YES;
337 | };
338 | name = Debug;
339 | };
340 | 58B511F11A9E6C8500147676 /* Release */ = {
341 | isa = XCBuildConfiguration;
342 | baseConfigurationReference = 22DD7C199DACB7CD866BC1A8 /* Pods-RNPopoverMenu.release.xcconfig */;
343 | buildSettings = {
344 | HEADER_SEARCH_PATHS = (
345 | "$(inherited)",
346 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
347 | "$(SRCROOT)/../../../React/**",
348 | "$(SRCROOT)/../../react-native/React/**",
349 | );
350 | LIBRARY_SEARCH_PATHS = "$(inherited)";
351 | OTHER_LDFLAGS = "-ObjC";
352 | PRODUCT_NAME = RNPopoverMenu;
353 | SKIP_INSTALL = YES;
354 | };
355 | name = Release;
356 | };
357 | /* End XCBuildConfiguration section */
358 |
359 | /* Begin XCConfigurationList section */
360 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNPopoverMenu" */ = {
361 | isa = XCConfigurationList;
362 | buildConfigurations = (
363 | 58B511ED1A9E6C8500147676 /* Debug */,
364 | 58B511EE1A9E6C8500147676 /* Release */,
365 | );
366 | defaultConfigurationIsVisible = 0;
367 | defaultConfigurationName = Release;
368 | };
369 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNPopoverMenu" */ = {
370 | isa = XCConfigurationList;
371 | buildConfigurations = (
372 | 58B511F01A9E6C8500147676 /* Debug */,
373 | 58B511F11A9E6C8500147676 /* Release */,
374 | );
375 | defaultConfigurationIsVisible = 0;
376 | defaultConfigurationName = Release;
377 | };
378 | /* End XCConfigurationList section */
379 | };
380 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
381 | }
382 |
--------------------------------------------------------------------------------
/Example/ios/Example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
11 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
12 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
13 | 8139E3C42689F9EC004E6C40 /* paste.png in Resources */ = {isa = PBXBuildFile; fileRef = 8139E3C32689F9EC004E6C40 /* paste.png */; };
14 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
15 | F37C81D7589981799C562C89 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B724793BC7A10AD11738730C /* libPods-Example.a */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 00A854C566ECD6C59C82F763 /* libPods-Example-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
20 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
21 | 00E356F21AD99517003FC87E /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = ""; };
22 | 0B11A2921C3EB4AAE1526710 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; };
23 | 13B07F961A680F5B00A75B9A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
24 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = ""; };
25 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Example/AppDelegate.m; sourceTree = ""; };
26 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = ""; };
27 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = ""; };
28 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = ""; };
29 | 33F4172949952E6517E6A4F4 /* Pods-Example-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.release.xcconfig"; sourceTree = ""; };
30 | 644E5358F647C730B4B5009A /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; };
31 | 8139E3C32689F9EC004E6C40 /* paste.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = paste.png; sourceTree = ""; };
32 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Example/LaunchScreen.storyboard; sourceTree = ""; };
33 | B724793BC7A10AD11738730C /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
34 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
35 | F1B39C3E9455B11C3EBE0789 /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = ""; };
36 | /* End PBXFileReference section */
37 |
38 | /* Begin PBXFrameworksBuildPhase section */
39 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
40 | isa = PBXFrameworksBuildPhase;
41 | buildActionMask = 2147483647;
42 | files = (
43 | F37C81D7589981799C562C89 /* libPods-Example.a in Frameworks */,
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXFrameworksBuildPhase section */
48 |
49 | /* Begin PBXGroup section */
50 | 00E356EF1AD99517003FC87E /* ExampleTests */ = {
51 | isa = PBXGroup;
52 | children = (
53 | 00E356F21AD99517003FC87E /* ExampleTests.m */,
54 | 00E356F01AD99517003FC87E /* Supporting Files */,
55 | );
56 | path = ExampleTests;
57 | sourceTree = "";
58 | };
59 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
60 | isa = PBXGroup;
61 | children = (
62 | 00E356F11AD99517003FC87E /* Info.plist */,
63 | );
64 | name = "Supporting Files";
65 | sourceTree = "";
66 | };
67 | 13B07FAE1A68108700A75B9A /* Example */ = {
68 | isa = PBXGroup;
69 | children = (
70 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
71 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
72 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
73 | 13B07FB61A68108700A75B9A /* Info.plist */,
74 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
75 | 13B07FB71A68108700A75B9A /* main.m */,
76 | );
77 | name = Example;
78 | sourceTree = "";
79 | };
80 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
81 | isa = PBXGroup;
82 | children = (
83 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
84 | B724793BC7A10AD11738730C /* libPods-Example.a */,
85 | 00A854C566ECD6C59C82F763 /* libPods-Example-ExampleTests.a */,
86 | );
87 | name = Frameworks;
88 | sourceTree = "";
89 | };
90 | 8139E3C22689F9EC004E6C40 /* Resources */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 8139E3C32689F9EC004E6C40 /* paste.png */,
94 | );
95 | path = Resources;
96 | sourceTree = "";
97 | };
98 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
99 | isa = PBXGroup;
100 | children = (
101 | );
102 | name = Libraries;
103 | sourceTree = "";
104 | };
105 | 83CBB9F61A601CBA00E9B192 = {
106 | isa = PBXGroup;
107 | children = (
108 | 8139E3C22689F9EC004E6C40 /* Resources */,
109 | 13B07FAE1A68108700A75B9A /* Example */,
110 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
111 | 00E356EF1AD99517003FC87E /* ExampleTests */,
112 | 83CBBA001A601CBA00E9B192 /* Products */,
113 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
114 | B9B79249E9AA3BF95DE980A3 /* Pods */,
115 | );
116 | indentWidth = 2;
117 | sourceTree = "";
118 | tabWidth = 2;
119 | usesTabs = 0;
120 | };
121 | 83CBBA001A601CBA00E9B192 /* Products */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 13B07F961A680F5B00A75B9A /* Example.app */,
125 | );
126 | name = Products;
127 | sourceTree = "";
128 | };
129 | B9B79249E9AA3BF95DE980A3 /* Pods */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 644E5358F647C730B4B5009A /* Pods-Example.debug.xcconfig */,
133 | 0B11A2921C3EB4AAE1526710 /* Pods-Example.release.xcconfig */,
134 | F1B39C3E9455B11C3EBE0789 /* Pods-Example-ExampleTests.debug.xcconfig */,
135 | 33F4172949952E6517E6A4F4 /* Pods-Example-ExampleTests.release.xcconfig */,
136 | );
137 | path = Pods;
138 | sourceTree = "";
139 | };
140 | /* End PBXGroup section */
141 |
142 | /* Begin PBXNativeTarget section */
143 | 13B07F861A680F5B00A75B9A /* Example */ = {
144 | isa = PBXNativeTarget;
145 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */;
146 | buildPhases = (
147 | 88DB7F43AB813C38F9D8A944 /* [CP] Check Pods Manifest.lock */,
148 | FD10A7F022414F080027D42C /* Start Packager */,
149 | 13B07F871A680F5B00A75B9A /* Sources */,
150 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
151 | 13B07F8E1A680F5B00A75B9A /* Resources */,
152 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
153 | B9ED845BAC67B02AB49AA395 /* [CP] Embed Pods Frameworks */,
154 | 500133812FE1C89396006241 /* [CP] Copy Pods Resources */,
155 | );
156 | buildRules = (
157 | );
158 | dependencies = (
159 | );
160 | name = Example;
161 | productName = Example;
162 | productReference = 13B07F961A680F5B00A75B9A /* Example.app */;
163 | productType = "com.apple.product-type.application";
164 | };
165 | /* End PBXNativeTarget section */
166 |
167 | /* Begin PBXProject section */
168 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
169 | isa = PBXProject;
170 | attributes = {
171 | LastUpgradeCheck = 1210;
172 | TargetAttributes = {
173 | 13B07F861A680F5B00A75B9A = {
174 | LastSwiftMigration = 1120;
175 | };
176 | };
177 | };
178 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */;
179 | compatibilityVersion = "Xcode 12.0";
180 | developmentRegion = en;
181 | hasScannedForEncodings = 0;
182 | knownRegions = (
183 | en,
184 | Base,
185 | );
186 | mainGroup = 83CBB9F61A601CBA00E9B192;
187 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
188 | projectDirPath = "";
189 | projectRoot = "";
190 | targets = (
191 | 13B07F861A680F5B00A75B9A /* Example */,
192 | );
193 | };
194 | /* End PBXProject section */
195 |
196 | /* Begin PBXResourcesBuildPhase section */
197 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
198 | isa = PBXResourcesBuildPhase;
199 | buildActionMask = 2147483647;
200 | files = (
201 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
202 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
203 | 8139E3C42689F9EC004E6C40 /* paste.png in Resources */,
204 | );
205 | runOnlyForDeploymentPostprocessing = 0;
206 | };
207 | /* End PBXResourcesBuildPhase section */
208 |
209 | /* Begin PBXShellScriptBuildPhase section */
210 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
211 | isa = PBXShellScriptBuildPhase;
212 | buildActionMask = 2147483647;
213 | files = (
214 | );
215 | inputPaths = (
216 | );
217 | name = "Bundle React Native code and images";
218 | outputPaths = (
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | shellPath = /bin/sh;
222 | shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
223 | };
224 | 500133812FE1C89396006241 /* [CP] Copy Pods Resources */ = {
225 | isa = PBXShellScriptBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | );
229 | inputFileListPaths = (
230 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-input-files.xcfilelist",
231 | );
232 | name = "[CP] Copy Pods Resources";
233 | outputFileListPaths = (
234 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-output-files.xcfilelist",
235 | );
236 | runOnlyForDeploymentPostprocessing = 0;
237 | shellPath = /bin/sh;
238 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
239 | showEnvVarsInLog = 0;
240 | };
241 | 88DB7F43AB813C38F9D8A944 /* [CP] Check Pods Manifest.lock */ = {
242 | isa = PBXShellScriptBuildPhase;
243 | buildActionMask = 2147483647;
244 | files = (
245 | );
246 | inputFileListPaths = (
247 | );
248 | inputPaths = (
249 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
250 | "${PODS_ROOT}/Manifest.lock",
251 | );
252 | name = "[CP] Check Pods Manifest.lock";
253 | outputFileListPaths = (
254 | );
255 | outputPaths = (
256 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
257 | );
258 | runOnlyForDeploymentPostprocessing = 0;
259 | shellPath = /bin/sh;
260 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
261 | showEnvVarsInLog = 0;
262 | };
263 | B9ED845BAC67B02AB49AA395 /* [CP] Embed Pods Frameworks */ = {
264 | isa = PBXShellScriptBuildPhase;
265 | buildActionMask = 2147483647;
266 | files = (
267 | );
268 | inputFileListPaths = (
269 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
270 | );
271 | name = "[CP] Embed Pods Frameworks";
272 | outputFileListPaths = (
273 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist",
274 | );
275 | runOnlyForDeploymentPostprocessing = 0;
276 | shellPath = /bin/sh;
277 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
278 | showEnvVarsInLog = 0;
279 | };
280 | FD10A7F022414F080027D42C /* Start Packager */ = {
281 | isa = PBXShellScriptBuildPhase;
282 | buildActionMask = 2147483647;
283 | files = (
284 | );
285 | inputFileListPaths = (
286 | );
287 | inputPaths = (
288 | );
289 | name = "Start Packager";
290 | outputFileListPaths = (
291 | );
292 | outputPaths = (
293 | );
294 | runOnlyForDeploymentPostprocessing = 0;
295 | shellPath = /bin/sh;
296 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
297 | showEnvVarsInLog = 0;
298 | };
299 | /* End PBXShellScriptBuildPhase section */
300 |
301 | /* Begin PBXSourcesBuildPhase section */
302 | 13B07F871A680F5B00A75B9A /* Sources */ = {
303 | isa = PBXSourcesBuildPhase;
304 | buildActionMask = 2147483647;
305 | files = (
306 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
307 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
308 | );
309 | runOnlyForDeploymentPostprocessing = 0;
310 | };
311 | /* End PBXSourcesBuildPhase section */
312 |
313 | /* Begin XCBuildConfiguration section */
314 | 13B07F941A680F5B00A75B9A /* Debug */ = {
315 | isa = XCBuildConfiguration;
316 | baseConfigurationReference = 644E5358F647C730B4B5009A /* Pods-Example.debug.xcconfig */;
317 | buildSettings = {
318 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
319 | CLANG_ENABLE_MODULES = YES;
320 | CURRENT_PROJECT_VERSION = 1;
321 | ENABLE_BITCODE = NO;
322 | INFOPLIST_FILE = Example/Info.plist;
323 | LD_RUNPATH_SEARCH_PATHS = (
324 | "$(inherited)",
325 | "@executable_path/Frameworks",
326 | );
327 | OTHER_LDFLAGS = (
328 | "$(inherited)",
329 | "-ObjC",
330 | "-lc++",
331 | );
332 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
333 | PRODUCT_NAME = Example;
334 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
335 | SWIFT_VERSION = 5.0;
336 | VERSIONING_SYSTEM = "apple-generic";
337 | };
338 | name = Debug;
339 | };
340 | 13B07F951A680F5B00A75B9A /* Release */ = {
341 | isa = XCBuildConfiguration;
342 | baseConfigurationReference = 0B11A2921C3EB4AAE1526710 /* Pods-Example.release.xcconfig */;
343 | buildSettings = {
344 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
345 | CLANG_ENABLE_MODULES = YES;
346 | CURRENT_PROJECT_VERSION = 1;
347 | INFOPLIST_FILE = Example/Info.plist;
348 | LD_RUNPATH_SEARCH_PATHS = (
349 | "$(inherited)",
350 | "@executable_path/Frameworks",
351 | );
352 | OTHER_LDFLAGS = (
353 | "$(inherited)",
354 | "-ObjC",
355 | "-lc++",
356 | );
357 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
358 | PRODUCT_NAME = Example;
359 | SWIFT_VERSION = 5.0;
360 | VERSIONING_SYSTEM = "apple-generic";
361 | };
362 | name = Release;
363 | };
364 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
365 | isa = XCBuildConfiguration;
366 | buildSettings = {
367 | ALWAYS_SEARCH_USER_PATHS = NO;
368 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
370 | CLANG_CXX_LIBRARY = "libc++";
371 | CLANG_ENABLE_MODULES = YES;
372 | CLANG_ENABLE_OBJC_ARC = YES;
373 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
374 | CLANG_WARN_BOOL_CONVERSION = YES;
375 | CLANG_WARN_COMMA = YES;
376 | CLANG_WARN_CONSTANT_CONVERSION = YES;
377 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
378 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
379 | CLANG_WARN_EMPTY_BODY = YES;
380 | CLANG_WARN_ENUM_CONVERSION = YES;
381 | CLANG_WARN_INFINITE_RECURSION = YES;
382 | CLANG_WARN_INT_CONVERSION = YES;
383 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
384 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
385 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
386 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
387 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | ENABLE_STRICT_OBJC_MSGSEND = YES;
396 | ENABLE_TESTABILITY = YES;
397 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_DYNAMIC_NO_PIC = NO;
400 | GCC_NO_COMMON_BLOCKS = YES;
401 | GCC_OPTIMIZATION_LEVEL = 0;
402 | GCC_PREPROCESSOR_DEFINITIONS = (
403 | "DEBUG=1",
404 | "$(inherited)",
405 | );
406 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
407 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
408 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
409 | GCC_WARN_UNDECLARED_SELECTOR = YES;
410 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
411 | GCC_WARN_UNUSED_FUNCTION = YES;
412 | GCC_WARN_UNUSED_VARIABLE = YES;
413 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
414 | LD_RUNPATH_SEARCH_PATHS = (
415 | /usr/lib/swift,
416 | "$(inherited)",
417 | );
418 | LIBRARY_SEARCH_PATHS = (
419 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
420 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
421 | "\"$(inherited)\"",
422 | );
423 | MTL_ENABLE_DEBUG_INFO = YES;
424 | ONLY_ACTIVE_ARCH = YES;
425 | SDKROOT = iphoneos;
426 | };
427 | name = Debug;
428 | };
429 | 83CBBA211A601CBA00E9B192 /* Release */ = {
430 | isa = XCBuildConfiguration;
431 | buildSettings = {
432 | ALWAYS_SEARCH_USER_PATHS = NO;
433 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
435 | CLANG_CXX_LIBRARY = "libc++";
436 | CLANG_ENABLE_MODULES = YES;
437 | CLANG_ENABLE_OBJC_ARC = YES;
438 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
439 | CLANG_WARN_BOOL_CONVERSION = YES;
440 | CLANG_WARN_COMMA = YES;
441 | CLANG_WARN_CONSTANT_CONVERSION = YES;
442 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
443 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
444 | CLANG_WARN_EMPTY_BODY = YES;
445 | CLANG_WARN_ENUM_CONVERSION = YES;
446 | CLANG_WARN_INFINITE_RECURSION = YES;
447 | CLANG_WARN_INT_CONVERSION = YES;
448 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
449 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
450 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
452 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
453 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
454 | CLANG_WARN_STRICT_PROTOTYPES = YES;
455 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
456 | CLANG_WARN_UNREACHABLE_CODE = YES;
457 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
458 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
459 | COPY_PHASE_STRIP = YES;
460 | ENABLE_NS_ASSERTIONS = NO;
461 | ENABLE_STRICT_OBJC_MSGSEND = YES;
462 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
463 | GCC_C_LANGUAGE_STANDARD = gnu99;
464 | GCC_NO_COMMON_BLOCKS = YES;
465 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
466 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
467 | GCC_WARN_UNDECLARED_SELECTOR = YES;
468 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
469 | GCC_WARN_UNUSED_FUNCTION = YES;
470 | GCC_WARN_UNUSED_VARIABLE = YES;
471 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
472 | LD_RUNPATH_SEARCH_PATHS = (
473 | /usr/lib/swift,
474 | "$(inherited)",
475 | );
476 | LIBRARY_SEARCH_PATHS = (
477 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
478 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
479 | "\"$(inherited)\"",
480 | );
481 | MTL_ENABLE_DEBUG_INFO = NO;
482 | SDKROOT = iphoneos;
483 | VALIDATE_PRODUCT = YES;
484 | };
485 | name = Release;
486 | };
487 | /* End XCBuildConfiguration section */
488 |
489 | /* Begin XCConfigurationList section */
490 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */ = {
491 | isa = XCConfigurationList;
492 | buildConfigurations = (
493 | 13B07F941A680F5B00A75B9A /* Debug */,
494 | 13B07F951A680F5B00A75B9A /* Release */,
495 | );
496 | defaultConfigurationIsVisible = 0;
497 | defaultConfigurationName = Release;
498 | };
499 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */ = {
500 | isa = XCConfigurationList;
501 | buildConfigurations = (
502 | 83CBBA201A601CBA00E9B192 /* Debug */,
503 | 83CBBA211A601CBA00E9B192 /* Release */,
504 | );
505 | defaultConfigurationIsVisible = 0;
506 | defaultConfigurationName = Release;
507 | };
508 | /* End XCConfigurationList section */
509 | };
510 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
511 | }
512 |
--------------------------------------------------------------------------------