Commit 3b6671c4 authored by Baris Sencan's avatar Baris Sencan
Browse files

Example fix, test script, and some refactoring

- The test script just does an eslint check. (Closes #121)
- Refactored JS code to pass the check.
- Fixed VideoPlayer example. (Closes #117)
  - Updated package.json to use local react-native-video in a simple manner.
  - Added shared scheme for target.
  - Updated poject settings.
  - Now using react-native 0.18.1.
parent c449faa3
Loading
Loading
Loading
Loading

.eslintrc

0 → 100644
+4 −0
Changes for .eslintrc: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
{
  "extends": "airbnb",
  "parser": "babel-eslint"
}
+6 −1
Changes for Examples/VideoPlayer/VideoPlayer.xcodeproj/project.pbxproj: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@
		83CBB9F71A601CBA00E9B192 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastUpgradeCheck = 0610;
				LastUpgradeCheck = 0720;
				ORGANIZATIONNAME = Facebook;
			};
			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "VideoPlayer" */;
@@ -487,8 +487,10 @@
					"$(SRCROOT)/node_modules/react-native/React/**",
				);
				INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				OTHER_LDFLAGS = "-ObjC";
				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
				PRODUCT_NAME = VideoPlayer;
			};
			name = Debug;
@@ -503,8 +505,10 @@
					"$(SRCROOT)/node_modules/react-native/React/**",
				);
				INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				OTHER_LDFLAGS = "-ObjC";
				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
				PRODUCT_NAME = VideoPlayer;
			};
			name = Release;
@@ -529,6 +533,7 @@
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
				COPY_PHASE_STRIP = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				ENABLE_TESTABILITY = YES;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_OPTIMIZATION_LEVEL = 0;
+91 −0
Changes for Examples/VideoPlayer/VideoPlayer.xcodeproj/xcshareddata/xcschemes/VideoPlayer.xcscheme: 91 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "0720"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
               BuildableName = "VideoPlayer.app"
               BlueprintName = "VideoPlayer"
               ReferencedContainer = "container:VideoPlayer.xcodeproj">
            </BuildableReference>
         </BuildActionEntry>
      </BuildActionEntries>
   </BuildAction>
   <TestAction
      buildConfiguration = "Debug"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      shouldUseLaunchSchemeArgsEnv = "YES">
      <Testables>
      </Testables>
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
            BuildableName = "VideoPlayer.app"
            BlueprintName = "VideoPlayer"
            ReferencedContainer = "container:VideoPlayer.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </TestAction>
   <LaunchAction
      buildConfiguration = "Debug"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      launchStyle = "0"
      useCustomWorkingDirectory = "NO"
      ignoresPersistentStateOnLaunch = "NO"
      debugDocumentVersioning = "YES"
      debugServiceExtension = "internal"
      allowLocationSimulation = "YES">
      <BuildableProductRunnable
         runnableDebuggingMode = "0">
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
            BuildableName = "VideoPlayer.app"
            BlueprintName = "VideoPlayer"
            ReferencedContainer = "container:VideoPlayer.xcodeproj">
         </BuildableReference>
      </BuildableProductRunnable>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <BuildableProductRunnable
         runnableDebuggingMode = "0">
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
            BuildableName = "VideoPlayer.app"
            BlueprintName = "VideoPlayer"
            ReferencedContainer = "container:VideoPlayer.xcodeproj">
         </BuildableReference>
      </BuildableProductRunnable>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
+3 −3
Changes for Examples/VideoPlayer/iOS/Info.plist: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
@@ -15,11 +15,11 @@
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<string>1.0.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<string>2</string>
	<key>LSApplicationCategoryType</key>
	<string></string>
	<key>LSRequiresIPhoneOS</key>
+3 −6
Changes for Examples/VideoPlayer/package.json: 3 added lines, 6 removed lines.
Original line number Diff line number Diff line
{
  "name": "VideoPlayer",
  "version": "0.0.1",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "start": "node_modules/react-native/packager/packager.sh"
  },
  "scripts": { 
    "postinstall" : "cp ../../*.js ../../*.m ../../*.h ../../README.md ../../package.json ./node_modules/react-native-video && cp ../../RCTVideo.xcodeproj/project.pbxproj ./node_modules/react-native-video/RCTVideo.xcodeproj/project.pbxproj"
  },
  "dependencies": {
    "react-native": "^0.16.0",
    "react-native-video": "brentvatne/react-native-video"
    "react-native": "0.18.1",
    "react-native-video": "../../"
  }
}
Loading