-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #392 from lovegaoshi/dev
feat: in app playStore update
- Loading branch information
Showing
22 changed files
with
300 additions
and
1,168 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// GMHikaru | ||
import { fetchYTIChannel } from '../../src/utils/mediafetch/ytbchannel'; | ||
import fetcher from '../../src/utils/mediafetch/bilivideo'; | ||
test('bilivideo', async () => { | ||
const result = await fetchYTIChannel('@MioriCelesta'); | ||
console.log(result); | ||
return; | ||
const content = await fetcher.regexFetch({ | ||
reExtracted: fetcher.regexSearchMatch.exec( | ||
'https://www.bilibili.com/video/BV1KW4y1p7oT/?spm_id_from=333.999.0.0' | ||
)!, | ||
}); | ||
// console.log(content); | ||
expect(content?.songList[0]?.id).not.toBeNull(); | ||
}); |
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
20 changes: 0 additions & 20 deletions
20
android/app/src/release/java/com/example/ReactNativeFlipper.java
This file was deleted.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
|
@@ -43,7 +43,6 @@ | |
"@shopify/flash-list": "^1.6.4", | ||
"@shopify/react-native-skia": "1.2.3", | ||
"axios": "^1.6.8", | ||
"babel-plugin-transform-remove-console": "^6.9.4", | ||
"base-64": "^1.0.0", | ||
"base64-js": "^1.5.1", | ||
"big-integer": "^1.6.52", | ||
|
@@ -74,38 +73,38 @@ | |
"postinstall-postinstall": "^2.1.0", | ||
"qs": "^6.12.1", | ||
"react": "18.2.0", | ||
"react-i18next": "^14.1.0", | ||
"react-i18next": "^14.1.1", | ||
"react-native": "0.73.7", | ||
"react-native-app-auth": "^7.1.3", | ||
"react-native-background-timer": "git+https://github.com/lovegaoshi/react-native-background-timer.git", | ||
"react-native-blob-jsi-helper": "^0.3.1", | ||
"react-native-blob-util": "^0.19.9", | ||
"react-native-device-info": "^10.13.2", | ||
"react-native-draggable-flatlist": "^4.0.1", | ||
"react-native-gesture-handler": "2.16.0", | ||
"react-native-get-random-values": "^1.11.0", | ||
"react-native-lyric": "git+https://github.com/lovegaoshi/react-native-lyric.git#dev", | ||
"react-native-pager-view": "^6.3.0", | ||
"react-native-pager-view": "^6.3.1", | ||
"react-native-paper": "^5.12.3", | ||
"react-native-qrcode-svg": "^6.3.0", | ||
"react-native-reanimated": "^3.8.1", | ||
"react-native-reanimated-carousel": "^3.5.1", | ||
"react-native-safe-area-context": "^4.9.0", | ||
"react-native-safe-area-context": "^4.10.1", | ||
"react-native-screens": "3.29.0", | ||
"react-native-shadow-2": "^7.0.8", | ||
"react-native-share-menu": "git+https://github.com/lovegaoshi/react-native-share-menu.git", | ||
"react-native-svg": "^15.1.0", | ||
"react-native-svga-player": "git+https://[email protected]/lovegaoshi/react-native-svga-player.git", | ||
"react-native-svg": "^15.2.0", | ||
"react-native-svga-player": "https://[email protected]/lovegaoshi/react-native-svga-player.git#commit=588c9a2819cb2fe14dd7204addaeadd4bf049333", | ||
"react-native-tab-view": "^3.5.2", | ||
"react-native-text-ticker": "git+https://[email protected]/lovegaoshi/react-native-text-ticker.git", | ||
"react-native-track-player": "git+https://[email protected]/lovegaoshi/react-native-track-player.git#APM", | ||
"react-native-url-polyfill": "^2.0.0", | ||
"react-native-vector-icons": "^10.0.3", | ||
"react-native-video": "git+https://github.com/lovegaoshi/react-native-video.git#dev-android-cache", | ||
"react-native-webview": "^13.8.6", | ||
"react-native-windows": "^0.73.11", | ||
"react-use": "^17.5.0", | ||
"sp-react-native-in-app-updates": "^1.4.0", | ||
"use-debounce": "^10.0.0", | ||
"uuid": "^9.0.1", | ||
"youtubei.js": "^9.3.0", | ||
"ytdl-core": "git+https://[email protected]/lovegaoshi/node-ytdl-core.git", | ||
"zustand": "^4.5.2" | ||
}, | ||
|
@@ -114,6 +113,7 @@ | |
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.24.4", | ||
"@babel/plugin-syntax-import-attributes": "^7.24.1", | ||
"@babel/preset-env": "^7.24.4", | ||
"@babel/preset-typescript": "^7.24.1", | ||
"@babel/runtime": "^7.24.4", | ||
|
@@ -138,6 +138,7 @@ | |
"argparse": "^2.0.1", | ||
"babel-jest": "^29.7.0", | ||
"babel-plugin-module-resolver": "^5.0.2", | ||
"babel-plugin-transform-remove-console": "^6.9.4", | ||
"cpx": "^1.5.0", | ||
"eslint": "^9.1.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
|
@@ -163,4 +164,4 @@ | |
}, | ||
"isSwift": true, | ||
"packageManager": "[email protected]" | ||
} | ||
} |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import SpInAppUpdates, { | ||
NeedsUpdateResponse, | ||
IAUUpdateKind, | ||
StartUpdateOptions, | ||
} from 'sp-react-native-in-app-updates'; | ||
import { Platform } from 'react-native'; | ||
|
||
// eslint-disable-next-line import/no-unresolved | ||
import { APPSTORE } from '@env'; | ||
|
||
export default () => { | ||
const inAppUpdates = new SpInAppUpdates( | ||
false // isDebug | ||
); | ||
|
||
const checkPlayStoreUpdates = async () => { | ||
if (Platform.OS !== 'android' || !APPSTORE) return; | ||
// curVersion is optional if you don't provide it will automatically take from the app using react-native-device-info | ||
const result = await inAppUpdates.checkNeedsUpdate(); | ||
if (result.shouldUpdate) { | ||
let updateOptions: StartUpdateOptions = {}; | ||
if (Platform.OS === 'android') { | ||
// android only, on iOS the user will be promped to go to your app store page | ||
updateOptions = { | ||
updateType: IAUUpdateKind.FLEXIBLE, | ||
}; | ||
} | ||
inAppUpdates.startUpdate(updateOptions); // https://github.com/SudoPlz/sp-react-native-in-app-updates/blob/master/src/types.ts#L78 | ||
} | ||
}; | ||
|
||
return { checkPlayStoreUpdates }; | ||
}; |
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
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
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
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
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
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
Oops, something went wrong.