Skip to content

Commit

Permalink
upgrade example`s react-native version to 0.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
magicismight committed Jul 13, 2016
1 parent 27a70b0 commit fabefb7
Show file tree
Hide file tree
Showing 10 changed files with 347 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ project.xcworkspace
.idea
.gradle
local.properties
build

# node.js
#
Expand Down
27 changes: 14 additions & 13 deletions Example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
package com.artsvgexample;

import com.facebook.react.ReactActivity;
import com.horcrux.svg.RNSvgPackage;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;

import java.util.Arrays;
import java.util.List;

public class MainActivity extends ReactActivity {

Expand All @@ -18,25 +12,4 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "ArtSvgExample";
}

/**
* Returns whether dev mode should be enabled.
* This enables e.g. the dev menu.
*/
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNSvgPackage()
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.artsvgexample;

import android.app.Application;
import android.util.Log;
import com.horcrux.svg.RNSvgPackage;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNSvgPackage()
);
}
};

@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
}
30 changes: 30 additions & 0 deletions Example/ios/ArtSvgExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
103345EE1CC618FA00B43156 /* libRNSVG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 103345ED1CC618D700B43156 /* libRNSVG.a */; };
1049A4131D363F65000A1827 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1049A4121D363F60000A1827 /* libRCTAnimation.a */; };
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
Expand Down Expand Up @@ -67,6 +68,13 @@
remoteGlobalIDString = 0CF68AC11AF0540F00FF9E5C;
remoteInfo = RNSVG;
};
1049A4111D363F60000A1827 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTAnimation;
};
139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
Expand Down Expand Up @@ -112,6 +120,7 @@
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
103345E81CC618D700B43156 /* RNSVG.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNSVG.xcodeproj; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = "<group>"; };
1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* ArtSvgExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ArtSvgExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -131,6 +140,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1049A4131D363F65000A1827 /* libRCTAnimation.a in Frameworks */,
103345EE1CC618FA00B43156 /* libRNSVG.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
Expand Down Expand Up @@ -196,6 +206,14 @@
name = Products;
sourceTree = "<group>";
};
1049A40E1D363F60000A1827 /* Products */ = {
isa = PBXGroup;
children = (
1049A4121D363F60000A1827 /* libRCTAnimation.a */,
);
name = Products;
sourceTree = "<group>";
};
139105B71AF99BAD00B5F7CC /* Products */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -245,6 +263,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */,
103345E81CC618D700B43156 /* RNSVG.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
Expand Down Expand Up @@ -333,6 +352,10 @@
ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
},
{
ProductGroup = 1049A40E1D363F60000A1827 /* Products */;
ProjectRef = 1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */;
},
{
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
Expand Down Expand Up @@ -424,6 +447,13 @@
remoteRef = 103345EC1CC618D700B43156 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1049A4121D363F60000A1827 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 1049A4111D363F60000A1827 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down
4 changes: 3 additions & 1 deletion Example/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const styles = StyleSheet.create({
fontWeight: 'bold'
},
link: {
height: 40,
alignSelf: 'stretch',
width: Dimensions.get('window').width / 2 - 10
},
Expand Down Expand Up @@ -143,7 +144,8 @@ class SvgExample extends Component {
let samples = example.samples;
this.state.scale.setValue(0);
Animated.spring(this.state.scale, {
toValue: 1
toValue: 1,
useNativeDriver: true
}).start();

this.setState({
Expand Down
24 changes: 12 additions & 12 deletions Example/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "ArtSvgExample",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start"
},
"dependencies": {
"react": "^15.1.0",
"react-native": "^0.27.0",
"react-native-root-modal": "^1.0.4",
"react-native-svg": "../"
}
"name": "ArtSvgExample",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start"
},
"dependencies": {
"react": "^15.1.0",
"react-native": "^0.29.0",
"react-native-root-modal": "^1.0.4",
"react-native-svg": "../"
}
}
Loading

0 comments on commit fabefb7

Please sign in to comment.