Quickdialog does not build QpickerElement - iphone

I'm using the QuickDialog framework. It's an awesome framework but I have a strange problem.
I have a JSON that I got back from my Webservice. Everything is working, only it will not build the QPickerElements. I get the following warning in my console.
Couldn't build element for type QPickerElement
But now the strange thing. When I paste the code in the demo of the framework. Everything works like it is supposed to...
This is how I load up the JSON in my app.
NSString *jsonSample = data2.form;
NSLog(#"JSON SAMPLE IS %#",jsonSample);
id const parsedJson = [NSJSONSerialization JSONObjectWithData:[jsonSample dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableLeaves error:nil];
QRootElement *root = [[QRootElement alloc] initWithJSON:parsedJson andData:nil];
TestViewController *quickformController = (TestViewController *) [[TestViewController alloc] initWithRoot:root];
[quickformController setScriptId:_event.eve_id];
[self.navigationController pushViewController:quickformController animated:YES];
Can anybody help me with this problem?

I assume that you have the QuickDialog project embedded into yours as is the recommendation in quickdialog webpage, só, click on the quickdialog root project, then in target click in QuickDialog, in the right hand side select "Build Phases", add all .m (or whatever you want) into "Compiled Sources", then add the same .h into "Copy Headers"

Related

error in gdata-objectivec-client api + oauth2 ios framework

guys i am doing google docs integration in my iphone app,
i have used the gdata-objectivec-client from http://code.google.com/p/gdata-objectivec-client/
and configured my project with this steps http://hoishing.wordpress.com/2011/08/23/gdata-objective-c-client-setup-in-xcode-4/
when i create instance of GTMOAuth2ViewControllerTouch.h using following code
GTMOAuth2ViewControllerTouch *viewController;
viewController = [[[GTMOAuth2ViewControllerTouch alloc] initWithScope:scope
clientID:kMyClientID
clientSecret:kMyClientSecret
keychainItemName:kKeychainItemName
delegate:self
finishedSelector:#selector(viewController:finishedWithAuth:error:)] autorelease];
[[self navigationController] pushViewController:viewController animated:YES];
i got this error missing GTMOAuth2ViewTouch.nib
please help me , thanks in advance.
You need to move the GTMOAuth2ViewTouch.nib file in root project(main project out side the data project)
I was having the same problem, but it was Xcode's problem.
You need to download the GTMOAuth2ViewTouch.nib file from SVN url give as http://gtm-oauth2.googlecode.com/svn/trunk/Source/Touch/. Download the file from here and then add it in your project. It will work fine.

What does "WARNING: Input manager failed to load static dictionary for: nl_NL" mean?

I've been working on a dutch localization of a xib file. When I run my app in the simulator, I get the following message in the log console:
WARNING: Input manager failed to load static dictionary for: nl_NL
I've tried to reset the simulator, I've deleted the app, I removed the localization stuff and added it again, I've cleaned my project, but nothing seems to work. I keep getting this warning message.
My questions:
- can I ignore it?
- how can I get rid of this warning?
I've searched the web, but can't seem to find any answer.
If it happens only in the simulator and doesn't cause any other issues, I wouldn't worry too much about it. I just saw this warning for the first time today too.
Some follow-up questions may help:
Which SDK are you using?
Does it happen if you create a new Xcode project from a template?
Is your app still loading the localized nib correctly?
I get the same message when I localise to Spanish (es_ES), but not when I localise to Japanese and to Simplified Chinese (or English for that matter).
I haven't been able to trace the cause or fix this. However in my case this is definitely not the localised xib files, but it arises when I call:
- (NSString *)language {
NSSet *supported_languages = [NSSet setWithObjects: #"en", #"es", #"ja",
#"zh-Hans", nil];
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defs objectForKey:#"AppleLanguages"];
NSString *primary_language = [languages objectAtIndex:0];
if ([supported_languages containsObject:primary_language]) {
return primary_language;
}
return #"en";
}
But this is only in the simulator.
On the device it works just fine as far as I can tell and I'm ignoring it.
I'm using the 4.2 SDK. I've created the project from a template. It's still loading the localized nib correctly.
What I did find out was the following: it seems to happen only if I run the following code in the didFinishLaunchingWithOptions selector inside the AppDelegate.m file:
AboutViewController *controller = [[AboutViewController alloc]
initWithNibName:#"AboutViewController" bundle:nil];
[self.window addSubview:controller.view];
[self.window makeKeyAndVisible];
If I comment out these lines, and replace it with another subview, it doesn't happen. The AboutViewController nib was the one which was localized. If I display the same view when the user clicks on an (i) information button, it just works and without the warning. It just gives me the warning when I do it from the AppDelegate.

save videos in iphone simulator & upload it to the web services

I just want to know that how I can save the videos to the iphone simulator & how I can upload it to the web services?
Thanks.
vpc=[[UIImagePickerController alloc] init];
vpc.delegate=self;
vpc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
vpc.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:vpc.sourceType];
vpc.allowsEditing = NO;
vpc.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
[self presentModalViewController:vpc animated:YES];
i am doing this it gives an error, kuTType undeclared before it used, i dont know about the kuTTypeMovies, please reply as soon as possible.
Thanks
I think you are missing one of below framework
libz.1.2.3.dylib
MobileCoreServices.framwork
SystemConfiguration.framwork
You need to import framework #import MobileCoreServices/UTCoreTypes.h
If u got an error when u import framework.try below method I found.
1) open your project profile
2) build phases > link binary with libraries
3) click + , add MobileCoreService framework
4) now see it in left side.In the Headers folder of framework.find file name MobileCoreServices.h
5) Now open .h file, simple drag it below #import UIKit/UIKit.h
Note : make sure you need to drag it into #import<....>
Now what...? Thats it.You can see KuTTYpeMovie in .m file...thanks

UIWebView leak? Can someone confirm?

I was leak-testing my current project and I'm stumped. I've been browsing like crazy and tried everything except chicken sacrifice. I just created a tiny toy project app from scratch and I can duplicate the leak in there. So either UIWebView has a leak or I'm doing something really silly.
Essentially, it boils down to a loadRequest: call to a UIWebView object, given an URLRequest built from an NSURL which references a file URL, for a file in the app bundle, which lives inside a folder that Xcode is including by reference. Phew.
The leak is intermittent but still happens ~75% of the time (in about 20 tests it happened about 15 times). It only happens on the device -- this does not leak in the simulator. I am testing targeting both iPhone OS 3.1.2 and 3.1.3, on an original (1st Gen) iPod Touch that is using iPhone OS 3.1.3.
To reproduce, just create a project from scratch. Add a UIWebView to the RootViewController's .xib, hook it up via IBOutlet. In the Finder, create a folder named "html" inside your project's folder. Inside that folder, create a file named "dummy.html" that has the word "Test" in it. (Does not need to be valid HTML.) Then add the html folder to your project in Xcode by choosing "Create Folder References for any added folders"
Add the following to viewDidLoad
NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
NSString* filePath = [[resourcePath stringByAppendingPathComponent:#"html"] stringByAppendingPathComponent:#"dummy.html"];
NSURL* url = [[NSURL alloc] initFileURLWithPath:filePath];
NSURLRequest* request = [NSURLRequest requestWithURL:url]; // <-- this creates the leak!
[browserView loadRequest:request];
[url release];
I've tried everything from setting delegate for the UIWebView and implementing UIWebViewDelegate, to not setting a delegate in IB, to not setting a delegate in IB and explicitly setting the web view's delegate property to nil, to using alloc/init instead of getting autoreleased NSURLRequests (and/or NSURLs)...
I tried the answer to a similar question (setting the shared URL cache to empty) and that did not help.
Can anyone help?
Try:
- (void)webViewDidFinishLoad:(UIWebView *)webView {
[[NSUserDefaults standardUserDefaults] setInteger:0 forKey:#"WebKitCacheModelPreferenceKey"];
}
From http://blog.techno-barje.fr/post/2010/10/04/UIWebView-secrets-part1-memory-leaks-on-xmlhttprequest
Forgot about this question.
The leak is not present in 4.1. I would assume the same for 4.2.

iPhone - MessageUI - framework not found Message

I want to be able to use the iPhones Mail.app inside my application so my users can send a share email without leaving the application. I know 3.0 made this possible.
I have added the framework properly by ctrl clicking on my frameworks folder -> add existing framework.
Added this to the header file of the viewcontroller I want the Mail.app to appear in.
#import <MessageUI/MessageUI.h>
I pop up a UIAlert and on closing I call the function below, There are no errors showing up in my code. Do I have to do something extra inside the Interface Builder? Error Msg is Below
-(void)showEmailModalView {
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self; // <- very important step if you want feedbacks on what the user did with your email sheet
NSString * emailSubject = [[NSString alloc] initWithFormat:#"iPhone Subject Test"];
[picker setSubject:emailSubject];
NSString * content = [[NSString alloc] initWithFormat:#"iPhone Email Content"];
// Fill out the email body text
NSString *pageLink = #"http://mugunthkumar.com/mygreatapp"; // replace it with yours
NSString *iTunesLink = #"http://link-to-mygreatapp"; // replate it with yours
NSString *emailBody =
[NSString stringWithFormat:#"%#\n\n<h3>Sent from <a href = '%#'>MyGreatApp</a> on iPhone. <a href = '%#'>Download</a> yours from AppStore now!</h3>", content, pageLink, iTunesLink];
[picker setMessageBody:emailBody isHTML:YES]; // depends. Mostly YES, unless you want to send it as plain text (boring)
picker.navigationBar.barStyle = UIBarStyleBlack; // choose your style, unfortunately, Translucent colors behave quirky.
[self presentModalViewController:picker animated:YES];
[picker release];
[content release];
[emailSubject release];
}
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
[self dismissModalViewControllerAnimated:YES];
}
My ERROR MESSAGE:
ld: framework not found Message
collect2: ld returned 1 exit status
I followed this tutorial:
http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email/
After doing some research I found out that the tutorial I was using was perfectly fine! The code had no errors and my problem was the way I added the MessageUI Framework to my project.
Wrong Way.
Ctrl-click on the frameworks folder and select add -> existing frameworks..
Correct Way.
Open up "targets" in the file panel on the left of your xcode screen, double click your project name. A new window will pop open, at the bottom of the new window you can add a new linked library, add one by clicking the little plus sign in the bottom left hand corner. Scroll down to MessageUI and select Add.
If you had already added the MessageUI Framework the wrong way, just simply delete it and proceed with the correct way. If it still doesn't work try shutting down xcode, restarting, and rebuilding your application.
After many hours of searching for an answer this is what worked for me.
The linker command line output will tell you a lot about what XCode is using to try and build your binary, including Framework include paths and the frameworks the linker is including in the build. From there you'll be able to see exactly what XCode is using and what might be missing from your settings. The command line output can be found in one of the output panes in the Build Results window.