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

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.

Related

Quickdialog does not build QpickerElement

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"

UIKit NIB not loading in bundle

NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/quantum/Library/Application Support/iPhone Simulator/6.1/Applications/19503C82-22E2-4787-A4F5-8D83EDD5D58B/foo.app> (loaded)' with name '_UIDocumentActivityViewController''
I'm creating a QLPreviewController, presenting it to show a PDF. I then tap the share button. It crashes.
I downloaded Apple's Document Interaction example project. I put my PDF fetching class into there, fetched a PDF, display it.. and it works. No crash on the share button. Both are for targets 6.1. I tried setting Apple's code to target iPad only like my project. Their code works, mine doesn't, and I'm baffled. From the error message it sounds like a bug in the SDK but I can't pinpoint it.
Have you seen this before?
QLPreviewController *previewController = [[QLPreviewController alloc] init];
[previewController setDataSource:self];
[previewController setDelegate:self];
[self presentViewController:previewController animated:YES completion:^{}];
#pragma mark QLPreviewControllerDataSource
- (NSInteger) numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller {
return 1;
}
- (id <QLPreviewItem>)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index {
return [NSURL fileURLWithPath:self.pdfPath];
}
I tried removing the reference to the framework, deleting derived data, cleaning the project, readding the QuickLook framework. I did show in Finder in both Apple's project & mine & they have the same path.
And same thing occurs when I use a UIDocumentInteractionController.
That little overlay with the email/print etc options is not loading in my project.
Apple support provided me with the answer.
I had over ridden an init method in a category and this screwed up the class initialization.
Moral: don't override init in a category method.
just try for initwithnib
QLPreviewController *previewController = [[QLPreviewController alloc] initWithNib: (QLPreviewController) bundle : nil];
hopefully it works.
if you have used NavigationController then use:
QLPreviewController *previewController = [[QLPreviewController alloc] init];
[self.navigationController pushViewController:previewController animated:YES];
else
QLPreviewController *previewController = [[QLPreviewController alloc] init];
[self presentModalViewController:previewController animated:YES];
According to Apple's documentation QL generators should not have NIB files as resources.
Although a Quick Look generator does not (and should not) have nib files as resources, you can add other resources if necessary.

InAppSettingsKit multi value not showing options

I have just managed to create my settings.bundle and set up a selection of different settings. However when I run my app and view the settings via InAppSettingsKit, the multi value options aren't displayed. I see the title and I can select it, then when it should display the options it just shows n empty cells (except for the tick).
The odd thing is that if I go into the Apple Settings app and check out the multi value settings they all show up as expected. Does anyone have any idea whats going on?
This is the code I'm using in my .h file:
#import <UIKit/UIKit.h>
#import "IASKAppSettingsViewController.h"
#interface myViewController : UIViewController <IASKSettingsDelegate, UITextViewDelegate>
{
IASKAppSettingsViewController *appSettingsViewController;
}
And in the .m file I have the following:
- (IBAction)optionsButtonSelected:(id)sender
{
appSettingsViewController = [[[IASKAppSettingsViewController alloc] initWithNibName:#"IASKAppSettingsView" bundle:nil] autorelease];
appSettingsViewController.delegate = self;
appSettingsViewController.showDoneButton = YES;
UINavigationController *aNavController = [[[UINavigationController alloc] initWithRootViewController:appSettingsViewController] autorelease];
[self presentModalViewController:aNavController animated:YES];
}
Below is a screenshot of a portion of my settings bundle (showing on of the problematic multi-value options):
And here is a screenshot showing what is displayed in the in app settings section when I click on Style:
I managed to resolve this issue by resetting the iPhone simulator. It seems it was getting confused between some old and new plist settings for some reason.
sorry it won't allow me to vote up. I also fixed a similar problem by quitting the simulator and running the app again (also try to delete the app?).

How to use Tapku library for iPhone?

I just found the Tapku library and would love to use the calendar, but am clueless as to where to start since I am new to iPhone dev. How do I go about presenting the calendar in one of my views?
TKCalendarMonthView *calendar1=[[TKCalendarMonthView alloc] init];
calendar1.delegate = self;
calendar1.dataSource = self;
[calendar1 selectDate:[NSDate date]];
[self.view addSubview:calendar1];
Add this in the .m file where you want to display.
have you looked in the demo project included in the library? i believe it has an example that would be very useful to you, and also, here is the developer documentation gitHub docs that includes the calendar class structure.

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