react-native-template-rhizatech-template

0.0.8 • Public • Published

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(thisgetMainComponentName()) {
            @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

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-template-rhizatech-template

Weekly Downloads

10

Version

0.0.8

License

none

Unpacked Size

11.8 kB

Total Files

24

Last publish

Collaborators

  • lucastvieira