You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
function myDeviceReady() {
var options = {
'auto-download': false,
'auto-install': false,
'config-file': 'http://asdf.ngrok.com/chcp.json' // will eventually be a manufactured server URL
}
chcp.configure( options );
}
When I run the app in iOS simulator, I get the following in the Xcode console:
2015-12-30 15:57:22.531 Simple[3326:41957] -[__NSDictionaryM dataUsingEncoding:]: unrecognized selector sent to instance 0x7ff5a3cba5d0
2015-12-30 15:57:22.533 Simple[3326:41957] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[__NSDictionaryM dataUsingEncoding:]: unrecognized selector sent to instance 0x7ff5a3cba5d0
It's as if the chcp.configure() function was expecting a string. I was able to get it working by using:
chcp.configure( JSON.stringify( options ) );
But, that seems wrong. I'm using the latest version of your plugin from npm - 1.1.2. In this phase of my development I am NOT using the dev add-on.
I'm building a Sencha Touch app, if that makes a difference, so the above code is not actually run on 'deviceready'. Rather, it's in a controller that gets initiated after 'deviceready' ( putting the code in a 'deviceready' listener doesn't make a difference ). It could be an issue with Sencha Touch, but I struggle to see how.
In Android, if I pass in the stringified version, then CHCP plugin does not work ( it doesn't have a config-file to load ).
Any thoughts?
The text was updated successfully, but these errors were encountered:
TrevorMills
changed the title
Calling chcp.configuration() throws error in iOS
Calling chcp.configure() throws error in iOS
Dec 30, 2015
Yes, that is a bug in v1.1.2. iOS expects it to be a string, but Android - an object. This is fixed in v1.2.0, that I'm currently working on. There is a development branch, so you can check it out, if you wish. Or just wait until the release. I'm planning to do this in the beginning of the January: need to do some testing and update the docs.
Hi there,
I'm trying to do this:
When I run the app in iOS simulator, I get the following in the Xcode console:
It's as if the chcp.configure() function was expecting a string. I was able to get it working by using:
But, that seems wrong. I'm using the latest version of your plugin from npm - 1.1.2. In this phase of my development I am NOT using the dev add-on.
I'm building a Sencha Touch app, if that makes a difference, so the above code is not actually run on 'deviceready'. Rather, it's in a controller that gets initiated after 'deviceready' ( putting the code in a 'deviceready' listener doesn't make a difference ). It could be an issue with Sencha Touch, but I struggle to see how.
In Android, if I pass in the stringified version, then CHCP plugin does not work ( it doesn't have a config-file to load ).
Any thoughts?
The text was updated successfully, but these errors were encountered: