Skip to content

Commit

Permalink
Merge pull request #1 from andrerfneves/develop
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
André Neves committed Feb 3, 2017
2 parents 15a722d + 4d86e87 commit 9a0fb97
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 5 deletions.
Binary file modified .DS_Store
Binary file not shown.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ Utility that allows you to open other installed apps from within your React Nati
React Native macOS is a very young implementation of React Native with support for macOS systems. Because of that, the library is not yet stable. There have been no successes for real-world applications built with react-native-macos yet. Proceed at your own risk.

## Installation
Install component and save to dependencies:
```
npm i react-native-macos-app-opener --save
```

Link native modules to your project automatically with:
```
react-native-macos link
```
Or you can follow the same pattern seen in [React Native iOS Library Linking](https://facebook.github.io/react-native/docs/linking-libraries-ios.html).

## Details
The utility leverages `NSWorkspace` to launch an application passed through a parameter to `AppOpener`. If the application is already opened, the system will bring it to the front and if the application does not exist it triggers an error.
The utility leverages `NSWorkspace` to launch an application passed through a parameter to `AppOpener`. If the application is already opened, the system will bring it to the front. If the application is closed, it will launch it.

## Usage
```
import AppOpener from 'react-native-macos-app-opener';
AppOpener.openApp('Finder');
```

## Contribution
Please contribute! PRs are welcome and I'll do my best to extend and improve this tool. For PR management, please follow the guidelines on `CONTRIBUTING.md`.
Please contribute! PRs are welcome and I'll do my best to extend and improve this utility.
2 changes: 1 addition & 1 deletion index.macos.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const AppOpener = {
}
}

module.exports = AppOpener;
export default AppOpener;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "react-native-macos-app-opener",
"version": "0.0.1",
"version": "0.1.0",
"description": "React Native macOS utility for launching an application on macOS.",
"keywords": ["react-native-macos", "app-opener", "react-native", "macos"],
"main": "index.macos.js",
"author": "André Neves <@andrerfneves>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/andrerfneves/react-native-macos-app-opener.git",
"url": "https://github.com/andrerfneves/react-native-macos-app-opener.git"
},
"scripts": {
"test": "echo \"No tests specified\" && exit 1"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ACCBE0251E2686ED00AE38AF"
BuildableName = "libreact-native-macos-app-opener.a"
BlueprintName = "react-native-macos-app-opener"
ReferencedContainer = "container:react-native-macos-app-opener.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<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">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ACCBE0251E2686ED00AE38AF"
BuildableName = "libreact-native-macos-app-opener.a"
BlueprintName = "react-native-macos-app-opener"
ReferencedContainer = "container:react-native-macos-app-opener.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ACCBE0251E2686ED00AE38AF"
BuildableName = "libreact-native-macos-app-opener.a"
BlueprintName = "react-native-macos-app-opener"
ReferencedContainer = "container:react-native-macos-app-opener.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>react-native-macos-app-opener.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>ACCBE0251E2686ED00AE38AF</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

0 comments on commit 9a0fb97

Please sign in to comment.