ios4

AVAssetExportSession no audio (iPhone), works on iPad

試著忘記壹切 提交于 2019-12-24 02:23:29
问题 We're trying to take an existing video with audio (.mov) and make a more email friendly version. Seems pretty straightforward and the code below does just what we need ... almost. On an iPad2 (4.3.3) it works in debug & release builds all of the time. On the iPhone 4 (4.3.3) or 4th gen iPod Touch there's no audio. From time to time, no obvious correlation as to what triggers it, it will start working on the iPhone. Delete the app, rebuild/install, and it no longer works. AVURLAsset* asset =

Alarm Even Application Closed in iPhone

霸气de小男生 提交于 2019-12-24 02:18:33
问题 I am working on iPhone application in which there is an option for Alarm. Is it possible to araise alarm even my application close. 回答1: Yes to a certain degree there is, check out the local notifications programming guide (local notifications are available in iOS 4 and newer). http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html 回答2: Use UILocalNotification to set the notifications. Then even your application

iPhone Instance Variable Issue

我怕爱的太早我们不能终老 提交于 2019-12-24 01:54:20
问题 I am trying to figure out what is the purpose of synthesizing myString to the instance variable _myString. What is the purpose of doing this? I tend to notice a lot of people doing this. Also I should release the instance variable and set the instance variable to nil, is that correct. ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController { NSString *_myString; } @property (nonatomic, retain) NSString *myString; @end ViewController.m #import "ViewController.h"

Saving a date in NSUserDefaults (as NSString) not working

时光怂恿深爱的人放手 提交于 2019-12-24 01:51:03
问题 I'm trying to save this date in NSUSerDefaults: 2011-04-14T13:18:25+0000 But I don't want the last bit (+0000), so I chopped it off using this method: NSString *since = [last objectForKey:@"updated_time"]; NSString *cutOff = @"+0000"; NSRange range = [since rangeOfString:cutOff]; self.lastUpdated = [since substringToIndex:range.location]; [[NSUserDefaults standardUserDefaults] setObject:lastUpdated forKey:@"lastUpdated"]; As you can see, it's just a very simple operation that will chop the

iPhone: 5 seconds video capture

我们两清 提交于 2019-12-24 01:44:56
问题 I would like to write code so that when the user presses a button, the camera is launched and records 5 seconds of video. In other words I want to have video capture but with a time limit. Is there something inside the UIImagePickerController or other parts of the framework that would allow doing this? Thank you. 回答1: There is nothing that allows you to directly do this. But you can very easily use UIImagePickerController's startVideoCapture to begin the capture and then call stopVideoCapture

Joining two CAF files together

荒凉一梦 提交于 2019-12-24 00:58:18
问题 I have the simple problem here. I have two CAF files. All I want to do is to join them to be one long audio file. I've tried to: Use the NSData class and append the audio data of both files into one. Hasn't worked. I assume some file property is not being set properly. The resulting file only plays the length of the first file. Tried to set the kAudioFilePropertyAudioDataByteCount property of the resulting file in my joining process. No result. Could anyone point me in the right direction /

Why is get-task-allow not showing in my Entitlements.plist file?

北城余情 提交于 2019-12-24 00:49:16
问题 So I am trying to set up my first ios app for add hoc distribution and I get the dreaded "Invalid Profile: developer build entitlements must have get-task-allow set to true." error. So I fumble around the internet trying to figure it out before I ask for help and come up with changing my "Entitlements.plist" file and change get-task-allow to true. Well ... when I go to xcode4 and look at my "Entitlements.plist" file, its not there. I try to add it and this shows up. Any idea what I am doing

iPhone App how to post Youtube video link using facebook graph Api

不打扰是莪最后的温柔 提交于 2019-12-24 00:35:08
问题 in iPhone App how to post Youtube video link using facebook graph Api to FaceBook Wall post? 回答1: You can try this : -(IBAction)postMeFeedButtonPressed:(id)sender { NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:4]; [variables setObject:@"#Your Message" forKey:@"message"]; [variables setObject:@"#http://Your Youtube Link" forKey:@"link"]; [variables setObject:@"#This is the bolded copy next to the image" forKey:@"name"]; [variables setObject:@"#This is the plain

How to play a video url from server in an iPhone app

你离开我真会死。 提交于 2019-12-24 00:35:01
问题 Actually, I get a url from server by using XMLParser . I want to play this video url in my app. Now I used `MPMoviePlayerController, but its not working. Please help! XMLParser.m -(id) loadXMLByURL:(NSString *)urlString { videoNames =[[NSMutableArray alloc]init]; videos = [[NSMutableArray alloc] init]; NSURL *url = [NSURL URLWithString:urlString]; NSData *data = [[NSData alloc] initWithContentsOfURL:url]; parser = [[NSXMLParser alloc] initWithData:data]; parser.delegate = self; [parser parse]

Core Data - Application crashes after adding extra attributes to xcddatamodel file

二次信任 提交于 2019-12-24 00:21:34
问题 I am using core data in my application. For data I link the sqlite file with it. All of my data is fetched successfully and I get the proper results. When I add some more attributes to the core data entity and then run the application then it crashes. My error message: "The model used to open the store is incompatible with the one used to create the store" So may be it seem because i have changed the Data model. Now what should i have to do if i want to add some extra fields in to my coredata