-
Notifications
You must be signed in to change notification settings - Fork 467
Phonegap IOS Version 4.01 compile errorerror: no visible @interface for 'UIView' declares the selector 'loadRequest:' #109
Comments
Strange... will check it, thanks. |
Did you run
Which means, that if we are running on cordova iOS v4 - use new API to load page. Otherwise - use old API. So if |
Hi Thanks. This is a phonegap build. I don’t have access mac to do the compilation myself. PhoneGap (iOS / Android / Windows) Here is the build log https://build.phonegap.com/apps/1717219/logs/ios/build/ Thanks From: Nikolay Demyankov [mailto:[email protected]] Did you run cordova build ios after updating to new cordova version? In iOS version of the plugin there are lines like these: #if HCP_CORDOVA_VERSION >= 4
#else
#endif Which means, that if we are running on cordova iOS v4 - use new API to load page. Otherwise - use old API. HCP_CORDOVA_VERSION constant is defined in HCPPlugin.h, and it's putted there by plugin's JS hook. So if HCP_CORDOVA_VERSION is set to 3, then you should either run cordova build ios from console before doing so from Xcode, or just manually change it to 4. — |
Ah, okey. Well, PGB doesn't support cordova hooks. That's why you are getting this error. Since cordova CLI v6.0 is out and it's using iOS v4 by default - I will change As a temporary workaround you can fork this repo and change this manually here. And then for PGB provide url to your forked repo on the github. |
Thanks. Quick question do I reference the forked repository URL provided by Github? Will PGB know what to do with this? From: Nikolay Demyankov [mailto:[email protected]] Ah, okey. Well, PGB doesn't support cordova hooks. That's why you are getting this error. Since cordova CLI v6.0 is out and it's using iOS v4 by default - I will change HCP_CORDOVA_VERSION default value to 4. As a temporary workaround you can fork this repo and change this manually herehttps://github.com/nordnet/cordova-hot-code-push/blob/master/src/ios/HCPPlugin.h#L11. And then for PGB provide url to your forked repo on the github. — |
I think it should accept github url. For example - |
Sorry to bother again. But doing a git build gives me the following Fetching plugin "https://github.com/Interon/cordova-hot-code-push.git" via git clone From: Nikolay Demyankov [mailto:[email protected]] Ah, okey. Well, PGB doesn't support cordova hooks. That's why you are getting this error. Since cordova CLI v6.0 is out and it's using iOS v4 by default - I will change HCP_CORDOVA_VERSION default value to 4. As a temporary workaround you can fork this repo and change this manually herehttps://github.com/nordnet/cordova-hot-code-push/blob/master/src/ios/HCPPlugin.h#L11. And then for PGB provide url to your forked repo on the github. — |
Try to look into PGB documentation on how to add plugins from git. My guess is that it should be something like this:
Or this is what you have? |
Yip that is exactly what I have and the docs are vague pertaining this . The funny thing is it compiles for android. |
It should compile fine for android, since it doesn't have a hook, like iOS does. And iOS has it, because cordova has changed their API. What seems really strange is that line in your logs:
What plugin Another way to go - you can search for how to define, which platform version of ios cordova to install. Right now PGB installs the latest one, but via CLI you can install any. For example, v3.9.2:
In that case you can use plugin without any changes. Theoretically, I can publish tomorrow v1.2.6 with just changing default value of |
Genius!! When ever you in South Africa, beer is on me. Thanks again. |
Glad to help :) Will close the issue later. |
@nikDemyankov just curious do you have a time frame in which you expect to release 1.2.6 with this fix? |
@ashelley I wanted to release this with v1.3.0 when it is done. Not sure, that this will be soon. But if needed - can release v1.2.6 with only that fix in it. |
I'm not sure if it matters. I just started this using this plugin and have been doing my dev on android. However to get ios working I had to use my own private fork with the patch to change the default HCP_CORDOVA_VERSION to 4. It may be of no consequence I was just looking for clarification so that I can explain to my colleagues as to why I was using my own fork vs the official plugin repo. Thanks for this plugin though it's working great otherwise! [EDIT] The reason I ran into this issue was I believe the default cordova version is 6.0.0 now. (Not using phonegap) |
Fixed in v1.2.6. By default |
Thanks in advance. This was working in version 5.. but is not working on phonegap/cordova 6.0.0 .
The text was updated successfully, but these errors were encountered: