0
私のコードプッシュはシミュレータ上で動作していますが、デバイス上で同じアプリケーションを実行したときに更新ダイアログが表示されますが、IOSデバイスのアプリケーションを更新しないでコードをプッシュ
class MyApp extends React.Component {
constructor() {
super();
this.state = {
logs: []
}
}
codePushStatusDidChange(status) {
let msg = '';
switch(status) {
case codePushComponent.SyncStatus.CHECKING_FOR_UPDATE:
msg = ("Checking for updates.");
break;
case codePushComponent.SyncStatus.DOWNLOADING_PACKAGE:
msg = ("Downloading package.");
break;
case codePushComponent.SyncStatus.INSTALLING_UPDATE:
msg = ("Installing update.");
break;
case codePushComponent.SyncStatus.UP_TO_DATE:
msg = ("Up-to-date.");
break;
case codePushComponent.SyncStatus.UPDATE_INSTALLED:
msg = ("Update installed.");
break;
}
}
codePushDownloadDidProgress(progress) {
console.log(progress.receivedBytes + " of " + progress.totalBytes + " received.");
}
update() {
codePushComponent.sync({
updateDialog: true,
installMode: codePushComponent.InstallMode.IMMEDIATE
},() => this.codePushStatusDidChange,() => this.codePushDownloadDidProgress);
}
render(){
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome
</Text>
<Text style={styles.instructions}>
Update version 1.0
</Text>
<Button title="Update" onPress={() => this.update()} />
</View>
)
}
}
export default (MyApp)
追加情報
- 反応し、ネイティブ・コード・プッシュバージョン: 4.1.0ベータ
- を反応させ、ネイティブ版: 16.0.0-alpha.12を
- iOS/Android/Windowsバージョン: IOS 10.3
- これは、デバッグビルドまたはリリースビルドで再現されますか? リリース
- リリースこれはシミュレータで再生されるのか、物理的なデバイスでのみ再生されますか? 物理デバイスにのみ