Audiobus: Use your music apps together.

What is Audiobus?Audiobus is an award-winning music app for iPhone and iPad which lets you use your other music apps together. Chain effects on your favourite synth, run the output of apps or Audio Units into an app like GarageBand or Loopy, or select a different audio interface output for each app. Route MIDI between apps — drive a synth from a MIDI sequencer, or add an arpeggiator to your MIDI keyboard — or sync with your external MIDI gear. And control your entire setup from a MIDI controller.

Download on the App Store

Audiobus is the app that makes the rest of your setup better.

Generic questions: App development for iOS / iPadOS / macOS

Hello again :smile:

After help from @NeonSilicon and @wim I am finally able to compile and run projects in Xcode on my Mac Mini M1.

I wanted to write down some of the answers I got or found, that helped me in this.
And I want to write down some open questions, while trying to "develop" something.

What I am trying to develop is not even clear.
I think about managing URLs, text and images and probably offering a way to encrypt them too.

Also, accessing any "document provider" (Files App), running side-by-side and in split-view or slide-over mode, seems to be essential for iPadOS ... regardless of what the App is finally used for. Basics!
Adding a Widget could be nice too, probably.

So, this is less about musical Apps, but more about the basics of any iOS / iPadOS / macOS App.
I will concentrate on Swift and SwiftUI, as this is what Apple is planning for.
Coming from C, I am also interested in C or Rust, but that sound like a very very future idea.

While posting my finding and problems, I would be more than happy to get some help from YOU!
:smiley: :smiley: :smiley:

Comments

  • tjatja
    edited July 2021

    The first thing I needed to learn, was to set the "Team" no "None" for all targets in the "Signing & Capabilities" editor of Xcode. For All, Debug and Release!
    And to enable "Automatically manage signing" ...

    And for the macOS target, I set "Signing Certificate" to "Sign to Run locally".

    Don't ask me, why this has to be done for any and all new projects - I tested about 20 projects and needed to change 20 * ( 3 + 4 ) = 140 entries.

    Why is there no default for all targets of all projects instead, Apple?
    If I worked for Apple at Xcode, this would have been fixed on my first day!

    QUESTION: Or mabye, I am just as stupid as usual and did not find the default setting for projects?

    But, it is very important to set "None": As @wim explained, you should not sign with your free developer ID, as those are restricted to a certain number of builds (for macOS only?) per week! And you may need to wait a week otherwise.

    As I would like to test any crappy App of mine on a real iPad, I even think about paying the developer fee to Apple - even years before I may be able to push something to the App Store, just for the convenience.

  • I am totally new to Swift, which seems to be a bad start :cold_sweat:

    But then, I know Object oriented programming from C++ and old times, so maybe I can adapt.

    Also, I already collected about 1000 URLs with tutorials of all kind: macOS, Xcode, Swift, architectural patterns (I tend to VIPER) and so on, also lots of github projects.

    I will add URLs here, when I feel they could help others!

    And yes, I think this will not directly lead to a "musical" App, as would be expected in this forum, but those basics may very well be required in musical Apps too - as long as they are not Audio Units, which are totally different :-D

  • tjatja
    edited July 2021

    Depending on what you want to program, you may need to pay for the Developer account anyways:

    https://help.apple.com/developer-account/#/dev21218dfd6

    "Apple Developer", the free tier, can only access few capabilties - but "Inter-App Audio" is contained!

  • I recommend starting with Playgrounds on iPad then switching to the forthcoming update which lets you ship apps to the App Store

    I’m a professional Swift dev with apps in the store and I can’t wait to ditch unnecessary complexity of Xcode for most purposes

  • Also highly recommend you check out Realm and their recent talks on YouTube about how they integrate with SwiftUI. It includes a review of architectures

    VIPER is way overkill for SwiftUI which introduces new architectural patterns for iOS

  • @wahnfrieden said:
    I recommend starting with Playgrounds on iPad then switching to the forthcoming update which lets you ship apps to the App Store

    I’m a professional Swift dev with apps in the store and I can’t wait to ditch unnecessary complexity of Xcode for most purposes

    I played around a bit with Playgrounds already, to get into contact to Swift.

    And while it may be neat to have the possibility to do some things on iPad, I am surely not going to try to develop on my iPad.
    For this, I have the Mac!

  • @wahnfrieden said:
    Also highly recommend you check out Realm and their recent talks on YouTube about how they integrate with SwiftUI. It includes a review of architectures

    Many thanks, but sadly I was not able to find such a channel.
    Any link?

    VIPER is way overkill for SwiftUI which introduces new architectural patterns for iOS

    Now, I have zero experience, but read some articles that pointed me to this direction:

    https://medium.com/geekculture/battle-of-the-ios-architecture-patterns-view-interactor-presenter-entity-router-viper-8f76f1bdc960

    https://www.raywenderlich.com/8440907-getting-started-with-the-viper-architecture-pattern

    https://www.programmersought.com/article/6871684149/
    https://www.programmersought.com/article/2081684152/
    https://www.programmersought.com/article/2709684151/

    It may be a bit of an overkill, but as far as I know, the separation will later proof to be worth it.
    I would play around with VIPER ...

  • edited July 2021

    This one is a good start (recommend watching sped up though)

    I’ve co-developed an app in the store with VIPER and even with UIKit it forced a huge amount of boilerplate split up across files for any small change. Also worked with a team that recently moved away from it with UIKit. I recommend patterns that make it easier to scale the architectural abstraction up and down appropriate to the complexity at hand in areas of your application. The video covers a simple case but provides some threads for further research.

    Realm is also ahead of Apple in terms of SwiftUI-idiomatic data store. SwiftUI is all about bindings which Realm does well.

    The upcoming Playgrounds is quite serious, I wouldn’t dismiss it so quickly

  • tjatja
    edited July 2021

    Ah, many thanks, @wahnfrieden
    I found this channel before, but as what you wrote, I was looking for "Realm" and not "MongoDB" which is the channel's name.
    Added to my watchlist! :smile:

    I may then be able to comment ...

    About Playgrounds, I will sure have a look at it, but cannot imagine to write any medium or larger amount of code on an iPad.
    I need multiple monitors and many windows to easily switch around between, even multiple "spaces".

    While I like using an iPad with keyboard and mouse, it is still not the same.
    But we will see - this comes with iOS 15, right?

  • edited July 2021

    Playgrounds is for mac

    MongoDB bought Realm a while back

  • tjatja
    edited July 2021

    @wahnfrieden said:
    Playgrounds is for mac

    Then, we talked about different topics :smiley:

    I only know Playgrounds from iPad (and you mentioned iPad above!) and did not even know that there is the same or something similar on the Mac.
    But why that may be better than Xcode is of course out of my knowledge.

    I now searched the App Store and found "Swift Playgrounds" for Mac.
    So far, it looks exactly like the iPad version.

    MongoDB bought Realm a while back

    I never heared either name, ever.
    Going to check what they do / offer.

    Thanks a bunch!

  • wimwim
    edited July 2021

    @tja said:
    Why is there no default for all targets of all projects instead, Apple?

    They aren't interested in encouraging people to stick with free accounts. Basic marketing my friend.

    If I worked for Apple at Xcode, this would have been fixed on my first day!

    Unless the marketing VP and/or CFO has more power than the engineering VP. Which is undoubtedly the case.

    QUESTION: Or mabye, I am just as stupid as usual and did not find the default setting for projects?

    But, it is very important to set "None": As @wim explained, you should not sign with your free developer ID, as those are restricted to a certain number of builds (for macOS only?) per week! And you may need to wait a week otherwise.

    It's not the number of builds, but the number of new projects that are signed. You can build each project and deploy it to your devices to your heart's content once you have a signing certificate for it.

    As I would like to test any crappy App of mine on a real iPad, I even think about paying the developer fee to Apple - even years before I may be able to push something to the App Store, just for the convenience.

    You can. You just can't fire up a whole bunch of new projects all at the same time. There is also a workaround by re-using a signing certificate from another app. I forget the details of how to do this, but it has to do with turning off the "Automatically manage signing" setting or something.

  • @wim said:

    @tja said:
    Why is there no default for all targets of all projects instead, Apple?

    They aren't interested in encouraging people to stick with free accounts. Basic marketing my friend.

    I'm always so naive.

    But, it is very important to set "None": As @wim explained, you should not sign with your free developer ID, as those are restricted to a certain number of builds (for macOS only?) per week! And you may need to wait a week otherwise.

    It's not the number of builds, but the number of new projects that are signed. You can build each project and deploy it to your devices to your heart's content once you have a signing certificate for it.

    Oh, OK. Thanks for the clarification!

    As I would like to test any crappy App of mine on a real iPad, I even think about paying the developer fee to Apple - even years before I may be able to push something to the App Store, just for the convenience.

    You can. You just can't fire up a whole bunch of new projects all at the same time. There is also a workaround by re-using a signing certificate from another app. I forget the details of how to do this, but it has to do with turning off the "Automatically manage signing" setting or something.

    I will try to seek this out, many thanks!

  • tjatja
    edited July 2021

    May I ask for your help, @wim ?

    I tried what you implied, that I can sign an App for my own iOS device, even when not paying for the Apple developer program. With this, I mean that i can run the App on my own iPad.


    When I select my "Team" instead of "None" and still have "Automatically manage signing" enabled, Xcode says the following:

    "Failed to create provisioning profile.
    There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it."
    With a button: "Try Again"
    

    And:

    "No profiles for '<Team ID>.<App Name>' were found
    Xcode couldn't find any iOS App Development provisioning profiles matching '<Team ID>.<App Name>."
    

    1)

    For the first message, I connected an iPad to the Mac, choose "Trust" on both of them and hit "Try again".
    But that changed nothing.
    But I am not sure what is meant by "select a device" ...

    I then tried to add the device manually on the developer website, but as it seems the required section is only available when paying.

    Did I probably missunderstood you again?
    Can I push an App to a local device for testing?


    2)

    For the second message, I read about 10 websites after a Google search, but of all them do not seem to work - at least not for my free account.
    But I cannot find to way to create such an "iOS App Development provisioning profile" for the App.

    For example: https://community.neptune-software.com/documentation/create-all-the-needed-ios-certificates

    On the Mac, I found this file, that I created initially when installing Xcode:

    <App Name> Certificate.p12
    

    This could probably be such a profile, but I have no idea what to do with it, how I did create it, or how to check "my" list of profiles or how to add it to Xcode, or whereever.

    And Apple ... does not seem to document any of this at all.
    At least, I cannot find it.

  • wimwim
    edited July 2021

    Jeeze @tja, I dunno. It was easy and intuitive enough when I did it that I didn't bother documenting or remembering what I did. It took no time at all. I registered my iPad and my iPhone, and even set them up for wireless deployment so I don't have to plug them in. I don't have any more devices to set up so I can't easily retrace my steps.

    There are enough developers here, so hopefully one can walk you through it. If there's something fundamentally different about paid accounts then maybe they won't be able to. If so then let me know and I'll see about de-registering one of my devices so I can refresh my memory of the process.

  • tjatja
    edited July 2021

    @wim said:
    Jeeze @tja, I dunno. It was easy and intuitive enough when I did it that I didn't bother documenting or remembering what I did. It took no time at all. I registered my iPad and my iPhone, and even set them up for wireless deployment so I don't have to plug them in. I don't have any more devices to set up so I can't easily retrace my steps.

    Hehe, I was fearing that :-D

    There are enough developers here, so hopefully one can walk you through it. If there's something fundamentally different about paid accounts then maybe they won't be able to. If so then let me know and I'll see about de-registering one of my devices so I can refresh my memory of the process.

    I think that most will be paying developers, so not having this problem.
    And thanks, but do not go the hard road for me! But thanks for this offer!

    I will seek and try some time more ... and probably start paying when I cannot find a solution.
    All those problems take a lot of time, nerves and eat my motivation ...

  • tjatja
    edited July 2021

    I found and fixed it!

    After reading https://learnappmaking.com/how-to-create-a-free-apple-developer-account/ I just needed to select the iPad Air in the "Windows / Devices and Simulators" menu, configure it include the using the Network, then select it as iOS target for the project and then run Try Again again.

    Also, I needed to enter "Device Management" in the "General" Settings of the iPads and click the "Trust" button of the App profile.

    So simple steps, but without knowing them ... :-(

    EDIT: Also, I think that me, trying around with lots of project from github will have broken the original settings.

  • I was checking out lots of tutorial and introductions to Swift and SwiftUI, but I reallty think that the SwiftUI primer from Apple is a very very valid start:

    https://developer.apple.com/tutorials/swiftui

    It introduces many topics one after the other and offers great downloads to explore on yourself.
    Just saying :-)

  • So far, I really don't like the Optionals, their Forced Unwrapping, Optional Binding and Implicitly Unwrapped Optionals from Swift.

    Seems horrible bloated and complicated, esp. as the test-variables can only be used in their small scope and need to be copied to another variable, if you want to use them outside / later.

    var s:String = "1"
    
    if let n = Int (s) {
            print (n)
    } else {
            print ("n unknown")
    }
    print ("n unknown")
    

    Just some random comment :D

  • tjatja
    edited August 2021

    Also, the syntax is broken, IMHO.

    This works:

    var N:Int
    N=1
    print(N)
    

    But this does not work:

    var N:Int
    N=-1
    print(N)
    

    ->

    test.swift:4:2: error: cannot find operator '=-' in scope
    N=-1
     ^~
    

    So, you better never ever should use "=" but always " = "
    The syntax should better enforce this!

    The same goes for the Type Inference, where Swift encourages you to be lazy with your variable declarations, ommiting the concrete type.
    But that may very well be wrong in a context and also seems to burden some stress on the compiler.
    It would be way better to drop that concept and enforce strict declarations!

  • What I really hate in Xcode and Swift, are the crippled compiler directives.

    You can do some #if #else and #endif, but there is seemingly no way to simply define such a flag!

    For this, you need to change some hidden obscure setting named "Active Compilation Conditions" in Xcode, which I found after searching for an hour.

    But you cannot just write "#define X" in a source file.
    WHY?!?

    That's so annoying.

    ...

    Just needed to rant :smiley:

  • @tja said:
    So far, I really don't like the Optionals, their Forced Unwrapping, Optional Binding and Implicitly Unwrapped Optionals from Swift.

    Seems horrible bloated and complicated, esp. as the test-variables can only be used in their small scope and need to be copied to another variable, if you want to use them outside / later.

    var s:String = "1"
    
    if let n = Int (s) {
            print (n)
    } else {
            print ("n unknown")
    }
    print ("n unknown")
    

    Just some random comment :disappointed:

    The usage pattern you want is with a guard statement. So like this,

    guard let ds = self.data_source else { return }

    You can put whatever you want in the scope where the return statement is, error logging, etc. In this example then, the ds is available in the enclosing scope of the guard statement.

    This also gets combined up with defer statements to handle error situations in a clean way.

    Swift actually has a pretty rich set of conditional compilation statements that can be useful. Guard, defer, and the compilation stuff is all on this page in the Swift language reference;

    https://docs.swift.org/swift-book/ReferenceManual/Statements.html

    I do agree about type inference. There are too many times in Swift where it doesn't work and I think it has an impact on code readability. Type inference can cause problems even in Haskell and Haskell is much better at it than Swift in my experience. But, I think it's there because of wanting to support some functional programming patterns and it does really help in reducing the complexity of reading closures where the types involved are usually clear.

  • Thanks, @NeonSilicon
    I get more and more comfortable with Swift, but it will never be a favorite of mine.
    Coming from C, it is so bloated ;-)

    And yes, there is an immense amount to read and learn.
    But often, things are not documented very well.

    You can see that in many stackoverflow questions, where people really tried to go by the docs, but it is still not clear what can and should be done and they need help from others.

    But OK, that is often not about the language itself, but about something like SwiftUI.

    For example, I cannot find anything about a way to disable the header that is shown when using a TextEditor View in a NavigationView. It only get's visible when you scroll down in the TextEditor, but it uses space.
    Or how to get rid of the header when using a Document App.
    I tried to find anything about, but could not, so far.
    Maybe I just need more experience to understand the documentation ... but it would be great to see more examples in those docs. And some best practice advice.

    And about type inference, I started to write down the full declaration everywhere.
    It helps me and the compiler to do so, esp. as I don't plan to use functional programming.
    Most of the time, I prever functions over closures anyway :smiley:

    I also always preferred Python over Perl for the same reason: Perl likes to offer 20 ways and syntax variants to do one thing. I hate that.

    Don't take me too serious ... I will sure complain again about this or that ;-)

  • edited September 2021

    Forgive the silly question, but can’t find an answer other than Reddit type forums and not 100%

    Are self coded and side loaded iOS apps limited to 1 week or can you make them longer?
    If it is 1 week, can this be circumvented with apple business manager for deployment as “internal apps” for a business through an MDM? (I have both of these)

  • @AlmostAnonymous said:
    Forgive the silly question, but can’t find an answer other than Reddit type forums and not 100%

    Are self coded and side loaded iOS apps limited to 1 week or can you make them longer?
    If it is 1 week, can this be circumvented with apple business manager for deployment as “internal apps” for a business through an MDM? (I have both of these)

    If the app is signed with a valid team certificate that the device is provisioned to work with, then it lasts longer than a week. I think it lasts until the certificate needs to be renewed but I can't remember for sure.

    I use an open source medical application on an iPhone and Watch and it goes for months at least without having to rebuild it. This is a standard testing build for a team. It's not a special business internal build.

  • Is your app sideloaded via Xcode? Or you have it deployed to you via MDM?

  • @AlmostAnonymous said:
    Is your app sideloaded via Xcode? Or you have it deployed to you via MDM?

    I compile it from source with Xcode and deploy it to the device from there.

  • Thank you for you input. Somehow I knew it it would be you replying. ;)

Sign In or Register to comment.