0.0.8 • Published 5 years ago

react-native-template-rhizatech-template v0.0.8

Weekly downloads
37
License
-
Repository
-
Last release
5 years ago

Install Template

	react-native init TemplateProject --template rhizatech-template

Basic Installation - Android

AndroidManifest.xml

	<!-- Facebook SDK Config -->
	<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

strings.xml

	<!-- Facebook SDK Config -->
	<string name="facebook_app_id">fb_id</string> 
	<string name="fb_login_protocol_scheme">fb_id</string>

MainActivity.java

Import
	import com.facebook.react.ReactActivityDelegate;
	import com.facebook.react.ReactRootView;
	import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
Code
  @Override
	protected ReactActivityDelegate createReactActivityDelegate() {
		return new ReactActivityDelegate(this, getMainComponentName()) {
			@Override
			protected ReactRootView createRootView() {
				return new RNGestureHandlerEnabledRootView(MainActivity.this);
			}
		};
	}

Basic Installation - iOS

Podfile

Open Podfile and add this code at the end of the file to replace any target smaller than iOS 8.0

	post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_i < 8
          puts config.build_settings['PRODUCT_NAME'] + ' ' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
        end
      end
    end
  end

Install pod dependencies

	$ cd ios && pod install && cd ..

Open XCode Project

$ cd ios
$ open ProjectName.xcworkspace

Remove all Fonts inside:

	Build Phases => Copy Bundle Resources

Open Metro Server with iTerm

The packager is started by executing open node_modules/react-native/scripts/launchPackager.command, so whatever program is associated with *.command will be started. You can change the association:

$ open node_modules/react-native/scripts/
Right click launchPackager.command
Press the OPTION key
Under "Always open with..." you can select iTerm
0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

1.0.0

5 years ago