Giter Club home page Giter Club logo

cordova-hot-code-push's Introduction

THIS PROJECT IS DEPRECATED

We are not using this repo anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork. See #371 for more information.

Cordova Hot Code Push Plugin

This plugin provides functionality to perform automatic updates of the web based content in your application. Basically, everything that is stored in www folder of your Cordova project can be updated using this plugin.

When you publish your application on the store - you pack in it all your web content: html files, JavaScript code, images and so on. There are two ways how you can update it:

  1. Publish new version of the app on the store. But it takes time, especially with the App Store.
  2. Sacrifice the offline feature and load all the pages online. But as soon as Internet connection goes down - application won't work.

This plugin is intended to fix all that. When user starts the app for the first time - it copies all the web files onto the external storage. From this moment all pages are loaded from the external folder and not from the packed bundle. On every launch plugin connects to your server (with optional authentication, see fetchUpdate() below) and checks if the new version of web project is available for download. If so - it loads it on the device and installs on the next launch.

As a result, your application receives updates of the web content as soon as possible, and still can work in offline mode. Also, plugin allows you to specify dependency between the web release and the native version to make sure, that new release will work on the older versions of the application.

Is it fine with App Store? Yes, it is... as long as your content corresponds to what application is intended for and you don't ask user to click some button to update the web content. For more details please refer to this wiki page.

Supported platforms

  • Android 4.0.0 or above.
  • iOS 7.0 or above. Xcode 7 is required.

Installation

This requires cordova 5.0+ (current stable 1.5.3)

cordova plugin add cordova-hot-code-push-plugin

It is also possible to install via repo url directly (unstable)

cordova plugin add https://github.com/nordnet/cordova-hot-code-push.git

At the end of the installation plugin will recommend you to install Cordova Hot Code Push CLI client. This client will help you to:

  • easily generate necessary configuration files;
  • launch local server to listen for any changes in the web project and deploy new version immediately on the app.

Of course, you can use this plugin without the CLI client, but it will make your life easier.

Quick start guide

In this guide we will show how quickly you can test this plugin and start using it for development. For that we will install development add-on.

  1. Create new Cordova project using command line interface and add iOS/Android platforms:
cordova create TestProject com.example.testproject TestProject
cd ./TestProject
cordova platform add android
cordova platform add ios

Or use the existing one.

  1. Add plugin:
cordova plugin add cordova-hot-code-push-plugin
  1. Add plugin for local development:
cordova plugin add cordova-hot-code-push-local-dev-addon
  1. Install Cordova Hot Code Push CLI client:
npm install -g cordova-hot-code-push-cli
  1. Start local server by executing:
cordova-hcp server

As a result you will see something like this:

Running server
Checking:  /Cordova/TestProject/www
local_url http://localhost:31284
Warning: .chcpignore does not exist.
Build 2015.09.02-10.17.48 created in /Cordova/TestProject/www
cordova-hcp local server available at: http://localhost:31284
cordova-hcp public server available at: https://5027caf9.ngrok.com
  1. Open new console window, go to the project root and launch the app:
cordova run

Wait until application is launched for both platforms.

  1. Now open your index.html page in www folder of the TestProject, change something in it and save. In a few seconds you will see updated page on the launched devices (emulators).

From this point you can do local development, where all the changes are uploaded on the devices without the need to restart applications on every change you made.

For production build do not forget to add the following to your config.xml file as it is a required property. Checkout the wiki for more information:

<chcp>
    <config-file url="https://5027caf9.ngrok.com/chcp.json"/>
</chcp>

Documentation

All documentation can be found in details in our Wiki on GitHub.

If you have some questions/problems/suggestions - don't hesitate to post a thread. If it's an actual issue - please, follow this guide on how to do that properly.

cordova-hot-code-push's People

Contributors

alexbuijs avatar andreialecu avatar bbreijer avatar cadesalaberry avatar davidovich avatar hassellof avatar ken-gladeye avatar legege avatar manduro avatar nikdemyankov avatar nordnet-deprecation-bot avatar pablomaurer avatar ptarjan avatar toostn avatar zwwhappy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-hot-code-push's Issues

