Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

[iOS] index.html alerts on update install #87

Closed
dylanvdmerwe opened this issue Mar 30, 2016 · 10 comments
Closed

[iOS] index.html alerts on update install #87

dylanvdmerwe opened this issue Mar 30, 2016 · 10 comments

Comments

@dylanvdmerwe
Copy link

On iOS I receive the following popups after an update is installed.

I thought this may be related to my CSP:
<meta http-equiv="Content-Security-Policy" content="default-src *; img-src 'self' * data: gap:; style-src 'self' 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">

                let syncOptions = {
                    installMode: InstallMode.IMMEDIATE,
                    updateDialog: false
                };
                window.codePush.sync(this.syncStatusCallback.bind(this), syncOptions, this.syncStaticDownloadProgress.bind(this));

How can I prevent these popups from displaying?

img_2005
img_2006

code-push 1.8.0-beta "CodePushAcquisition"
cordova-plugin-app-event 1.2.0 "Application Events"
cordova-plugin-app-preferences 0.7.7 "AppPreferences"
cordova-plugin-app-version 0.1.8 "AppVersion"
cordova-plugin-badge 0.7.2 "Badges"
cordova-plugin-code-push 1.5.1-beta "CodePush"
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-contacts 2.0.1 "Contacts"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-dialogs 1.2.0 "Notification"
cordova-plugin-directions 0.4.3 "Directions"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.0 "File Transfer"
cordova-plugin-geolocation 2.1.0 "Geolocation"
cordova-plugin-inappbrowser 1.2.1 "InAppBrowser"
cordova-plugin-queries-schemes 0.1.1 "App Queries Strings"
cordova-plugin-splashscreen 3.2.0 "Splashscreen"
cordova-plugin-statusbar 2.1.2 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
cordova-plugin-x-socialsharing 5.0.11 "SocialSharing"
cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
ionic-plugin-keyboard 2.0.1 "Keyboard"
phonegap-plugin-push 1.6.0 "PushPlugin"

@lostintangent
Copy link
Member

@dylanvdmerwe That's bizarre! That is definitely not coming from the CodePush plugin, and it almost looks like the Cordova bridge is asking for a response to every native method call made from JS. Could you show an example of the CLI commands you are running to release an update to CodePush?

@dylanvdmerwe
Copy link
Author

I think I may have used the android www folder for an iOS update. Would this make a difference? Will try and see if this is the issue later.

@lostintangent
Copy link
Member

Yeah that would definitely make a difference :) This issue is likely a sign of a "bad" cordova.js file and/or bridge config, so if you accidentally sent an Android update to an iOS app, that would be a likely cause of this problem.

@dylanvdmerwe
Copy link
Author

Yeah this issue is resolved with a correct iOS update file. Not one from Android.

@lostintangent
Copy link
Member

Awesome! Thanks for confirming.

@alizahid
Copy link

alizahid commented Feb 5, 2017

@dylanvdmerwe What do you mean by using the Android www folder for an iOS update? I'm getting the same alerts. I only have one www folder for both apps. And only one CodePush app for both platforms. @lostintangent

@dylanvdmerwe
Copy link
Author

@alizahid you cannot do a single codepush to both platforms - they are different. You need one for iOS and one for Android.

@alizahid
Copy link

alizahid commented Feb 5, 2017

Oh, I saw in the documentation that you can choose multiple platforms for one app, like:

code-push release-cordova APP_NAME ios
code-push release-cordova APP_NAME android

I do remember a recommendation to not do that, though.

@dylanvdmerwe So, you're suggesting I create multiple CodePush apps and then I can release from the same www folder?

@sergey-akhalkov
Copy link
Contributor

@alizahid, could you please look at #189?
We've discussed the same exception and for now there is merged microsoft/code-push#373 PR with docs updates.

@alizahid
Copy link

alizahid commented Feb 6, 2017

@sergey-akhalkov Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants