Skip to content

Commit

Permalink
Fix/seek (#1415)
Browse files Browse the repository at this point in the history
* chore(example): update the example project dependencies

* docs(example): add some general documentation on working with the example app

* chore(ios): upgrade the SwiftAudioEx library which fixes an issue with seek

doublesymmetry/react-native-track-player#1359
  • Loading branch information
hlieb53 committed Feb 24, 2022
1 parent 80daaa3 commit 78167d5
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 15 deletions.
48 changes: 48 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# RNTP Example App

This app is useful to simply try out the RNTP features or as a basis for
implementing new features and/or bugfixes.

## Running The Example App

```sh
git clone git@github.com:DoubleSymmetry/react-native-track-player.git
cd react-native-track-player
yarn
yarn build
cd example
yarn
cd ios && pod install && cd ..
```

## Library Development

If you want to use the example project to work on features or bug fixes in
the core library then there are a few things to keep in mind. The most important
is that for changes to be reflected in the example app in the simulator code
changes need to be made in the version of `react-native-track-player` which is
installed at `./example/node_modules/react-native-track-player`. There
are a couple of approaches that you use to accomplish this:

1. `yarn add react-native-track-player@file:..`
2. `yarn sync`

In all cases keep the following in mind:

- If you're making changes to `ts` you'll need to re-run `yarn build`.
- If you're making changes to native code (e.g. anything `ios` or `android`)
you'll need to rebuild the app in order to see those changes. (e.g. `yarn ios`
or `yarn android`)

#### `yarn add react-native-track-player@file:..`

This command will effectively reinstall the `react-native-track-player` in the
example project based on the current state of the git repository.

#### `yarn sync`

This command works in the opposite direction of the `add` approach. It copies
the files from the `example/node_modules/react-native-track-player` directory
up to the top level project. You would want to use this approach if you're
making your changes directly to the code in the `example/node_modules/react-native-track-player`
folder.
5 changes: 3 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

source 'https://github.com/CocoaPods/Specs.git'
# use cocoapods CDN per https://blog.cocoapods.org/CocoaPods-1.7.2/
source 'https://cdn.cocoapods.org/'

platform :ios, '11.0'

Expand All @@ -28,4 +29,4 @@ target 'example' do
post_install do |installer|
react_native_post_install(installer)
end
end
end
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"sync": "yarn sync:ios && yarn sync:android"
},
"dependencies": {
"@react-native-community/slider": "4.0.0-rc.3",
"@react-native-community/slider": "4.2.0",
"react": "17.0.2",
"react-native": "0.65.1",
"react-native-track-player": "file:..",
Expand Down
15 changes: 4 additions & 11 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1336,12 +1336,10 @@
resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.1.0.tgz#e42b1bef12d2415411519fd528e64b593b1363dc"
integrity sha512-W/J0fNYVO01tioHjvYWQ9m6RgndVtbElzYozBq1ZPrHO/iCzlqoySHl4gO/fpCl9QEFjvJfjPgtPMTMlsoq5DQ==

"@react-native-community/slider@4.0.0-rc.3":
version "4.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@react-native-community/slider/-/slider-4.0.0-rc.3.tgz#4e2b09e4e31c75e3fd61ad6068fe438835cfb30c"
integrity sha512-OFW4NSk86hhkAEqsC7n1qrBCxl83+Im73F/E5oxrj/fsGW+pUR92yWMCEigEaAdTzsw22r1/snBO74FtAQbl6g==
dependencies:
flow-bin "0.113.0"
"@react-native-community/slider@4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@react-native-community/slider/-/slider-4.2.0.tgz#47fa146b2f2c92e45c35c154b1df8a66e71b8048"
integrity sha512-7LUDk63cbkDgmTqHBWn0pXzwF/VY9I3wDTnLWNehgQu7GlluHDn02qHgINxS9dRoG96JOqLFxRxnCEKkg5zcmQ==

"@react-native-windows/cli@0.65.2":
version "0.65.2"
Expand Down Expand Up @@ -3410,11 +3408,6 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469"
integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==

flow-bin@0.113.0:
version "0.113.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.113.0.tgz#6457d250dbc6f71ca51e75f00a96d23cde5d987a"
integrity sha512-76uE2LGNe50wm+Jup8Np4FBcMbyy5V2iE+K25PPIYLaEMGHrL1jnQfP9L0hTzA5oh2ZJlexRLMlaPqIYIKH9nw==

flow-parser@0.*:
version "0.152.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.152.0.tgz#a627aec1fdcfa243e2016469e44284a98169b996"
Expand Down
2 changes: 1 addition & 1 deletion react-native-track-player.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ Pod::Spec.new do |s|
s.swift_version = "4.2"

s.dependency "React-Core"
s.dependency "SwiftAudioEx", "0.14.6"
s.dependency "SwiftAudioEx", "0.14.7"
end

0 comments on commit 78167d5

Please sign in to comment.