|
It says right in the documentation for AVAudioPlayer, in the -prepareToPlay section:quote:Calling this method preloads buffers and acquires the audio hardware needed for playback, which minimizes the lag between calling the play method and the start of sound output. It most likely releases the buffers and audio resources after a short interval so as not to be a resource hog. The docs for the -play method state that it will call the -prepareToPlay method if the audio player isn't ready to play. AVAudioPlayer is meant for stuff where a little lag doesn't matter and there isn't much justification for holding onto the audio resources for an extended period of time, like short UI sounds or something. Doc Block fucked around with this message at 04:54 on Apr 3, 2013 |
# ? Apr 3, 2013 04:52 |
|
|
# ? May 17, 2024 05:21 |
|
That's exactly what I was using it for and hitching for a third of a second is not acceptable, it's very noticeable if there is any accompanying visual change.
|
# ? Apr 3, 2013 04:54 |
|
For anyone that does Ad Hoc distribution builds: Where do you keep your provisioning profiles? We have our TC server set up and it has an old, outdated distribution profile on it because we're too lazy to have to VNC in and update it ourselves. So whenever we push out a new build number to TC, we have to manually upload the newest provisioning profile so that new devices that we've added will have correct permissions. (This is through Testflight) Do you keep it in source control, and whenever you add a device, simply download and update the profile? And then have your CI/Build process use the profile from the source? Doh004 fucked around with this message at 17:59 on Apr 3, 2013 |
# ? Apr 3, 2013 17:57 |
|
I thought I saw something about making or accessing iTunes purchases in-app? (Not purchases related to your app, but generic music, video, .etc) Am I imagining things?
|
# ? Apr 4, 2013 22:41 |
|
Small White Dragon posted:I thought I saw something about making or accessing iTunes purchases in-app? (Not purchases related to your app, but generic music, video, .etc) Am I imagining things? I'm not really sure what you're asking for but maybe SKStoreProductViewController?
|
# ? Apr 4, 2013 23:03 |
|
pokeyman posted:Pick up whatever language you like and write yourself a shiny server, Okay, this is probably a really dumb question, but what is meant by this? Watching the Stanford class (if a bit behind), the guy's made reference to this before, and I'm just wondering what's up with this. Is it basically an AJAX thing, except instead of Javascript, it's your app? Like, with everything over HTTP and probably messages in XML of some sort? Or is it more involved than that? If I wanted to learn more about that sort of thing (writing an app that has a server), what classes should I be looking at?
|
# ? Apr 4, 2013 23:43 |
|
Axiem posted:Okay, this is probably a really dumb question, but what is meant by this? Watching the Stanford class (if a bit behind), the guy's made reference to this before, and I'm just wondering what's up with this. It's basically an AJAX thing, except instead of JavaScript, it's your app. Your app sends HTTP requests, your server sends responses in XML or whatever. I don't have any suggestions for classes, sorry. Maybe head to the Cocoa Literature List and search for "server" or "http"? I'm sure you'll find something useful. And there's nothing better than firing up Xcode, starting a new project, and trying to make sense of it!
|
# ? Apr 5, 2013 00:18 |
|
pokeyman posted:I'm not really sure what you're asking for but maybe SKStoreProductViewController?
|
# ? Apr 5, 2013 01:11 |
|
pokeyman posted:And there's nothing better than firing up Xcode, starting a new project, and trying to make sense of it! Having a starting point helps, though. I guess what I'm asking is: how do I make an HTTP request to a server? Like, what is the Obj-C equivalent to jquery.ajax()?
|
# ? Apr 5, 2013 02:28 |
|
NSURLRequest plus NSURLConnection if you want to do it yourself, otherwise, AFNetworking. Of course, if you simply want to download a file at a specific URL, you could just do something like Objective-C code:
|
# ? Apr 5, 2013 02:49 |
|
Doc Block posted:NSURLRequest plus NSURLConnection if you want to do it yourself, otherwise, AFNetworking Cool, I'll take a look. And jeez, there seem to be a lot of frameworks and other useful things on github.
|
# ? Apr 5, 2013 03:01 |
|
OS X thing I can't get to work: I have a NSMenuItem with a custom subview, and I can't get the thing to highlight. Objective-C code:
That, from the NSMenuDelegate, is called each time I mouseover a different NSMenuItem/NSView, but item is always null. I feel like I'm missing some really simple boolean somewhere, but all I can find on this are a few StackOverflow questions that have what looks like 1/3 the code I need. dustgun fucked around with this message at 03:52 on Apr 5, 2013 |
# ? Apr 5, 2013 03:45 |
|
I'm wondering if someone here could give me a good idea of the work that would need to be done to have the following iOS application made. I have a site with a form that consist in one text area that's site to website.com/process.php afterwards. Is it possible to have an App that would consist of this form + possibility to take a picture and add it (I imagine this could be submitted as $_FILES?) that would also be submitted to that process.php file. Is that easily doable for someone who has little but no knowledge in Cocoa/Objective-C ? If so, any pointers as to where should I start to learn around that?
|
# ? Apr 8, 2013 00:12 |
|
That's very simple to implement. You'll basically only need an interface + an action that sends (auth+)text+image to your url. Look into NSMutableURLRequest or a wrapper library.
|
# ? Apr 8, 2013 00:45 |
|
Anyone know why my UIBarButtonItem's aren't actually changing their backgrounds when highlighted or selected? I'm calling the setBackgroundImage for the correct states in a subclassed UIBarButtonItem, but it's not actually changing it. I made sure the style is Plain, which explicitly states that it glows when touched. In the mean time I'm trying to recreate the UIBarButtonItem look with setting a UIButton as the custom view. However, I don't know how to recreate the bottom lighter border that shows up on the bottom of the button. It's like a gray thin line, if the rest of my border was black. Any ideas?
|
# ? Apr 8, 2013 16:27 |
|
Doh004 posted:Anyone know why my UIBarButtonItem's aren't actually changing their backgrounds when highlighted or selected? I'm calling the setBackgroundImage for the correct states in a subclassed UIBarButtonItem, but it's not actually changing it. I made sure the style is Plain, which explicitly states that it glows when touched. Double post, but we found out why: We had set the tint to blackColor, which means the highlighted/pressed state was no different from its default color. I guess the highlighting isn't smart enough to detect that it cannot go any darker and should instead go lighter.
|
# ? Apr 8, 2013 17:27 |
|
Oh God, they redid the Provisioning Center. THIS IS THE END HOW DO I DO THINGS. Edit: Oh, cool. You can finally delete App IDs you made by mistake. ultramiraculous fucked around with this message at 23:46 on Apr 8, 2013 |
# ? Apr 8, 2013 23:38 |
|
Just start mashing buttons until it works.
|
# ? Apr 8, 2013 23:41 |
|
Word of warning: You currently cannot add new devices to provisioning profiles via the web interface. If you hit "Generate" on an Ad-Hoc/Development certificate's page, it'll save it with no devices attached and no way to attach them again. The only recourse is to delete the profile and make a new one. So, don't: Yodzilla posted:Just start mashing buttons until it works.
|
# ? Apr 9, 2013 00:04 |
|
What do people use for automated testing? This Monkey Talk seems nice: http://www.gorillalogic.com/monkeytalk I'd need it to integrate into CI (we use TeamCity).
|
# ? Apr 9, 2013 16:55 |
|
Speaking of testing, Travis CI recently added support for open source Objective-C and Xcode projects. If you have one, get some continuous testing going!
|
# ? Apr 9, 2013 17:08 |
|
Doh004 posted:What do people use for automated testing? This Monkey Talk seems nice: http://www.gorillalogic.com/monkeytalk We use a combination of KIF kicked off with WaxSym from Jenkins onto Mac Minis and GoogleTest
|
# ? Apr 10, 2013 14:24 |
|
Hughlander posted:We use a combination of KIF kicked off with WaxSym from Jenkins onto Mac Minis and GoogleTest Awesome, thanks. KIF was the other that we've been looking into and it seems awesome. The only issue is our tester guy(s) don't have Macs or use XCode, so we'd have to teach them how to use it and we'd also have some worries about maintaining the tests down the road with new people.
|
# ? Apr 10, 2013 15:07 |
|
Anyone else experiencing a bunch of issues with the simulator not attaching to Xcode when debugging? The only way I can reliably connect to the simulator is by switching the debugger from LLDB to GDB.
|
# ? Apr 11, 2013 15:48 |
|
Doh004 posted:Anyone else experiencing a bunch of issues with the simulator not attaching to Xcode when debugging? The only way I can reliably connect to the simulator is by switching the debugger from LLDB to GDB. I ran into this. I tried switching debuggers, but ultimately the only fix for me was to reboot my machine twice, Build Clean and pray very hard. When it doesn't attach, I have to force quit Xcode.
|
# ? Apr 11, 2013 20:27 |
|
Say I have a tool generating a bunch of .m an .h files. I then include them as a folder reference, as they might change names, some might appear/disappear. Is there an easy way to get that to compile in XCode?
|
# ? Apr 13, 2013 17:54 |
|
Have the tool emit a permanent header which contains up-to-date includes for all of the dynamic headers.
|
# ? Apr 13, 2013 18:23 |
|
Doh. Thanks!
|
# ? Apr 13, 2013 18:43 |
|
I'm considering options for sending real-time updates from a server to an iOS client, and it's mostly down to WebSockets vs push notifications. My thinking is that push notifications aren't quite the right tool because 1) there's no real-time delivery guarantee and 2) I don't really need updates to be sent unless the app is actually open. HTTP polling is an option too but I figured with a short polling interval there's a lot more overhead compared to WebSockets which might cause more battery drain. Anyone have experience doing real-time updates?
|
# ? Apr 13, 2013 23:54 |
|
I have a ragel file in my project, it works fine with a build rule and compiles etc. Debugging is a bit hard though: Although I can set breakpoints (if I change the filetype to for instance objc source), and it will stop and show me the ragel file at the right spot (and I can tell the stack is right by po-ing local variables in the debugger), it doesn't show the highlighted line so stepping through code is incredibly difficult since I have to keep track of it mentally. Anybody done a similar thing and got it to work?
|
# ? Apr 14, 2013 17:58 |
|
gently caress me, never ever ever accept a speech recognition job people. No matter how good your engine is, the client will want it to be better And after a one month job slipping into three months due to this loving client refusing to pay and constantly going "Why can SIRI understand it then huh?" (Our tests have Opensphinx actually getting a better recognition rate, but whatever) I'm loving out. I'm throwing in the towel and leaving the industry because I cant take this poo poo no more.
|
# ? Apr 16, 2013 08:58 |
|
You need an iron clad "needs to work thiiiiiiiis well" line in the contract for that job. No, I don't have a clue how you'd ever specify that, why do you ask?
|
# ? Apr 16, 2013 09:08 |
|
I'm getting a crash when trying to use object_getIvar()code:
E: Turns out I was freeing the Ivar and it wasn't getting captured in the block I was using it in. Carthag Tuek fucked around with this message at 00:10 on Apr 17, 2013 |
# ? Apr 16, 2013 18:45 |
|
haveblue posted:Have the tool emit a permanent header which contains up-to-date includes for all of the dynamic headers. Do folder references actually add/remove .m files for compilation? It would be really, really nice if it did but the last time I tried (with some Apache Thrift generated protocol stuff) Xcode didn't even notice that there were source files in there.
|
# ? Apr 18, 2013 05:07 |
|
pokeyman posted:
Done that. Contractually the dude is supposed to have paid but at this stage I'm so loving broke I can't afford a lawyer to chase this drat thing to its conclusion. Heres the thing. He told me at one point "The app is boring". He didn't seem to accept that I followed his (Fairly detailed) spec to the *letter*, and just because the idea sucks doesn't mean he can just back out. Well after I made him realise that he suddenly started squabbling with the recognition quality. Heres the thing though, we did prototypes *before the project started* with the exact engine, and he accepted it as quality enough, and it was on that basis we proceeded (all in writing). So at this stage he hasn't got a leg to stand on, except for one very big leg;- He's got the money and I don't. ergo: gently caress this industry. I accepted a full time job last week at another company, where some other schmuck can deal with smacking sense into dirtback clients, and I'm lighting this loving bridge on fire. Once my finances are recovered, I'm revisiting this issue with a vengence. duck monster fucked around with this message at 09:25 on Apr 21, 2013 |
# ? Apr 21, 2013 09:22 |
|
Wouldn't there be lawyers willing to take the case on contingency, or is that not a thing down under?
|
# ? Apr 21, 2013 15:53 |
|
An IAP question: when Apple is asking for a screenshot of the product in iTunes Connect, they're asking for a screenshot of the item as it appears in the app, right? As in, not just how it appears in my in app store?
|
# ? Apr 22, 2013 06:55 |
|
As it appears in the app, yeah. The result of the purchase.
|
# ? Apr 22, 2013 07:04 |
|
Thanks. That's what I thought. Figured I'd better ask before I had to go through another rejection.
|
# ? Apr 22, 2013 07:06 |
|
|
# ? May 17, 2024 05:21 |
|
How would one illustrate a consumables purchase in a screenshot? Show a "Congratulations you bought 100,000 smurfberries, sucker!" or a before/after currency counter?
|
# ? Apr 22, 2013 14:41 |