xml2js is not installed

Issue from pull request #33.

In some cases after executing ionic platform add iOS we can get the following error:

Running command: /Users/zwacky/data/mc-webapp/mobile/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/zwacky/data/mc-webapp/mobile
Error: Cannot find module 'xml2js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at /Users/zwacky/data/mc-webapp/mobile/plugins/cordova-hot-code-push-plugin/scripts/lib/chcpConfigXmlReader.js:8:14
    at Object.<anonymous> (/Users/zwacky/data/mc-webapp/mobile/plugins/cordova-hot-code-push-plugin/scripts/lib/chcpConfigXmlReader.js:71:3)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

node -v

v0.12.2

npm -v

2.13.2

For some reasons node module xml2js is not installed.

As a solution you can just add it manually:

npm install xml2js

But this should be done by the plugin after the installation.

Don't use disk storage if app contents have changed

The first time I install my app and start it, it fires the

chcp_assetsInstalledOnExternalStorage

event. Subsequent runs don't fire that event, so I'm assuming they are reading from some External Storage.

Well, the problem is if I update my app code, and redeploy to the device, it isn't getting updated! I think you are reading from the previous cached copy and ignoring new changes? This is pretty bad for my development as I have no way to getting new code to the app without fully removing it.

Failed to copy file into www folder

Hello,

First of all, thanks a lot for your awesome plugin!

I have an issue copying files to local folder after update is ready. When launching the simulator, all files are loaded, checksums are ok, but then it fails to copy:

"Update is ready for installation"
"Failed to copy file fonts/icomoon.eot into www folder: The operation couldn’t be completed. No such file or directory. Installation failed."

I tried to manually create fonts directory in www. I tried different devices in Xcode. I also tried to chmod 777 the entire folder but it doesn't work :(

I have the following config if it can helps:

  • OSX 10.10.5
  • Xcode 7.1.1
  • Cordova 5.4.1
  • Hot code push 1.1.2

Do you have any idea where the issue is coming from?

Thank you very much

afterPrepareHook function "parseOptionsFromConsole" throwing a typeerror

In afterPrrepareHook.js, the function parseOptionsFromConsole throws a typeerror on line 60 when I type in terminal
cordova run ios --device

This is preventing the deploy script from deploying the app to the ios device I have attached via USB.

If I console.log consoleOptions before the for loop begins, the contents of this object is:
{ device: true, argv: [] }

By the looks of it, the indexOf check is expecting a string, but is getting a boolean.

As a workaround I've put a typeof opt === 'string' check into the if statement on line 60, but I think something fishy is going on here.

Install script hangs when using ionic

I ran this:

$ ionic plugin add cordova-hot-code-push-plugin
Updated the hooks directory to have execute permissions
Fetching plugin "cordova-hot-code-push-plugin" via npm
Installing "cordova-hot-code-push-plugin" for android
Plugin "cordova-hot-code-push-plugin" already installed on ios.
======== CHCP after plugin add process ========
Can't find module prompt, running npm install
Package prompt is installed
Can't find module xml2js, running npm install
Package xml2js is installed
All dependency modules are installed.

To make the development process more easy for you - we developed CLI client for our plugin.
For more information please visit https://github.com/nordnet/cordova-hot-code-push-cli
Would you like to install CLI client for the plugin?(y/n): y

And now it is hung. pstree only gives me:

 |         |     \--- 06073 pt node /usr/local/bin/cordova plugin add cordova-hot-code-push-plugin

with no children. Doing it again with cordova works:

$ cordova plugin add cordova-hot-code-push-plugin
Updated the hooks directory to have execute permissions
Fetching plugin "cordova-hot-code-push-plugin" via npm
Plugin "cordova-hot-code-push-plugin" already installed on android.
Plugin "cordova-hot-code-push-plugin" already installed on ios.
======== CHCP after plugin add process ========
Node module prompt is found
Package prompt is installed
Node module xml2js is found
Package xml2js is installed
All dependency modules are installed.
To make the development process more easy for you - we developed CLI client for our plugin.
For more information please visit https://github.com/nordnet/cordova-hot-code-push-cli
Would you like to install CLI client for the plugin?(y/n): y
Installing CHCP CLI client...
CLI for plugin is installed. You are good to go. For more information use "cordova-hcp --help"
=================================================

