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
Related
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"
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.
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?).
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.
I dont know why I am getting this message when I click have this code
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] iniWithContentURL: url];
Is there something, I am missing here?
Thanks
You need to import/include the movie player:
#import <MediaPlayer/MediaPlayer.h>
Furthermore, the MediaPlayer.framework must be added to your "Frameworks" folder in the XCode project.
To add the framework, right-click on "Frameworks", then select the path on your system where this framework resides. On my system it is under the following path:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/MediaPlayer.framework
Make sure you are linking to MediaPlayer.framework in your Xcode project. That's where MPMoviePlayerController comes from and if you don't link to it, the linker won't know what it is.
MediaPlayer.framework must be added to your "Frameworks" and #import <MediaPlayer/MediaPlayer.h> in your .h file