Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.1.0 #1

Merged
merged 4 commits into from
Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>