├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── binding ├── Makefile ├── ReactNative.Droid │ ├── Additions │ │ ├── AboutAdditions.txt │ │ ├── ReactActivity.cs │ │ └── ReactInstanceManager.cs │ ├── Jars │ │ ├── AboutJars.txt │ │ ├── android-jsc-r174650.aar │ │ ├── bolts-tasks-1.4.0.jar │ │ ├── drawee-1.5.0.jar │ │ ├── fbcore-1.5.0.jar │ │ ├── fresco-1.5.0.jar │ │ ├── imagepipeline-1.5.0.jar │ │ ├── imagepipeline-base-1.5.0.jar │ │ ├── imagepipeline-okhttp3-1.5.0.jar │ │ ├── javax.inject-1.jar │ │ ├── jsr305-3.0.2.jar │ │ ├── okhttp-3.9.0.jar │ │ ├── okhttp-urlconnection-3.9.0.jar │ │ ├── soloader-0.2.0.jar │ │ └── textlayoutbuilder-1.1.0.jar │ ├── Jni │ │ ├── arm64-v8a │ │ │ └── libimagepipeline.so │ │ ├── armeabi-v7a │ │ │ └── libimagepipeline.so │ │ ├── armeabi │ │ │ └── libimagepipeline.so │ │ ├── x86 │ │ │ └── libimagepipeline.so │ │ └── x86_64 │ │ │ └── libimagepipeline.so │ ├── Makefile │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ReactNative.Droid.csproj │ ├── ReactNative.Droid.nuspec │ ├── Transforms │ │ ├── EnumFields.xml │ │ ├── EnumMethods.xml │ │ └── Metadata.xml │ └── packages.config ├── ReactNative.iOS │ ├── ApiDefinition.cs │ ├── Makefile │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ReactNative.iOS.Debug.nuspec │ ├── ReactNative.iOS.csproj │ ├── ReactNative.iOS.nuspec │ ├── StructsAndEnums.cs │ ├── buildLibs.sh │ └── libReactNative.linkwith.cs ├── ReactNative.sln ├── index.js ├── package.json └── yarn.lock ├── forms ├── Makefile ├── ReactNative.Forms.Droid │ ├── Makefile │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ReactFormsAppCompatActivity.cs │ ├── ReactFormsApplicationActivity.cs │ ├── ReactNative.Forms.Droid.csproj │ ├── ReactNative.Forms.Droid.nuspec │ ├── RendererManager.cs │ ├── Renderers │ │ └── ReactViewRenderer.cs │ ├── Resources │ │ └── Resource.designer.cs │ └── packages.config ├── ReactNative.Forms.iOS │ ├── Makefile │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ReactNative.Forms.iOS.csproj │ ├── ReactNative.Forms.iOS.nuspec │ ├── Renderers │ │ └── ReactViewRenderer.cs │ └── packages.config ├── ReactNative.Forms.sln └── ReactNative.Forms │ ├── Makefile │ ├── ReactNative.Forms.csproj │ ├── ReactNative.Forms.nuspec │ └── Views │ └── ReactView.cs └── samples ├── SampleApp.Droid ├── Assets │ ├── AboutAssets.txt │ ├── index.android.bundle │ └── index.android.bundle.meta ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.designer.cs │ ├── mipmap-hdpi │ │ └── Icon.png │ ├── mipmap-mdpi │ │ └── Icon.png │ ├── mipmap-xhdpi │ │ └── Icon.png │ ├── mipmap-xxhdpi │ │ └── Icon.png │ ├── mipmap-xxxhdpi │ │ └── Icon.png │ └── values │ │ └── Strings.xml ├── SampleApp.Droid.csproj └── packages.config ├── SampleApp.Forms.Droid ├── Assets │ ├── AboutAssets.txt │ ├── index.android.bundle │ └── index.android.bundle.meta ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.designer.cs │ ├── drawable-hdpi │ │ └── icon.png │ ├── drawable-xhdpi │ │ └── icon.png │ ├── drawable-xxhdpi │ │ └── icon.png │ ├── drawable │ │ └── icon.png │ ├── layout │ │ ├── Tabbar.axml │ │ └── Toolbar.axml │ └── values │ │ └── styles.xml ├── SampleApp.Forms.Droid.csproj ├── packages.config └── references │ ├── ReactNative.Forms.Droid.dll │ └── ReactNative.Forms.dll ├── SampleApp.Forms.iOS ├── AppDelegate.cs ├── Entitlements.plist ├── Info.plist ├── LaunchScreen.storyboard ├── Main.cs ├── Resources │ ├── main.jsbundle │ └── main.jsbundle.meta ├── SampleApp.Forms.iOS.csproj ├── packages.config └── references │ ├── ReactNative.Forms.dll │ └── ReactNative.Forms.iOS.dll ├── SampleApp.Forms.sln ├── SampleApp.Forms ├── App.xaml ├── App.xaml.cs ├── MainPage.xaml ├── MainPage.xaml.cs ├── SampleApp.Forms.projitems └── SampleApp.Forms.shproj ├── SampleApp.iOS ├── AppDelegate.cs ├── Entitlements.plist ├── Info.plist ├── Main.cs ├── Resources │ ├── Images.xcassets │ │ └── AppIcons.appiconset │ │ │ └── Contents.json │ ├── LaunchScreen.xib │ ├── main.jsbundle │ └── main.jsbundle.meta └── SampleApp.iOS.csproj └── SampleApp.sln /.gitignore: -------------------------------------------------------------------------------- 1 | /**/node_modules 2 | /**/bin 3 | /**/obj 4 | packages 5 | libReactNative.a 6 | *.userprefs 7 | .vscode 8 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: build 2 | 3 | build: 4 | $(MAKE) -C binding 5 | $(MAKE) -C forms 6 | 7 | clean: 8 | $(MAKE) clean -C binding 9 | $(MAKE) clean -C forms 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xamarin + react-native binding & sample project [![Build Status](https://www.bitrise.io/app/b3d5e7123fea85f8/status.svg?token=kL4Osd_HE45B1xGIH9wqVA&branch=master)](https://www.bitrise.io/app/b3d5e7123fea85f8) 2 | This project is inspired and based on https://github.com/cluxton/xamarin-react-native. Credits to him, for his good work! :+1: 3 | 4 | #### Whats in the box? 5 | This example includes a working proof-of-concept for both *Xamarin.Android* and *Xamarin.iOS*. Also there are renderers for *Xamarin.Forms*. 6 | 7 | #### So, why would you do that? 8 | This is mainly a proof-of-concept and a challange to make transitioning projects from Xamarin to react-native a lot easier. 9 | 10 | ## Integrate in your project 11 | To get startet just install the NuGet packages you need for your project. It depends on which project type you are dealing with. The version of the NuGet package indicates in which version of react-native is targeted. For example the version `1.0.**50**` targets react-native `^0.50.0`. 12 | 13 | #### Xamarin.iOS and Xamarin.Droid 14 | * Xamarin.Droid - https://www.nuget.org/packages/ReactNative.Droid/ 15 | * Xamarin.iOS - https://www.nuget.org/packages/ReactNative.iOS/ 16 | * Xamarin.iOS for Debugging (see notes in 1. Getting your hands dirty) https://www.nuget.org/packages/ReactNative.iOS.Debug/ 17 | 18 | #### Xamarin.Forms 19 | * Xamarin.Forms.Droid - https://www.nuget.org/packages/ReactNative.Forms.Droid/ 20 | * Xamarin.Forms.iOS - https://www.nuget.org/packages/ReactNative.Forms.iOS/ 21 | 22 | (you can and should use the `ReactNative.iOS.Debug` package in exchange for `ReactNative.iOS` for debugging purposes) 23 | 24 | ## A word about linking react-native components 25 | There are a lot of react-native components which need [native linking](https://facebook.github.io/react-native/docs/linking-libraries-ios.html). This binding already contains a precompiled and linked version of react-native. In theroy every component which need native linking should work if bound to C# seperatly. Make sure it is referencing this base react-native binding. 26 | 27 | You can also write your own native modules for [iOS](https://facebook.github.io/react-native/docs/native-modules-ios) or [Android](https://facebook.github.io/react-native/docs/native-modules-android) that can be called from javascript. See below for examples: 28 | 29 | #### iOS Native Module Example 30 | ````c# 31 | using System; 32 | using Foundation; 33 | using System.Runtime.InteropServices; 34 | using ReactNative.iOS; 35 | using UIKit; 36 | 37 | namespace Example.iOS 38 | { 39 | public class NativeModule : RCTBridgeModule 40 | { 41 | [Export("moduleName")] 42 | public static string ModuleName() => "SomeName"; 43 | 44 | [Export("requiresMainQueueSetup")] 45 | public static bool RequiresMainQueueSetup() => false; 46 | 47 | [Export("Foo")] 48 | public void Foo() 49 | { 50 | Console.Write("Hello Native World!") 51 | } 52 | 53 | [Export("__rct_export__Foo")] 54 | public static IntPtr FooExport() 55 | { 56 | var temp = new RCTMethodInfo() 57 | { 58 | jsName = string.Empty, 59 | objcName = "Foo", 60 | isSync = false 61 | }; 62 | var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(temp)); 63 | 64 | Marshal.StructureToPtr(temp, ptr, false); 65 | 66 | return ptr; 67 | } 68 | } 69 | } 70 | ```` 71 | 72 | #### Android Native Module Example 73 | ````c# 74 | using System.Collections.Generic; 75 | using Android.Content; 76 | using Com.Facebook.React; 77 | using Com.Facebook.React.Bridge; 78 | using Com.Facebook.React.Uimanager; 79 | using Java.Interop; 80 | 81 | namespace Example.Droid 82 | { 83 | public class NativePackage : Java.Lang.Object, IReactPackage 84 | { 85 | public IList CreateNativeModules(ReactApplicationContext context) 86 | { 87 | var module = new NativeModule(context); 88 | var list = new List { module }; 89 | return list; 90 | } 91 | 92 | public IList CreateViewManagers(ReactApplicationContext context) 93 | { 94 | return new List { }; 95 | } 96 | } 97 | 98 | public class NativeModule : ReactContextBaseJavaModule 99 | { 100 | public NativeModule(ReactApplicationContext reactContext) : base(reactContext) { } 101 | 102 | public override string Name => "SomeName"; 103 | 104 | [Export] 105 | [ReactMethod] 106 | public void Foo() 107 | { 108 | Console.Write("Hello Native World") 109 | } 110 | } 111 | } 112 | ```` 113 | 114 | ## Build the samples and sources 115 | ### iOS 116 | #### 1. Getting your hands dirty 117 | To build the application you will first need to download React Native & build the static library for Xamarin to use. 118 | 119 | **DO THIS STUFF TO MAKE IT WORK** 120 | https://github.com/facebook/react-native/issues/21168#issuecomment-422431294 121 | https://github.com/facebook/react-native/pull/19579/commits/293915091ca6c9de2c54681e78eecf3229bc05d5?utf8=✓&diff=split&w=1 122 | 123 | It is crucial to understand, that since the library is compiled and linked statically you have to ship seperate `*.dlls` for release and debug. For example a release build of `libReactNative.a` won't contain the [DevSupport](https://facebook.github.io/react-native/docs/debugging.html) tools. See the commands below on how you can change the build configuration. 124 | 125 | After checking out the project run the following commands: 126 | 127 | ```bash 128 | # inside of ./binding/ReactNative.iOS 129 | # install all node dependencies 130 | yarn install 131 | 132 | # build static react native library and the binding 133 | make build CONFIGURATION=Debug # or Release respectively (case sensitive), default: Debug 134 | ``` 135 | 136 | #### 2. Either use the react packager 137 | This will only work for debug builds. Run the following command and check that your javascript bundle is available on `http://localhost:8081/index.bundle` 138 | 139 | If you deploy to a physical device make sure you update the url inside `SampleApp.iOS/AppDelegate.cs` with your local ip address, so that the device can reach the packager in your local network. 140 | 141 | ```bash 142 | # inside of ./binding 143 | # run react native packager 144 | yarn start 145 | ``` 146 | 147 | #### 2. Or use the embeddable javascript bundle 148 | This is recommended for release builds. You will need to update the javascript source inside `samples/SampleApp.iOS/AppDelegate.cs` or `samples/SampleApp.Forms/Mainpage.xaml` to the bundled asset. 149 | 150 | ```bash 151 | # inside of ./binding 152 | # bundle javascript to embeddable main.jsbundle 153 | yarn bundle-ios 154 | ``` 155 | 156 | #### 3. Firing it up 157 | After you have done this, you can open the project `samples/SampleApp.sln` and deploy it to a device or simulator. 158 | 159 | ### Android 160 | #### 1. Getting your hands dirty 161 | After checking out the project run the following commands: 162 | 163 | ```bash 164 | # inside of ./binding/ReactNative.Droid 165 | # install all node dependencies 166 | yarn install 167 | 168 | # build the android binding 169 | make build 170 | ``` 171 | 172 | #### 2. Bundle the embeddable javascript 173 | This is recommended for release builds. 174 | 175 | ```bash 176 | # inside of ./binding/ 177 | # bundle javascript to embeddable index.android 178 | yarn bundle-android 179 | ``` 180 | 181 | #### (OPTIONAL) 3.1. Use the react packager 182 | Using the react packager is only possible once the app already started and loaded it's bundle from `Assets/`. See *Known Issues*. 183 | 184 | This will only work for debug builds. Run the following command and check that your javascript bundle is available on `http://localhost:8081/index.bundle` 185 | 186 | ```bash 187 | # inside of ./binding 188 | # run react native packager 189 | yarn start 190 | ``` 191 | 192 | Open the react dev support menu and `Refresh` the view or `Enable hot reloading` to check if everything works. 193 | 194 | #### 3. Firing it up 195 | After you have done this, you can open the project `samples/SampleApp.sln` and deploy it to a device or simulator. 196 | 197 | ## Known Issues 198 | * The precompiled `ReactNative.Droid` assembly references the `Square.Okio` package. This will cause build errors in the DEXer build step if you are using `modernhttpclient`. This is because `modernhttpclient` ships with its own prebundled version of `okhttp`. 199 | * **Workaround:** You have to compile `ReactNative.Droid` by yourself and remove the duplicated native references. Alternatively you can use a fork of `modernhttpclient` which does not embed its own version of `okhttp`. 200 | * The Android sample application does not initially load from the react packager. **Or is this the intended behavior?** 201 | * **Workaround:** Instead you have to `yarn bundle` and include the `index.android.bundle` in the android `Assets/` directory. 202 | -------------------------------------------------------------------------------- /binding/Makefile: -------------------------------------------------------------------------------- 1 | all: build 2 | 3 | build: 4 | $(MAKE) -C ReactNative.Droid 5 | $(MAKE) -C ReactNative.iOS 6 | 7 | clean: 8 | $(MAKE) clean -C ReactNative.Droid 9 | $(MAKE) clean -C ReactNative.iOS 10 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Additions/AboutAdditions.txt: -------------------------------------------------------------------------------- 1 | Additions allow you to add arbitrary C# to the generated classes 2 | before they are compiled. This can be helpful for providing convenience 3 | methods or adding pure C# classes. 4 | 5 | == Adding Methods to Generated Classes == 6 | 7 | Let's say the library being bound has a Rectangle class with a constructor 8 | that takes an x and y position, and a width and length size. It will look like 9 | this: 10 | 11 | public partial class Rectangle 12 | { 13 | public Rectangle (int x, int y, int width, int height) 14 | { 15 | // JNI bindings 16 | } 17 | } 18 | 19 | Imagine we want to add a constructor to this class that takes a Point and 20 | Size structure instead of 4 ints. We can add a new file called Rectangle.cs 21 | with a partial class containing our new method: 22 | 23 | public partial class Rectangle 24 | { 25 | public Rectangle (Point location, Size size) : 26 | this (location.X, location.Y, size.Width, size.Height) 27 | { 28 | } 29 | } 30 | 31 | At compile time, the additions class will be added to the generated class 32 | and the final assembly will a Rectangle class with both constructors. 33 | 34 | 35 | == Adding C# Classes == 36 | 37 | Another thing that can be done is adding fully C# managed classes to the 38 | generated library. In the above example, let's assume that there isn't a 39 | Point class available in Java or our library. The one we create doesn't need 40 | to interact with Java, so we'll create it like a normal class in C#. 41 | 42 | By adding a Point.cs file with this class, it will end up in the binding library: 43 | 44 | public class Point 45 | { 46 | public int X { get; set; } 47 | public int Y { get; set; } 48 | } 49 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Additions/ReactActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Com.Facebook.React 4 | { 5 | public abstract partial class ReactActivity 6 | { 7 | new public int CheckSelfPermission(string permission) 8 | { 9 | return (int)base.CheckSelfPermission(permission); 10 | } 11 | 12 | new public int CheckPermission(string permission, int pid, int uid) 13 | { 14 | return (int)base.CheckPermission(permission, pid, uid); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Additions/ReactInstanceManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Com.Facebook.React 4 | { 5 | public partial class ReactInstanceManager 6 | { 7 | /// 8 | /// Initializes the class. 9 | /// Load necessary jni libraries via static ctor. 10 | /// 11 | static ReactInstanceManager() 12 | { 13 | // Load jni libraries. 14 | Java.Lang.JavaSystem.LoadLibrary("imagepipeline"); 15 | Java.Lang.JavaSystem.LoadLibrary("reactnativejni"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/AboutJars.txt: -------------------------------------------------------------------------------- 1 | This directory is for Android .jars. 2 | 3 | There are 4 types of jars that are supported: 4 | 5 | == Input Jar and Embedded Jar == 6 | 7 | This is the jar that bindings should be generated for. 8 | 9 | For example, if you were binding the Google Maps library, this would 10 | be Google's "maps.jar". 11 | 12 | The difference between EmbeddedJar and InputJar is, EmbeddedJar is to be 13 | embedded in the resulting dll as EmbeddedResource, while InputJar is not. 14 | There are couple of reasons you wouldn't like to embed the target jar 15 | in your dll (the ones that could be internally loaded by 16 | feature e.g. maps.jar, or you cannot embed jars that are under some 17 | proprietary license). 18 | 19 | Set the build action for these jars in the properties page to "InputJar". 20 | 21 | 22 | == Reference Jar and Embedded Reference Jar == 23 | 24 | These are jars that are referenced by the input jar. C# bindings will 25 | not be created for these jars. These jars will be used to resolve 26 | types used by the input jar. 27 | 28 | NOTE: Do not add "android.jar" as a reference jar. It will be added automatically 29 | based on the Target Framework selected. 30 | 31 | Set the build action for these jars in the properties page to "ReferenceJar". 32 | 33 | "EmbeddedJar" works like "ReferenceJar", but like "EmbeddedJar", it is 34 | embedded in your dll. But at application build time, they are not included 35 | in the final apk, like ReferenceJar files. 36 | 37 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/android-jsc-r174650.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/android-jsc-r174650.aar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/bolts-tasks-1.4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/bolts-tasks-1.4.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/drawee-1.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/drawee-1.5.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/fbcore-1.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/fbcore-1.5.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/fresco-1.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/fresco-1.5.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/imagepipeline-1.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/imagepipeline-1.5.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/imagepipeline-base-1.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/imagepipeline-base-1.5.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/imagepipeline-okhttp3-1.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/imagepipeline-okhttp3-1.5.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/javax.inject-1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/javax.inject-1.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/jsr305-3.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/jsr305-3.0.2.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/okhttp-3.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/okhttp-3.9.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/okhttp-urlconnection-3.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/okhttp-urlconnection-3.9.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/soloader-0.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/soloader-0.2.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jars/textlayoutbuilder-1.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jars/textlayoutbuilder-1.1.0.jar -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jni/arm64-v8a/libimagepipeline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jni/arm64-v8a/libimagepipeline.so -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jni/armeabi-v7a/libimagepipeline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jni/armeabi-v7a/libimagepipeline.so -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jni/armeabi/libimagepipeline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jni/armeabi/libimagepipeline.so -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jni/x86/libimagepipeline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jni/x86/libimagepipeline.so -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Jni/x86_64/libimagepipeline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/binding/ReactNative.Droid/Jni/x86_64/libimagepipeline.so -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Makefile: -------------------------------------------------------------------------------- 1 | NUGET=nuget 2 | MSBUILD=msbuild 3 | SOLUTION=ReactNative.Droid.csproj 4 | NUSPEC=ReactNative.Droid.nuspec 5 | 6 | all: nuget 7 | 8 | build: 9 | $(MSBUILD) $(SOLUTION) /t:Restore 10 | $(MSBUILD) $(SOLUTION) /p:Configuration=Release /t:Clean /t:Build 11 | 12 | nuget: 13 | $(MAKE) build 14 | $(NUGET) pack $(NUSPEC) 15 | mv *.nupkg bin/ 16 | 17 | clean: 18 | rm -rf bin/ obj/ 19 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle("ReactNative.Droid")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("voydz")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/ReactNative.Droid.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {093D248C-E7EF-4C74-B1A0-38E0A332E736} 7 | {10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | Library 9 | ReactNative.Droid 10 | ReactNative.Droid 11 | v6.0 12 | Resources 13 | Assets 14 | false 15 | class-parse 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug 22 | DEBUG; 23 | prompt 24 | 4 25 | None 26 | false 27 | 28 | 29 | true 30 | pdbonly 31 | true 32 | bin\Release 33 | prompt 34 | 4 35 | true 36 | false 37 | false 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | ..\packages\Square.OkIO.1.13.0\lib\MonoAndroid\Square.OkIO.dll 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Jars\react-native-0.54.1.aar 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/ReactNative.Droid.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReactNative.Droid 5 | 1.0.55 6 | voydz 7 | voydz 8 | https://reactjs.org/favicon.ico 9 | https://github.com/voydz/xamarin-react-native 10 | false 11 | Xamarin.Droid binding of react-native. 12 | Initial release. 13 | Copyright 2018 14 | react react-native com.facebook.react facebook 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Transforms/EnumFields.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Transforms/EnumMethods.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 19 | 20 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/Transforms/Metadata.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Com.Facebook.React.Bridge.IReadableMap 36 | Com.Facebook.React.Bridge.IReadableArray 37 | 38 | Com.Facebook.React.Bridge.IReadableMap 39 | Com.Facebook.React.Bridge.IReadableArray 40 | 41 | Com.Facebook.React.Bridge.IReadableMap 42 | Com.Facebook.React.Bridge.IReadableArray 43 | 44 | Com.Facebook.React.Bridge.IReadableMap 45 | Com.Facebook.React.Bridge.IReadableArray 46 | 47 | public 48 | 49 | public 50 | 51 | public 52 | 53 | public 54 | 55 | public 56 | 57 | public 58 | 59 | public 60 | Java.Lang.Object 61 | 62 | Java.Lang.Object 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Java.Lang.Object 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | Java.Lang.Object 81 | 82 | Java.Lang.Object 83 | protected 84 | 85 | Java.Lang.Object 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | Java.Lang.Object 95 | protected 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | Java.Lang.Object 105 | protected 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | Java.Lang.Object 123 | protected 124 | 125 | Java.Lang.Object 126 | protected 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | Java.Lang.Object 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | Java.Lang.Object 168 | protected 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | Java.Lang.Object 186 | protected 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | Java.Lang.Object 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | Java.Lang.Object 204 | 205 | Java.Lang.Object 206 | 207 | Java.Lang.Object 208 | 209 | Java.Lang.Object 210 | 211 | Java.Lang.Object 212 | 213 | Java.Lang.Object 214 | protected 215 | 216 | Java.Lang.Object 217 | protected 218 | 219 | Java.Lang.Object 220 | protected 221 | 222 | Java.Lang.Object 223 | -------------------------------------------------------------------------------- /binding/ReactNative.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/ApiDefinition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using UIKit; 4 | using Foundation; 5 | using ObjCRuntime; 6 | using CoreGraphics; 7 | 8 | namespace ReactNative.iOS 9 | { 10 | [BaseType(typeof(UIView))] 11 | interface RCTRootView 12 | { 13 | [ExportAttribute("initWithBundleURL:moduleName:initialProperties:launchOptions:")] 14 | IntPtr Constructor(NSUrl bundleUrl, NSString moduleName, NSDictionary initialProperties, NSDictionary launchOptions); 15 | } 16 | 17 | [Protocol, Model] 18 | [BaseType(typeof(NSObject))] 19 | interface RCTBridgeModule { } 20 | 21 | [BaseType(typeof(NSObject))] 22 | interface RCTBundleURLProvider 23 | { 24 | [Static] 25 | [Export("sharedSettings")] 26 | RCTBundleURLProvider SharedSettings(); 27 | 28 | [Export("jsBundleURLForBundleRoot:fallbackResource:")] 29 | NSUrl JsBundleURLForBundleRoot(string bundleRoot, [NullAllowed] string resourceName); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/Makefile: -------------------------------------------------------------------------------- 1 | NUGET=nuget 2 | MSBUILD=msbuild 3 | SOLUTION=ReactNative.iOS.csproj 4 | NUSPEC=ReactNative.iOS.nuspec 5 | DBG_NUSPEC=ReactNative.iOS.Debug.nuspec 6 | 7 | all: nuget 8 | 9 | build: 10 | ./buildLibs.sh $(CONFIGURATION) 11 | $(MSBUILD) $(SOLUTION) /t:Restore 12 | $(MSBUILD) $(SOLUTION) /p:Configuration=$(CONFIGURATION) /t:Clean /t:Build 13 | 14 | nuget: 15 | $(MAKE) build CONFIGURATION=Release 16 | $(NUGET) pack $(NUSPEC) 17 | $(MAKE) build CONFIGURATION=Debug 18 | $(NUGET) pack $(DBG_NUSPEC) 19 | mv *.nupkg bin/ 20 | 21 | clean: 22 | rm -rf *.a bin/ obj/ 23 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | using Foundation; 5 | 6 | // This attribute allows you to mark your assemblies as “safe to link”. 7 | // When the attribute is present, the linker—if enabled—will process the assembly 8 | // even if you’re using the “Link SDK assemblies only” option, which is the default for device builds. 9 | 10 | [assembly: LinkerSafe] 11 | 12 | // Information about this assembly is defined by the following attributes. 13 | // Change them to the values specific to your project. 14 | 15 | [assembly: AssemblyTitle("ReactNative.iOS")] 16 | [assembly: AssemblyDescription("")] 17 | [assembly: AssemblyConfiguration("")] 18 | [assembly: AssemblyCompany("")] 19 | [assembly: AssemblyProduct("")] 20 | [assembly: AssemblyCopyright("charles")] 21 | [assembly: AssemblyTrademark("")] 22 | [assembly: AssemblyCulture("")] 23 | 24 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 25 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 26 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 27 | 28 | [assembly: AssemblyVersion("1.0.*")] 29 | 30 | // The following attributes are used to specify the signing key for the assembly, 31 | // if desired. See the Mono documentation for more information about signing. 32 | 33 | //[assembly: AssemblyDelaySign(false)] 34 | //[assembly: AssemblyKeyFile("")] 35 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/ReactNative.iOS.Debug.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReactNative.iOS.Debug 5 | 1.0.55 6 | voydz 7 | voydz 8 | https://reactjs.org/favicon.ico 9 | https://github.com/voydz/xamarin-react-native 10 | false 11 | Xamarin.iOS binding of react-native. This version has debug tools enabled and should not be used for production builds! 12 | Initial release. 13 | Copyright 2018 14 | react react-native com.facebook.react facebook 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/ReactNative.iOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {05FF3726-ED02-4814-AF63-9BA10085090E} 8 | Library 9 | ReactNative.iOS 10 | Resources 11 | ReactNative.iOS 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\Debug 18 | DEBUG; 19 | prompt 20 | 4 21 | false 22 | true 23 | 24 | 25 | full 26 | true 27 | bin\Release 28 | prompt 29 | 4 30 | false 31 | true 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | libReactNative.a 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/ReactNative.iOS.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReactNative.iOS 5 | 1.0.55 6 | voydz 7 | voydz 8 | https://reactjs.org/favicon.ico 9 | https://github.com/voydz/xamarin-react-native 10 | false 11 | Xamarin.iOS binding of react-native. 12 | Initial release. 13 | Copyright 2018 14 | react react-native com.facebook.react facebook 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/StructsAndEnums.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using Foundation; 4 | 5 | namespace ReactNative.iOS 6 | { 7 | [StructLayout(LayoutKind.Sequential)] 8 | public struct RCTMethodInfo 9 | { 10 | public string jsName; 11 | public string objcName; 12 | public bool isSync; 13 | } 14 | 15 | public static class CFunctions 16 | { 17 | [DllImport ("__Internal")] 18 | public static extern void RCTRegisterModule(IntPtr module); 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/buildLibs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) 3 | CONFIGURATION=${1:-${CONFIGURATION:-Debug}} 4 | 5 | # xcpretty is required to run this script 6 | if ! [ -x "$(command -v xcpretty)" ]; then 7 | echo 'Error: xcpretty is not installed.' >&2 8 | exit 1 9 | fi 10 | 11 | function buildLib { 12 | # prepare project params 13 | BASE="$DIR/../node_modules/react-native" 14 | PROJECT="$BASE/$1" 15 | 16 | if [[ -n $4 ]]; then 17 | HEADER_I386="HEADER_SEARCH_PATHS=\"$BASE/$4/build-i386/include\"" 18 | HEADER_X86_64="HEADER_SEARCH_PATHS=\"$BASE/$4/build-x86_64/include\"" 19 | HEADER_ARM64="HEADER_SEARCH_PATHS=\"$BASE/$4/build-arm64/include\"" 20 | HEADER_ARMV7="HEADER_SEARCH_PATHS=\"$BASE/$4/build-armv7/include\"" 21 | else 22 | HEADER_I386="" 23 | HEADER_X86_64="" 24 | HEADER_ARM64="" 25 | HEADER_ARMV7="" 26 | fi 27 | 28 | # build xcode 29 | xcodebuild \ 30 | -project "$PROJECT/$2.xcodeproj" \ 31 | -target $2 \ 32 | -sdk iphonesimulator \ 33 | -arch i386 \ 34 | -configuration $3 clean build \ 35 | TARGET_BUILD_DIR="$PROJECT/build-i386" \ 36 | BUILT_PRODUCTS_DIR="$PROJECT/build-i386" \ 37 | $HEADER_I386 | xcpretty 38 | xcodebuild \ 39 | -project "$PROJECT/$2.xcodeproj" \ 40 | -target $2 \ 41 | -sdk iphonesimulator \ 42 | -arch x86_64 \ 43 | -configuration $3 clean build \ 44 | TARGET_BUILD_DIR="$PROJECT/build-x86_64" \ 45 | BUILT_PRODUCTS_DIR="$PROJECT/build-x86_64" \ 46 | $HEADER_X86_64 | xcpretty 47 | xcodebuild \ 48 | -project "$PROJECT/$2.xcodeproj" \ 49 | -target $2 \ 50 | -sdk iphoneos \ 51 | -arch armv7 \ 52 | -configuration $3 clean build \ 53 | TARGET_BUILD_DIR="$PROJECT/build-armv7" \ 54 | BUILT_PRODUCTS_DIR="$PROJECT/build-armv7" \ 55 | $HEADER_ARMV7 | xcpretty 56 | xcodebuild \ 57 | -project "$PROJECT/$2.xcodeproj" \ 58 | -target $2 \ 59 | -sdk iphoneos \ 60 | -arch arm64 \ 61 | -configuration $3 clean build \ 62 | TARGET_BUILD_DIR="$PROJECT/build-arm64" \ 63 | BUILT_PRODUCTS_DIR="$PROJECT/build-arm64" \ 64 | $HEADER_ARM64 | xcpretty 65 | 66 | # link archs together 67 | lipo -create -output "$DIR/bin/react/$3/lib$2.a" \ 68 | "$PROJECT/build-armv7/lib$2.a" \ 69 | "$PROJECT/build-arm64/lib$2.a" \ 70 | "$PROJECT/build-i386/lib$2.a" \ 71 | "$PROJECT/build-x86_64/lib$2.a" 72 | } 73 | 74 | # clean .a directory 75 | OUTPUT="$DIR/bin/react/$CONFIGURATION/" 76 | rm -Rf "$OUTPUT" 77 | mkdir -p "$OUTPUT" 78 | 79 | # actually build the react submodules 80 | buildLib React React "$CONFIGURATION" 81 | buildLib Libraries/Text RCTText "$CONFIGURATION" React 82 | buildLib Libraries/Network RCTNetwork "$CONFIGURATION" React 83 | buildLib Libraries/WebSocket RCTWebSocket "$CONFIGURATION" React # needed for debugging 84 | buildLib Libraries/Image RCTImage "$CONFIGURATION" React 85 | buildLib Libraries/EventEmitter RCTEventEmitter "$CONFIGURATION" React 86 | buildLib Libraries/LinkingIOS RCTLinking "$CONFIGURATION" React 87 | buildLib Libraries/NativeAnimation RCTAnimation "$CONFIGURATION" React 88 | buildLib Libraries/ActionSheetIOS RCTActionSheet "$CONFIGURATION" React 89 | 90 | # link everything together 91 | ASSEMBLY="$DIR/bin/react/$CONFIGURATION/libReactNative.a" 92 | rm -f "$ASSEMBLY" 93 | libtool -static -o "$ASSEMBLY" \ 94 | "$DIR/bin/react/$CONFIGURATION/libReact.a" \ 95 | "$DIR/bin/react/$CONFIGURATION/libRCTText.a" \ 96 | "$DIR/bin/react/$CONFIGURATION/libRCTNetwork.a" \ 97 | "$DIR/bin/react/$CONFIGURATION/libRCTWebSocket.a" \ 98 | "$DIR/bin/react/$CONFIGURATION/libRCTImage.a" \ 99 | "$DIR/bin/react/$CONFIGURATION/libRCTLinking.a" \ 100 | "$DIR/bin/react/$CONFIGURATION/libRCTAnimation.a" \ 101 | "$DIR/bin/react/$CONFIGURATION/libRCTActionSheet.a" 102 | 103 | # copy target assembly 104 | cp "$ASSEMBLY" "$DIR/libReactNative.a" 105 | -------------------------------------------------------------------------------- /binding/ReactNative.iOS/libReactNative.linkwith.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ObjCRuntime; 3 | 4 | [assembly: LinkWith( 5 | "libReactNative.a", 6 | LinkTarget.ArmV7 | LinkTarget.Arm64 | LinkTarget.i386 | LinkTarget.x86_64, 7 | Frameworks = "JavaScriptCore", 8 | IsCxx = true, 9 | SmartLink = false /* if set to true it will unlink both RCTBatchedBridge and RCTCxxBridge */, 10 | ForceLoad = true)] 11 | -------------------------------------------------------------------------------- /binding/ReactNative.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative.iOS", "ReactNative.iOS\ReactNative.iOS.csproj", "{05FF3726-ED02-4814-AF63-9BA10085090E}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative.Droid", "ReactNative.Droid\ReactNative.Droid.csproj", "{093D248C-E7EF-4C74-B1A0-38E0A332E736}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Release|Any CPU.Build.0 = Release|Any CPU 18 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Release|Any CPU.Build.0 = Release|Any CPU 22 | EndGlobalSection 23 | EndGlobal 24 | -------------------------------------------------------------------------------- /binding/index.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 | Platform, 11 | StyleSheet, 12 | Text, 13 | View 14 | } from 'react-native'; 15 | 16 | const instructions = Platform.select({ 17 | ios: 'Press Cmd+R to reload,\n' + 18 | 'Cmd+D or shake for dev menu', 19 | android: 'Double tap R on your keyboard to reload,\n' + 20 | 'Shake or press menu button for dev menu', 21 | }); 22 | 23 | class RNHelloWorld extends Component<{}> { 24 | render() { 25 | return ( 26 | 27 | 28 | Hey there! Wassup? 29 | 30 | 31 | To get started, edit App.js 32 | 33 | 34 | {instructions} 35 | 36 | 37 | ); 38 | } 39 | } 40 | 41 | const styles = StyleSheet.create({ 42 | container: { 43 | flex: 1, 44 | justifyContent: 'center', 45 | alignItems: 'center', 46 | backgroundColor: '#F5FCFF', 47 | }, 48 | welcome: { 49 | fontSize: 20, 50 | textAlign: 'center', 51 | margin: 10, 52 | }, 53 | instructions: { 54 | textAlign: 'center', 55 | color: '#333333', 56 | marginBottom: 5, 57 | }, 58 | }); 59 | 60 | // Module name 61 | AppRegistry.registerComponent('MyReactNativeApp', () => RNHelloWorld); 62 | -------------------------------------------------------------------------------- /binding/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "xamarin-react-native", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "bundle-android": "yarn bundle-sample-android && yarn bundle-sample-forms-android", 8 | "bundle-sample-android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output ../samples/SampleApp.Droid/Assets/index.android.bundle --assets-dest ../samples/SampleApp.Droid/Resources/", 9 | "bundle-sample-forms-android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output ../samples/SampleApp.Forms.Droid/Assets/index.android.bundle --assets-dest ../samples/SampleApp.Forms.Droid/Resources/", 10 | "bundle-ios": "yarn bundle-sample-ios && yarn bundle-sample-forms-ios", 11 | "bundle-sample-ios": "react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ../samples/SampleApp.iOS/Resources/main.jsbundle --assets-dest ../samples/SampleApp.iOS/Resources/", 12 | "bundle-sample-forms-ios": "react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ../samples/SampleApp.Forms.iOS/Resources/main.jsbundle --assets-dest ../samples/SampleApp.Forms.iOS/Resources/" 13 | }, 14 | "dependencies": { 15 | "react": "16.3.1", 16 | "react-native": "0.55.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /forms/Makefile: -------------------------------------------------------------------------------- 1 | all: build 2 | 3 | build: 4 | $(MAKE) -C ReactNative.Forms 5 | $(MAKE) -C ReactNative.Forms.Droid 6 | $(MAKE) -C ReactNative.Forms.iOS 7 | 8 | clean: 9 | $(MAKE) clean -C ReactNative.Forms 10 | $(MAKE) clean -C ReactNative.Forms.Droid 11 | $(MAKE) clean -C ReactNative.Forms.iOS 12 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/Makefile: -------------------------------------------------------------------------------- 1 | NUGET=nuget 2 | MSBUILD=msbuild 3 | SOLUTION=ReactNative.Forms.Droid.csproj 4 | NUSPEC=ReactNative.Forms.Droid.nuspec 5 | 6 | all: nuget 7 | 8 | build: 9 | $(MSBUILD) $(SOLUTION) /t:Restore 10 | $(MSBUILD) $(SOLUTION) /p:Configuration=Release /t:Clean /t:Build 11 | 12 | nuget: 13 | $(MAKE) build 14 | $(NUGET) pack $(NUSPEC) 15 | mv *.nupkg bin/ 16 | 17 | clean: 18 | rm -rf bin/ obj/ 19 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("ReactNative.Forms.Droid")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("voydz")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.0")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/ReactFormsAppCompatActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content; 3 | using Android.OS; 4 | using Android.Views; 5 | using Xamarin.Forms.Platform.Android; 6 | 7 | namespace ReactNative.Forms.Droid 8 | { 9 | public class ReactFormsAppCompatActivity : FormsAppCompatActivity 10 | { 11 | /// 12 | /// The renderer manager. 13 | /// 14 | private RendererManager _rendererManager; 15 | 16 | #region configure functionality 17 | 18 | protected virtual bool IsReactNativeDebugging() 19 | { 20 | return false; 21 | } 22 | 23 | #endregion 24 | 25 | #region lifecycle functions 26 | 27 | protected override void OnCreate(Bundle savedInstanceState) 28 | { 29 | base.OnCreate(savedInstanceState); 30 | 31 | _rendererManager = new RendererManager(this, IsReactNativeDebugging()); 32 | } 33 | 34 | protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) 35 | { 36 | base.OnActivityResult(requestCode, resultCode, data); 37 | 38 | _rendererManager.OnActivityResult(requestCode, resultCode, data); 39 | } 40 | 41 | protected override void OnResume() 42 | { 43 | base.OnResume(); 44 | 45 | _rendererManager.OnResume(); 46 | } 47 | 48 | protected override void OnPause() 49 | { 50 | base.OnPause(); 51 | 52 | _rendererManager.OnPause(); 53 | } 54 | 55 | protected override void OnDestroy() 56 | { 57 | base.OnDestroy(); 58 | 59 | _rendererManager.OnDestroy(); 60 | } 61 | 62 | public override void OnBackPressed() 63 | { 64 | if (!_rendererManager.OnBackPressed()) 65 | { 66 | base.OnBackPressed(); 67 | } 68 | } 69 | 70 | public override bool OnKeyUp(Keycode keyCode, KeyEvent e) 71 | { 72 | if (keyCode == Keycode.Menu) 73 | { 74 | _rendererManager.OnKeyUp(keyCode, e); 75 | return true; 76 | } 77 | 78 | return base.OnKeyUp(keyCode, e); 79 | } 80 | 81 | #endregion 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/ReactFormsApplicationActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content; 3 | using Android.OS; 4 | using Android.Views; 5 | using Xamarin.Forms.Platform.Android; 6 | 7 | namespace ReactNative.Forms.Droid 8 | { 9 | public class ReactFormsApplicationActivity : FormsApplicationActivity 10 | { 11 | /// 12 | /// The renderer manager. 13 | /// 14 | private RendererManager _rendererManager; 15 | 16 | #region configure functionality 17 | 18 | protected virtual bool IsReactNativeDebugging() 19 | { 20 | return false; 21 | } 22 | 23 | #endregion 24 | 25 | #region lifecycle functions 26 | 27 | protected override void OnCreate(Bundle savedInstanceState) 28 | { 29 | base.OnCreate(savedInstanceState); 30 | 31 | _rendererManager = new RendererManager(this, IsReactNativeDebugging()); 32 | } 33 | 34 | protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) 35 | { 36 | base.OnActivityResult(requestCode, resultCode, data); 37 | 38 | _rendererManager.OnActivityResult(requestCode, resultCode, data); 39 | } 40 | 41 | protected override void OnResume() 42 | { 43 | base.OnResume(); 44 | 45 | _rendererManager.OnResume(); 46 | } 47 | 48 | protected override void OnPause() 49 | { 50 | base.OnPause(); 51 | 52 | _rendererManager.OnResume(); 53 | } 54 | 55 | protected override void OnDestroy() 56 | { 57 | base.OnDestroy(); 58 | 59 | _rendererManager.OnDestroy(); 60 | } 61 | 62 | public override void OnBackPressed() 63 | { 64 | if (!_rendererManager.OnBackPressed()) 65 | { 66 | base.OnBackPressed(); 67 | } 68 | } 69 | 70 | public override bool OnKeyUp(Keycode keyCode, KeyEvent e) 71 | { 72 | if (keyCode == Keycode.Menu) 73 | { 74 | _rendererManager.OnKeyUp(keyCode, e); 75 | return true; 76 | } 77 | 78 | return base.OnKeyUp(keyCode, e); 79 | } 80 | 81 | #endregion 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/ReactNative.Forms.Droid.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Debug 7 | AnyCPU 8 | {5557067B-04CE-407A-8E1E-DC5FBBB781B9} 9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | ReactNative.Forms.Droid 12 | ReactNative.Forms.Droid 13 | v8.1 14 | Resources\Resource.designer.cs 15 | Resource 16 | Resources 17 | Assets 18 | true 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug 25 | DEBUG; 26 | prompt 27 | 4 28 | None 29 | 30 | 31 | true 32 | pdbonly 33 | true 34 | bin\Release 35 | prompt 36 | 4 37 | true 38 | false 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | ..\packages\Xamarin.Android.Support.Annotations.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Annotations.dll 47 | 48 | 49 | ..\packages\Xamarin.Android.Support.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Compat.dll 50 | 51 | 52 | ..\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.UI.dll 53 | 54 | 55 | ..\packages\Xamarin.Android.Support.Core.Utils.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.Utils.dll 56 | 57 | 58 | ..\packages\Xamarin.Android.Support.Media.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Media.Compat.dll 59 | 60 | 61 | ..\packages\Xamarin.Android.Support.Fragment.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Fragment.dll 62 | 63 | 64 | ..\packages\Xamarin.Android.Support.Transition.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Transition.dll 65 | 66 | 67 | ..\packages\Xamarin.Android.Support.v4.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v4.dll 68 | 69 | 70 | ..\packages\Xamarin.Android.Support.v7.CardView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.CardView.dll 71 | 72 | 73 | ..\packages\Xamarin.Android.Support.v7.Palette.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.Palette.dll 74 | 75 | 76 | ..\packages\Xamarin.Android.Support.v7.RecyclerView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.dll 77 | 78 | 79 | ..\packages\Xamarin.Android.Support.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.dll 80 | 81 | 82 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.dll 83 | 84 | 85 | ..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.dll 86 | 87 | 88 | ..\packages\Xamarin.Android.Support.Design.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Design.dll 89 | 90 | 91 | ..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.dll 92 | 93 | 94 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\MonoAndroid10\FormsViewGroup.dll 95 | 96 | 97 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\MonoAndroid10\Xamarin.Forms.Core.dll 98 | 99 | 100 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll 101 | 102 | 103 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\MonoAndroid10\Xamarin.Forms.Platform.dll 104 | 105 | 106 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | {093D248C-E7EF-4C74-B1A0-38E0A332E736} 123 | ReactNative.Droid 124 | 125 | 126 | {370CC3E0-D956-4784-A374-F80B0E536C31} 127 | ReactNative.Forms 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/ReactNative.Forms.Droid.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReactNative.Forms.Droid 5 | 1.0.55 6 | voydz 7 | voydz 8 | https://reactjs.org/favicon.ico 9 | https://github.com/voydz/xamarin-react-native 10 | false 11 | Use ReactNative.Droid inside of Xamarin.Forms. 12 | Initial release. 13 | Copyright 2018 14 | react react-native com.facebook.react facebook 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/RendererManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Android.App; 3 | using Android.Content; 4 | using Android.Net; 5 | using Android.OS; 6 | using Android.Provider; 7 | using Android.Views; 8 | using Com.Facebook.React.Modules.Core; 9 | using ReactNative.Forms.Droid.Renderers; 10 | 11 | namespace ReactNative.Forms.Droid 12 | { 13 | public class RendererManager : Java.Lang.Object, IDefaultHardwareBackBtnHandler 14 | { 15 | private const int OVERLAY_PERMISSION_REQ_CODE = 1945; 16 | 17 | /// 18 | /// The forms activity. 19 | /// 20 | internal static Activity Activity; 21 | 22 | /// 23 | /// The debug mode. 24 | /// 25 | internal static bool Debug; 26 | 27 | /// 28 | /// The renderers. 29 | /// 30 | private static List _renderers = new List(); 31 | 32 | /// 33 | /// Initializes a new instance of the class. 34 | /// 35 | /// Activity. 36 | /// Debug. 37 | public RendererManager(Activity activity, bool debug) 38 | { 39 | Activity = activity; 40 | Debug = debug; 41 | 42 | if (debug && Build.VERSION.SdkInt >= BuildVersionCodes.M) 43 | { 44 | if (!Settings.CanDrawOverlays(activity)) 45 | { 46 | var intent = new Intent(Settings.ActionManageOverlayPermission, Uri.Parse("package:" + activity.PackageName)); 47 | activity.StartActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE); 48 | } 49 | } 50 | } 51 | 52 | #region public interface 53 | 54 | public void OnActivityResult(int requestCode, Result resultCode, Intent data) 55 | { 56 | if (requestCode == OVERLAY_PERMISSION_REQ_CODE) 57 | { 58 | if (Build.VERSION.SdkInt >= BuildVersionCodes.M) 59 | { 60 | if (Settings.CanDrawOverlays(Activity)) 61 | { 62 | // Success, now create the view if we have an instance. 63 | foreach (var renderer in _renderers) 64 | { 65 | renderer.RerenderReactView(); 66 | } 67 | } 68 | } 69 | } 70 | } 71 | 72 | public void OnResume() 73 | { 74 | foreach (var renderer in _renderers) 75 | { 76 | renderer.Resume(this); 77 | } 78 | } 79 | 80 | public void OnPause() 81 | { 82 | foreach (var renderer in _renderers) 83 | { 84 | renderer.Pause(); 85 | } 86 | } 87 | 88 | public void OnDestroy() 89 | { 90 | foreach (var renderer in _renderers) 91 | { 92 | renderer.Destroy(); 93 | } 94 | } 95 | 96 | public bool OnBackPressed() 97 | { 98 | var result = false; 99 | foreach (var renderer in _renderers) 100 | { 101 | if (renderer.BackPressed()) 102 | result = true; 103 | } 104 | return result; 105 | } 106 | 107 | public bool OnKeyUp(Keycode keyCode, KeyEvent e) 108 | { 109 | if (keyCode == Keycode.Menu) 110 | { 111 | foreach (var renderer in _renderers) 112 | { 113 | renderer.ShowDevOptionsDialog(); 114 | } 115 | return true; 116 | } 117 | 118 | return false; 119 | } 120 | 121 | #endregion 122 | 123 | #region interface implementation 124 | 125 | /// 126 | /// Invokes the default on back pressed. 127 | /// 128 | public void InvokeDefaultOnBackPressed() 129 | { 130 | Activity.OnBackPressed(); 131 | } 132 | 133 | #endregion 134 | 135 | #region internal interface 136 | 137 | /// 138 | /// Register the specified renderer. 139 | /// 140 | /// The register. 141 | /// Renderer. 142 | internal static void Register(ReactViewRenderer renderer) 143 | { 144 | _renderers.Add(renderer); 145 | } 146 | 147 | /// 148 | /// Unregister the specified renderer. 149 | /// 150 | /// The unregister. 151 | /// Renderer. 152 | internal static void Unregister(ReactViewRenderer renderer) 153 | { 154 | _renderers.Remove(renderer); 155 | } 156 | 157 | #endregion 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/Renderers/ReactViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using ReactNative.Forms.Droid.Renderers; 2 | using ReactNative.Forms.Views; 3 | using Xamarin.Forms; 4 | using Com.Facebook.React; 5 | using Xamarin.Forms.Platform.Android; 6 | using Com.Facebook.React.Shell; 7 | using Com.Facebook.React.Common; 8 | using System.ComponentModel; 9 | using Android.OS; 10 | using Android.Provider; 11 | using Com.Facebook.React.Modules.Core; 12 | using Android.Views; 13 | using System.Collections.Generic; 14 | using Com.Facebook.React.Bridge; 15 | using Android.App; 16 | 17 | [assembly: ExportRenderer(typeof(ReactView), typeof(ReactViewRenderer))] 18 | namespace ReactNative.Forms.Droid.Renderers 19 | { 20 | public class ReactViewRenderer : ViewRenderer, ReactInstanceManager.IReactInstanceEventListener 21 | { 22 | #region fields 23 | 24 | private ReactRootView _rootView; 25 | 26 | private ReactInstanceManager _instanceManager; 27 | 28 | #endregion 29 | 30 | public ReactViewRenderer() 31 | { 32 | RendererManager.Register(this); 33 | } 34 | 35 | protected override void Dispose(bool disposing) 36 | { 37 | if (disposing) 38 | { 39 | RendererManager.Unregister(this); 40 | } 41 | 42 | base.Dispose(disposing); 43 | } 44 | 45 | #region internal api 46 | 47 | internal void RerenderReactView() 48 | { 49 | CreateReactView(); 50 | } 51 | 52 | internal void Resume(IDefaultHardwareBackBtnHandler handler) 53 | { 54 | _instanceManager?.OnHostResume(RendererManager.Activity, handler); 55 | } 56 | 57 | internal void Pause() 58 | { 59 | _instanceManager?.OnHostPause(RendererManager.Activity); 60 | } 61 | 62 | internal void Destroy() 63 | { 64 | _instanceManager?.OnHostDestroy(RendererManager.Activity); 65 | } 66 | 67 | internal bool BackPressed() 68 | { 69 | if (_instanceManager == null) 70 | { 71 | return false; 72 | } 73 | else 74 | { 75 | _instanceManager.OnBackPressed(); 76 | return true; 77 | } 78 | } 79 | 80 | internal void ShowDevOptionsDialog() 81 | { 82 | _instanceManager?.ShowDevOptionsDialog(); 83 | } 84 | 85 | #endregion 86 | 87 | #region renderer 88 | 89 | protected override void OnElementChanged(ElementChangedEventArgs e) 90 | { 91 | base.OnElementChanged(e); 92 | 93 | if (Control == null) 94 | { 95 | // View is added upon react context was initialized. 96 | CreateReactView(); 97 | } 98 | } 99 | 100 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 101 | { 102 | base.OnElementPropertyChanged(sender, e); 103 | 104 | switch (e.PropertyName) 105 | { 106 | case nameof(ReactView.PackagerUrl): 107 | case nameof(ReactView.BundleName): 108 | case nameof(ReactView.ModulePath): 109 | case nameof(ReactView.ModuleName): 110 | case nameof(ReactView.Properties): 111 | 112 | // Kill everything. 113 | _instanceManager.DetachRootView(_rootView); 114 | _instanceManager.Destroy(); 115 | 116 | _instanceManager = null; 117 | _rootView = null; 118 | 119 | // Recreate view. 120 | CreateReactView(); 121 | break; 122 | } 123 | } 124 | 125 | private void CreateReactView() 126 | { 127 | if (RendererManager.Debug && !Settings.CanDrawOverlays(RendererManager.Activity)) 128 | { 129 | // Debug mode without overlay permissions not supported. 130 | System.Console.WriteLine("[ReactNative.Forms] Debug mode without overlay permissions not supported."); 131 | return; 132 | } 133 | 134 | _rootView = new ReactRootView(Context); 135 | _instanceManager = ReactInstanceManager.Builder() 136 | .SetApplication(RendererManager.Activity.Application) 137 | .SetBundleAssetName(Element.BundleName) 138 | .SetJSMainModulePath(Element.ModulePath) 139 | .AddPackage(new MainReactPackage()) 140 | .SetUseDeveloperSupport(RendererManager.Debug) 141 | .SetInitialLifecycleState(LifecycleState.Resumed) 142 | .Build(); 143 | 144 | _instanceManager.AddReactInstanceEventListener(this); 145 | 146 | // convert dictionary to bundle 147 | var props = new Bundle(); 148 | foreach (KeyValuePair entry in Element.Properties) 149 | { 150 | props.PutString(entry.Key, (string)entry.Value); 151 | } 152 | 153 | _rootView.StartReactApplication(_instanceManager, Element.ModuleName, props); 154 | } 155 | 156 | public void OnReactContextInitialized(ReactContext p0) 157 | { 158 | // Adding the view here will ensure it already 159 | // has a view id managed by react native. 160 | // Forms will take on this id and does not generate 161 | // a new one upon adding without an id. 162 | SetNativeControl(_rootView); 163 | } 164 | 165 | #endregion 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/Resources/Resource.designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/forms/ReactNative.Forms.Droid/Resources/Resource.designer.cs -------------------------------------------------------------------------------- /forms/ReactNative.Forms.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.iOS/Makefile: -------------------------------------------------------------------------------- 1 | NUGET=nuget 2 | MSBUILD=msbuild 3 | SOLUTION=ReactNative.Forms.iOS.csproj 4 | NUSPEC=ReactNative.Forms.iOS.nuspec 5 | 6 | all: nuget 7 | 8 | build: 9 | $(MSBUILD) $(SOLUTION) /t:Restore 10 | $(MSBUILD) $(SOLUTION) /p:Configuration=Release /t:Clean /t:Build 11 | 12 | nuget: 13 | $(MAKE) build 14 | $(NUGET) pack $(NUSPEC) 15 | mv *.nupkg bin/ 16 | 17 | clean: 18 | rm -rf bin/ obj/ 19 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("ReactNative.Forms.iOS")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("voydz")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.iOS/ReactNative.Forms.iOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Debug 7 | AnyCPU 8 | {CE1F91F2-1D49-4C92-9AF1-284639C2BBE7} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | ReactNative.Forms.iOS 12 | ReactNative.Forms.iOS 13 | Resources 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG; 21 | prompt 22 | 4 23 | iPhone Developer 24 | true 25 | true 26 | true 27 | 55749 28 | false 29 | 30 | 31 | 32 | 33 | pdbonly 34 | true 35 | bin\Release 36 | 37 | prompt 38 | 4 39 | iPhone Developer 40 | true 41 | SdkOnly 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll 51 | 52 | 53 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll 54 | 55 | 56 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll 57 | 58 | 59 | ..\packages\Xamarin.Forms.2.5.1.444934\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | {05FF3726-ED02-4814-AF63-9BA10085090E} 69 | ReactNative.iOS 70 | 71 | 72 | {370CC3E0-D956-4784-A374-F80B0E536C31} 73 | ReactNative.Forms 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.iOS/ReactNative.Forms.iOS.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReactNative.Forms.iOS 5 | 1.0.55 6 | voydz 7 | voydz 8 | https://reactjs.org/favicon.ico 9 | https://github.com/voydz/xamarin-react-native 10 | false 11 | Use ReactNative.iOS inside of Xamarin.Forms. 12 | Initial release. 13 | Copyright 2018 14 | react react-native com.facebook.react facebook 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.iOS/Renderers/ReactViewRenderer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.IO; 3 | using System.Linq; 4 | using Foundation; 5 | using ReactNative.Forms.iOS.Renderers; 6 | using ReactNative.Forms.Views; 7 | using ReactNative.iOS; 8 | using Xamarin.Forms; 9 | using Xamarin.Forms.Platform.iOS; 10 | 11 | [assembly: ExportRenderer(typeof(ReactView), typeof(ReactViewRenderer))] 12 | namespace ReactNative.Forms.iOS.Renderers 13 | { 14 | public class ReactViewRenderer : ViewRenderer 15 | { 16 | private RCTRootView _rootView; 17 | 18 | #region renderer 19 | 20 | protected override void OnElementChanged(ElementChangedEventArgs e) 21 | { 22 | base.OnElementChanged(e); 23 | 24 | if (Control == null) 25 | { 26 | _rootView = CreateReactView(); 27 | SetNativeControl(_rootView); 28 | } 29 | } 30 | 31 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) 32 | { 33 | base.OnElementPropertyChanged(sender, e); 34 | 35 | switch (e.PropertyName) 36 | { 37 | case nameof(ReactView.PackagerUrl): 38 | case nameof(ReactView.BundleName): 39 | case nameof(ReactView.ModulePath): 40 | case nameof(ReactView.ModuleName): 41 | case nameof(ReactView.Properties): 42 | // We have to force recreate the whole view. 43 | _rootView = CreateReactView(); 44 | SetNativeControl(_rootView); 45 | break; 46 | } 47 | } 48 | 49 | private RCTRootView CreateReactView() 50 | { 51 | // convert dictionary to nsdictionary 52 | var props = NSDictionary.FromObjectsAndKeys( 53 | Element.Properties.Values.ToArray(), 54 | Element.Properties.Keys.ToArray() 55 | ); 56 | 57 | // TODO options not implemented for now 58 | var options = new NSDictionary(); 59 | 60 | NSUrl url; 61 | if (string.IsNullOrEmpty(Element.ModulePath)) 62 | { 63 | // using bundled asset 64 | var bundleName = Element.BundleName; 65 | url = NSBundle.MainBundle.GetUrlForResource( 66 | Path.GetFileNameWithoutExtension(bundleName), 67 | Path.GetExtension(bundleName) 68 | ); 69 | } 70 | else 71 | { 72 | // using react packager 73 | url = NSUrl.FromString($"{Element.PackagerUrl}/{Element.ModulePath}.bundle?platform=ios"); 74 | } 75 | 76 | return new RCTRootView(url, new NSString(Element.ModuleName), props, options); 77 | } 78 | 79 | #endregion 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative.Forms", "ReactNative.Forms\ReactNative.Forms.csproj", "{370CC3E0-D956-4784-A374-F80B0E536C31}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative.Forms.iOS", "ReactNative.Forms.iOS\ReactNative.Forms.iOS.csproj", "{CE1F91F2-1D49-4C92-9AF1-284639C2BBE7}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative.Forms.Droid", "ReactNative.Forms.Droid\ReactNative.Forms.Droid.csproj", "{5557067B-04CE-407A-8E1E-DC5FBBB781B9}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative.Droid", "..\binding\ReactNative.Droid\ReactNative.Droid.csproj", "{093D248C-E7EF-4C74-B1A0-38E0A332E736}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactNative.iOS", "..\binding\ReactNative.iOS\ReactNative.iOS.csproj", "{05FF3726-ED02-4814-AF63-9BA10085090E}" 13 | EndProject 14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Binding", "Binding", "{2EAEC814-EA58-4732-BB79-5046A3A6D2C3}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {370CC3E0-D956-4784-A374-F80B0E536C31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {370CC3E0-D956-4784-A374-F80B0E536C31}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {370CC3E0-D956-4784-A374-F80B0E536C31}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {370CC3E0-D956-4784-A374-F80B0E536C31}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {CE1F91F2-1D49-4C92-9AF1-284639C2BBE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {CE1F91F2-1D49-4C92-9AF1-284639C2BBE7}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {CE1F91F2-1D49-4C92-9AF1-284639C2BBE7}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {CE1F91F2-1D49-4C92-9AF1-284639C2BBE7}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {5557067B-04CE-407A-8E1E-DC5FBBB781B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {5557067B-04CE-407A-8E1E-DC5FBBB781B9}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {5557067B-04CE-407A-8E1E-DC5FBBB781B9}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {5557067B-04CE-407A-8E1E-DC5FBBB781B9}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {093D248C-E7EF-4C74-B1A0-38E0A332E736}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 39 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Debug|Any CPU.Build.0 = Debug|Any CPU 40 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Release|Any CPU.ActiveCfg = Release|Any CPU 41 | {05FF3726-ED02-4814-AF63-9BA10085090E}.Release|Any CPU.Build.0 = Release|Any CPU 42 | EndGlobalSection 43 | GlobalSection(NestedProjects) = preSolution 44 | {093D248C-E7EF-4C74-B1A0-38E0A332E736} = {2EAEC814-EA58-4732-BB79-5046A3A6D2C3} 45 | {05FF3726-ED02-4814-AF63-9BA10085090E} = {2EAEC814-EA58-4732-BB79-5046A3A6D2C3} 46 | EndGlobalSection 47 | EndGlobal 48 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms/Makefile: -------------------------------------------------------------------------------- 1 | DOTNET=dotnet 2 | MSBUILD=msbuild 3 | 4 | all: pack 5 | 6 | build: 7 | $(DOTNET) restore 8 | $(MSBUILD) /p:Configuration=Release /t:Clean /t:Build 9 | 10 | pack: 11 | $(MAKE) build 12 | $(DOTNET) pack --no-build -c release 13 | 14 | clean: 15 | rm -rf bin/ obj/ 16 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms/ReactNative.Forms.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | $(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms/ReactNative.Forms.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReactNative.Forms 5 | 1.0.55 6 | voydz 7 | voydz 8 | https://reactjs.org/favicon.ico 9 | https://github.com/voydz/xamarin-react-native 10 | false 11 | Use ReactNative.iOS inside of Xamarin.Forms. 12 | Initial release. 13 | Copyright 2018 14 | react react-native com.facebook.react facebook 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /forms/ReactNative.Forms/Views/ReactView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Xamarin.Forms; 3 | 4 | namespace ReactNative.Forms.Views 5 | { 6 | public class ReactView : View 7 | { 8 | public static readonly BindableProperty PackagerUrlProperty = BindableProperty.Create( 9 | propertyName: nameof(PackagerUrl), 10 | returnType: typeof(string), 11 | declaringType: typeof(ReactView), 12 | defaultValue: null); 13 | 14 | public string PackagerUrl 15 | { 16 | get { return (string)GetValue(PackagerUrlProperty); } 17 | set { SetValue(PackagerUrlProperty, value); } 18 | } 19 | 20 | public static readonly BindableProperty BundleNameProperty = BindableProperty.Create( 21 | propertyName: nameof(BundleName), 22 | returnType: typeof(string), 23 | declaringType: typeof(ReactView), 24 | defaultValue: null); 25 | 26 | public string BundleName 27 | { 28 | get { return (string)GetValue(BundleNameProperty); } 29 | set { SetValue(BundleNameProperty, value); } 30 | } 31 | 32 | public static readonly BindableProperty ModulePathProperty = BindableProperty.Create( 33 | propertyName: nameof(ModulePath), 34 | returnType: typeof(string), 35 | declaringType: typeof(ReactView), 36 | defaultValue: null); 37 | 38 | public string ModulePath 39 | { 40 | get { return (string)GetValue(ModulePathProperty); } 41 | set { SetValue(ModulePathProperty, value); } 42 | } 43 | 44 | public static readonly BindableProperty ModuleNameProperty = BindableProperty.Create( 45 | propertyName: nameof(ModuleName), 46 | returnType: typeof(string), 47 | declaringType: typeof(ReactView), 48 | defaultValue: null); 49 | 50 | public string ModuleName 51 | { 52 | get { return (string)GetValue(ModuleNameProperty); } 53 | set { SetValue(ModuleNameProperty, value); } 54 | } 55 | 56 | public static readonly BindableProperty PropertiesProperty = BindableProperty.Create( 57 | propertyName: nameof(Properties), 58 | returnType: typeof(Dictionary), 59 | declaringType: typeof(ReactView), 60 | defaultValue: new Dictionary()); 61 | 62 | public Dictionary Properties 63 | { 64 | get { return (Dictionary)GetValue(PropertiesProperty); } 65 | set { SetValue(PropertiesProperty, value); } 66 | } 67 | } 68 | } 69 | 70 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Assets/index.android.bundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Droid/Assets/index.android.bundle.meta -------------------------------------------------------------------------------- /samples/SampleApp.Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.OS; 3 | using Com.Facebook.React; 4 | using Com.Facebook.React.Shell; 5 | using Com.Facebook.React.Common; 6 | using Android.Views; 7 | using Com.Facebook.React.Modules.Core; 8 | using Android.Support.V7.App; 9 | using Android.Content; 10 | using Android.Net; 11 | using Android.Provider; 12 | 13 | namespace SampleApp.Droid 14 | { 15 | [Activity(Label = "XamarinReactNative", MainLauncher = true, Icon = "@mipmap/icon", Theme = "@style/Theme.AppCompat.Light.NoActionBar")] 16 | public class MainActivity : AppCompatActivity, IDefaultHardwareBackBtnHandler 17 | { 18 | ReactRootView mReactRootView; 19 | 20 | ReactInstanceManager mReactInstanceManager; 21 | 22 | private const int OVERLAY_PERMISSION_REQ_CODE = 1; 23 | 24 | protected override void OnCreate(Bundle savedInstanceState) 25 | { 26 | base.OnCreate(savedInstanceState); 27 | 28 | if (Build.VERSION.SdkInt >= BuildVersionCodes.M) 29 | { 30 | if (!Settings.CanDrawOverlays(this)) 31 | { 32 | Intent intent = new Intent(Settings.ActionManageOverlayPermission, Uri.Parse("package:" + PackageName)); 33 | StartActivityForResult(intent, OVERLAY_PERMISSION_REQ_CODE); 34 | } 35 | } 36 | 37 | mReactRootView = new ReactRootView(this); 38 | mReactInstanceManager = ReactInstanceManager.Builder() 39 | .SetApplication(Application) 40 | .SetBundleAssetName("index.android.bundle") 41 | .SetJSMainModulePath("index") 42 | .AddPackage(new MainReactPackage()) 43 | #if DEBUG 44 | .SetUseDeveloperSupport(true) 45 | #else 46 | .SetUseDeveloperSupport(false) 47 | #endif 48 | .SetInitialLifecycleState(LifecycleState.Resumed) 49 | .Build(); 50 | 51 | mReactRootView.StartReactApplication(mReactInstanceManager, "MyReactNativeApp", null); 52 | 53 | SetContentView(mReactRootView); 54 | } 55 | 56 | protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) 57 | { 58 | if (requestCode == OVERLAY_PERMISSION_REQ_CODE) 59 | { 60 | if (Build.VERSION.SdkInt >= BuildVersionCodes.M) 61 | { 62 | if (!Settings.CanDrawOverlays(this)) 63 | { 64 | // SYSTEM_ALERT_WINDOW permission not granted... 65 | } 66 | } 67 | } 68 | } 69 | 70 | protected override void OnPause() 71 | { 72 | base.OnPause(); 73 | 74 | if (mReactInstanceManager != null) 75 | { 76 | mReactInstanceManager.OnHostPause(this); 77 | } 78 | } 79 | 80 | protected override void OnResume() 81 | { 82 | base.OnResume(); 83 | 84 | if (mReactInstanceManager != null) 85 | { 86 | mReactInstanceManager.OnHostResume(this, this); 87 | } 88 | } 89 | 90 | protected override void OnDestroy() 91 | { 92 | base.OnDestroy(); 93 | 94 | if (mReactInstanceManager != null) 95 | { 96 | mReactInstanceManager.OnHostDestroy(this); 97 | } 98 | } 99 | 100 | public override void OnBackPressed() 101 | { 102 | if (mReactInstanceManager != null) 103 | { 104 | mReactInstanceManager.OnBackPressed(); 105 | } 106 | else 107 | { 108 | base.OnBackPressed(); 109 | } 110 | } 111 | 112 | public void InvokeDefaultOnBackPressed() 113 | { 114 | base.OnBackPressed(); 115 | } 116 | 117 | public override bool OnKeyUp(Keycode keyCode, KeyEvent e) 118 | { 119 | if (keyCode == Keycode.Menu && mReactInstanceManager != null) 120 | { 121 | mReactInstanceManager.ShowDevOptionsDialog(); 122 | return true; 123 | } 124 | 125 | return base.OnKeyUp(keyCode, e); 126 | } 127 | } 128 | } 129 | 130 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle("SampleApp.Droid")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("voydz")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Resources/mipmap-hdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Droid/Resources/mipmap-hdpi/Icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Resources/mipmap-mdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Droid/Resources/mipmap-mdpi/Icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Resources/mipmap-xhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Droid/Resources/mipmap-xhdpi/Icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Resources/mipmap-xxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Droid/Resources/mipmap-xxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Resources/mipmap-xxxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Droid/Resources/mipmap-xxxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Droid/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | XamarinReactNative 4 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/SampleApp.Droid.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {72D1B391-859D-4927-92E5-E911A1887036} 7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | Library 9 | SampleApp.Droid 10 | SampleApp.Droid 11 | v8.0 12 | True 13 | Resources\Resource.designer.cs 14 | Resource 15 | Properties\AndroidManifest.xml 16 | Resources 17 | Assets 18 | true 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug 25 | DEBUG; 26 | prompt 27 | 4 28 | None 29 | armeabi-v7a;x86 30 | anycpu 31 | 32 | 33 | true 34 | pdbonly 35 | true 36 | bin\Release 37 | prompt 38 | 4 39 | true 40 | false 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | ..\packages\Xamarin.Android.Support.Annotations.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Annotations.dll 49 | 50 | 51 | ..\packages\Xamarin.Android.Support.Compat.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Compat.dll 52 | 53 | 54 | ..\packages\Xamarin.Android.Support.Core.UI.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Core.UI.dll 55 | 56 | 57 | ..\packages\Xamarin.Android.Support.Core.Utils.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Core.Utils.dll 58 | 59 | 60 | ..\packages\Xamarin.Android.Support.Media.Compat.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Media.Compat.dll 61 | 62 | 63 | ..\packages\Xamarin.Android.Support.Fragment.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Fragment.dll 64 | 65 | 66 | ..\packages\Xamarin.Android.Support.v4.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.v4.dll 67 | 68 | 69 | ..\packages\Xamarin.Android.Support.Vector.Drawable.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Vector.Drawable.dll 70 | 71 | 72 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.Animated.Vector.Drawable.dll 73 | 74 | 75 | ..\packages\Xamarin.Android.Support.v7.AppCompat.26.0.2\lib\MonoAndroid80\Xamarin.Android.Support.v7.AppCompat.dll 76 | 77 | 78 | ..\..\binding\ReactNative.Droid\bin\Debug\ReactNative.Droid.dll 79 | 80 | 81 | ..\packages\Square.OkIO.1.13.0\lib\MonoAndroid\Square.OkIO.dll 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /samples/SampleApp.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Assets/index.android.bundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.Droid/Assets/index.android.bundle.meta -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content.PM; 3 | using Android.OS; 4 | 5 | namespace SampleApp.Forms.Droid 6 | { 7 | [Activity(Label = "SampleApp.Forms.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 8 | public class MainActivity : global::ReactNative.Forms.Droid.ReactFormsAppCompatActivity 9 | { 10 | protected override void OnCreate(Bundle savedInstanceState) 11 | { 12 | TabLayoutResource = Resource.Layout.Tabbar; 13 | ToolbarResource = Resource.Layout.Toolbar; 14 | 15 | base.OnCreate(savedInstanceState); 16 | 17 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState); 18 | 19 | LoadApplication(new App()); 20 | } 21 | 22 | protected override bool IsReactNativeDebugging() 23 | { 24 | #if DEBUG 25 | return true; 26 | #else 27 | return false; 28 | #endif 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle("SampleApp.Forms.Droid")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("voydz")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/layout/Tabbar.axml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/layout/Toolbar.axml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | 6 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/SampleApp.Forms.Droid.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2} 8 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 9 | Library 10 | SampleApp.Forms.Droid 11 | SampleApp.Forms.Droid 12 | v8.1 13 | True 14 | Resources\Resource.designer.cs 15 | Resource 16 | Properties\AndroidManifest.xml 17 | Resources 18 | Assets 19 | true 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug 26 | DEBUG; 27 | prompt 28 | 4 29 | None 30 | 31 | 32 | true 33 | pdbonly 34 | true 35 | bin\Release 36 | prompt 37 | 4 38 | true 39 | false 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | ..\packages\Xamarin.Android.Support.Annotations.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Annotations.dll 48 | 49 | 50 | ..\packages\Xamarin.Android.Support.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Compat.dll 51 | 52 | 53 | ..\packages\Xamarin.Android.Support.Core.UI.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.UI.dll 54 | 55 | 56 | ..\packages\Xamarin.Android.Support.Core.Utils.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Core.Utils.dll 57 | 58 | 59 | ..\packages\Xamarin.Android.Support.Media.Compat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Media.Compat.dll 60 | 61 | 62 | ..\packages\Xamarin.Android.Support.Fragment.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Fragment.dll 63 | 64 | 65 | ..\packages\Xamarin.Android.Support.v4.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v4.dll 66 | 67 | 68 | ..\packages\Xamarin.Android.Support.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.dll 69 | 70 | 71 | ..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.dll 72 | 73 | 74 | ..\packages\Xamarin.Android.Support.v7.AppCompat.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.dll 75 | 76 | 77 | ..\packages\Xamarin.Android.Support.Transition.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Transition.dll 78 | 79 | 80 | ..\packages\Xamarin.Android.Support.v7.RecyclerView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.dll 81 | 82 | 83 | ..\packages\Xamarin.Android.Support.Design.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.Design.dll 84 | 85 | 86 | ..\packages\Xamarin.Android.Support.v7.CardView.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.CardView.dll 87 | 88 | 89 | ..\packages\Xamarin.Android.Support.v7.Palette.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.Palette.dll 90 | 91 | 92 | ..\packages\Xamarin.Android.Support.v7.MediaRouter.25.4.0.2\lib\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.dll 93 | False 94 | 95 | 96 | references\ReactNative.Forms.dll 97 | 98 | 99 | references\ReactNative.Forms.Droid.dll 100 | 101 | 102 | ..\packages\Square.OkIO.1.13.0\lib\MonoAndroid\Square.OkIO.dll 103 | 104 | 105 | ..\..\binding\ReactNative.Droid\bin\Debug\ReactNative.Droid.dll 106 | 107 | 108 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\FormsViewGroup.dll 109 | 110 | 111 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Core.dll 112 | 113 | 114 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll 115 | 116 | 117 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.dll 118 | 119 | 120 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/references/ReactNative.Forms.Droid.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.Droid/references/ReactNative.Forms.Droid.dll -------------------------------------------------------------------------------- /samples/SampleApp.Forms.Droid/references/ReactNative.Forms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.Droid/references/ReactNative.Forms.dll -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace SampleApp.Forms.iOS 9 | { 10 | [Register("AppDelegate")] 11 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 12 | { 13 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 14 | { 15 | global::Xamarin.Forms.Forms.Init(); 16 | 17 | // Prevent library from beeing unlinked. 18 | var temp = new ReactNative.Forms.iOS.Renderers.ReactViewRenderer(); 19 | 20 | LoadApplication(new App()); 21 | 22 | return base.FinishedLaunching(app, options); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/Info.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | CFBundleDisplayName 6 | XamReactNativeForms 7 | CFBundleName 8 | XamReactNativeForms 9 | CFBundleIdentifier 10 | de.voydz.XamReactNativeForms 11 | CFBundleShortVersionString 12 | 1.0 13 | CFBundleVersion 14 | 1.0 15 | LSRequiresIPhoneOS 16 | 17 | MinimumOSVersion 18 | 8.0 19 | UIDeviceFamily 20 | 21 | 1 22 | 2 23 | 24 | UILaunchStoryboardName 25 | LaunchScreen 26 | UIRequiredDeviceCapabilities 27 | 28 | armv7 29 | 30 | UISupportedInterfaceOrientations 31 | 32 | UIInterfaceOrientationPortrait 33 | UIInterfaceOrientationLandscapeLeft 34 | UIInterfaceOrientationLandscapeRight 35 | 36 | UISupportedInterfaceOrientations~ipad 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationPortraitUpsideDown 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | XSAppIconAssets 44 | Assets.xcassets/AppIcon.appiconset 45 | NSAppTransportSecurity 46 | 47 | NSExceptionDomains 48 | 49 | localhost 50 | 51 | NSTemporaryExceptionAllowsInsecureHTTPLoads 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/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 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace SampleApp.Forms.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/Resources/main.jsbundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.iOS/Resources/main.jsbundle.meta -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/SampleApp.Forms.iOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | iPhoneSimulator 7 | {237E5459-3849-45D9-93AA-7D2ADE261356} 8 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 9 | Exe 10 | SampleApp.Forms.iOS 11 | SampleApp.Forms.iOS 12 | Resources 13 | 14 | 15 | true 16 | full 17 | false 18 | bin\iPhoneSimulator\Debug 19 | DEBUG;ENABLE_TEST_CLOUD; 20 | prompt 21 | 4 22 | iPhone Developer 23 | true 24 | true 25 | true 26 | 45275 27 | None 28 | x86_64 29 | HttpClientHandler 30 | x86 31 | 32 | 33 | pdbonly 34 | true 35 | bin\iPhone\Release 36 | prompt 37 | 4 38 | iPhone Developer 39 | true 40 | Entitlements.plist 41 | SdkOnly 42 | ARM64 43 | HttpClientHandler 44 | x86 45 | 46 | 47 | pdbonly 48 | true 49 | bin\iPhoneSimulator\Release 50 | prompt 51 | 4 52 | iPhone Developer 53 | true 54 | None 55 | x86_64 56 | HttpClientHandler 57 | x86 58 | 59 | 60 | true 61 | full 62 | false 63 | bin\iPhone\Debug 64 | DEBUG;ENABLE_TEST_CLOUD; 65 | prompt 66 | 4 67 | iPhone Developer 68 | true 69 | true 70 | true 71 | true 72 | true 73 | Entitlements.plist 74 | 21011 75 | SdkOnly 76 | ARM64 77 | HttpClientHandler 78 | x86 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | references\ReactNative.Forms.dll 87 | 88 | 89 | references\ReactNative.Forms.iOS.dll 90 | 91 | 92 | ..\..\binding\ReactNative.iOS\bin\Debug\ReactNative.iOS.dll 93 | 94 | 95 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll 96 | 97 | 98 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll 99 | 100 | 101 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll 102 | 103 | 104 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/references/ReactNative.Forms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.iOS/references/ReactNative.Forms.dll -------------------------------------------------------------------------------- /samples/SampleApp.Forms.iOS/references/ReactNative.Forms.iOS.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.Forms.iOS/references/ReactNative.Forms.iOS.dll -------------------------------------------------------------------------------- /samples/SampleApp.Forms.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SampleApp.Forms", "SampleApp.Forms\SampleApp.Forms.shproj", "{8B8B1A39-4D56-4035-8A36-DBA39E1F79E8}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.Forms.iOS", "SampleApp.Forms.iOS\SampleApp.Forms.iOS.csproj", "{237E5459-3849-45D9-93AA-7D2ADE261356}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.Forms.Droid", "SampleApp.Forms.Droid\SampleApp.Forms.Droid.csproj", "{3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 13 | Release|iPhone = Release|iPhone 14 | Release|iPhoneSimulator = Release|iPhoneSimulator 15 | Debug|iPhone = Debug|iPhone 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 21 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 22 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Release|iPhone.ActiveCfg = Release|iPhone 23 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Release|iPhone.Build.0 = Release|iPhone 24 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 25 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 26 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Debug|iPhone.ActiveCfg = Debug|iPhone 27 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Debug|iPhone.Build.0 = Debug|iPhone 28 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator 29 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator 30 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Release|Any CPU.ActiveCfg = Release|iPhone 31 | {237E5459-3849-45D9-93AA-7D2ADE261356}.Release|Any CPU.Build.0 = Release|iPhone 32 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 33 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 34 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Release|iPhone.ActiveCfg = Release|Any CPU 35 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Release|iPhone.Build.0 = Release|Any CPU 36 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 37 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 38 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Debug|iPhone.ActiveCfg = Debug|Any CPU 39 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Debug|iPhone.Build.0 = Debug|Any CPU 40 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Release|Any CPU.ActiveCfg = Release|Any CPU 43 | {3CF8120A-6FDB-48F0-A0A8-0DD5063DD6A2}.Release|Any CPU.Build.0 = Release|Any CPU 44 | EndGlobalSection 45 | EndGlobal 46 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | using Xamarin.Forms.Xaml; 3 | 4 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)] 5 | namespace SampleApp.Forms 6 | { 7 | public partial class App : Application 8 | { 9 | public App() 10 | { 11 | InitializeComponent(); 12 | 13 | MainPage = new MainPage(); 14 | } 15 | 16 | protected override void OnStart() 17 | { 18 | // Handle when your app starts 19 | } 20 | 21 | protected override void OnSleep() 22 | { 23 | // Handle when your app sleeps 24 | } 25 | 26 | protected override void OnResume() 27 | { 28 | // Handle when your app resumes 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms; 2 | 3 | namespace SampleApp.Forms 4 | { 5 | public partial class MainPage : ContentPage 6 | { 7 | public MainPage() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms/SampleApp.Forms.projitems: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | {8B8B1A39-4D56-4035-8A36-DBA39E1F79E8} 7 | 8 | 9 | SampleApp.Forms 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | App.xaml 18 | 19 | 20 | MainPage.xaml 21 | 22 | 23 | -------------------------------------------------------------------------------- /samples/SampleApp.Forms/SampleApp.Forms.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {8B8B1A39-4D56-4035-8A36-DBA39E1F79E8} 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/SampleApp.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using UIKit; 3 | using ReactNative.iOS; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | 7 | namespace SampleApp.iOS 8 | { 9 | // The UIApplicationDelegate for the application. This class is responsible for launching the 10 | // User Interface of the application, as well as listening (and optionally responding) to application events from iOS. 11 | [Register("AppDelegate")] 12 | public class AppDelegate : UIApplicationDelegate 13 | { 14 | // class-level declarations 15 | 16 | public override UIWindow Window 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) 23 | { 24 | // create a new window instance based on the screen size 25 | Window = new UIWindow(UIScreen.MainScreen.Bounds); 26 | 27 | var props = new NSDictionary(); 28 | var options = new NSDictionary(); 29 | 30 | //var url = NSBundle.MainBundle.GetUrlForResource("main", "jsbundle"); 31 | var url = NSUrl.FromString("http://localhost:8081/index.bundle?platform=ios"); 32 | 33 | RCTRootView rootView = new RCTRootView(url, new NSString("MyReactNativeApp"), props, options); 34 | var vc = new UIViewController(); 35 | vc.View = rootView; 36 | 37 | Window.RootViewController = vc; 38 | 39 | // make the window visible 40 | Window.MakeKeyAndVisible(); 41 | 42 | return true; 43 | } 44 | 45 | public override void OnResignActivation(UIApplication application) 46 | { 47 | // Invoked when the application is about to move from active to inactive state. 48 | // This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) 49 | // or when the user quits the application and it begins the transition to the background state. 50 | // Games should use this method to pause the game. 51 | } 52 | 53 | public override void DidEnterBackground(UIApplication application) 54 | { 55 | // Use this method to release shared resources, save user data, invalidate timers and store the application state. 56 | // If your application supports background exection this method is called instead of WillTerminate when the user quits. 57 | } 58 | 59 | public override void WillEnterForeground(UIApplication application) 60 | { 61 | // Called as part of the transiton from background to active state. 62 | // Here you can undo many of the changes made on entering the background. 63 | } 64 | 65 | public override void OnActivated(UIApplication application) 66 | { 67 | // Restart any tasks that were paused (or not yet started) while the application was inactive. 68 | // If the application was previously in the background, optionally refresh the user interface. 69 | } 70 | 71 | public override void WillTerminate(UIApplication application) 72 | { 73 | // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground. 74 | } 75 | } 76 | } 77 | 78 | 79 | -------------------------------------------------------------------------------- /samples/SampleApp.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/SampleApp.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | XamarinReactNative 7 | CFBundleShortVersionString 8 | 1.0 9 | CFBundleVersion 10 | 1.0 11 | LSRequiresIPhoneOS 12 | 13 | MinimumOSVersion 14 | 8.0 15 | UIDeviceFamily 16 | 17 | 1 18 | 2 19 | 20 | UILaunchStoryboardName 21 | LaunchScreen 22 | UIRequiredDeviceCapabilities 23 | 24 | armv7 25 | 26 | UISupportedInterfaceOrientations 27 | 28 | UIInterfaceOrientationPortrait 29 | UIInterfaceOrientationLandscapeLeft 30 | UIInterfaceOrientationLandscapeRight 31 | 32 | UISupportedInterfaceOrientations~ipad 33 | 34 | UIInterfaceOrientationPortrait 35 | UIInterfaceOrientationLandscapeLeft 36 | UIInterfaceOrientationLandscapeRight 37 | 38 | XSAppIconAssets 39 | Resources/Images.xcassets/AppIcons.appiconset 40 | CFBundleName 41 | XamarinReactNative 42 | NSAppTransportSecurity 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSTemporaryExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | CFBundleIdentifier 54 | de.voydz.xamreact 55 | 56 | 57 | -------------------------------------------------------------------------------- /samples/SampleApp.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using UIKit; 2 | 3 | namespace SampleApp.iOS 4 | { 5 | public class Application 6 | { 7 | // This is the main entry point of the application. 8 | static void Main(string[] args) 9 | { 10 | // if you want to use a different Application Delegate class from "AppDelegate" 11 | // you can specify it here. 12 | UIApplication.Main(args, null, "AppDelegate"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/SampleApp.iOS/Resources/Images.xcassets/AppIcons.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "size": "29x29", 5 | "scale": "1x", 6 | "idiom": "iphone" 7 | }, 8 | { 9 | "size": "29x29", 10 | "scale": "2x", 11 | "idiom": "iphone" 12 | }, 13 | { 14 | "size": "29x29", 15 | "scale": "3x", 16 | "idiom": "iphone" 17 | }, 18 | { 19 | "size": "40x40", 20 | "scale": "2x", 21 | "idiom": "iphone" 22 | }, 23 | { 24 | "size": "40x40", 25 | "scale": "3x", 26 | "idiom": "iphone" 27 | }, 28 | { 29 | "size": "57x57", 30 | "scale": "1x", 31 | "idiom": "iphone" 32 | }, 33 | { 34 | "size": "57x57", 35 | "scale": "2x", 36 | "idiom": "iphone" 37 | }, 38 | { 39 | "size": "60x60", 40 | "scale": "2x", 41 | "idiom": "iphone" 42 | }, 43 | { 44 | "size": "60x60", 45 | "scale": "3x", 46 | "idiom": "iphone" 47 | }, 48 | { 49 | "size": "29x29", 50 | "scale": "1x", 51 | "idiom": "ipad" 52 | }, 53 | { 54 | "size": "29x29", 55 | "scale": "2x", 56 | "idiom": "ipad" 57 | }, 58 | { 59 | "size": "40x40", 60 | "scale": "1x", 61 | "idiom": "ipad" 62 | }, 63 | { 64 | "size": "40x40", 65 | "scale": "2x", 66 | "idiom": "ipad" 67 | }, 68 | { 69 | "size": "50x50", 70 | "scale": "1x", 71 | "idiom": "ipad" 72 | }, 73 | { 74 | "size": "50x50", 75 | "scale": "2x", 76 | "idiom": "ipad" 77 | }, 78 | { 79 | "size": "72x72", 80 | "scale": "1x", 81 | "idiom": "ipad" 82 | }, 83 | { 84 | "size": "72x72", 85 | "scale": "2x", 86 | "idiom": "ipad" 87 | }, 88 | { 89 | "size": "76x76", 90 | "scale": "1x", 91 | "idiom": "ipad" 92 | }, 93 | { 94 | "size": "76x76", 95 | "scale": "2x", 96 | "idiom": "ipad" 97 | }, 98 | { 99 | "size": "120x120", 100 | "scale": "1x", 101 | "idiom": "car" 102 | } 103 | ], 104 | "info": { 105 | "version": 1, 106 | "author": "xcode" 107 | } 108 | } -------------------------------------------------------------------------------- /samples/SampleApp.iOS/Resources/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/SampleApp.iOS/Resources/main.jsbundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voydz/xamarin-react-native/a2e82bea20baf1ad3b2710ad765ba265201e3d97/samples/SampleApp.iOS/Resources/main.jsbundle.meta -------------------------------------------------------------------------------- /samples/SampleApp.iOS/SampleApp.iOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF} 8 | Exe 9 | SampleApp.iOS 10 | Resources 11 | SampleApp 12 | 13 | 14 | true 15 | full 16 | false 17 | bin\iPhoneSimulator\Debug 18 | DEBUG; 19 | prompt 20 | 4 21 | false 22 | i386, x86_64 23 | true 24 | true 25 | iPhone Developer 26 | 27 | 28 | None 29 | 30 | 31 | full 32 | true 33 | bin\iPhone\Release 34 | prompt 35 | 4 36 | Entitlements.plist 37 | ARMv7, ARM64 38 | false 39 | iPhone Developer 40 | SdkOnly 41 | 42 | 43 | full 44 | true 45 | bin\iPhoneSimulator\Release 46 | prompt 47 | 4 48 | i386, x86_64 49 | false 50 | SdkOnly 51 | 52 | 53 | true 54 | full 55 | false 56 | bin\iPhone\Debug 57 | DEBUG; 58 | prompt 59 | 4 60 | false 61 | ARMv7, ARM64 62 | Entitlements.plist 63 | true 64 | iPhone Developer 65 | true 66 | None 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | ..\..\binding\ReactNative.iOS\bin\Debug\ReactNative.iOS.dll 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /samples/SampleApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.iOS", "SampleApp.iOS\SampleApp.iOS.csproj", "{9B697011-40F0-42E1-8101-0FDA2FA8A8DF}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp.Droid", "SampleApp.Droid\SampleApp.Droid.csproj", "{72D1B391-859D-4927-92E5-E911A1887036}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 11 | Release|iPhone = Release|iPhone 12 | Release|iPhoneSimulator = Release|iPhoneSimulator 13 | Debug|iPhone = Debug|iPhone 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 19 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 20 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Release|iPhone.ActiveCfg = Release|iPhone 21 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Release|iPhone.Build.0 = Release|iPhone 22 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 23 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 24 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Debug|iPhone.ActiveCfg = Debug|iPhone 25 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Debug|iPhone.Build.0 = Debug|iPhone 26 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator 27 | {9B697011-40F0-42E1-8101-0FDA2FA8A8DF}.Release|Any CPU.ActiveCfg = Debug|iPhoneSimulator 28 | {72D1B391-859D-4927-92E5-E911A1887036}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 29 | {72D1B391-859D-4927-92E5-E911A1887036}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 30 | {72D1B391-859D-4927-92E5-E911A1887036}.Release|iPhone.ActiveCfg = Release|Any CPU 31 | {72D1B391-859D-4927-92E5-E911A1887036}.Release|iPhone.Build.0 = Release|Any CPU 32 | {72D1B391-859D-4927-92E5-E911A1887036}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 33 | {72D1B391-859D-4927-92E5-E911A1887036}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 34 | {72D1B391-859D-4927-92E5-E911A1887036}.Debug|iPhone.ActiveCfg = Debug|Any CPU 35 | {72D1B391-859D-4927-92E5-E911A1887036}.Debug|iPhone.Build.0 = Debug|Any CPU 36 | {72D1B391-859D-4927-92E5-E911A1887036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 37 | {72D1B391-859D-4927-92E5-E911A1887036}.Debug|Any CPU.Build.0 = Debug|Any CPU 38 | {72D1B391-859D-4927-92E5-E911A1887036}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {72D1B391-859D-4927-92E5-E911A1887036}.Release|Any CPU.Build.0 = Release|Any CPU 40 | EndGlobalSection 41 | EndGlobal 42 | --------------------------------------------------------------------------------