-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build iOS/MacOS with Project Catalyst and XCode 11 #268
Comments
The project builds for macOS without the Obj-C audio unit and manager. The audio unit might be too old or other maintenance needs to be done.
enohp ym morf tnes
-----------
Dan Wilcox
danomatika.com
robotcowboy.com
… On Jun 16, 2019, at 3:55 AM, Seth ***@***.***> wrote:
I'm curious if there are any insights on how we might add libpd to both iOS and MacOS using the new project catalyst feature Apple announced. Trying to build libpd for MacOS using XCode 11 and catalyst gives some error.
Has anyone else tried this yet or is it too early?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I can confirm that libpd works the same on Xcode 11 and iOS13/MacOS Catalina, however as of iOS 13 Inter App Audio is deprecated in favour of AUv3. |
Thanks virusys. I’m specifically referring to the new UIKit for Mac though. So not building for Mac target specifically and instead using the same iOS codebase for Mac which is the new feature that Apple announced.
…Sent from my iPhone
On Jul 26, 2019, at 8:33 AM, virusys ***@***.***> wrote:
I can confirm that libpd works the same on Xcode 11 and iOS13/MacOS Catalina, however as of iOS 13 Inter App Audio is deprecated in favour of AUv3.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I am actually trying the same. While I (still) get audio on my iPad with the Catalyst project, I get just a crackle sound when the app starts, but then no further audio. These are the reported logs: [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000273080> ... |
Ah, well, just tried with PdTest01 demo project and it instantly ran (after adding the Micro key) on my mac via Catalyst ... cool :) |
I get errors in "AudioHelpers.m" when trying to compile with Catalyst. I'm not sure if it's due to me using cocoapods though. |
It might be releated to cocoapods indeed. I just found out that the PdTest01 demo project does not work on my Mac anymore, when I move the PD file out of the resources folder, to the bundle folder, where my PD files are in all my other projects. So maybe Catalyst Macs apps need their resources offered in certain structure, PD files in the Resources folder in this case ? |
@o-g-sus, I don't see how you're even able to compile. I checked out both the libpd repo and the pd-for-ios repo, opened the xcode project, and enabled Mac catalyst and it won't compile. It errors in "AudioHelpers.m." I tried creating an xcframework which combines the ios/osx/simulator libraries into a framework to work cross platform, but was unable to get a build working for catalyst. https://medium.com/swift-sections/xcframeworks-afd0b151d111 |
Hm, which errors do you get? |
The iOS project builds. Once you select the checkbox to build for Mac
catalyst and try to build for Mac, it'll error since it's trying to use the
iOS library on Mac which has different calls than the Mac library. It needs
to use the Mac library.
Generally this would be done by only include the mac library for Catalyst
and Mac builds and iOS library for iOS builds OR build a xcframework which
bundles everything into one framework that automatically picks the right
one for the right deployment target.
…On Sun, Jul 5, 2020 at 12:46 PM Oliver Greschke ***@***.***> wrote:
Hm, which errors do you get?
Could you compile for iOS at least?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#268 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABR253QOD5NMVRIMADA5ALR2DKAZANCNFSM4HYQFLNQ>
.
|
Experienced this issue today with a libpd project using Cocoapods (errors in |
If we can figure out how to create an xcframework, that'd be great.
Ultimately, for my Catalyst app, I ended up just adding libpd source to my
workspace as a project dependency and then added the OSX version to
Catalyst and iOS build to iOS and it worked. However, being able to use
cocoapods or even SPM would make it much easier.
…On Thu, Oct 8, 2020 at 10:39 AM virusys ***@***.***> wrote:
Experienced this issue today with a libpd project using Cocoapods (errors
in AudioHelpers.m as @cerupcat <https://github.com/cerupcat> mentioned).
Has it been decided what the best path forward would be in terms of
modifying the project file/xcframeworks? I'm available to take a look at
this if needed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABR254V6O5VESKPXDZX4H3SJX2NHANCNFSM4HYQFLNQ>
.
|
@cerupcat Do you happen to have a working blank sample project with that setup you'd be willing to share? I'm working on a client project right now that wants this done "as fast as possible" — but I will eventually look into the xcframework at some point for my personal projects. |
I don't have a blank project that I can easily share right now.
If you drag the libpd project file into your project you can make the libpd
project a dependency.
In the main Xcode Project, after dragging in the libpd project, add it as a
dependency in project Settings > Build Phases > Dependencies.
Then in project settings > Build Phases > Link Binary with Libraries, add
libpd-ios.a to iOS only and lipd-osx.a to MacOS only.
Lastly, in the libpd project select libpd-ios target > Build Settings >
Supports Mac Catalyst = YES
Do the same for the libpd-osx target.
ᐧ
…On Wed, Oct 21, 2020 at 7:59 AM virusys ***@***.***> wrote:
@cerupcat <https://github.com/cerupcat> Do you happen to have a working
blank sample project with that setup you'd be willing to share? I'm working
on a client project right now that wants this done "as fast as possible" —
but I will eventually look into the xcframework at some point for my
personal projects.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#268 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABR253DVCJLJFBTBSG5UH3SL3ZLZANCNFSM4HYQFLNQ>
.
|
No worries at all — thank you for your instructions! |
Hi again — I managed to setup a Catalyst project in the way @cerupcat described, but I was unaware of issue #93 (I guess up until now all of my libpd work has been on iOS 🙃). @o-g-sus You were able to get |
It was actually fairly straightforward to adapt https://drive.google.com/file/d/1-8aDYEQSxaFgxzS2s9FRmTTBYi6rTZks/view?usp=sharing |
It might be more useful to contribute an example project either to this repo or to a "pd-for-mac" repo, similar to the "pd-for-ios" repo, via a Pull Request. |
Sounds good, I can contribute what I have but I'm currently experiencing this issue when unplugging/switching audio devices: thestk/rtaudio#194. In the meantime I have been trying other strategies; but had no luck so far trying to import |
FYI: As far as I know, neither RtAudio nor portaudio support dynamic device hot-plugging. I'd suggest using a different solution like Novocaine or rolling your own using CoreAudio directly. |
@danomatika Thanks for that suggestion! — I cloned Novocaine and was able to get their sample projects to run except I ran into this error if I try to start the Novocaine audio manager in either "iOS" or "Mac" mode within my Catalyst project; exiting the app on launch:
Looking at their repo it seems like the latest updates were around 4-5 years ago so I feel like they didn't have Catalyst in mind as a target — I feel like a lot of these issues stem from Catalyst being its own unique platform which is essentially just trying to emulate iOS on the Mac. I've started some work trying to setup my own Audio Unit handler but I'm experiencing similar issues and its taking more time than I currently can devote to this project — I'll file a bug report on the Novocaine repository and if I make any more progress on my CoreAudio code down the line I'll post it here 👍 |
Well, if Novocaine is out of date, then some other CoreAudio wrapper. My point was mainly that, unless you add functionality to RtAudio or Portaudio, they are not going to handle your use cases as is. |
@danomatika Cool, thanks again for confirming the lack of hotplug functionality; forgot to mention that in my last comment! |
I'm curious if there are any insights on how we might add libpd to both iOS and MacOS using the new project catalyst feature Apple announced.
There is a new XCFramework support in Xcode 11 for distributing frameworks for multiple platforms (specifically UIKit for Mac) that would be super useful for clients porting their iPad apps to macOS. I imagine, creating this would solve the issues currently seen when trying to build UIKit for Mac.
Has anyone else tried this yet or is it too early?
The text was updated successfully, but these errors were encountered: