├── .gitignore
├── README.md
├── SampleView.ios.js
├── __tests__
├── index.android.js
└── index.ios.js
├── android
├── app
│ ├── BUCK
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── myswiftdemo
│ │ │ ├── MainActivity.java
│ │ │ └── MainApplication.java
│ │ └── res
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── keystores
│ ├── BUCK
│ └── debug.keystore.properties
└── settings.gradle
├── index.android.js
├── index.ios.js
├── ios
├── MySwiftDemo-Bridging-Header.h
├── MySwiftDemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── JP.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── MySwiftDemo.xcscheme
│ └── xcuserdata
│ │ └── JP.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── MySwiftDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── SampleView.swift
│ ├── SampleViewManager.swift
│ ├── SampleViewModule.m
│ └── main.m
└── MySwiftDemoTests
│ ├── Info.plist
│ └── MySwiftDemoTests.m
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Vending pure-Swift views in React Native
2 |
3 | This is a sample repo illustrating how to render a pure-Swift UIView in React Native.
4 |
5 | see https://medium.com/@jpdriver/vending-pure-swift-views-in-react-native-3f417349e3c6
6 |
--------------------------------------------------------------------------------
/SampleView.ios.js:
--------------------------------------------------------------------------------
1 | import { requireNativeComponent } from 'react-native';
2 |
3 | // requireNativeComponent automatically resolves this to "SampleViewManager"
4 | module.exports = requireNativeComponent('SampleView', null);
5 |
--------------------------------------------------------------------------------
/__tests__/index.android.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.android.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/__tests__/index.ios.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.ios.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/android/app/BUCK:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | # To learn about Buck see [Docs](https://buckbuild.com/).
4 | # To run your application with Buck:
5 | # - install Buck
6 | # - `npm start` - to start the packager
7 | # - `cd android`
8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10 | # - `buck install -r android/app` - compile, install and run application
11 | #
12 |
13 | lib_deps = []
14 | for jarfile in glob(['libs/*.jar']):
15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16 | lib_deps.append(':' + name)
17 | prebuilt_jar(
18 | name = name,
19 | binary_jar = jarfile,
20 | )
21 |
22 | for aarfile in glob(['libs/*.aar']):
23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24 | lib_deps.append(':' + name)
25 | android_prebuilt_aar(
26 | name = name,
27 | aar = aarfile,
28 | )
29 |
30 | android_library(
31 | name = 'all-libs',
32 | exported_deps = lib_deps
33 | )
34 |
35 | android_library(
36 | name = 'app-code',
37 | srcs = glob([
38 | 'src/main/java/**/*.java',
39 | ]),
40 | deps = [
41 | ':all-libs',
42 | ':build_config',
43 | ':res',
44 | ],
45 | )
46 |
47 | android_build_config(
48 | name = 'build_config',
49 | package = 'com.myswiftdemo',
50 | )
51 |
52 | android_resource(
53 | name = 'res',
54 | res = 'src/main/res',
55 | package = 'com.myswiftdemo',
56 | )
57 |
58 | android_binary(
59 | name = 'app',
60 | package_type = 'debug',
61 | manifest = 'src/main/AndroidManifest.xml',
62 | keystore = '//android/keystores:debug',
63 | deps = [
64 | ':app-code',
65 | ],
66 | )
67 |
--------------------------------------------------------------------------------
/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
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property can be in the following formats
30 | * // 'bundleIn${productFlavor}${buildType}'
31 | * // 'bundleIn${buildType}'
32 | * // bundleInFreeDebug: true,
33 | * // bundleInPaidRelease: true,
34 | * // bundleInBeta: true,
35 | *
36 | * // the root of your project, i.e. where "package.json" lives
37 | * root: "../../",
38 | *
39 | * // where to put the JS bundle asset in debug mode
40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
41 | *
42 | * // where to put the JS bundle asset in release mode
43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
44 | *
45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
46 | * // require('./image.png')), in debug mode
47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
48 | *
49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
50 | * // require('./image.png')), in release mode
51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
52 | *
53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
57 | * // for example, you might want to remove it from here.
58 | * inputExcludes: ["android/**", "ios/**"],
59 | *
60 | * // override which node gets called and with what additional arguments
61 | * nodeExecutableAndArgs: ["node"]
62 | *
63 | * // supply additional arguments to the packager
64 | * extraPackagerArgs: []
65 | * ]
66 | */
67 |
68 | apply from: "../../node_modules/react-native/react.gradle"
69 |
70 | /**
71 | * Set this to true to create two separate APKs instead of one:
72 | * - An APK that only works on ARM devices
73 | * - An APK that only works on x86 devices
74 | * The advantage is the size of the APK is reduced by about 4MB.
75 | * Upload all the APKs to the Play Store and people will download
76 | * the correct one based on the CPU architecture of their device.
77 | */
78 | def enableSeparateBuildPerCPUArchitecture = false
79 |
80 | /**
81 | * Run Proguard to shrink the Java bytecode in release builds.
82 | */
83 | def enableProguardInReleaseBuilds = false
84 |
85 | android {
86 | compileSdkVersion 23
87 | buildToolsVersion "23.0.1"
88 |
89 | defaultConfig {
90 | applicationId "com.myswiftdemo"
91 | minSdkVersion 16
92 | targetSdkVersion 22
93 | versionCode 1
94 | versionName "1.0"
95 | ndk {
96 | abiFilters "armeabi-v7a", "x86"
97 | }
98 | }
99 | splits {
100 | abi {
101 | reset()
102 | enable enableSeparateBuildPerCPUArchitecture
103 | universalApk false // If true, also generate a universal APK
104 | include "armeabi-v7a", "x86"
105 | }
106 | }
107 | buildTypes {
108 | release {
109 | minifyEnabled enableProguardInReleaseBuilds
110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
111 | }
112 | }
113 | // applicationVariants are e.g. debug, release
114 | applicationVariants.all { variant ->
115 | variant.outputs.each { output ->
116 | // For each separate APK per architecture, set a unique version code as described here:
117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
118 | def versionCodes = ["armeabi-v7a":1, "x86":2]
119 | def abi = output.getFilter(OutputFile.ABI)
120 | if (abi != null) { // null for the universal-debug, universal-release variants
121 | output.versionCodeOverride =
122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
123 | }
124 | }
125 | }
126 | }
127 |
128 | dependencies {
129 | compile fileTree(dir: "libs", include: ["*.jar"])
130 | compile "com.android.support:appcompat-v7:23.0.1"
131 | compile "com.facebook.react:react-native:+" // From node_modules
132 | }
133 |
134 | // Run this once to be able to run the application with BUCK
135 | // puts all compile dependencies into folder libs for BUCK to use
136 | task copyDownloadableDepsToLibs(type: Copy) {
137 | from configurations.compile
138 | into 'libs'
139 | }
140 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30 |
31 | # Do not strip any method/class that is annotated with @DoNotStrip
32 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
33 | -keep @com.facebook.common.internal.DoNotStrip class *
34 | -keepclassmembers class * {
35 | @com.facebook.proguard.annotations.DoNotStrip *;
36 | @com.facebook.common.internal.DoNotStrip *;
37 | }
38 |
39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40 | void set*(***);
41 | *** get*();
42 | }
43 |
44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
46 | -keepclassmembers,includedescriptorclasses class * { native ; }
47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
50 |
51 | -dontwarn com.facebook.react.**
52 |
53 | # okhttp
54 |
55 | -keepattributes Signature
56 | -keepattributes *Annotation*
57 | -keep class okhttp3.** { *; }
58 | -keep interface okhttp3.** { *; }
59 | -dontwarn okhttp3.**
60 |
61 | # okio
62 |
63 | -keep class sun.misc.Unsafe { *; }
64 | -dontwarn java.nio.file.*
65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66 | -dontwarn okio.**
67 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/myswiftdemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.myswiftdemo;
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.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "MySwiftDemo";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/myswiftdemo/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.myswiftdemo;
2 |
3 | import android.app.Application;
4 | import android.util.Log;
5 |
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.react.shell.MainReactPackage;
11 |
12 | import java.util.Arrays;
13 | import java.util.List;
14 |
15 | public class MainApplication extends Application implements ReactApplication {
16 |
17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
18 | @Override
19 | protected boolean getUseDeveloperSupport() {
20 | return BuildConfig.DEBUG;
21 | }
22 |
23 | @Override
24 | protected List getPackages() {
25 | return Arrays.asList(
26 | new MainReactPackage()
27 | );
28 | }
29 | };
30 |
31 | @Override
32 | public ReactNativeHost getReactNativeHost() {
33 | return mReactNativeHost;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jpdriver/pure-swift-views-react-native/1d63e52c9ed68c987f3faef6e59b094c57608a6b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jpdriver/pure-swift-views-react-native/1d63e52c9ed68c987f3faef6e59b094c57608a6b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jpdriver/pure-swift-views-react-native/1d63e52c9ed68c987f3faef6e59b094c57608a6b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jpdriver/pure-swift-views-react-native/1d63e52c9ed68c987f3faef6e59b094c57608a6b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MySwiftDemo
3 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jpdriver/pure-swift-views-react-native/1d63e52c9ed68c987f3faef6e59b094c57608a6b/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = 'debug',
3 | store = 'debug.keystore',
4 | properties = 'debug.keystore.properties',
5 | visibility = [
6 | 'PUBLIC',
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'MySwiftDemo'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/index.android.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 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 |
15 | export default class MySwiftDemo extends Component {
16 | render() {
17 | return (
18 |
19 |
20 | Welcome to React Native!
21 |
22 |
23 | To get started, edit index.android.js
24 |
25 |
26 | Double tap R on your keyboard to reload,{'\n'}
27 | Shake or press menu button for dev menu
28 |
29 |
30 | );
31 | }
32 | }
33 |
34 | const styles = StyleSheet.create({
35 | container: {
36 | flex: 1,
37 | justifyContent: 'center',
38 | alignItems: 'center',
39 | backgroundColor: '#F5FCFF',
40 | },
41 | welcome: {
42 | fontSize: 20,
43 | textAlign: 'center',
44 | margin: 10,
45 | },
46 | instructions: {
47 | textAlign: 'center',
48 | color: '#333333',
49 | marginBottom: 5,
50 | },
51 | });
52 |
53 | AppRegistry.registerComponent('MySwiftDemo', () => MySwiftDemo);
54 |
--------------------------------------------------------------------------------
/index.ios.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 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 |
15 | const SampleView = require('./SampleView.ios.js');
16 |
17 | export default class MySwiftDemo extends Component {
18 | render() {
19 | return (
20 |
21 |
22 | Welcome to React Native!
23 |
24 |
25 | To get started, edit index.ios.js
26 |
27 |
28 | Press Cmd+R to reload,{'\n'}
29 | Cmd+D or shake for dev menu
30 |
31 |
32 |
33 | );
34 | }
35 | }
36 |
37 | const styles = StyleSheet.create({
38 | container: {
39 | flex: 1,
40 | justifyContent: 'center',
41 | alignItems: 'center',
42 | backgroundColor: '#F5FCFF',
43 | },
44 | welcome: {
45 | fontSize: 20,
46 | textAlign: 'center',
47 | margin: 10,
48 | },
49 | instructions: {
50 | textAlign: 'center',
51 | color: '#333333',
52 | marginBottom: 5,
53 | },
54 | view: {
55 | margin: 10,
56 | width: 100
57 | }
58 | });
59 |
60 | AppRegistry.registerComponent('MySwiftDemo', () => MySwiftDemo);
61 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 | #import "RCTViewManager.h"
--------------------------------------------------------------------------------
/ios/MySwiftDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 | 00E356F31AD99517003FC87E /* MySwiftDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* MySwiftDemoTests.m */; };
16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25 | 4FBEEF221D8C166A00F478BD /* SampleViewModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FBEEF211D8C166A00F478BD /* SampleViewModule.m */; };
26 | 4FBEEF241D8C16B600F478BD /* SampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FBEEF231D8C16B600F478BD /* SampleView.swift */; };
27 | 4FBEEF261D8C16D600F478BD /* SampleViewManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FBEEF251D8C16D600F478BD /* SampleViewManager.swift */; };
28 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
35 | proxyType = 2;
36 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
37 | remoteInfo = RCTActionSheet;
38 | };
39 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
40 | isa = PBXContainerItemProxy;
41 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
42 | proxyType = 2;
43 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
44 | remoteInfo = RCTGeolocation;
45 | };
46 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
47 | isa = PBXContainerItemProxy;
48 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
49 | proxyType = 2;
50 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
51 | remoteInfo = RCTImage;
52 | };
53 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
54 | isa = PBXContainerItemProxy;
55 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
56 | proxyType = 2;
57 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
58 | remoteInfo = RCTNetwork;
59 | };
60 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
61 | isa = PBXContainerItemProxy;
62 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
63 | proxyType = 2;
64 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
65 | remoteInfo = RCTVibration;
66 | };
67 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
68 | isa = PBXContainerItemProxy;
69 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
70 | proxyType = 1;
71 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
72 | remoteInfo = MySwiftDemo;
73 | };
74 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
75 | isa = PBXContainerItemProxy;
76 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
77 | proxyType = 2;
78 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
79 | remoteInfo = RCTSettings;
80 | };
81 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
82 | isa = PBXContainerItemProxy;
83 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
84 | proxyType = 2;
85 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
86 | remoteInfo = RCTWebSocket;
87 | };
88 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
89 | isa = PBXContainerItemProxy;
90 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
91 | proxyType = 2;
92 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
93 | remoteInfo = React;
94 | };
95 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
96 | isa = PBXContainerItemProxy;
97 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
98 | proxyType = 2;
99 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
100 | remoteInfo = RCTLinking;
101 | };
102 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
103 | isa = PBXContainerItemProxy;
104 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
105 | proxyType = 2;
106 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
107 | remoteInfo = RCTText;
108 | };
109 | E888EB511DC9490F008B629A /* PBXContainerItemProxy */ = {
110 | isa = PBXContainerItemProxy;
111 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
112 | proxyType = 2;
113 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
114 | remoteInfo = "RCTImage-tvOS";
115 | };
116 | E888EB551DC9490F008B629A /* PBXContainerItemProxy */ = {
117 | isa = PBXContainerItemProxy;
118 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
119 | proxyType = 2;
120 | remoteGlobalIDString = 2D2A28471D9B043800D4039D;
121 | remoteInfo = "RCTLinking-tvOS";
122 | };
123 | E888EB591DC9490F008B629A /* PBXContainerItemProxy */ = {
124 | isa = PBXContainerItemProxy;
125 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
126 | proxyType = 2;
127 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
128 | remoteInfo = "RCTNetwork-tvOS";
129 | };
130 | E888EB5D1DC9490F008B629A /* PBXContainerItemProxy */ = {
131 | isa = PBXContainerItemProxy;
132 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
133 | proxyType = 2;
134 | remoteGlobalIDString = 2D2A28611D9B046600D4039D;
135 | remoteInfo = "RCTSettings-tvOS";
136 | };
137 | E888EB611DC9490F008B629A /* PBXContainerItemProxy */ = {
138 | isa = PBXContainerItemProxy;
139 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
140 | proxyType = 2;
141 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
142 | remoteInfo = "RCTText-tvOS";
143 | };
144 | E888EB661DC9490F008B629A /* PBXContainerItemProxy */ = {
145 | isa = PBXContainerItemProxy;
146 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
147 | proxyType = 2;
148 | remoteGlobalIDString = 2D2A28881D9B049200D4039D;
149 | remoteInfo = "RCTWebSocket-tvOS";
150 | };
151 | E888EB6A1DC9490F008B629A /* PBXContainerItemProxy */ = {
152 | isa = PBXContainerItemProxy;
153 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
154 | proxyType = 2;
155 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
156 | remoteInfo = "React-tvOS";
157 | };
158 | /* End PBXContainerItemProxy section */
159 |
160 | /* Begin PBXFileReference section */
161 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
162 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
163 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
164 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
165 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
166 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
167 | 00E356EE1AD99517003FC87E /* MySwiftDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MySwiftDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
168 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
169 | 00E356F21AD99517003FC87E /* MySwiftDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MySwiftDemoTests.m; sourceTree = ""; };
170 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
171 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
172 | 13B07F961A680F5B00A75B9A /* MySwiftDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MySwiftDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
173 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = MySwiftDemo/AppDelegate.h; sourceTree = ""; };
174 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = MySwiftDemo/AppDelegate.m; sourceTree = ""; };
175 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
176 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = MySwiftDemo/Images.xcassets; sourceTree = ""; };
177 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = MySwiftDemo/Info.plist; sourceTree = ""; };
178 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = MySwiftDemo/main.m; sourceTree = ""; };
179 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
180 | 4FBEEF111D8C149900F478BD /* MySwiftDemo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MySwiftDemo-Bridging-Header.h"; sourceTree = ""; };
181 | 4FBEEF211D8C166A00F478BD /* SampleViewModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SampleViewModule.m; path = MySwiftDemo/SampleViewModule.m; sourceTree = ""; };
182 | 4FBEEF231D8C16B600F478BD /* SampleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SampleView.swift; path = MySwiftDemo/SampleView.swift; sourceTree = ""; };
183 | 4FBEEF251D8C16D600F478BD /* SampleViewManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SampleViewManager.swift; path = MySwiftDemo/SampleViewManager.swift; sourceTree = ""; };
184 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
185 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
186 | /* End PBXFileReference section */
187 |
188 | /* Begin PBXFrameworksBuildPhase section */
189 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
190 | isa = PBXFrameworksBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
194 | );
195 | runOnlyForDeploymentPostprocessing = 0;
196 | };
197 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
198 | isa = PBXFrameworksBuildPhase;
199 | buildActionMask = 2147483647;
200 | files = (
201 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
202 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
203 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
204 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
205 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
206 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
207 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
208 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
209 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
210 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
211 | );
212 | runOnlyForDeploymentPostprocessing = 0;
213 | };
214 | /* End PBXFrameworksBuildPhase section */
215 |
216 | /* Begin PBXGroup section */
217 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
218 | isa = PBXGroup;
219 | children = (
220 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
221 | );
222 | name = Products;
223 | sourceTree = "";
224 | };
225 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
226 | isa = PBXGroup;
227 | children = (
228 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
229 | );
230 | name = Products;
231 | sourceTree = "";
232 | };
233 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
234 | isa = PBXGroup;
235 | children = (
236 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
237 | E888EB521DC9490F008B629A /* libRCTImage-tvOS.a */,
238 | );
239 | name = Products;
240 | sourceTree = "";
241 | };
242 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
243 | isa = PBXGroup;
244 | children = (
245 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
246 | E888EB5A1DC9490F008B629A /* libRCTNetwork-tvOS.a */,
247 | );
248 | name = Products;
249 | sourceTree = "";
250 | };
251 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
252 | isa = PBXGroup;
253 | children = (
254 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
255 | );
256 | name = Products;
257 | sourceTree = "";
258 | };
259 | 00E356EF1AD99517003FC87E /* MySwiftDemoTests */ = {
260 | isa = PBXGroup;
261 | children = (
262 | 00E356F21AD99517003FC87E /* MySwiftDemoTests.m */,
263 | 00E356F01AD99517003FC87E /* Supporting Files */,
264 | );
265 | path = MySwiftDemoTests;
266 | sourceTree = "";
267 | };
268 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
269 | isa = PBXGroup;
270 | children = (
271 | 00E356F11AD99517003FC87E /* Info.plist */,
272 | );
273 | name = "Supporting Files";
274 | sourceTree = "";
275 | };
276 | 139105B71AF99BAD00B5F7CC /* Products */ = {
277 | isa = PBXGroup;
278 | children = (
279 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
280 | E888EB5E1DC9490F008B629A /* libRCTSettings-tvOS.a */,
281 | );
282 | name = Products;
283 | sourceTree = "";
284 | };
285 | 139FDEE71B06529A00C62182 /* Products */ = {
286 | isa = PBXGroup;
287 | children = (
288 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
289 | E888EB671DC9490F008B629A /* libRCTWebSocket-tvOS.a */,
290 | );
291 | name = Products;
292 | sourceTree = "";
293 | };
294 | 13B07FAE1A68108700A75B9A /* MySwiftDemo */ = {
295 | isa = PBXGroup;
296 | children = (
297 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
298 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
299 | 4FBEEF231D8C16B600F478BD /* SampleView.swift */,
300 | 4FBEEF251D8C16D600F478BD /* SampleViewManager.swift */,
301 | 4FBEEF211D8C166A00F478BD /* SampleViewModule.m */,
302 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
303 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
304 | 13B07FB61A68108700A75B9A /* Info.plist */,
305 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
306 | 13B07FB71A68108700A75B9A /* main.m */,
307 | 4FBEEF111D8C149900F478BD /* MySwiftDemo-Bridging-Header.h */,
308 | );
309 | name = MySwiftDemo;
310 | sourceTree = "";
311 | };
312 | 146834001AC3E56700842450 /* Products */ = {
313 | isa = PBXGroup;
314 | children = (
315 | 146834041AC3E56700842450 /* libReact.a */,
316 | E888EB6B1DC9490F008B629A /* libReact-tvOS.a */,
317 | );
318 | name = Products;
319 | sourceTree = "";
320 | };
321 | 78C398B11ACF4ADC00677621 /* Products */ = {
322 | isa = PBXGroup;
323 | children = (
324 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
325 | E888EB561DC9490F008B629A /* libRCTLinking-tvOS.a */,
326 | );
327 | name = Products;
328 | sourceTree = "";
329 | };
330 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
331 | isa = PBXGroup;
332 | children = (
333 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
334 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
335 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
336 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
337 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
338 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
339 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
340 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
341 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
342 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
343 | );
344 | name = Libraries;
345 | sourceTree = "";
346 | };
347 | 832341B11AAA6A8300B99B32 /* Products */ = {
348 | isa = PBXGroup;
349 | children = (
350 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
351 | E888EB621DC9490F008B629A /* libRCTText-tvOS.a */,
352 | );
353 | name = Products;
354 | sourceTree = "";
355 | };
356 | 83CBB9F61A601CBA00E9B192 = {
357 | isa = PBXGroup;
358 | children = (
359 | 13B07FAE1A68108700A75B9A /* MySwiftDemo */,
360 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
361 | 00E356EF1AD99517003FC87E /* MySwiftDemoTests */,
362 | 83CBBA001A601CBA00E9B192 /* Products */,
363 | );
364 | indentWidth = 2;
365 | sourceTree = "";
366 | tabWidth = 2;
367 | };
368 | 83CBBA001A601CBA00E9B192 /* Products */ = {
369 | isa = PBXGroup;
370 | children = (
371 | 13B07F961A680F5B00A75B9A /* MySwiftDemo.app */,
372 | 00E356EE1AD99517003FC87E /* MySwiftDemoTests.xctest */,
373 | );
374 | name = Products;
375 | sourceTree = "";
376 | };
377 | /* End PBXGroup section */
378 |
379 | /* Begin PBXNativeTarget section */
380 | 00E356ED1AD99517003FC87E /* MySwiftDemoTests */ = {
381 | isa = PBXNativeTarget;
382 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "MySwiftDemoTests" */;
383 | buildPhases = (
384 | 00E356EA1AD99517003FC87E /* Sources */,
385 | 00E356EB1AD99517003FC87E /* Frameworks */,
386 | 00E356EC1AD99517003FC87E /* Resources */,
387 | );
388 | buildRules = (
389 | );
390 | dependencies = (
391 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
392 | );
393 | name = MySwiftDemoTests;
394 | productName = MySwiftDemoTests;
395 | productReference = 00E356EE1AD99517003FC87E /* MySwiftDemoTests.xctest */;
396 | productType = "com.apple.product-type.bundle.unit-test";
397 | };
398 | 13B07F861A680F5B00A75B9A /* MySwiftDemo */ = {
399 | isa = PBXNativeTarget;
400 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MySwiftDemo" */;
401 | buildPhases = (
402 | 13B07F871A680F5B00A75B9A /* Sources */,
403 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
404 | 13B07F8E1A680F5B00A75B9A /* Resources */,
405 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
406 | );
407 | buildRules = (
408 | );
409 | dependencies = (
410 | );
411 | name = MySwiftDemo;
412 | productName = "Hello World";
413 | productReference = 13B07F961A680F5B00A75B9A /* MySwiftDemo.app */;
414 | productType = "com.apple.product-type.application";
415 | };
416 | /* End PBXNativeTarget section */
417 |
418 | /* Begin PBXProject section */
419 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
420 | isa = PBXProject;
421 | attributes = {
422 | LastUpgradeCheck = 0610;
423 | ORGANIZATIONNAME = Facebook;
424 | TargetAttributes = {
425 | 00E356ED1AD99517003FC87E = {
426 | CreatedOnToolsVersion = 6.2;
427 | TestTargetID = 13B07F861A680F5B00A75B9A;
428 | };
429 | 13B07F861A680F5B00A75B9A = {
430 | LastSwiftMigration = 0810;
431 | };
432 | };
433 | };
434 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "MySwiftDemo" */;
435 | compatibilityVersion = "Xcode 3.2";
436 | developmentRegion = English;
437 | hasScannedForEncodings = 0;
438 | knownRegions = (
439 | en,
440 | Base,
441 | );
442 | mainGroup = 83CBB9F61A601CBA00E9B192;
443 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
444 | projectDirPath = "";
445 | projectReferences = (
446 | {
447 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
448 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
449 | },
450 | {
451 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
452 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
453 | },
454 | {
455 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
456 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
457 | },
458 | {
459 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
460 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
461 | },
462 | {
463 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
464 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
465 | },
466 | {
467 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
468 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
469 | },
470 | {
471 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
472 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
473 | },
474 | {
475 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
476 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
477 | },
478 | {
479 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
480 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
481 | },
482 | {
483 | ProductGroup = 146834001AC3E56700842450 /* Products */;
484 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
485 | },
486 | );
487 | projectRoot = "";
488 | targets = (
489 | 13B07F861A680F5B00A75B9A /* MySwiftDemo */,
490 | 00E356ED1AD99517003FC87E /* MySwiftDemoTests */,
491 | );
492 | };
493 | /* End PBXProject section */
494 |
495 | /* Begin PBXReferenceProxy section */
496 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
497 | isa = PBXReferenceProxy;
498 | fileType = archive.ar;
499 | path = libRCTActionSheet.a;
500 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
501 | sourceTree = BUILT_PRODUCTS_DIR;
502 | };
503 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
504 | isa = PBXReferenceProxy;
505 | fileType = archive.ar;
506 | path = libRCTGeolocation.a;
507 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
508 | sourceTree = BUILT_PRODUCTS_DIR;
509 | };
510 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
511 | isa = PBXReferenceProxy;
512 | fileType = archive.ar;
513 | path = libRCTImage.a;
514 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
515 | sourceTree = BUILT_PRODUCTS_DIR;
516 | };
517 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
518 | isa = PBXReferenceProxy;
519 | fileType = archive.ar;
520 | path = libRCTNetwork.a;
521 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
522 | sourceTree = BUILT_PRODUCTS_DIR;
523 | };
524 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
525 | isa = PBXReferenceProxy;
526 | fileType = archive.ar;
527 | path = libRCTVibration.a;
528 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
529 | sourceTree = BUILT_PRODUCTS_DIR;
530 | };
531 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
532 | isa = PBXReferenceProxy;
533 | fileType = archive.ar;
534 | path = libRCTSettings.a;
535 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
536 | sourceTree = BUILT_PRODUCTS_DIR;
537 | };
538 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
539 | isa = PBXReferenceProxy;
540 | fileType = archive.ar;
541 | path = libRCTWebSocket.a;
542 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
543 | sourceTree = BUILT_PRODUCTS_DIR;
544 | };
545 | 146834041AC3E56700842450 /* libReact.a */ = {
546 | isa = PBXReferenceProxy;
547 | fileType = archive.ar;
548 | path = libReact.a;
549 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
550 | sourceTree = BUILT_PRODUCTS_DIR;
551 | };
552 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
553 | isa = PBXReferenceProxy;
554 | fileType = archive.ar;
555 | path = libRCTLinking.a;
556 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
557 | sourceTree = BUILT_PRODUCTS_DIR;
558 | };
559 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
560 | isa = PBXReferenceProxy;
561 | fileType = archive.ar;
562 | path = libRCTText.a;
563 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
564 | sourceTree = BUILT_PRODUCTS_DIR;
565 | };
566 | E888EB521DC9490F008B629A /* libRCTImage-tvOS.a */ = {
567 | isa = PBXReferenceProxy;
568 | fileType = archive.ar;
569 | path = "libRCTImage-tvOS.a";
570 | remoteRef = E888EB511DC9490F008B629A /* PBXContainerItemProxy */;
571 | sourceTree = BUILT_PRODUCTS_DIR;
572 | };
573 | E888EB561DC9490F008B629A /* libRCTLinking-tvOS.a */ = {
574 | isa = PBXReferenceProxy;
575 | fileType = archive.ar;
576 | path = "libRCTLinking-tvOS.a";
577 | remoteRef = E888EB551DC9490F008B629A /* PBXContainerItemProxy */;
578 | sourceTree = BUILT_PRODUCTS_DIR;
579 | };
580 | E888EB5A1DC9490F008B629A /* libRCTNetwork-tvOS.a */ = {
581 | isa = PBXReferenceProxy;
582 | fileType = archive.ar;
583 | path = "libRCTNetwork-tvOS.a";
584 | remoteRef = E888EB591DC9490F008B629A /* PBXContainerItemProxy */;
585 | sourceTree = BUILT_PRODUCTS_DIR;
586 | };
587 | E888EB5E1DC9490F008B629A /* libRCTSettings-tvOS.a */ = {
588 | isa = PBXReferenceProxy;
589 | fileType = archive.ar;
590 | path = "libRCTSettings-tvOS.a";
591 | remoteRef = E888EB5D1DC9490F008B629A /* PBXContainerItemProxy */;
592 | sourceTree = BUILT_PRODUCTS_DIR;
593 | };
594 | E888EB621DC9490F008B629A /* libRCTText-tvOS.a */ = {
595 | isa = PBXReferenceProxy;
596 | fileType = archive.ar;
597 | path = "libRCTText-tvOS.a";
598 | remoteRef = E888EB611DC9490F008B629A /* PBXContainerItemProxy */;
599 | sourceTree = BUILT_PRODUCTS_DIR;
600 | };
601 | E888EB671DC9490F008B629A /* libRCTWebSocket-tvOS.a */ = {
602 | isa = PBXReferenceProxy;
603 | fileType = archive.ar;
604 | path = "libRCTWebSocket-tvOS.a";
605 | remoteRef = E888EB661DC9490F008B629A /* PBXContainerItemProxy */;
606 | sourceTree = BUILT_PRODUCTS_DIR;
607 | };
608 | E888EB6B1DC9490F008B629A /* libReact-tvOS.a */ = {
609 | isa = PBXReferenceProxy;
610 | fileType = archive.ar;
611 | path = "libReact-tvOS.a";
612 | remoteRef = E888EB6A1DC9490F008B629A /* PBXContainerItemProxy */;
613 | sourceTree = BUILT_PRODUCTS_DIR;
614 | };
615 | /* End PBXReferenceProxy section */
616 |
617 | /* Begin PBXResourcesBuildPhase section */
618 | 00E356EC1AD99517003FC87E /* Resources */ = {
619 | isa = PBXResourcesBuildPhase;
620 | buildActionMask = 2147483647;
621 | files = (
622 | );
623 | runOnlyForDeploymentPostprocessing = 0;
624 | };
625 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
626 | isa = PBXResourcesBuildPhase;
627 | buildActionMask = 2147483647;
628 | files = (
629 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
630 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
631 | );
632 | runOnlyForDeploymentPostprocessing = 0;
633 | };
634 | /* End PBXResourcesBuildPhase section */
635 |
636 | /* Begin PBXShellScriptBuildPhase section */
637 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
638 | isa = PBXShellScriptBuildPhase;
639 | buildActionMask = 2147483647;
640 | files = (
641 | );
642 | inputPaths = (
643 | );
644 | name = "Bundle React Native code and images";
645 | outputPaths = (
646 | );
647 | runOnlyForDeploymentPostprocessing = 0;
648 | shellPath = /bin/sh;
649 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
650 | };
651 | /* End PBXShellScriptBuildPhase section */
652 |
653 | /* Begin PBXSourcesBuildPhase section */
654 | 00E356EA1AD99517003FC87E /* Sources */ = {
655 | isa = PBXSourcesBuildPhase;
656 | buildActionMask = 2147483647;
657 | files = (
658 | 00E356F31AD99517003FC87E /* MySwiftDemoTests.m in Sources */,
659 | );
660 | runOnlyForDeploymentPostprocessing = 0;
661 | };
662 | 13B07F871A680F5B00A75B9A /* Sources */ = {
663 | isa = PBXSourcesBuildPhase;
664 | buildActionMask = 2147483647;
665 | files = (
666 | 4FBEEF221D8C166A00F478BD /* SampleViewModule.m in Sources */,
667 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
668 | 4FBEEF241D8C16B600F478BD /* SampleView.swift in Sources */,
669 | 4FBEEF261D8C16D600F478BD /* SampleViewManager.swift in Sources */,
670 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
671 | );
672 | runOnlyForDeploymentPostprocessing = 0;
673 | };
674 | /* End PBXSourcesBuildPhase section */
675 |
676 | /* Begin PBXTargetDependency section */
677 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
678 | isa = PBXTargetDependency;
679 | target = 13B07F861A680F5B00A75B9A /* MySwiftDemo */;
680 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
681 | };
682 | /* End PBXTargetDependency section */
683 |
684 | /* Begin PBXVariantGroup section */
685 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
686 | isa = PBXVariantGroup;
687 | children = (
688 | 13B07FB21A68108700A75B9A /* Base */,
689 | );
690 | name = LaunchScreen.xib;
691 | path = MySwiftDemo;
692 | sourceTree = "";
693 | };
694 | /* End PBXVariantGroup section */
695 |
696 | /* Begin XCBuildConfiguration section */
697 | 00E356F61AD99517003FC87E /* Debug */ = {
698 | isa = XCBuildConfiguration;
699 | buildSettings = {
700 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
701 | BUNDLE_LOADER = "$(TEST_HOST)";
702 | GCC_PREPROCESSOR_DEFINITIONS = (
703 | "DEBUG=1",
704 | "$(inherited)",
705 | );
706 | INFOPLIST_FILE = MySwiftDemoTests/Info.plist;
707 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
708 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
709 | PRODUCT_NAME = "$(TARGET_NAME)";
710 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MySwiftDemo.app/MySwiftDemo";
711 | };
712 | name = Debug;
713 | };
714 | 00E356F71AD99517003FC87E /* Release */ = {
715 | isa = XCBuildConfiguration;
716 | buildSettings = {
717 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
718 | BUNDLE_LOADER = "$(TEST_HOST)";
719 | COPY_PHASE_STRIP = NO;
720 | INFOPLIST_FILE = MySwiftDemoTests/Info.plist;
721 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
722 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
723 | PRODUCT_NAME = "$(TARGET_NAME)";
724 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MySwiftDemo.app/MySwiftDemo";
725 | };
726 | name = Release;
727 | };
728 | 13B07F941A680F5B00A75B9A /* Debug */ = {
729 | isa = XCBuildConfiguration;
730 | buildSettings = {
731 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
732 | CLANG_ENABLE_MODULES = YES;
733 | CURRENT_PROJECT_VERSION = 1;
734 | DEAD_CODE_STRIPPING = NO;
735 | HEADER_SEARCH_PATHS = (
736 | "$(inherited)",
737 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
738 | "$(SRCROOT)/../node_modules/react-native/React/**",
739 | );
740 | INFOPLIST_FILE = MySwiftDemo/Info.plist;
741 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
742 | OTHER_LDFLAGS = (
743 | "$(inherited)",
744 | "-ObjC",
745 | "-lc++",
746 | );
747 | PRODUCT_NAME = MySwiftDemo;
748 | SWIFT_OBJC_BRIDGING_HEADER = "MySwiftDemo-Bridging-Header.h";
749 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
750 | SWIFT_VERSION = 3.0;
751 | VERSIONING_SYSTEM = "apple-generic";
752 | };
753 | name = Debug;
754 | };
755 | 13B07F951A680F5B00A75B9A /* Release */ = {
756 | isa = XCBuildConfiguration;
757 | buildSettings = {
758 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
759 | CLANG_ENABLE_MODULES = YES;
760 | CURRENT_PROJECT_VERSION = 1;
761 | HEADER_SEARCH_PATHS = (
762 | "$(inherited)",
763 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
764 | "$(SRCROOT)/../node_modules/react-native/React/**",
765 | );
766 | INFOPLIST_FILE = MySwiftDemo/Info.plist;
767 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
768 | OTHER_LDFLAGS = (
769 | "$(inherited)",
770 | "-ObjC",
771 | "-lc++",
772 | );
773 | PRODUCT_NAME = MySwiftDemo;
774 | SWIFT_OBJC_BRIDGING_HEADER = "MySwiftDemo-Bridging-Header.h";
775 | SWIFT_VERSION = 3.0;
776 | VERSIONING_SYSTEM = "apple-generic";
777 | };
778 | name = Release;
779 | };
780 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
781 | isa = XCBuildConfiguration;
782 | buildSettings = {
783 | ALWAYS_SEARCH_USER_PATHS = NO;
784 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
785 | CLANG_CXX_LIBRARY = "libc++";
786 | CLANG_ENABLE_MODULES = YES;
787 | CLANG_ENABLE_OBJC_ARC = YES;
788 | CLANG_WARN_BOOL_CONVERSION = YES;
789 | CLANG_WARN_CONSTANT_CONVERSION = YES;
790 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
791 | CLANG_WARN_EMPTY_BODY = YES;
792 | CLANG_WARN_ENUM_CONVERSION = YES;
793 | CLANG_WARN_INT_CONVERSION = YES;
794 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
795 | CLANG_WARN_UNREACHABLE_CODE = YES;
796 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
797 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
798 | COPY_PHASE_STRIP = NO;
799 | ENABLE_STRICT_OBJC_MSGSEND = YES;
800 | GCC_C_LANGUAGE_STANDARD = gnu99;
801 | GCC_DYNAMIC_NO_PIC = NO;
802 | GCC_OPTIMIZATION_LEVEL = 0;
803 | GCC_PREPROCESSOR_DEFINITIONS = (
804 | "DEBUG=1",
805 | "$(inherited)",
806 | );
807 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
808 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
809 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
810 | GCC_WARN_UNDECLARED_SELECTOR = YES;
811 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
812 | GCC_WARN_UNUSED_FUNCTION = YES;
813 | GCC_WARN_UNUSED_VARIABLE = YES;
814 | HEADER_SEARCH_PATHS = (
815 | "$(inherited)",
816 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
817 | "$(SRCROOT)/../node_modules/react-native/React/**",
818 | );
819 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
820 | MTL_ENABLE_DEBUG_INFO = YES;
821 | ONLY_ACTIVE_ARCH = YES;
822 | SDKROOT = iphoneos;
823 | };
824 | name = Debug;
825 | };
826 | 83CBBA211A601CBA00E9B192 /* Release */ = {
827 | isa = XCBuildConfiguration;
828 | buildSettings = {
829 | ALWAYS_SEARCH_USER_PATHS = NO;
830 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
831 | CLANG_CXX_LIBRARY = "libc++";
832 | CLANG_ENABLE_MODULES = YES;
833 | CLANG_ENABLE_OBJC_ARC = YES;
834 | CLANG_WARN_BOOL_CONVERSION = YES;
835 | CLANG_WARN_CONSTANT_CONVERSION = YES;
836 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
837 | CLANG_WARN_EMPTY_BODY = YES;
838 | CLANG_WARN_ENUM_CONVERSION = YES;
839 | CLANG_WARN_INT_CONVERSION = YES;
840 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
841 | CLANG_WARN_UNREACHABLE_CODE = YES;
842 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
843 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
844 | COPY_PHASE_STRIP = YES;
845 | ENABLE_NS_ASSERTIONS = NO;
846 | ENABLE_STRICT_OBJC_MSGSEND = YES;
847 | GCC_C_LANGUAGE_STANDARD = gnu99;
848 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
849 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
850 | GCC_WARN_UNDECLARED_SELECTOR = YES;
851 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
852 | GCC_WARN_UNUSED_FUNCTION = YES;
853 | GCC_WARN_UNUSED_VARIABLE = YES;
854 | HEADER_SEARCH_PATHS = (
855 | "$(inherited)",
856 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
857 | "$(SRCROOT)/../node_modules/react-native/React/**",
858 | );
859 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
860 | MTL_ENABLE_DEBUG_INFO = NO;
861 | SDKROOT = iphoneos;
862 | VALIDATE_PRODUCT = YES;
863 | };
864 | name = Release;
865 | };
866 | /* End XCBuildConfiguration section */
867 |
868 | /* Begin XCConfigurationList section */
869 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "MySwiftDemoTests" */ = {
870 | isa = XCConfigurationList;
871 | buildConfigurations = (
872 | 00E356F61AD99517003FC87E /* Debug */,
873 | 00E356F71AD99517003FC87E /* Release */,
874 | );
875 | defaultConfigurationIsVisible = 0;
876 | defaultConfigurationName = Release;
877 | };
878 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MySwiftDemo" */ = {
879 | isa = XCConfigurationList;
880 | buildConfigurations = (
881 | 13B07F941A680F5B00A75B9A /* Debug */,
882 | 13B07F951A680F5B00A75B9A /* Release */,
883 | );
884 | defaultConfigurationIsVisible = 0;
885 | defaultConfigurationName = Release;
886 | };
887 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "MySwiftDemo" */ = {
888 | isa = XCConfigurationList;
889 | buildConfigurations = (
890 | 83CBBA201A601CBA00E9B192 /* Debug */,
891 | 83CBBA211A601CBA00E9B192 /* Release */,
892 | );
893 | defaultConfigurationIsVisible = 0;
894 | defaultConfigurationName = Release;
895 | };
896 | /* End XCConfigurationList section */
897 | };
898 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
899 | }
900 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo.xcodeproj/project.xcworkspace/xcuserdata/JP.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jpdriver/pure-swift-views-react-native/1d63e52c9ed68c987f3faef6e59b094c57608a6b/ios/MySwiftDemo.xcodeproj/project.xcworkspace/xcuserdata/JP.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ios/MySwiftDemo.xcodeproj/xcshareddata/xcschemes/MySwiftDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo.xcodeproj/xcuserdata/JP.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MySwiftDemo.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 00E356ED1AD99517003FC87E
16 |
17 | primary
18 |
19 |
20 | 13B07F861A680F5B00A75B9A
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import "RCTBundleURLProvider.h"
13 | #import "RCTRootView.h"
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"MySwiftDemo"
25 | initialProperties:nil
26 | launchOptions:launchOptions];
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/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 | }
--------------------------------------------------------------------------------
/ios/MySwiftDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/SampleView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SampleView.swift
3 | // MySwiftDemo
4 | //
5 | // Created by JP Driver on 9/16/16.
6 | // Copyright © 2016 Facebook. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SampleView: UIView {
12 |
13 | override init(frame: CGRect) {
14 | super.init(frame: frame)
15 |
16 | let label = UILabel(frame: CGRect(x: 0, y: 0, width: 100, height: 15))
17 | label.text = "This is Swift"
18 | self.addSubview(label)
19 | }
20 |
21 | required init?(coder aDecoder: NSCoder) {
22 | fatalError("init(coder:) has not been implemented")
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/SampleViewManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SampleViewManager.swift
3 | // MySwiftDemo
4 | //
5 | // Created by JP Driver on 9/16/16.
6 | // Copyright © 2016 Facebook. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | @objc(SampleViewManager)
11 | class SampleViewManager : RCTViewManager {
12 |
13 | override func view() -> UIView! {
14 | return SampleView();
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/SampleViewModule.m:
--------------------------------------------------------------------------------
1 | //
2 | // SampleViewModule.m
3 | // MySwiftDemo
4 | //
5 | // Created by JP Driver on 3/29/16.
6 | // Copyright © 2016 Facebook. All rights reserved.
7 | //
8 |
9 | #import "RCTBridgeModule.h"
10 | #import "RCTViewManager.h"
11 |
12 | @interface RCT_EXTERN_MODULE(SampleViewManager, RCTViewManager)
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ios/MySwiftDemo/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ios/MySwiftDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/MySwiftDemoTests/MySwiftDemoTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import "RCTLog.h"
14 | #import "RCTRootView.h"
15 |
16 | #define TIMEOUT_SECONDS 600
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface MySwiftDemoTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation MySwiftDemoTests
24 |
25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 | {
27 | if (test(view)) {
28 | return YES;
29 | }
30 | for (UIView *subview in [view subviews]) {
31 | if ([self findSubviewInView:subview matching:test]) {
32 | return YES;
33 | }
34 | }
35 | return NO;
36 | }
37 |
38 | - (void)testRendersWelcomeScreen
39 | {
40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 | BOOL foundElement = NO;
43 |
44 | __block NSString *redboxError = nil;
45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
46 | if (level >= RCTLogLevelError) {
47 | redboxError = message;
48 | }
49 | });
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | RCTSetLogFunction(RCTDefaultLogFunction);
64 |
65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
67 | }
68 |
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "MySwiftDemo",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "react": "15.3.2",
11 | "react-native": "0.36.0"
12 | },
13 | "jest": {
14 | "preset": "jest-react-native"
15 | },
16 | "devDependencies": {
17 | "babel-jest": "16.0.0",
18 | "babel-preset-react-native": "1.9.0",
19 | "jest": "16.0.2",
20 | "jest-react-native": "16.0.0",
21 | "react-test-renderer": "15.3.2"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------