I want to implement an app by which voice & text chat between two iOS devcices under a network become possible. I dont need voice call facility to any phone like LinPhone or SiPhone. I have studied over them & found too complex for me. Is there any simple SDK to make this possible???
By the way, user identification may be done by e-mail verification....
I think one best way to do it using XMPP Framework. Using XMPP you can send files & text to other persons. Using it you can record voice message & send it across. There are some links for it:
GitHub Project Link for XMPP Chat
Building a Jabber Client for iOS: XMPP Setup
Hope it helps to you.
EDIT:
Apple's GameKit framework provides evertyhing you need to implement in-game chat.
The full documentation is here:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/AddingVoiceChattoaMatch/AddingVoiceChattoaMatch.html#//apple_ref/doc/uid/TP40008304-CH11-SW11
Assuming you have allready connected the App to one or more other players using GameKit, you can start the voice chat like so:
-(void) startInGameChat {
//Set up audio session
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:myErr];
[audioSession setActive: YES error: myErr];
GKMatch* match;
GKVoiceChat *teamChannel = [[match voiceChatWithName:#"redTeam"] retain];
GKVoiceChat *allChannel = [[match voiceChatWithName:#"allPlayers"] retain];
//Start the chat
[teamChannel start];
//Enable Mic
teamChannel.active = YES;
}
Related
How do I open the App Store on the Apple TV to show all the apps created by a specific developer?
The iOS way, http://appstore.com/DEVNAME, does not work on Apple TV.
I use this method:
NSString* url = #"some url";
[[UIApplication sharedApplication] openURL:[NSURL url]];
To get the details of a developer,
https://itunes.apple.com/lookup?id=1074241891
To get all apps by that developer,
https://itunes.apple.com/lookup?id=1074241891&entity=software
To get the apps based on localization,
https://itunes.apple.com/lookup?id=1074241891&entity=software&country=gb
or
https://itunes.apple.com/gb/lookup?id=514675684&entity=software
I don't know why it is currently making me download a js file, it is suppose to display JSON response in browser? Maybe just temporary?
I am creating an application for the new Apple Watch. I would like to use text-to-speech functionality. Right now, I'm using the old code (iPhone):
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init];
speechPaused = YES;
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:#""];
utterance.rate = 0.15;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:#"it_IT"];
[synthesizer speakUtterance:utterance];
In my simulator it works correctly for the watch.
I am confused, because I've read on several forums that it is not possible to use text-to-speech.
I'd like to know if my code works in a real Apple Watch.
Thank you.
According to the documentation at developer.apple.com the AVSpeechSynthesizer API is available for watchOS 2+.
In addition, as of June 9, 2017, I can verify that I can play an AVSpeechUtterance on my wrist on an actual device, a Series 0 Apple Watch, 38mm, which can play from the built-in speaker or through bluetooth headphones (BeatsX).
This is not possible. In general, WatchKit is pretty limited right now. Third-party developers can currently not play audio from Apple Watch (Source: Apple employee via developer forum).
See here what's possible.
I have an iPad app that records video and sends it to my SaaS application using AVFoundation. My web application then reads the file, and plays it using JWPlayer.
The problem I am having, is that JWPlayer (or any player I have tried) has to download the WHOLE video file before it will play. After doing some reading, I have discovered that the videos recorded from IOS don't have "fast start from internet" enabled. Or something along those lines.
I am using AVFoundation. Is there a different way to save the video so it will stream instantly from my web server? What am I missing.
The shouldOptimizeForNetworkUse property on AVWriter allows you to do this.
You could use it to rewrite the captured movie file prior to uploading to your server (or immediately post-capture, whatever suits I suppose).
Edit:
Okay, I'm not at a Mac at the moment, but something along these lines:
AVAsset *originalFile = [AVAsset assetWithURL:originalFileURL];
NSURL *outputFileURL = wherever you want to put it;
NSError *readerError;
NSError *writerError;
AVAssetReader *reader = [AVAssetReader assetReaderWithAsset:originalFile error:&readerError];
AVAssetWriter *writer = [AVAssetWriter assetWriterWithURL:outputFileURL fileType:AVFileTypeQuickTimeMovie error:&writerError];
writer.shouldOptimizeForNetworkUse = YES;
[writer startWriting];
...
and so on.
I'm developing an app which makes usage of AVPlayer, MPMediaItem and MPMediaQuery. It works as long as Itunes match. We start with a MPMediaQuery, then we perform some filtering leaving some MPMediaItems, then we have been using AVPlayer because:
1.- we also play noises during the song play
2.- we need to suscribe to play/stops events from ipod.
All this features are currently working, except if the ipod library has itunes match enabled. Even when AVPlayer status is playing, no sound comes. Is obvious that it is not triggering the song download from iCloud.
All the information I have about itunes match by the moment is this post:
MPMediaItem and iTunes Match
which states you can trigger the download by using a MPMusicPlayerController play call. For the reasons given above, we cannot make use of this class to control our own player.
I have two ideas on how to solve this problem:
A. Find a way to check if a song is already downloaded and available in the library to play using AVPlayer. If the song is not available let the user know that we don't support songs not available.
B. Find a way to trigger the download of the song just before it becomes the next item to play.
I still cannot find how to implement any of these solutions and I haven't found any related documentation, so I submitted my app with a warning message to prevent users to use this app if they are using itunes match.
On iOS 6 and up you can use [[item valueForProperty:MPMediaItemPropertyIsCloudItem] boolValue] to check if an item is already downloaded.
A. Find a way to check if a song is already downloaded and available
in the library to play using AVPlayer. If the song is not available
let the user know that we don't support songs not available.
This isn't perfect but it works in most cases. Songs downloaded from iTunes Match will be DRM free. So you can check the assets DRM flags, if it is not exportable then it needs to be downloaded. It is possible to get a false positive with audio books/pod casts but you are mostly safe.
MPMediaItem* item
NSURL* url = [item valueForProperty:MPMediaItemPropertyAssetURL];
AVURLAsset* assetToLoad = [[AVURLAsset alloc] initWithURL:url options:nil];
bool protectedCon = assetToLoad.hasProtectedContent;
bool exportable = true;
if (gApp.mSysVersionInt >= 5) {
exportable = assetToLoad.exportable; //4.3+
}
B. Find a way to trigger the download of the song just before it
becomes the next item to play.
You can try doing this will a muted MPMusicPlayerController, but there is no way to track when the song is downloaded and sometimes it takes a very long time.
Via the settings panel of your iPhone, you can add a subscription to a remote .ics calendar format. I have a Dutch iPhone app that does this from within the app (see the screenshot below, "abonneren op de agenda" means "subscribe to the calendar"), but there must be others too.
I want to mimic this behavior for a project of mine, but I can't find the API to do this with. It looks like it's not a part of EventKit, but because there's no app switching going on when you hit 'subscribe' in the example app I suspect it's also not a url scheme.
Who knows?
Try something like this:
NSString *url = #"http://server/filename.ics";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
This shows an uialertview with the question to the user if he/she wants to subscribe.
;)