I was actually working on some new IAPs for one of my apps which is totally based around downloadable sample-based instruments. I basically had to can about two months worth of work.
It was also a nightmare (for me, at least) getting the whole SK download stuff working properly. At one point, it was all working great, then there was an iOS update, and everything was broken again.
Maybe little wonder Apple decided to "deprecate" this...
Post
Replies
Boosts
Views
Activity
Update... I think this is broken again.
Basically I'm seeing conflicting download states and progress, e.g. downloads in "waiting" state but the download progress is updating and the content is actually downloading.
It's making it really hard on the app side to handle this logic and I'm getting customer complaints again that "downloads aren't working".
I'm wondering whether to totally ignore the download state property for now?
Seems to be working now for me. Spent quite a long time on the "generating codes..." spiny thing, but it got there eventually!
Yep I'm getting errors right now for promo code generation for both iOS apps and IAPs.
For apps I get: We're have trouble generating the codes. Please contact App Store Developer Support for assistance.
For IAPs I get same as OP: Promo codes for the following could not be generated. Try generating them again. (followed by a bullet list of my IAPs that I tried to generate codes for)
In case anyone's interested in this at all aside from me...
pause and resume seems to work OK on iOS 14.2, but trying to restart a cancelled download does not - I guess that's by design, although you can actually do that on iOS 13.7.
Apologies for my error in a previous post - I was trying to resume() a paused download, not start() it. And...
This seems to be working OK on 13.7 too, so either I got this wrong, or something has changed in the last week on the backend. Anyhoo... this all seems to be working predictably / as expected and pausing / resuming downloads makes more sense in the context of my app - i.e. you always want to download the content eventually.
Marking this as resolved.
The downloads saga continues... I seem to be having an issue with pause / resume too.
I can't seem to be able to resume() a paused download, but I can start() it. No error is reported - simply nothing seems to happen. However... I can start() it, but when I start() a paused download, the status during (what appears to be a successful download, i.e. progress > 0) is waiting, not active (aka: downloading). I would not have expected that, but I am slowly learning to expect the unexpected with hosted content downloads... This is on iOS 13.7.
Update: now some of my users are seeing spurious download status of failed. The localised description of the error is "An unknown error occurred".
The inability to re-start a download also seems to apply to iOS 14.2.
I've also noticed that if you cancel a download, you then get a download notification that correctly reports the state as cancelled but also reports the progress as 1.0 - I would not have expected that. You then can't use that same transaction to re-start a download, so the only way I can see to unblock that error state is to restore purchases.
This seems to be specific to iOS 14.1 as best I can tell. I'm able to cancel and re-start downloads on iOS 13.7 just fine - no need to restore purchases and you can (re-)use the same transaction. Whether that's the "correct" thing to do or not, I'm happy to be educated on that point.
I see this behaviour in the sandbox and production environments.
Update: I'm also seeing download state of "finished" with progress of zero. Not sure if that's intentional either, but again, very confusing on the app side. This is on 13.7 btw, but I suspect it's more of a server-side issue anyway :-/
lol - that censored word was simply a common non-offensive word meaning "not nice" ;-)
Correction / my bad: looks like AVAudioUnitMIDIInstrument sendController() does indeed work - all good! :-)
I think I've got this working now by hooking into the template / generated code. I'm not happy with how / where the AVAudioEngine get started, and there's the frame setting issue which I'm hoping I can "safely" ignore...
Anyhoo - it's kinda working, so I'm unblocked. For now :-)
Just to add some more missing detail. I think I know my way around AVFoundation OK. I have several apps based on the AVFoundation audio players, samplers, mixers, effects and so on. They seem to be working just fine. They even support IAA. Ahem...
So what I basically would like to do, is to expose some of the nodes in my "graph" as AUv3 audio units. Some of the hooks seem to be there as noted above. Normally you'd stop and start your AVAudioEngine instance, tear down your graph and re-build it, for example on an IAA connection.
I'm trying to do something similar, but as an AUv3 Audio Unit. Anyone... anyone?
All well and good saying "IAA is deprecated - use AUv3" - how do I make the switch in the case of my apps, when they're all built on AVFoundation?
Quick update on what I tried as a super simple "proof of concept".
I created an AVAudioUnitSampler, and return the auAudioUnit property as my AUAudioUnit in the AudioUnitViewController createAudioUnit() func.
I tried to do this initially in the generated template code, but didn't get anywhere with that. So just to be clear, I'm not using that template kernel and DSP stuff at all - I'm hoping that the AUAudioUnit inside AVAudioUnitSampler already knows how to do that.
Anyway, this seems to instantiate OK in AUM without error. However...
As I mentioned above, the internal AUAudioUnit doesn't seem to be in a usable state and throws this exception when you try calling any of the AVAudioUnitSampler funcs:
[AVAudioNodeImpl.h:253:AVAECheckNodeHasEngine: (engine != nil)]
And I guess that's the point where it all starts to feel a bit "wrong". So basically, I'd love a simple yes / no answer:
Is it possible to expose the underlying AUAudioUnits in an AVFoundation-based app as AUv3s? Yes or no.
If the answer is yes, how / where / when do I set up the AVAudioEngine shared instance?
Whoa... I totally missed this... if AUGraph is being deprecated, then does that mean the whole AVFoundation "nodes" architecture is going down too?
I got IAA working by the way, by listening for the IAA property change and publishing may main mixer output audio unit. Great that it's now deprecated.