-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,61 @@ | ||
# react-native-apple-music | ||
# Apple MusicKit for React Native | ||
|
||
MusicKit for RN | ||
A react native module for the Apple MusicKit ( [iOS](https://developer.apple.com/musickit/) ) | ||
|
||
## Supported Features | ||
|
||
An [Example](./example) project was developed to exercise and test all functionality within this library. If you are curious about how to use something, or need to compare your application setup to something that works, check there first. | ||
|
||
## Features | ||
|
||
The following table shows the platform support for various Apple Music functionality within this library. | ||
|
||
| Feature | iOS | | ||
| :--------------------------- | :-: | | ||
| **Auth** | | ||
| `authorize` | ✅ | | ||
| `checkSubscription` | ✅ | | ||
| **Player** | | ||
| `play` | ✅ | | ||
| `pause` | ✅ | | ||
| `togglePlayerState` | ✅ | | ||
| `skipToNextEntry` | ✅ | | ||
| `getCurrentState` | ✅ | | ||
| `addListener` | ✅ | | ||
| `removeListener` | ✅ | | ||
| **MusicKit** | | ||
| `catalogSearch` | ✅ | | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install react-native-apple-music | ||
npm install @lomray/react-native-apple-music | ||
``` | ||
```sh | ||
npx pod-install | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
import { multiply } from 'react-native-apple-music'; | ||
### iOS Requirements | ||
- Ensure your iOS deployment target is 15.0 or higher, as this library relies on the Apple MusicKit, which requires iOS 15.0+. | ||
- Add the following line to your info.plist file to include a description for the Media Library usage permission: | ||
``` | ||
<key>NSAppleMusicUsageDescription</key> | ||
<string>Allow to continue</string> | ||
``` | ||
- Ensure that your Apple Developer account has the MusicKit entitlement enabled and the appropriate MusicKit capabilities are set in your app's bundle identifier. | ||
|
||
// ... | ||
## Linking | ||
|
||
const result = await multiply(3, 7); | ||
``` | ||
As of React Native `> 0.61`, auto linking should work for iOS. There shouldn't be any modifications necessary and it _Should_ work out of the box. | ||
|
||
## Contributing | ||
## Usage | ||
|
||
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. | ||
|
||
## License | ||
## Bugs and feature requests | ||
|
||
MIT | ||
Bug or a feature request, [please open a new issue](https://github.com/Lomray-Software/vite-ssr-boost/issues/new). | ||
|
||
--- | ||
## License | ||
Made with 💚 | ||
|
||
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob) | ||
Published under [Apache License](./LICENSE). |