고요빛물결
앱개발

react-native-appupdate 컴포넌트

· 2016-12-04 (일) 02:00:04 · 1428

https://github.com/parryworld/react-native-appupdate

 

코드를 보면 App update를 직접하는 것 같습니다.  http://sir.kr/so_app/1316 의 codepush글도 있고,

질문도 있었는데,  제 수준이 아직 여기까지는 못가서, 자세한 대답을 못하지만, 앞으로 이런 것들이 필요할 것 같은 것들을  정리차원에서 참조로 올려놓는 것입니다.  

 

[code]

import { Alert } from 'react-native';
import AppUpdate from 'react-native-appupdate';

const appUpdate = new AppUpdate({
  iosAppId: '123456',
  apkVersionUrl: 'https://github.com/version.json',
  needUpdateApp: (needUpdate) => {
    Alert.alert(
      'Update tip',
      'Finding new version, do you want to update?',
      [
        {text: 'Cancel', onPress: () => {}},
        {text: 'Update', onPress: () => needUpdate(true)}
      ]
    );
  },
  downloadApkStart: () => { console.log("Start") },
  downloadApkProgress: (progress) => { console.log(`Downloading ${progress}%...`) },
  downloadApkEnd: () => { console.log("End") },
  onError: () => { console.log("Error") }
});
appUpdate.checkUpdate();

[/code]

[code]

// version.json
{
  "versionName":"1.0.0",
  "apkUrl":"https://github.com/NewApp.apk"
}

[/code] 

댓글을 작성하시려면 로그인이 필요합니다.

소모임

23,243건
+
분류 제목 글쓴이 날짜 조회
음악/악기 16-12-05 조회 1,134
노래방 16-12-05 조회 1,184
앱개발 16-12-05 조회 1,732
앱개발 16-12-05 조회 1,665
오늘뭐먹지?
[오늘뭐먹지?]
16-12-05 조회 1,532
써글모 16-12-05 조회 5,285
앱개발 16-12-05 조회 1,821
해외사용자 16-12-05 조회 1,335
모형취미
[모형취미]
16-12-05 조회 1,228
출산육아
[출산육아]
16-12-05 조회 1,008
정치/경제/사회 16-12-04 조회 2,714
정치/경제/사회 16-12-04 조회 2,478
해외사용자
[해외사용자]
16-12-04 조회 1,782
앱개발 16-12-04 조회 1,374
앱개발 16-12-04 조회 1,429
앱개발 16-12-04 조회 1,672
출산육아 16-12-04 조회 924
출산육아 16-12-03 조회 923
드론 16-12-03 조회 3,367
해외사용자
[해외사용자]
16-12-03 조회 1,186
영화가좋다 16-12-03 조회 4,537
영화가좋다
[영화가좋다]
16-12-03 조회 2,123
해외사용자 16-12-03 조회 1,461
앱개발 16-12-03 조회 1,792
앱개발 16-12-03 조회 1,977
앱개발 16-12-03 조회 1,740
오늘뭐먹지?
[오늘뭐먹지?]
16-12-02 조회 1,443
코딩야화TV 16-12-02 조회 1,556
영화가좋다
[영화가좋다]
16-12-02 조회 1,720
프리사자모 16-12-02 조회 3,092