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.

Strange error message on Mac, latest Big Sur

tjatja
edited July 2021 in App Development

I started to dabble around with Xcode ...

Today, I ran "git clone ..." on some github repository and got the following messages:

objc[3694]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1ec6e7ad8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x115ddc2b8). One of the two will be used. Which one is undefined.
objc[3694]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1ec6e7b28) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x115ddc308). One of the two will be used. Which one is undefined.

After that, I ran "xcodebuild" and got exactly the same error message:

objc[3702]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1ec6e7ad8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1161a82b8). One of the two will be used. Which one is undefined.
objc[3702]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1ec6e7b28) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1161a8308). One of the two will be used. Which one is undefined.

Something seems to be wrong ...
Googling around did not help much, pointing mostly to Flutter, which I don't have installed.

Anybody has an idea what could cause such messages?

It seems that I would need to remove one of those files or directories.

«1

Comments

  • Interestig is the following:

    $ ls /usr/lib/libauthinstall.dylib
    ls: /usr/lib/libauthinstall.dylib: No such file or directory
    

    This lib does not exist at all!

    The other file is there:

     $ ls /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    -rwxr-xr-x  1 root  wheel  6014480 Jan  1  2020 /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
    
  • It could be a configuration error in the project. But, there is this thread (very short) at the dev forums:
    https://developer.apple.com/forums/thread/676210
    The person that replied to this question is generally knowledgable on dev related issues.

    I saw some people mentioning a link between this particular library conflict and having Homebrew installed. I have no idea if this is a reliable piece of info though.

    I have had this type of conflict with some demo projects I've looked at. The error never caused the project not to work, but it is troubling to see.

    Are you on the beta of Xcode or the current release?

  • @NeonSilicon said:
    It could be a configuration error in the project. But, there is this thread (very short) at the dev forums:
    https://developer.apple.com/forums/thread/676210
    The person that replied to this question is generally knowledgable on dev related issues.

    I saw some people mentioning a link between this particular library conflict and having Homebrew installed. I have no idea if this is a reliable piece of info though.

    I have had this type of conflict with some demo projects I've looked at. The error never caused the project not to work, but it is troubling to see.

    Are you on the beta of Xcode or the current release?

    Ah, very interesting!
    I installed Xcode from the App Store, as the dummy I am :-)

    I have Homebrew not installed, but instead Mac Ports.
    I could understand the situation with some wild library that got installed wrongly or something, but one of the two logged libraries does not even exist!
    That makes it hard to fix the situation ...

    And no, it has nothing to do the with actual project!

    I can ente rmy Home-Dir, that is not even a git directory and just issue "git":

    mini:~ tja$ git
    objc[1668]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1fe3afad8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x115f6c2b8). One of the two will be used. Which one is undefined.
    objc[1668]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1fe3afb28) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x115f6c308). One of the two will be used. Which one is undefined.
    usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
    <...>
    

    Same behavior ...

  • I tried to trace what is happening here, but macOS seems too crippled to do such things anymore.

    Neither sc_usage, fs_usage, dtruss, ktrace or directly dtrace can help in any way I could find.

    Nothing works at all:

    mini:~ root# dtruss -f /usr/bin/git
    dtrace: system integrity protection is on, some features will not be available
    
    dtrace: failed to execute /usr/bin/git: (os/kern) failure
    

    And there is no simple strace or ptrace program.

    It seems, I need to reset the Mac.
    I just don't want to spend my time with trying to debug this.

    Still, this is frustrating!

  • The reported location of the conflicting libraries could be in a framework, not the actual machine. This would be even more likely to be true in projects with cross-compilation. The other thing that can make it difficult to trace these types of problems is that the library location that's reported could be in a sandbox that you can't directly see unless you take the time to search around through APFS mounts and locations in the caches in ~/Library.

    I tried to do a web search for this warning. The problem with getting decent hits is that almost everything is actually unrelated to the warning. The way the command line tools report back warnings in the build process makes it look like this warning is the issue in failed builds where the real issue is totally unrelated. Lots and lots of these types of threads relating to Dart/Flutter projects where the build fails for an unrelated reason but this is the last build warning that is seen before the build fails.

    I'd probably ignore the warning if the build is working. If the build is failing, look for a different cause of the failure. You could report the error to Apple like suggested in the one thread -- but I think we all have a feel for what good that would do.

    If you really want to track it down or feel like it might eventually cause a problem in your own project, I'd try seeing if it happens for builds for all platform/architectures. This particular library conflict seems to be related to building on M1 based machines, but that could be misleading again. But, that might help narrow down the source of the issue and if it might end up being an actual problem.

    If you want to check if the issue is still there using the betas of Xcode, you can have both the production version and the beta installed at the same time. I usually do that in the periods like right now where the transitions are happening. You just have to make sure that any builds for submission are done using the production Xcode. (You also end up needing to play around with xcode-select and related tools to do CLI stuff with the Xcode related tools.)

  • Thanks for the advice, @NeonSilicon

    I had the impression that it is a general system problem, probably from doing something wrong with Xode or some mistake when installing Mac Ports.

    But I now tried more binaries from /usr/bin and /opt/local/bin, but did not find any other such problems.

    So, it somehow indeed seems to be related to Xcode, as /usr/bin/git is the system path and not Mac Ports (which are in /opt/local/bin)

    I should probably not have installed Mac Ports (or Homebrew), whithout knowing for what exactly I may need it.
    Any Xcode tutorial seems to recommend installing Homebrew or Mac Ports, but why?!?

    So, I may start with uninstalling Mac Ports first and check if things get better.

    :-)

  • I think this issue probably isn't related to MacPorts (or Homebrew). It seems like it is an issue with the configuration of certain projects in Xcode but could be an actual issue in the deployments of the libraries on the M1 based Macs. Hard to tell really and the convoluted XML based project files for Xcode don't help in tracking down these issues.

    I use MacPorts for installing lots of unix-ish tools and generally don't have problems from using it. I personally don't like Homebrew because of their history of screwing up the filesystem and user permissions. I consider them a security risk. But, I don't think they are a root cause of this problem.

    This type of warning has been around forever with Obj-C libraries on the Mac. You can look at it as the Mac's version of DLL Hell or Java's CLASSPATH nightmares. The good thing is that, at least for the system level libraries, it's pretty innocuous in practice.

    I have worked at places though with a zero warning policy for code passing QA. This sort of stuff would have been so painful in those places. Then again, I don't think any of them would have put out a product on a consumer grade OS anyway. Makes me wonder what those places are doing today when we pretty much only have consumer grade OS's.

  • In case you are interested, @NeonSilicon

    I did the following:

    Save /opt/local as /opt/local.tar and then rm -rf /opt/local/*
    Uninstall the App Store Xcode
    Delete any of the strange projects I downloaded, trying to compiling them.

    Downloaded Xcode 12.5.1 and command line tools from the developert page.
    Moved the extracted Xcode to /Applications, run "xcode-select -switch /Applications/Xcode.app" and installed the command line tools with the GUI.

    Then, I started Xcode, which strangely did not ask to install anything else and after that. just tried this:

    mini:~ tja$ git
    usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
    <...>
    

    So, the problem is gone :-)
    And I don't have Mac Port or Homebrew installed - will only do so, when I have a conrete reason to do so.

    Now, I "just" need some basic project that I can try to compile to see if everything works.

  • I am interested in hearing what happens when you go to compile one of the projects that failed before. It would be really weird if the root cause were installing Xcode from the App Store instead of the dev download -- not impossible for sure, but really weird.

    I'd guess that the install of the CLI tools before the launch of Xcode covered all of the components that it needed, so no extra downloads.

    It's going to suck a bit if both MacPorts and Homebrew are having configuration issues. I have pretty much moved back to configuring and compiling most things by hand from source anyway, but MacPorts is pretty convenient for getting things installed fast.

  • I never found any Swift project that i could compile, @NeonSilicon

    I found "Swift-30-Projects", but when I look at ToDoTDD in it, it is 2 years old and for Swift 4 and will sure also not compile.
    https://github.com/soapyigu/Swift-30-Projects/tree/master/Project 04 - TodoTDD

    I read about architectures and found VIPER to be promising, but the example project also is way to old and did not compile.
    I learn best by doing, but am seeking tutorials now.

    If you know any github project that actually can be compiled, PLEASE give me the URL :-)

    About Mac Ports, without any experience with compiling stuff on Mac, I have no idea what would be needed from Mac Ports.
    I have git and a bash, that should solve most things, I hope :-)

  • tjatja
    edited July 2021

    I just created a new Multiplatform Document App project, compiled it - which worked - but already here, I see error messages:

    2021-07-25 19:34:33.691651+0200 DocumentApp[2914:116157] +[NSSavePanel _warmUp] obviated
    2021-07-25 19:34:48.152925+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp}
    2021-07-25 19:34:48.153635+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp}
    2021-07-25 19:34:48.154024+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit}
    2021-07-25 19:34:48.154109+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit}
    2021-07-25 19:35:19.517562+0200 DocumentApp[2914:117344] [scoped] handle 0: sandbox_extension_release error [22: Invalid argument]
    2021-07-25 19:35:19.517601+0200 DocumentApp[2914:117344] [scoped] <0x600000333840 file:///Users/tja/Documents/Untitled.exampletext>: internal sandbox error for <StopAccessing>
    

    Apple is so strange in everything.
    I really wonder how people manage to develop Apps.

  • I pretty much only use MacPorts for stuff that I would normally use in BSD or Linux. Given that, configuring and compiling these projects on macOS is pretty much the same as if you do it by hand on Linux or BSD -- hunt down the dependencies and keep everything organized in /usr/local. This usually works out pretty well. I do run into some issues with MacPorts doing compiles outside because the builds there often don't look for dependencies outside of /opt/local. This can be a pain.

    If you are wanting some Swift projects that compile easily to look at the structure and test your environment, one source is Apple. If you look at some of the videos in the Developer App, they will often have included projects that work. Game related stuff is a good place to look for Swift things that aren't SwiftUI. Sad truth is though that Apple is making this resource less useful in their moves to make their developer documentation more like standard useless stuff you'd expect out of a web library. Lots of their sample code has been moved in to the archived section of the website and is no longer maintained.

    If you want to look at a really simple pretty much all Swift AUv3 project, this is the example I put up exploring the possibility of doing an AUv3 without C++/Objective-C++

    https://github.com/NeonSilicon/Demo_Volume_AUv3

    The project should build OK. I wouldn't use any of the code in the project to do anything real though. Checkout the README for why I say that ;).

    There is a bug in the later versions of Xcode where it can't see some of the header files included in the bridging header until after you start a compile. If you see this error in Xcode, try to do the compile anyway and the error should disappear. (I say it's a bug in Xcode because it only does it sometimes and will come and go at different times and different versions of Xcode.)

  • @tja said:
    Apple is so strange in everything.
    I really wonder how people manage to develop App.

    Regarding all the "Apple-internal errors" popping up all the time while debugging my projects, I've long ago resorted to a custom log function that just prefixes everything with "SevenApp" and I then type "SevenApp" into the "Filter" field in Xcode because honestly, otherwise it's really hard to find MY debug messages among all of Apple's 😂

  • @tja said:
    I just created a new Multiplatform Document App project, compiled it - which worked - but already here, I see error messages:

    2021-07-25 19:34:33.691651+0200 DocumentApp[2914:116157] +[NSSavePanel _warmUp] obviated
    2021-07-25 19:34:48.152925+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp}
    2021-07-25 19:34:48.153635+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: MyID.DocumentApp}
    2021-07-25 19:34:48.154024+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit}
    2021-07-25 19:34:48.154109+0200 DocumentApp[2914:116157] [framework] CoreUI: Error Domain=NSCocoaErrorDomain Code=260 "RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit" UserInfo={NSLocalizedDescription=RunTimeThemeRefForBundleIdentifierAndName() couldn't find NSAppearanceNameAccessibilityVibrantLight.car in bundle with identifier: com.apple.AppKit}
    2021-07-25 19:35:19.517562+0200 DocumentApp[2914:117344] [scoped] handle 0: sandbox_extension_release error [22: Invalid argument]
    2021-07-25 19:35:19.517601+0200 DocumentApp[2914:117344] [scoped] <0x600000333840 file:///Users/tja/Documents/Untitled.exampletext>: internal sandbox error for <StopAccessing>
    

    Apple is so strange in everything.
    I really wonder how people manage to develop App.

    Many of Apple's templates for project types are a complete mess. Sometimes it makes sense because the missing pieces are really project dependent. But the current AUv3 templates in particular are really confusing -- multiple and redundant files in Swift or Objective-C, some are empty, and the whole result is just confusing.

  • @NeonSilicon said:
    If you are wanting some Swift projects that compile easily to look at the structure and test your environment, one source is Apple. If you look at some of the videos in the Developer App, they will often have included projects that work. Game related stuff is a good place to look for Swift things that aren't SwiftUI. Sad truth is though that Apple is making this resource less useful in their moves to make their developer documentation more like standard useless stuff you'd expect out of a web library. Lots of their sample code has been moved in to the archived section of the website and is no longer maintained.

    Now, I tried the most basic thing you could imagine: Create a new project, compile it without doing anything else and got the above error messages.

    Not even this works clean :-)

    If you want to look at a really simple pretty much all Swift AUv3 project, this is the example I put up exploring the possibility of doing an AUv3 without C++/Objective-C++

    https://github.com/NeonSilicon/Demo_Volume_AUv3

    I am too stupid for this :)

    I cloned it, pressed the "Play" button and a window popped up that asked me, which App to start, but I did not see your "Demo_Volume" and was not sure what to start :-)

    I found this:

    https://www.swiftdevjournal.com/make-a-markdown-editor-in-swiftui/

    It bases on the above minimal Multiplatform Document App and enhanced it with some packages.
    It looks like a good starting point ... if I did not get the error messages.
    Will still try around with this!

  • @SevenSystems said:

    @tja said:
    Apple is so strange in everything.
    I really wonder how people manage to develop App.

    Regarding all the "Apple-internal errors" popping up all the time while debugging my projects, I've long ago resorted to a custom log function that just prefixes everything with "SevenApp" and I then type "SevenApp" into the "Filter" field in Xcode because honestly, otherwise it's really hard to find MY debug messages among all of Apple's 😂

    Hehe, good idea! :-)

  • @tja said:

    @NeonSilicon said:
    If you are wanting some Swift projects that compile easily to look at the structure and test your environment, one source is Apple. If you look at some of the videos in the Developer App, they will often have included projects that work. Game related stuff is a good place to look for Swift things that aren't SwiftUI. Sad truth is though that Apple is making this resource less useful in their moves to make their developer documentation more like standard useless stuff you'd expect out of a web library. Lots of their sample code has been moved in to the archived section of the website and is no longer maintained.

    Now, I tried the most basic thing you could imagine: Create a new project, compile it without doing anything else and got the above error messages.

    Not even this works clean :-)

    If you want to look at a really simple pretty much all Swift AUv3 project, this is the example I put up exploring the possibility of doing an AUv3 without C++/Objective-C++

    https://github.com/NeonSilicon/Demo_Volume_AUv3

    I am too stupid for this :)

    I cloned it, pressed the "Play" button and a window popped up that asked me, which App to start, but I did not see your "Demo_Volume" and was not sure what to start :-)

    I found this:

    https://www.swiftdevjournal.com/make-a-markdown-editor-in-swiftui/

    It bases on the above minimal Multiplatform Document App and enhanced it with some packages.
    It looks like a good starting point ... if I did not get the error messages.
    Will still try around with this!

    The project is set to launch the AUv3 in a host app and attach the debugger to the running AUv3 instance that comes up first. So, if you select an AUv3 host from the list of apps and then select my example AU in the host, it should run and the debugger in Xcode should attach to the AU.

    The test host I usually use is available here, https://developer.apple.com/documentation/audiotoolbox/audio_unit_v3_plug-ins/incorporating_audio_effects_and_instruments
    In recent versions of this you do have to do this weird little thing where you need to select the instruments tab and then go back to the effects tab to get the AU you are trying to test to show up in the list. I have a little bit of a suspicion that this is somehow related to the disappearing AU problem on iOS.

    The Ju-X host is a light weight one that'll work too.

  • Also, if you code-sign the project, you can run it directly in a host on an iOS device if you have one setup for testing. The connection to the running iOS device in the debugger of Xcode is actually pretty nice.

    That AU host from Apple I linked to above should run in the simulators too and let you test AU's on the simulator. But, there have been some issues recently with getting it to run correctly in the simulator. If you want to develop AUv3 though, it can help to get this working on the simulator for quick testing.

  • tjatja
    edited July 2021

    Many, many thanks, @NeonSilicon

    I do not see me developing anything audio-related.
    Seems to be wayyyy too complicated for me :smile:
    So I think it is not required to get your App running in the Simulator or to try the same with a connected iDevice.

    But I would like to try around with document based Apps, using document providers, Open In Place, iCloud and so on.
    This way, I could also just develop things on the Mac and only later try things on iDevices.
    At least, thats my idea for now :smiley:

    So, the website I quoted above seems to be a good base to start things.

  • @tja said:
    Many, many thanks, @NeonSilicon

    I do not see me developing anything audio-related.
    Seems to be wayyyy to complicated for me :smile:
    So I think it is not required to get your App running in the Simulator or to try the same with a connected iDevice.

    But I would like to try around with document based Apps, using document providers, Open In Place, iCloud and so on.
    This way, I could also just develop things on the Mac and only later try things on iDevices.
    At least, thats my idea for now :smiley:

    So, the website I quoted above seems to be a good base to start things.

    Yeah, it looks good from the parts I read. Are you wanting to use SwiftUI in particular?

    Surprisingly, Apple's documentation on browser based apps isn't totally abysmal.

    The main links here are actually helpful,
    MacOS:
    https://developer.apple.com/documentation/appkit/documents_data_and_pasteboard/developing_a_document-based_app/

    iOS:
    https://developer.apple.com/documentation/uikit/view_controllers/building_a_document_browser-based_app
    https://developer.apple.com/documentation/uikit/view_controllers/building_a_document_browser_app_for_custom_file_formats/
    https://developer.apple.com/documentation/uikit/view_controllers/adding_a_document_browser_to_your_app

    I don't know if you saw this sample code from Apple for a SwiftUI based version,
    https://developer.apple.com/documentation/swiftui/building_a_document-based_app_with_swiftui/
    I haven't tested that one at all though because I don't like using SwiftUI. There're some sessions from the last couple of WWDC's that go over using SwiftUI for document based apps that might be useful after you get what you can out of the article you are using now.

  • tjatja
    edited July 2021

    @NeonSilicon said:

    @tja said:
    Many, many thanks, @NeonSilicon

    I do not see me developing anything audio-related.
    Seems to be wayyyy to complicated for me :smile:
    So I think it is not required to get your App running in the Simulator or to try the same with a connected iDevice.

    But I would like to try around with document based Apps, using document providers, Open In Place, iCloud and so on.
    This way, I could also just develop things on the Mac and only later try things on iDevices.
    At least, thats my idea for now :smiley:

    So, the website I quoted above seems to be a good base to start things.

    Yeah, it looks good from the parts I read. Are you wanting to use SwiftUI in particular?

    You are asking things :-D

    I have no idea, of course ...
    I just read that SwiftUI is the new recommended way to create GUIs on Apple devices.

    You prefer using "browser-based" over SwiftUI?
    Why actually? Would SwiftUI not be better, faster and more supported?

    EDIT: I think, I misunderstood - this is just about Document Apps, not browser Apps, right?

    I added those to my endless list of URLs ;-)

    I don't know if you saw this sample code from Apple for a SwiftUI based version,
    https://developer.apple.com/documentation/swiftui/building_a_document-based_app_with_swiftui/
    I haven't tested that one at all though because I don't like using SwiftUI. There're some sessions from the last couple of WWDC's that go over using SwiftUI for document based apps that might be useful after you get what you can out of the article you are using now.

    Noo, and it's directly from Apple - going to save, read, download an test!
    :-)

  • @tja said:

    @NeonSilicon said:

    @tja said:
    Many, many thanks, @NeonSilicon

    I do not see me developing anything audio-related.
    Seems to be wayyyy to complicated for me :smile:
    So I think it is not required to get your App running in the Simulator or to try the same with a connected iDevice.

    But I would like to try around with document based Apps, using document providers, Open In Place, iCloud and so on.
    This way, I could also just develop things on the Mac and only later try things on iDevices.
    At least, thats my idea for now :smiley:

    So, the website I quoted above seems to be a good base to start things.

    Yeah, it looks good from the parts I read. Are you wanting to use SwiftUI in particular?

    You are asking things :-D

    I have no idea, of course ...
    I just read that SwiftUI is the new recommended way to create GUIs on Apple devices.

    This is basically correct, yes.

    You prefer using "browser-based" over SwiftUI?
    Why actually? Would SwiftUI not be better, faster and more supported?

    EDIT: I think, I misunderstood - this is just about Document Apps, not browser Apps, right?

    Yeah, Apple's main structure for most apps is to use the Document Browser structures. This is how GarageBand is structured for example.

    I added those to my endless list of URLs ;-)

    I don't know if you saw this sample code from Apple for a SwiftUI based version,
    https://developer.apple.com/documentation/swiftui/building_a_document-based_app_with_swiftui/
    I haven't tested that one at all though because I don't like using SwiftUI. There're some sessions from the last couple of WWDC's that go over using SwiftUI for document based apps that might be useful after you get what you can out of the article you are using now.

    Noo, and it's directly from Apple - going to save, read, download an test!
    :-)

    Hopefully they'll prove useful for you.

    Regarding SwiftUI, it's pretty much Apple's way of making applications that are structured like web apps -- part of the new trend that seems to regard MVC as some sort of evil or something. There are some nice things that come out of using a declarative programming approach like SwiftUI uses, but I personally think it causes problems with structure for large scale or complex programs whereas MVC handles them very well. I've yet to see Apple actually produce any large applications using SwiftUI for example. Also, there are still lots of libraries from UIKit and AppKit that don't have SwiftUI counterparts.

    But, it is part of the general trend for developing UI based applications and Apple is positioning it as the way to develop at least many types applications on their platforms. Actually, if you want to do their new Widget stuff, I think you have to use SwiftUI.

  • tjatja
    edited July 2021

    I would like to create an App that I can use to store URLs, text-snippets and images, possibly adding encryption and grouping and linking stuff together.
    Not sure how to start this first ;-)

    I downloaded the project you mentioned, from https://developer.apple.com/documentation/swiftui/building_a_document-based_app_with_swiftui/

    Could not compile it so far.

    The error is:
    Signing for "DocumentBasedApp (macOS)" requires a development team. Select a development team in the Signing & Capabilities editor.

    But I did check "Automatically manage signing" and this should do this automatically!
    Still, I get the following:

    This is all so complicated and I cannot find any documention.

    I can understand that Apple wants you to register when actually pushing an App to the App Store, but why all this, when you just want to compile something?

    I hope that I can gather the strength required to get just SOMETHING to compile at all.

    And this is before I even start to write my first own line of code :-D

    EDIT: I started to dream about the old "./configure && make all" that just did everything, on any platform.

  • @tja - change Team to "none". You won't be able to deploy to any other devices, but should be able to compile and run in the simulator

    The developer account is needed because Apple is issuing a signing certificate the way you have it configured. Any issuer is going to want to have some control and visibility into who they're issuing certificates to, or they become meaningless.

    EDIT: I started to dream about the old "./configure && make all" that just did everything, on any platform.

    Yeh, and you just woke up one morning with the intuitive knowledge of how to do that? C'mon, expecting to not have a learning curve with a new language and IDE is just silly. ;) You can do this. B)

  • P.S. If you do start signing projects, be aware that the free developer account only allows you to create a limited number of signing certificates per week. My first roadblock with Xcode was I went ahead and started signing Demo and Tutorial projects all over the place, then found I couldn't go any further for about a week. I finally read somewhere that you can re-use a signing certificate, but by then had discovered the "None" developer team workaround.

  • @wim said:
    P.S. If you do start signing projects, be aware that the free developer account only allows you to create a limited number of signing certificates per week. My first roadblock with Xcode was I went ahead and started signing Demo and Tutorial projects all over the place, then found I couldn't go any further for about a week. I finally read somewhere that you can re-use a signing certificate, but by then had discovered the "None" developer team workaround.

    Yeah, I did this same thing and ended up having to use one project to cram more and more stuff into to learn on before I figured out the "none" thing.

    Another thing I did was make the mistake of not having the build system automatically handle signing on my first project. It made going back and forth between dev builds and release builds a total pain. It took me months to figure out how to fix that issue without breaking the project.

  • tjatja
    edited July 2021

    @wim said:

    EDIT: I started to dream about the old "./configure && make all" that just did everything, on any platform.

    Yeh, and you just woke up one morning with the intuitive knowledge of how to do that? C'mon, expecting to not have a learning curve with a new language and IDE is just silly. ;) You can do this. B)

    No, but it was explained in any and all README files for most of the software and it was easy to deduce that running "configure" and then "make all" was some good start ;-)
    And my last try with Flutter on Windows was also relatively easy.

    It is way more complicated with Xcode, and I try to read many tutortials, but I find few things from Apple itself and many of the other sites have outdated information.

    So, many many thanks for the "None" hint!

    In the evening and tomorrow, I can try to continue my journey :-D

  • tjatja
    edited July 2021

    I used "None" as development team for both macOS and iOS targets and set "Signing Certificate" to "Sign to Run Locally" for macOS.

    After that, I could compile and run the macOS version!
    Fantastic :smile:

    I then switched the target over to iOS, selected an iPad Pro 9.7 and ... bammm, it compiled and started the simulator!
    I am sooo happy :smiley:

    But the same message appeared again, even if only as warning (not an error):

    Signing for "DocumentBasedApp (iOS)" requires a development team. Select a development team in the Signing & Capabilities editor.
    

    I can now start to play around with this project :smiley:

  • tjatja
    edited July 2021

    Just to try this, I changed "None" to my developer ID for iOS, and got other warnings (not errors):

    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.
    

    It seems, using my ID also changed the compilation to a "real" one ...
    I will later try to connect a device.

    The other message was:

    No profiles for 'com.example.apple-samplecode.building-a-document-based-app-with-swiftui4H939Z98M6.ios' were found
    Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.apple-samplecode.building-a-document-based-app-with-swiftui4H939Z98M6.ios'.
    

    This is just because this is the the default profile. I will later try to find out, what to set in this field.

    I definitely need a Xcode primer for dummies with just the basics - what needs to be done to compile a project and how to best configure Xcode and a new project :-D

    Did not find such a thing so far ...
    But maybe this is already enough for now :smile:

    Thanks again!

  • Now imagine how exciting all this becomes when you actually DO want to deploy to the App Store, and need "entitlements" from Apple, and have to upgrade your Xcode (12 GB download) AND macOS (another 12 GB download) for every point update of iOS (with the added "bonus" that the latest Xcode never actually supports deploying to a device running the latest iOS (I'm not kidding!)).

    Good stuff! ;)

Sign In or Register to comment.