afterPluginAddHook hijacking --nosave switch on cordova install

According to the docs, installing a plugin with --nosave should prevent it from being added to package.json, however it appears your afterPluginHook.js is hijacking that capability and installing the plugin into package.json regardless.

Further, the reason I'm trying to keep it out of package.json is because it seems to run after every other plugin is installed as well, if it itself is also installed along with the other plugins.

iOS: Refactor download mechanics to allow future auth headers to be added

It would be nice to allow auth headers to be added to the network operations that the plugin initiates. This would allow protected uris to serve the chcp content.

To allow authentication headers to be added, we need to refactor downloading mechanics to use a single method of downloading files, which can be configured with credentials, thus allowing authentication. This issue is opened to track development of such a feature.

Having a way to customize all headers is an open question. But initially, to not put too much burden on the users side, we will concentrate on specifying credentials. Other custom headers could be added in the future.

Another issue will be opened to track and discuss the user facing (js) api.

stop spewing about chcpbuild.options

I happily have a config-file in my config.xml. Please check for that first before spewing this debug message. It is confusing my engineers.

$ cordova platform update ios
Updating ios project...
iOS project updated with [email protected]
========CHCP plugin after prepare hook========
Unknown build configuration.
You can ignore this if "config-file" is set in config.xml manually.
Otherwise, please provide build configuration in chcpbuild.options. For local development please run:
cordova-hcp server
This will generate .chcpenv file with local server configuration.
=====================END======================
IOS project now has deployment target set as:[7.0] ...
IOS project option EMBEDDED_CONTENT_CONTAINS_SWIFT set as:[YES] ...
IOS project Runpath Search Paths set to: @executable_path/Frameworks ...

Document what to put in `min_native_interface`

My version string of my app is currently 0.38.1. What do I put in cordova-hcp.json's min_native_interface?

Looking at the code it seems that you parse the string as an integer and I have no idea what that yields.

Write comparison section in README

Can you compare and contrast why I want to use this project instead of what else is out there? I want to do live updates to my production app but I'm not sure which solution to pick. Just a cursory googling seems to leave me picking between:

and I'm sure I missed some that you know about. You know the space much better than me, so seeing a comparison written by you would help a lot.

112 Compile errors with XCode 6.4

Do you support XCode 6.4? Ionic needs me to be on that version until they fix themselves for 7.0.

/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:116:23: warning: 'fast fast' can be expressed more succinctly as '#fast'
    public func close(fast fast: Bool) {
                      ^   ~~~~~
                      #
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:14: error: consecutive statements on a line must be separated by ';'
        guard let ws = self.ws else {return}
             ^
             ;
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:31: error: consecutive statements on a line must be separated by ';'
        guard let ws = self.ws else {return}
                              ^
                              ;
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:32: error: expected expression
        guard let ws = self.ws else {return}
                               ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:365:37: error: braced block of statements is an unused closure
        guard let ws = self.ws else {return}
                                    ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:391:27: error: consecutive statements on a line must be separated by ';'
            let json = try NSJSONSerialization.JSONObjectWithData(mesData,
                          ^
                          ;
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:414:11: error: expected 'while' in 'do-while' loop
        } catch {
          ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:414:17: error: braced block of statements is an unused closure
        } catch {
                ^
/Users/pt/trimian/main/platforms/ios/Trimian/Plugins/cordova-hot-code-push-plugin/SocketIOClientSwift/SocketEngine.swift:488:14: error: consecutive statements on a line must be separated by ';'
        guard str.characters.count != 1 else {
...

limited manifest

Question.

First do I have to include all files in the manifest? And do I have to host all files remotely?

I would like to only include certain files hosted remotely that I can update. Mostly content and config type files.

EXC_BAD_ACCESS following quick-start guide

I set this up on an existing project (ionic) and went through the quick-start guide. When I run cordova run, the application crashes shortly after booting with EXC_BAD_ACCESS in HCPPlugin.m line 674:

_socketIOClient = [[SocketIOClient alloc] initWithSocketURL:devServerURL options:nil];

Seems weird to me since that is in a try/catch block, but when I try continuing past the break it just keeps repeating the same error.

Happy to provide more details if need-be.

QuickStart instructions don't work

In the quickstart section you don't mention anything about the <chcp> block that should be in the config.xml. Without it, my application is spewing:

Error during update: Failed to load current application config

I'm running cordova-hcp server and it successfully made the two chcp.json and chcp.manifest files. Does something also have to go into the config.xml for local development? I'd rather not since then each of my team-members will have to go edit that file and it is committed to our repo.

Quick start instructions no longer work on windows

Hi,

I managed to get this working with version 1.0 after someone fixed the file reference problem with windows. I came back to use it for another project and it no longer seems to work with an actual android device, although I did get it to work with the emulator..

The manifest file is getting populated properly, and everything looks OK, but when running the server and a physical android client, the server doesn't report that a client has connected, nor does it push updates. It worked on the emulator, but not on a device.

Cheers

Phil

Update cordova hooks for iOS for Cordova 5.4

After updating Cordova to v5.4 - when building for iOS following message is displayed:

The module "ConfigParser" has been factored into "cordova-common". 
Consider update your plugin hooks.

Nothing critical, everything works, but still - need to clean it up.

Error during update: Hash of the loaded file doesn't match the checksum

I've just started to use your plugin and had it working the other day but I am now getting a constant issue.

Error during update: Hash of the loaded file doesn't match the checksum

I am using cordova-hcp build to generate the manifest file and then uploading to the remote server.

any ideas?
MAC 10.11
iOS 9.1

cordova-hot-code-push-plugin 1.1.0

thanks.

Crashes on load

I just got your plugin working, and now my app crashes on load with this:

Sep 30 16:42:24 Pauls-MBP Trimian[98961]: Error during update: Application build version is too low for this update
Sep 30 16:42:24 Pauls-MBP Trimian[98961]: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[3]'
    *** First throw call stack:
    (
        0   CoreFoundation                      0x003faa94 __exceptionPreprocess + 180
        1   libobjc.A.dylib                     0x036c1e02 objc_exception_throw + 50
        2   CoreFoundation                      0x002e9682 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 386
        3   CoreFoundation                      0x002fd8db +[NSDictionary dictionaryWithObjects:forKeys:count:] + 75
        4   Trimian                             0x0003b886 -[HCPContentConfig toJson] + 310
        5   Trimian                             0x0003b083 -[HCPApplicationConfig toJson] + 115
        6   Trimian                             0x0003f2d8 +[CDVPluginResult(HCPEvents) constructDataBlock:] + 88
        7   Trimian                             0x0003eee8 +[CDVPluginResult(HCPEvents) pluginResultForNotification:] + 568
        8   Trimian                             0x00038d20 -[HCPPlugin onUpdateDownloadErrorEvent:] + 304
        9   Foundation                          0x0336d0d2 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 40
        10  CoreFoundation                      0x003c2774 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
        11  CoreFoundation                      0x003c242a _CFXRegistrationPost + 458
        12  CoreFoundation                      0x003c2176 ___CFXNotificationPost_block_invoke + 54
        13  CoreFoundation                      0x0040e453 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1795
        14  CoreFoundation                      0x002a8e17 _CFXNotificationPost + 599
        15  Foundation                          0x032a7197 -[NSNotificationCenter postNotification:] + 131
        16  Trimian                             0x0004857e -[HCPUpdateLoaderWorker notifyWithError:applicationConfig:] + 286
        17  Trimian                             0x00047805 -[HCPUpdateLoaderWorker run] + 901
        18  Trimian                             0x00047084 __31-[HCPUpdateLoader executeTask:]_block_invoke + 68
        19  libdispatch.dylib                   0x04950a7f _dispatch_call_block_and_release + 15
        20  libdispatch.dylib                   0x0496e6fd _dispatch_client_callout + 14
        21  libdispatch.dylib                   0x049578ec _dispatch_root_queue_drain + 744
        22  libdispatch.dylib                   0x049575fd _dispatch_worker_thread3 + 108
        23  libsystem_pthread.dylib             0x04c89653 _pthread_wqthread + 724
        24  libsystem_pthread.dylib             0x04c86e0e start_wqthread + 30

Incompatible with cordova-plugin-wkwebview

cordova-plugin-wkwebview bundles a web server in order to serve content, and it is somehow incompatible with the way chcp sets the location on the webview.

It sets an url which looks like:
http://localhost:12344/file:///Users/user/Library/Developer/CoreSimulator/Devices/EC1D4B9C-9582-4592-AD29-988B1D2C9247/data/Containers/Data/Application/D4B4B4EF-4C96-4D52-976C-565FEB50DEF3/Library/Application%20Support/app.bundle.name/cordova-hot-code-push-plugin/www/index.html

However, a proper url would be
http://localhost:12344/Library/Application%20Support/app.bundle.name/cordova-hot-code-push-plugin/www/index.html

I'm not sure if there's a workaround I can apply or it needs a PR. Any pointers would be appreciated.

Make update installation bulletproof

Need to make update installation more bulletproof. That should involve better communication between installer and loader. Plus, a way to rollback to the previous version, if something terrible happened during the update installation. It already has a rollback mechanisms, but it can be improved.

`cordova-hcp build` doesn't add `content_url`

Where should the content_url come from during the build step? I tried putting it in my cordova-hcp.json like:

$ cat cordova-hcp.json
{
  "content_url": "https://example.com"
}

But that didn't get it:

$ cat ./push/prod/chcp.json
{
  "autogenerated": true,
  "release": "2015.10.02-14.39.11"
}

Should it pull from my config.xml or something?

UpdateInstalled Event should fire, after the reload

The UpdateInstalled event fires directly after the update and not after your reload. I can do nothing with an event, that fires directly before a reload happens. Because i could never be shure if my code did rung through successfully.

So the UpdateInstalled event should fire after the reload.

Fail on android build --release

add to body class: platform-android
CHCP plugin after prepare hook:
Error: opt.indexOf is not a function

Any ideas? Really cool plugin overall. Managed to build with --release after removing the lines with opt.indexOf and opt.replace in afterPrepareHook.js

iOS plugin installation blocks other plugins installation routine

I'm using cordova in a gulp task and saved cordova-hot-code-push in my config.xml file via cordova plugin add cordova-hot-code-push-plugin --save. If I init my app everything goes fine for android. But all my iOS plugins don't get installed, when your plugin is in the config.xml.

This is part of my gulp task:

return new Promise(resolve => {
  cordova.platform('add', 'android', () => {
  cordova.platform('add', 'ios', resolve);
  });
});

Update doesn't reload changed files correctly

Hi, everything seems to work fine. It finds the changed files, downloads it. I also can see, how the app get's reloaded, but the css changes doesn't appear.

I use Ionic and did follow the ionic guide in your readme. Because I have almost no idea about Objective-c and xCode i also don't have an idea on how to debug this thing.

I forked your project and added a folder example/ionic which you maybe can test, if you don't already have one seted up.

In this example i did not build any chcp files.

Can it be that it does save the downloaded files on the wrong location, and because of that it still loads the old style.css file?

App store is rejecting my plugin now

I tried submitting an App with your plugin as my only change and got this email from Apple:

Dear developer,

We have discovered one or more issues with your recent delivery for "Directory.". To process your delivery, the following issues must be corrected:

Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

I don't know if it is related, but when I open the XCode project I get this:

image

Can you either update your Swift code or remove it please?

On firstrun/install of app chcp.fetchUpdate() returns nothing does not fire my callback and gives me no error

On firstrun/install of app chcp.fetchUpdate() returns nothing does not fire my callback and gives me no errors?
chcp.fetchUpdate(function(error,data){
console.log(error);
console.log(data);
});

Refreshing the page and or start/stopping the app and the callback works fine.

Any thoughts?

using

Cordova version: 5.4.1
cordova-hot-code-push-plugin 1.1.2

iOS platform:
Xcode 7.1.1
Build version 7B1005

This plugin breaks `ionic restore`

If I have cordova-hot-code-push-plugin in my cordovaPlugins section of my package.json and then run

ionic restore

it hangs during this plugin's step.

min_native_interface problem on Android

I was troubleshooting a weird problem with min_native_interface not seemingly doing anything.

Then I realized that if I had android-versionCode="2", the apk would actually have a version code of 20, 22 or 24 (depending on platform, arm/x86/etc) even though AndroidManifest.xml would show version code as being 2. This can be confirmed by running aapt dump badging package.apk.

The reason for this behavior is here: https://issues.apache.org/jira/browse/CB-8976

So incrementing the version code for android to 3 in cordova's config.xml would require setting min_native_interface to at least 30.

This doesn't happen for iOS, so the version code would still be 3 in this case.

The workaround here is to make sure that ios version codes are incremented by 10 in order to keep the android and ios packages in sync.

So for version code 3, the following needs to be done:

<widget id="..." android-versionCode="3" ios-CFBundleVersion="30"> and min_native_interface has to be set to 30.

This should be added to the readme at the very least. I'm not sure if there are any ways to solve it, perhaps one way would be to separate min_native_interface into min_native_interface_android and min_native_interface_ios

Plugin 'HotCodePushLocalDevMode' not found whereas it's not installed

I just installed cordova-hot-code-push (and uninstalled cordova-hot-code-push-local-dev-addon) and when I launch the app under Xcode, this mistake appears:

ERROR: Plugin 'HotCodePushLocalDevMode' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2015-11-17 13:42:25.564 MyApp[20217:2330480] -[CDVCommandQueue executePending] [Line 159] FAILED pluginJSON = ["HotCodePushLocalDevMode461129820","HotCodePushLocalDevMode","jsInitPlugin",[]]

At the first installation of cordova-hot-code-push, I've added cordova-hot-code-push-local-dev-addon, and I removed him with:

# cordova plugin remove cordova-hot-code-push-local-dev-addon

I don't find any file with "HotCodePushLocalDevMode" under my project.

Swift is crashing app on the device with iOS 9

Continue discussion on Swift crashes, started in issue #26 .

Message from the @hirbod:

Well, as soon as I include this plugin and try to build on REAL device (iOS9, iOS8 just works fine) (simulator just works fine) I get:

dyld: Library not loaded: @rpath/libswiftCore.dylib

Referenced from: /private/var/mobile/Containers/Bundle/Application/...

Reason: no suitable image found. Did find:

/private/var/mobile/Containers/Bundle/Application/1.../Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100CD0000, size=0x0015C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftCore.dylib

As soon as I remove this plugin, everything works fine. Now I've submitted my app to the app store yesterday before trying on a real device with iOS 9 (just updated today) , so I'm dead sure that Apple will also will reject my app as it will crash. Do you have a fast fix here @nikDemyankov? Some guys on SO said its related due to old mobile-provisionings (missing OU in subject, but my certs are fine)

Some embedded-framework problem here?

Issue happens only on real device. And only since I've upgrade to iOS 9. iOS 8 worked well. (iPhone 6)

Xcode 7.0.1, newest, Cordova

By the way. I already tried project from scratch, deleted iOS Platform, reinstalled plugin (from npm and from github). Nothing changed. Swift is making problems here.
Also checked the flag "Embedded Code contains Swift". It was already checked. But as soon as I try to run it on my real device, I get this problems.

cordova-hcp server command issue

Running server
Could not create tunnel: [Error: panic: runtime error: invalid memory address or nil pointer dereference

github.com/inconshreveable/olive/recover.go:40
runtime/asm_386.s:413
reflect/value.go:419
reflect/value.go:296
github.com/codegangsta/inject/inject.go:102
< autogenerated >:30
< autogenerated >:132
github.com/inconshreveable/olive/recover.go:29
runtime/asm_386.s:412
runtime/panic.go:387
github.com/inconshreveable/olive/error.go:37
runtime/asm_386.s:412
runtime/panic.go:387
runtime/panic.go:42
runtime/os_windows.go:42
github.com/inconshreveable/go-tunnel/client/reconnecting.go:42
github.com/inconshreveable/go-tunnel/client/session.go:97
ngrok/tunnel_session.go:128
ngrok/web_api.go:95
runtime/asm_386.s:413
reflect/value.go:419
reflect/value.go:296
github.com/codegangsta/inject/inject.go:102
< autogenerated >:30
github.com/go-martini/martini/router.go:373
github.com/go-martini/martini/router.go:367
github.com/inconshreveable/olive/error.go:41
runtime/asm_386.s:413
reflect/value.go:419
reflect/value.go:296
github.com/codegangsta/inject/inject.go:102
< autogenerated >:30
github.com/go-martini/martini/router.go:373
github.com/go-martini/martini/router.go:367
github.com/inconshreveable/olive/recover.go:32
runtime/asm_386.s:413
reflect/value.go:419
reflect/value.go:296
github.com/codegangsta/inject/inject.go:102
< autogenerated >:30
github.com/go-martini/martini/router.go:373
github.com/go-martini/martini/router.go:367
github.com/inconshreveable/olive/logger.go:17
runtime/asm_386.s:413
reflect/value.go:419
reflect/value.go:296
github.com/codegangsta/inject/inject.go:102
< autogenerated >:30
github.com/go-martini/martini/router.go:373
github.com/go-martini/martini/router.go:250
github.com/go-martini/martini/router.go:120
github.com/inconshreveable/ngrok/web.go:25
runtime/asm_386.s:413
reflect/value.go:419
reflect/value.go:296
github.com/codegangsta/inject/inject.go:102
github.com/go-martini/martini/martini.go:173
github.com/go-martini/martini/martini.go:69
]

So, any clue?

Greetings

Can't build android

After installing this plugin i can't build for android i just stops my build.

I run

cordova build android --debug (same with run)

and then I get

CHCP Local Development Add-on:
Config-file is not set, local-development mode is enabled by default.
Setting config-file to local server: https://3cbcf516.ngrok.com/chcp.json
Android version code is set to 3
CHCP plugin after prepare hook:
config-file preference is not set.
will push strings array {"name":"lang","titles":["English (US)","English (UK)"],"values":["en-us","en-gb"]}
android preferences file was successfully generated

Running bower install on new ionic project breaks reload

After following the quickstart procedure running bower update on the project root breaks cordova-hcp.
Changing the index.html in www doesn't cause the app to reload. Not even running ionic run updates the app correctly.
For me it was triggered by installing ionicons with the command ionic add ionicons.
That caused angular 1.4.3 to install, hope it's useful.

Android installation is getting corrupted sometimes

Sometimes I'm getting an error in the simulator on startup, after chcp tries to install an update. Here's a screenshot:

image

I assume this may happen because the download or installation didn't fully complete before closing the application on a previous run.

Rerunning the application a second time starts it properly again - but it is reverted to the initially installed version (in the apk), all subsequent chcp installed updates are lost.

It also disables any kind of chcp updates from working until the app is uninstalled and reinstalled. I'm seeing an error reported by chcp on every app start:

"{"action":"chcp_updateLoadFailed","error":{"code":-9,"description":"Failed to load current application config"}}"

Page isn't reloading with new resources in dev mode

When I make a change to one of my files in dev mode while using cordova-hcp server, I see this in the Xcode console

2015-10-14 13:59:06.548 Trimian[68609:17794099] Loaded file all.js
2015-10-14 13:59:06.551 Trimian[68609:17794099] Update is ready for installation
2015-10-14 13:59:06.552 Trimian[68609:17793946] chcp_updateIsReadyToInstall [object CustomEvent]
2015-10-14 13:59:07.531 Trimian[68609:17793946] chcp_updateInstalled [object CustomEvent]
2015-10-14 13:59:07.785 Trimian[68609:17794099] Nothing to update
2015-10-14 13:59:07.786 Trimian[68609:17793946] chcp_nothingToUpdate [object CustomEvent]

(the chcp_ is me logging the javascript events that are fired).

Then the page reloads with the old data. If I kill the app and restart it, I get the new data, but that kind of defeats the purpose here.

Here are some related files:

$ cat www/chcp.json
{
  "release": "2015.10.14-13.59.03",
  "content_url": "https://291b3fb6.ngrok.com",
  "update": "now"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.