|
Can MPMoviePlayerController deal with anything other than a .m3u8 file when loading from an http server? Pointing it at a .mov, .mp4 or .m4v doesn't appear to work.
|
# ¿ Apr 8, 2011 18:49 |
|
|
# ¿ Apr 30, 2024 07:25 |
|
Small White Dragon posted:I worked on a video streaming app during the iOS 2.0 - 2.2 period, and it did then.
|
# ¿ Apr 12, 2011 16:33 |
|
skidooer posted:Make sure your web server supports HTTP ranges. The well known ones like Apache typically do, but if you are using something a little more esoteric, it might not.
|
# ¿ Apr 12, 2011 18:19 |
|
Has anyone attempted to use the Live555 RTSP library within an iOS app? I've gotten it to build and link to my app but I'm not sure the best way to integrate the task management. I'm guessing the correct way is to subclass TaskScheduler with something that uses the iOS scheduler but the documentation is a little sparse ( to be polite ) so if someone else has already done this work it'd be handy to look at it. Once I'm able to receive RTP video packets, if they are in a form that can be natively decoded by the iPad ( like .h264 ) is it as easy as passing the packets off to something like a MPMoviePlayerController or will I need to link to ffmpeg or something similar to do any video decoding from a stream?
|
# ¿ Apr 26, 2011 18:26 |
|
lord funk posted:Finally got an iPad for development.
|
# ¿ May 2, 2011 16:49 |
|
I'm trying to create a write-only property. If I just define the set* method like thiscode:
code:
code:
|
# ¿ May 27, 2011 00:17 |
|
Apparently I kicked the write-only property hornets nest. I was mainly curious as to why it didn't work. Is it an intentional design choice in ObjC to fail so one cannot create write-only properties or is it a side effect of how properties are implemented? The Property Declaration docs state that you must have both a setter and getter. Since I wasn't declaring the property explicitly I was surprised I got an error.
|
# ¿ May 27, 2011 06:50 |
|
I'm displaying a UIPickerView dynamically based on a button press and want to select an item in the picker. If the orientation of the iPhone is portrait then calling [UIPickerView selectRow] works fine with animated being YES or NO. If the orientation is landscape, selectRow only works if I set animated to NO. If I attempt to animate the selection it fails and leaves the first item selected. I'm attempting to select the item in viewDidLoad - is there a better place to do this? Here's my controller code in case it helps. code:
|
# ¿ Jun 24, 2011 22:52 |
|
If I had to guess I'd say it's more likely an issue with patent rights. From http://www.tms.org/pubs/journals/JOM/matters/matters-9405.html quote:Second, the use of confidentiality agreements can prevent the forfeiture of valuable patent rights. Under U.S. law and in other countries as well, the public disclosure of an invention can be deemed as a forfeiture of patent rights in that invention. A properly drafted confidentiality agreement can avoid the undesired—and often unintentional—forfeiture of valuable patent rights. My non-lawyer understanding is that once something is public knowledge you loose the ability to file a patent. By wrapping things up in an NDA you can claim it was still confidential and are able to file a patent. I haven't read the Apple NDA to see if this applies but I know my work has used an NDA to make sure we could still patent things before releasing a product.
|
# ¿ Jun 27, 2011 22:44 |
|
lord funk posted:As suggested in a WWDC video, I moved all my graphics calls to a background thread to prevent it from tying up the main thread. It's not a graphics heavy app, but I shaved 30ms off the response time for UITouch events. In the audio world that is huge! Any chance you can point me to which video? I'm also writing an audio / control application and would be interested in checking it out.
|
# ¿ Aug 6, 2011 22:18 |
|
Given a crash log and the .dSYM file associated with the release, what's the easiest way to symbolize the crash log? I'm using a script which uses xcrun to package my app so it's not in the Archived Applications section of Organizer. XCode 3.2.5 in case that matters.
|
# ¿ Aug 11, 2011 22:05 |
|
We have an iOS app which is distributed through the app store. The app has settings available via the Settings pane. I have a user that has a bunch of iPads and he wants to 'lock down' our app as far as settings go - basically he doesn't want his users to be able to change the settings for our app. He'd probably be fine with locking down all the settings on the iPad. I thought the iPhone Configuration Utility would be able to handle this but I don't see any way to lock down the settings. Is there any other way to accomplish something like this?
|
# ¿ Mar 7, 2012 00:24 |
|
I'm looking for a way to make a custom UIScrollView be 'virtualizing' but still be able to masquerade as a normal UIScrollView. By virtualizing I mean that it loads only the view that is visible ( +- a few pages ) and discards/loads views while the user is scrolling. I can override addSubView: and shove the views into my own collection but then subViews.count isn't in sync anymore and removeFromSuperview: doesn't remove them from my internal collection. Is there a way to make this work? Am I going about this the wrong way? Here's my current code which uses dummy UIViews in place of the offscreen views. This doesn't work but shows what I'm going for. code:
|
# ¿ Mar 19, 2012 17:57 |
|
pokeyman posted:Check out the Advanced ScrollView Techniques WWDC 2011 session. I have another question about image caching. Say I implement an image cache based on image URL and have the ability to assign weight to each cache entry. Using this weight I can order which images I would want to delete from my cache first - in my case that would be pages furthest from the currently viewed one. It seems like the right approach would be to hook didReceiveMemoryWarning and delete there. The issue is how to I now how much to delete? Ideally I don't want to delete all my images - just enough to allow me to continue to run. If I do a pass and delete the least weighted ones will I get another message letting me know I should do another pass? Another thought I had was to just reserve a given amount of memory for the images and delete based on that. It seems a little slimy but in theory I think would work. I'd still need to clear out my cache when I get didReceiveMemoryWarning but that would just blow away everything requiring things to redownload if necessary.
|
# ¿ Mar 19, 2012 23:43 |
|
pokeyman posted:As far as I know there's no good way to figure out how much memory to free up on a memory warning–the OS will just terminate you if you don't free enough. I think the idea is you completely empty all memory caches on a memory warning.
|
# ¿ Mar 20, 2012 16:38 |
|
I'm trying to figure out if we need to join the MFi program to control one of our hardware products over Bluetooth. Searching the iOS developer site I get some confusing information. There is a CoreBluetooth Temperature Sensor example which says it shows how to read/write/notify a remote device. The ReadMe doesn't say anything about MFi ( although maybe it's implied? ) and just says you need a Bluetooth LE Device. This Technical Q&A says you need to join MFi to connect to something over Bluetooth but it's older than the previous link.
|
# ¿ May 11, 2012 18:54 |
|
When I first started writing my app a few years ago I used the recommendations of this book and made 3 different targets - one for emulation, one for ad hoc testing and one for the app store. If I'm using XCode 4.3 is there any reason to continue doing so? The Tools Workflow Guide shows that I should just have one target and create a copy of the release configuration for submitting to the store. Having multiple targets is a pain so if I don't need to do that anymore that'd be great.
|
# ¿ Jun 20, 2012 22:08 |
|
Anyone have any experience with CocoaAsyncSocket? I'm using the GCDAsyncSocket and am getting notifications into my object after it has been deallocated. I'm running with ARC if that matters. I am closing down my code before it gets dealloced to stop any subsequent notificationscode:
code:
code:
Any ideas what might be happening or workarounds that might be worth a shot?
|
# ¿ Aug 24, 2012 00:07 |
|
I'm struggling with ARC issues. If I have a class which contains a pointer to another class with the default __strong attributecode:
Is there any case where deallocing Foo won't cause a dealloc on Bar ( excluding the obvious case where something else has a reference to Bar )? Are there any tools in XCode that can help trace who has a reference to Bar? FAST EDIT: If I add the following code to my Foo dealloc it will then dealloc Bar correctly code:
EDIT2 : Apparently having Zombies enabled was my issue ( per http://stackoverflow.com/questions/8695969/object-not-being-deleted-under-arc ). fankey fucked around with this message at 22:34 on Aug 31, 2012 |
# ¿ Aug 31, 2012 20:58 |
|
I'm using TestFlightApp and have gotten a few crash reports. One of them contains the following call stackcode:
|
# ¿ Sep 4, 2012 23:23 |
|
pokeyman posted:Complete and total shot in the dark: is there an autorelease pool on your non-main thread? In that particular call stack the Notification is called with the following code code:
|
# ¿ Sep 4, 2012 23:58 |
|
pokeyman posted:NSNotificationCenter is synchronous, so you should be fine. I'm assuming the crash happens on the line with -postNotificationName:object:. Here's the entire call stack. I've posted the functions in the call stack relative to my code here. code:
|
# ¿ Sep 5, 2012 16:45 |
|
So it looks like at least part of my problem was calling std::string( [someNSString UTF8String] ) when someNSString == nil. When using lldb as my debugger I would get crazy call stacks when the exception was thrown. If I switch back to gdb I get a nice obvious call stack which showed me the problem in about 6 seconds. Is this expected behavior for lldb? Anything I can do to make it work better? Or should I just use gdb until lldb becomes more robust?
|
# ¿ Sep 5, 2012 17:59 |
|
Is there any documentation on exactly how UIImage frees up memory in low memory situations? I have a case where I'd really like it to discard the internal image data ( as per the docs ) but as far as I can tell it never frees any memory and my app crashes when run on an iPad 1. My app dynamically loads pages of content off a server on the network. The set of pages is user defined and contains controls like faders, knobs and meters as well as graphic elements like text and images. In the case of images the app downloads the images via HTTP to a local /tmp directory and then creates UIImages using imageWithContentsOfFile:. The resultant UIImage is set as the .image of a UIImageView and that set as a subView of a UIView used for the page. Each of the page UIViews are loaded into a UIScrollView. The UIScrollView is 'virtualizing' - it dynamically adds and remove content based on what page is currently visible. Right now it's configured to load 3 pages on each side of the current page. In the particular case I'm trying to debug the user has created a set of 52 pages, each one with a 1024x768 png image on them. I download all of the images and create my pages without an issue. As I scroll through the pages, at some point ( around page 43 or so ) I get an out of memory warning and then it crashes. I know that it wouldn't be possible to load 52 pngs of that size on an iPad 1 so that's why I was hoping that the UIImages would discard their data when not visible as I scrolled through - as far as I can tell that's not happening. I thought maybe the fact I am removing pages from the view tree was somehow screwing up the UIImage memory management stuff but if I disable my virtualization of the UIScrollView and just load all the images at once it immediately runs out of memory. Of course that doesn't mean what I'm doing isn't causing a problem but it does show that I'll need to do something to make this work. Any idea why my approach isn't working?
|
# ¿ Dec 10, 2012 19:21 |
|
Doc Block posted:You're unloading the pages once the user is past them, right? I think you said your app keeps 3 pages on each side, make sure they're getting unloaded once the user is far enough past them. You might not be unloading everything. I'm going to fire up Instruments next but I'm pretty much sure that I'm running out of memory because of the UIImages which is of no surprise if they aren't releasing memory under low memory situations.
|
# ¿ Dec 10, 2012 21:31 |
|
Ender.uNF posted:Are you absolutely certain you are removing the UIImageView from its super view and not holding a reference to it anywhere? I am intentionally holding a reference to the UIImageView - I don't dealloc my 'removed' pages, I'm just removing them from the active UIView tree. I guess I could be interpreting the documentation wrong. quote:In low-memory situations, image data may be purged from a UIImage object to free up memory on the system. This purging behavior affects only the image data stored internally by the UIImage object and not the object itself. When you attempt to draw an image whose data has been purged, the image object automatically reloads the data from its original file. This extra load step, however, may incur a small performance penalty.
|
# ¿ Dec 10, 2012 22:03 |
|
Martytoof posted:How do you guys manage multiple NSURLConnections in the same class? Do you key off something in the connection:DidReceiveData: delegate method and route the data to the appropriate property or what? I'm coding on flu meds so if this is really obvious I apologize Objective-C code:
|
# ¿ Jan 10, 2013 21:36 |
|
I have a UIPopoverController whose content is set to a UITableViewController. Pre iOS 7 I was able to use the following code in my class derived from UITableViewController so the Popover was automatically sized based on my contentObjective-C code:
Objective-C code:
|
# ¿ Sep 25, 2013 22:09 |
|
pokeyman posted:Might be getting this wrong but isn't your actual goal to make the popover the size of the table view? If so, can you lay out the table view then return its size?
|
# ¿ Sep 26, 2013 16:59 |
|
NoDamage posted:Based on your old code it looks like you want fixed height cells but a variable width table view/popover... In that case, why not use sizeWithFont: like before to determine the max width, and then get the total height using self.choices.count * self.tableView.rowHeight? You don't really need the cell since you already have the string that goes into the cell.
|
# ¿ Sep 26, 2013 17:01 |
|
pokeyman posted:Try calling -layoutIfNeeded on the table view. And make sure it's the right width first. The content loaded into the TableView is dynamic ( read from a remote server ). How would I go about making sure the table is the right width?
|
# ¿ Sep 26, 2013 20:21 |
|
NoDamage posted:Well you've got a bit of a chicken-and-egg scenario. The cell width is determined by the table width. The table width is determined by the popover size. If you want the popover width to be determined based on the width of your longest string, you're going to have to calculate that ahead of time. Otherwise, if you're okay using the default width (320) on your popover, then you can force the table view to layout in order to calculate the height like pokeyman mentioned.
|
# ¿ Sep 26, 2013 21:35 |
|
NoDamage posted:Doesn't that just give you 320x44 for every cell though? Oops, you're correct. It just happened that my test data fit pretty much perfectly in 320...
|
# ¿ Sep 26, 2013 23:17 |
|
pokeyman posted:I guess I'm not sure what you're trying to accomplish. My suggestion was to fill out your table view (remote data, local data, whatever, just -reloadData once you're ready), then lay it out at various widths until you find a bounds that suits you. If it's already visible though that's gonna look pretty stupid, so maybe you measure it using cells or asking UIKit to lay out your strings. Previously I was just measuring the strings to determine the width. I just didn't feel that comfortable with that approach since I had to hardcode a margin so it looked ok and at some point Apple might change the margins used by the cell. I guess one solution would be to provide my own cell style but I was hoping to get by using the default since it will better match iOSs look and feel.
|
# ¿ Sep 26, 2013 23:39 |
|
moved to C/C++ thread since I think it's more of a POSIX sockets issue...
fankey fucked around with this message at 21:23 on Apr 18, 2014 |
# ¿ Apr 17, 2014 22:01 |
|
Is there any way to work around the 'Multiple methods named 'x' found with mismatched result, parameter type or attributes' error? I made the unfortunate mistake of adding a scale property to a bunch of objects without a common base class and in the past I was able to iterate objects and set the scale with code likeObjective-C code:
|
# ¿ Apr 21, 2014 23:50 |
|
ManicJason posted:How many different classes with setScale? You can test for isKindOfClass and add the appropriate cast, but that still smells bad. You can cast to only one of the classes if the footprint is the same and you really want to save lines.
|
# ¿ Apr 22, 2014 16:40 |
|
Any recommendations on iBeacon hardware/SDK to play around with? The estimote looks pretty slick. Or maybe the kontakt? Apprently beacon companies are unable to spell anything correctly...
|
# ¿ Sep 19, 2014 23:07 |
|
I'm attempting to draw a string ( in this case a single character of a font that contains icons ) with an outline. Using this codecode:
For whatever reason the outline doesn't appear at the left and bottom.Is there a better way to draw text with an outline that will give me a uniform stroke? Edit: I know a stroke of 1 will only get me a 0.5 stroke outline since the stroke should be centered on the path. A stroke of 2 has a similar ununiformity fankey fucked around with this message at 22:08 on Jan 12, 2015 |
# ¿ Jan 12, 2015 21:47 |
|
|
# ¿ Apr 30, 2024 07:25 |
|
Better, but still isn't uniform. It ends up making it look like a bezel and not an outline, which is what I'm going for.
|
# ¿ Jan 13, 2015 19:12 |