Hi,Is it necessary or recommended to do anything special to protect resources that are distributed in an application bundle? I'm talking about files like images and movies.I'm working with a customer who is paranoid about their resources getting ripped off and they think the solution is to encrypt all of the files and decrypt them in the app using custom code. I'm almost certain this is a waste of time because of all the encryption already built in to the device, but I need to make 100% sure I'm understanding things correctly before I say anything.Does Data Protection have anything to do with this? Or is Data Protection only relevant for files that the application writes to its documents directory at runtime?Frank
Post
Replies
Boosts
Views
Activity
Hi,My app is configured to receive location updates while running in the background.I need to send these updates to a server. I'd like to do it as soon as possible, but it isn't absolutely necessary.If I receive a location update in the background, am I allowed to send the data to a server immediately using an NSURLRequest? Do I need to call "beginBackgroundTaskWithExpirationHandler" to request time for the request to complete?Or, should I just store the location update in a local database and send it when the app is running in the foreground?I'm assuming that I can use an expression such as "[[UIApplication sharedApplication] applicationState] != UIApplicationStateActive" in my CLLocationManagerDelegate callback to determine whether I'm getting locations in the background.Thanks!
Hi,One of my external testers wants to run my app on a second device.He asked me to please send him another invitation for the second device. I don't know how to do this. If I try to add his email address again, nothing happens. If he tries to re-use the original invitation, it doesn't work.How do I invite the same person to test on a new device? Does he need to get another email address?Frank
Hi,I've been unable to upload a build for the last several hours. Xcode spins for a while on "Fetching list of teams from the Developer Portal..." and then reports "The request timed out".This is not a new app or a new account; I've uploaded about 70 previous builds.Frank
Hi,I have an app that was approved and is "Pending developer release".While we were waiting to release the app, someone found a bug that we'd like to fix.Unfortunately, I can neither upload a new version of the app, nor create a new version in iTunes Connect (the option to add a new iOS version is disabled).Is there any way to revoke the approved version without releasing it to the app store? I don't mind having to wait for Apple to review the updated version again.Frank
Help,I'm trying to post a legitimate question but I keep getting this error that says "The message contains invalid characters."I tried "rephrasing" my question several times but nothing helps, what is happening?
Hi,It seems like it's pretty easy to consume HTTP Live Streaming content in an iOS app. Unfortunately, I need to consume media from an RTSP server. It seems to me that this is a very similar thing, and that all of the underpinnings for doing it ought to be present in iOS, but I'm having a devil of a time figuring out how to make it work without doing a lot of programming.For starters, I know that there are web-based services that can consume an RTSP stream and rebroadcast it as an HTTP Live Stream that can be easily consumed by the media players in iOS. This won't work for me because my application needs to function in an environment where there is no internet access (it's on a private Wifi network where the only other thing on the network is the device that is serving the RTSP stream).Having read everything I can get my hands on and exploring third-party and open-source solutions, I've compiled the following list of ideas:1. Using an iOS build of the open-source ffmpeg library, which supports RTSP, I've come up with a test app that can receive the RTSP packets, decode them, create UIImages out of the frames, and display those frames on-screen. This provides a crude player, but performance is poor, most likely because ffmpeg can't take advantage of any hardware acceleration. It also doesn't provide me with any way to integrate the video stream into AVFoundation, so I'm on my own as far as saving the stream to a file, transcoding it, etc.2. I know that the AVURLAsset class doesn't directly support the RTSP scheme. Since I have access to the undecoded RTSP packets via ffmpeg, I've thought it should be possible to implement RTSP support myself via a custom NSURLProtocol, essentially fooling AVFoundation into reading those packets as if they originated in a file. I'm not sure if this would work, since the raw packets coming from the RTSP server might lack the headers that would otherwise be present in data being read from a file. I'm not even sure if AVFoundation would recognize my custom protocol.3. If a protocol doesn't work, I've considered that I might be able to implement my own local HTTP Live Streaming server that converts the RTSP packets into an HTTP stream that the media players can read. This sounds like a terribly convoluted solution to the problem, at best, and very difficult at worst.4. Going back to solution (1), if I could speed up the decoding by using some iOS CoreVideo function instead of ffmpeg, this solution might be okay. However, I can't find any documentation for CoreVideo on iOS (Apple only documents it for OS X).5. I'm certainly willing to license a third-party solution if it works well and provides good performance. Unfortunately, everything I've found so far is pretty crummy and mostly just leverages ffmpeg and/or VLC. What is most disappointing to me is that nobody seems to be able or willing to provide a solution that neatly integrates with AVFoundation. I really want to make my RTSP stream available as an AVAsset so I can use it with AVFoundation players and other classes -- I don't want to build an app that relies on custom third-party code for everything.Any ideas, tips, advice would be greatly appreciated.Thanks,Frank
Hi,I'm having two problems using the scheduleBuffer function of AVAudioPlayerNode.Background: my app generates audio programatically, which is why I am using this function. I also need low latency. Therefore, I'm using a strategy of scheduling a small number of buffers, and using the completion handler to keep the process moving forward by scheduling one more buffer for each one that completes.I'm seeing two problems with this approach:One, the total memory consumed by my app grows steadily while the audio is playing, which suggests that the audio buffers are never being deallocated or some other runaway process is underway. (The Leaks tool doesn't detect any leaks, however).Two, audio playback sometimes stops, particularly on slower devices. By "stops", what I mean is that at some point I schedule a buffer and the completion block for that buffer is never called. When this happens, I can't even clear the problem by stopping the player.Now, regarding the first issue, I suspected that if my completion block recursively scheduled another buffer with another completion block, I would probably end up blowing out the stack with an infinite recursion. To get around this, instead of directly scheduling the buffer in the completion block, I set it up to enqueue the schedule in a dispatch queue. However, this doesn't seem to solve the problem.Any advice would be appreciated. Thanks.
Hi,I'm having a really weird problem. Brand new project, using a UINavigationController. I want to set the background color of my navigation bar to match the background color of my root view controller.I thought that this was the right way to do it: [[UINavigationBar appearance] setTranslucent:NO];
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0x2d/255.0 green:0x55/255.0 blue:0x97/255.0 alpha:1.0]];However, this generates a navigation bar with a color value of #234185 instead of the expected #2D5597. What is the explanation for this, and how do I fix it?Thanks,Frank
Hi,Usually when you create a new class or other file in Xcode, the default location of the new file is a folder with the same name as your project.Somehow, I've ended up with a project where the default location for new files is the folder above this (the one with the .xcodeproj file in it). I can certainly change the folder whenever I make a new file, if I remember to do it, but often I forget, and end up with half my files in one place and half in the other.What controls this default, and how can I change it back to the folder I want?Thanks.
Hi,I'm working with subscriptions.How do I know when a subscription expires, or is cancelled by the user? Does Apple push this information to my app automatically, or do I have to execute a command such as SKReceiptRefreshRequest or restoreCompletedTransactions?What is the difference between requesting a receipt refresh and restoring completed transactions?Thanks,Frank
How do I get a background image to fill the screen in my launch screen on an iPhone X?I have aligned the image to the top and bottom layout guides, but this leaves large white gaps.
Hi,Is it possible using MusicKit to play songs through audio filters, such as pitch shift or time stretch filters?Is it possible to play two songs at once for the purpose of fading between them?Is there a way that I can access tempo information about songs?Thanks,Frank
Hi,According to the documentation for the AVVideoCompositing protocol:"When creating instances of custom video compositors, AV Foundation initializes them by calling init and then makes them available as the value of the customVideoCompositor property of the object to which it was assigned. You then can do any additional setup or configuration to the custom compositor."AVMutableVideoComposition has a customVideoCompositorClass property, but does not have a customVideoCompositor property.Am I misunderstanding this? I need to access the instance to set some properties on it, but I cannot.Thanks,Frank
I've been using Xcode and Objective-C for years, and rely heavily on the built-in documentation, which is for the most part good.There's an issue that's always bothered me. Today I was looking up a function called class_getName. I found its documentation page, and was also able to navigate to the page showing the overview of the runtime system, all of which is fine.When I typed "class_getName" into my program, the compiler immediately flagged it as an unknown symbol.I knew I probably had to include a header, but none of the documentation pages I looked at mentioned the name of the header file. I had to end up searching the internet for examples until I hit one that showed <objc/runtime.h> being imported.Why isn't this very small, simple and extremely useful bit of information included in the documentation?Frank