AudioKit / AudioKitSynthOne

AudioKit Synth One: Open-Source iOS Synthesizer App
http://audiokitpro.com/synth
MIT License
1.67k stars 217 forks source link

XCode 12 Ipad IOS 14.4 Swift 5.2.1 compile problems. #172

Closed simontuffs closed 3 years ago

simontuffs commented 3 years ago

I'm going up the AudioKitSynthOne learning ramp, and so far I have managed to build it on XCode 11.3.1, and deploy on an IPad 8th generation under IOS 14.4. I had to patch the XCode devices Developer/Platforms/IPhoneOS.patform/DeviceSupport /14.4 by copying in the same from XCode12, and it does upload to the device and run, but I am unable to debug.

When I switch to XCode 12 and build I get the following errors:

module compiled with Swift 5.1.1 cannot be imported by the Swift 5.3.2 compiler: /Users/simontuffs/github/AudioKit/AudioKitSynthOne/Pods/AudioKit/iOS/AudioKit.framework/Modules/AudioKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule

Adding 5.1.1. to the XCode toolchain gets me this error:

The Swift standard library from the toolchain cannot be used on devices.

Select a macOS or simulator run destination instead, or use a different toolchain that only provides the compiler.''

I am stuck. The build process for AudioKitSynthOne is very complex, I have been peeling away at the onion for three days now, and with the success on deployment I am encouraged to continue, the overall software synthesizer is superb, and I am looking forward to getting into development and doing fun things with it.

But the XCode chain, Swift incompatibilities are awful: granted this my first time on Xcode+Swift, but there appear to be systemic problems with version compatibilities that somebody must know how to overcome, but I can't figure them out.

Any suggestions appreciated.

BTW: to deploy on the Ipad I had to use the automatic certificate generation trick, and delete the duplicate certificate that expires in 2023 and replace it with the 2030 cert. This took some figuring out. Also, it's important to make sure you use the same bundle identifier for the OpenSignal and AudioKitSynthOne targets otherwise Xcode goes into a mode of ping-pong reverting the certificates between the two, and does not stabilize.

I'm happy to write up the whole process to get running at this point on XCode 11.3.1/IPad8/IOS14.4, if I can get the code running on XCode 12, otherwise it seems I will have to wait for somebody else to figure it out.

analogcode commented 3 years ago

Hi Simon –  Yes, you are correct. There are a lot of dependencies and Synth One might not be a good intro project for AudioKit. A better entry point maybe the Cookbook https://github.com/AudioKit/Cookbook or for a complete app example that's in the app store: https://github.com/AudioKit/AUv3-Example-App

simontuffs commented 3 years ago

hey thanks Matt: I understand that I'm taking the hard path, but I really do want to bootstrap the synth into hardware, then contribute back to the project. I'm good to go with the Xcode 11 build on ipad, and debug using simulators, since the simulators work really well except for the multi-touch keyboard, and I was able to plug in a midi keyboard and map it to the synth using the audio-midi controller. I will probably continue to barge down this path, because I'm stubborn and it happens to be a good way to learn the technology stack. We learn more from failure, as it were.