UserVoice integration in an Phonegap application - ios

I have this iOS Phonegap application and I need to integrate UserVoice. I follow this tutorial and I have reached to the point I have to make the configuration. I am really not sure where I have to put that object UserVoice are providing me with:
UVConfig *config = [UVConfig configWithSite:#"YOUR_USERVOICE_URL"
andKey:#"YOUR_KEY"
andSecret:#"YOUR_SECRET",
andSSOToken:#"SOME_BIG_LONG_SSO_TOKEN"];
I'll appreciate some help with that, since I'm really on a beginner level with iOS apps in general. Thanks in advance.

The code you posted comes from the UserVoice for iOS SDK which gives you the libraries and code necessary to include UserVoice in a native iOS app and will not work with a PhoneGap app.
Your options are to write a PhoneGap plugin, in Obj-C, to expose the UserVoice library, or possibly a better option is simply to open your UserVoice page within your PhoneGap app using the InAppBrowser plugin.

Here is a simple phonegap plugin
http://developerextensions.com/index.php/cordova-phonegap-plugin-uservoice

I took the code from here: http://developerextensions.com/index.php/cordova-phonegap-plugin-uservoice and followed their instructions.
There were some additional things I needed to do:
edit the config.xml and add the feature UserVoiceCommand
edit the .js file and replace Ext.emptyFn with function(){}:
cordova.exec(function(){}, function(){}, "UserVoiceCommand", "launch", [config]);
(those are the success and failure callback, which I intend to implement as well)
Since it was not functioning correctly on iOS7, I cloned https://github.com/uservoice/uservoice-ios-sdk, compiled it by running ./build.sh and then overwritten the files that came with the plugin.

You can now get iOS+Android support from this new cordova plugin:
https://github.com/Resgrid/cordova-plugins-uservoice
P.S. I am not affiliated to this plugin by any means, just came across it.

Related

CanvasCamera for iOS PhoneGap / Cordova

First of all, I'm really new to Cordova and Xcode and I'm trying to create an inline QR Code scanner from and HTML 5 app (or at least see if it's possible with this plugin).
I'm trying to follow the instructions from https://github.com/daraosn/Cordova-CanvasCamera and I am unsure what format or how to edit the config.xml in my project.
The instructions say:
"Edit your config.xml and add CanvasCamera into your Plugins list." but i dont know what this means or what format it should follow.
Also, when I add the plugins to the Plugin folder in the project, Xcode throws an error saying:
"'NSAutoreleasePool' is unavailable: not available in automatic reference counting mode".
I know that getUserMedia isnt support in Safari/iOS so it's pushing the boundaries a bit. If all else fails, i'll just use the input type=file and access the camera that way.
That plugin you reference looks severely dated. My best guess is, for your config.xml, add:
<plugin name="CanvasCamera" />
once you copied the files into your directory per those instructions.
Also, you could check out https://github.com/donaldp24/CanvasCameraPlugin. You can install it by running "cordova plugin add https://github.com/donaldp24/CanvasCameraPlugin.git && cordova prepare".
Hope this helps.
I found a plugin (http://scandit.com) which is much better than what i was originally trying to achieve.
The only downside is that it's a premium service ($200/month), however the upsides are: super easy to install, is really really fast at decoding (doesn't need to focus, shade doesn't matter), available on plenty for platforms, good documentation.
Another point was that it is a fullscreen camera plugin, which actually works better than inline, what we initially wanted.
Hope it helps anyone else.

IOS Phonegap 3.X: Lock page orientation during runtime

I am developing a webapp using phonegap + sencha touch, and I want to lock orientation on certain pages during runtime. I found this phonegap plugin , but it's not working for phonegap 3.X.
I also found something about a js function which named 'shouldRotateToOrientation', is it provided by phonegap? And it seems just works in multi-page(html files) app, my sencha touch app only have one html file.
So, how can I do that? Any help from you will be greatly appreciated.
i know this is not really a valid "answer" but SO doesn't let me comment with <50 rep. anyway, i noticed it's not that difficult to set up an old plugin to be used with cordova 3+. adhere to the folder structure (which you can see in existing cordova plugins like "device"), create a plugin.xml and install the plugin with plugman. read the documentation about plugin development and you should be good.
you will especially have to replace the function header in the ios files. replace
-(void)setAllowed:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options
with
- (void)setAllowed:(CDVInvokedUrlCommand*)command
This is a phonegap plugin for android/ios.
https://github.com/yoik/cordova-yoik-screenorientation

Are there any simple PhoneGap tutorials?

I have found zillions of tutorials that none of them was clarifying all information to get started easily with phonegap.
And phonegap documentation it self is pretty confusing and bulky.
However, my request is:
A simple tutorial to build jquerymobile web project with phone gap without any extra SDK's
And how to get the debug and release keys for app stores..
Thanks in advance
Here's a line by line tutorial: http://www.gajotres.net/building-a-native-mobile-app-with-phonegap-and-jquery-mobile-1-4/
If you need MaxOS version you can find it here: http://www.gajotres.net/creating-phonegap-project-on-macos/
It is my personal blog but there's no point in writing it everything here. Feel free to ask me if you have more questions.
Well it doesn't use jQuery but I have quite a step-by-step PhoneGap tutorial for beginners up at https://github.com/drappenheimer/phonegap-by-dissection
It makes no assumptions, and the end result is an actual app! (https://play.google.com/store/apps/details?id=com.drappenheimer.japxlate)
A good place to start PhoneGap would be this step by step tutorial. How to install/run PhoneGap on Ubuntu, Step by step guide.
Here are two another tutorials from the end of 2014.
Phonegap / Cordova - iOS Tutorial
Phonegap / Cordova - Android Tutorial
If you need more information about those guides - let me know.
Since PhoneGap is evolving every day, I would like to add a few more links to this answer.
Nowadays, you can use Cordova (aka PhoneGap) with any modern web framework such as Angular, React, Vue JS instead of JQuery mobile
Reference Links:
https://www.tutorialspoint.com/phonegap/
PhoneGap Tutorial
https://medium.com/#nacojohn/convert-your-angular-project-to-mobile-app-using-cordova-f0384a7711a6
http://coenraets.org/blog/2014/12/sample-mobile-application-with-react-and-cordova/

phonegap 2.0 with admob/iads

I've been searching for hours for a guide/tutorial on how to implement either admob or iads in an iOS app build with PhoneGap 2.0. So far I've been searching in vain. The closest I have gotten to an answer is this:
http://iphone.keyvisuals.com/iphonedev/implementing-admob-ads-in-a-phonegap-project-for-ios-no-plugins-required/
I dont have any objective-c experience and in the above mentioned link I can get past 3rd step. I have tried to download the demo and look at the code, but the app can't even be built. Probably because I'm using PhoneGap 2.0 and not an older version.
Are any of you guys able to guide me, or know of any helpful links for this to succeed?
How about using this plugin from github? Looks like getting it setup shouldn't be too bad.

How to install phonegap Facebook plugin for iPhone

i'm making a project for school and I want to use the phone gap Facebook plugin for iOS, but the installation instructions in the text file is rather complicated. I was wondering if someone got a great link on how to install it, or maybe someone has an example project or even could help me with installing it because I fail extremely in installing it.
Kind Regards,
Bart
I've created this tutorial / example for how to use Facebook inside of Phonegap without the plugin, it is similar but is more expandable and is easy to setup and use.
This explains everything in pretty good detail
http://www.drewdahlman.com/meusLabs/?p=88
check out the GIT
https://github.com/DrewDahlman/phonegapFacebookApp
hope this helps!
PhoneGap posted a YouTube video detailing the install process step-by-step. Note that 1.4.1 is the most recent supported version of PhoneGap - the 1.5 Cordova update is not yet supported.

Resources