standalone_ios.h
A plugin's standalone, as an iPhone and iPad app.
#include <sonore/standalone_ios.h>- 1type
- 17other declarations
- Guides: Getting started, Platforms and formats
On this page
Design notes
Included by standalone.h on iOS, where it is runInteractive: the same App every platform's standalone runs -- the plugin's Instance, processBlock, the parameters and their state -- under UIKit instead of a desktop window. main() is still standalone.h's, so the offline modes (--verify, --render) work as they do everywhere, which is how CI's simulator checks the app's own binary; with none of them, runInteractive hands the process to UIApplicationMain and an app delegate registered here at run time (no Objective-C source, as everywhere in the SDK).
- The editor fills the screen inside the safe area -- clear of the notch, the Dynamic Island and the home indicator -- and follows a rotation. The same choice every format makes: the plugin's page in a WKWebView when it has one, else the SDK-drawn native editor (gfx/window_uikit.h), whose on-screen keyboard a finger plays.
- Sound runs while the app is in front. RemoteIO under the app's AVAudioSession (audio_ios.h); an interruption -- a call -- stops it and its end restarts it.
- An effect hears the microphone once the user allows it, and only while the sound goes to headphones or an interface: through the speaker the microphone would hear the effect and howl. The permission is asked for at the first launch; NSMicrophoneUsageDescription, which iOS requires before it will ask, is in the Info.plist sonore_add_standalone writes.
Types 1
The app's one of everything: the App the runInteractive call was given, the output, and the views the editor lives in. Main thread only.
Functions 17
- fn
inline Runtime& rt()standalone::iosapp::rt · standalone_ios.h:61 - fn
inline bool isEffect()standalone::iosapp::isEffect · standalone_ios.h:66 - fn
inline void stopSound()standalone::iosapp::stopSound · standalone_ios.h:68 - fn
inline void startSound()standalone::iosapp::startSound · standalone_ios.h:84 - fn
inline void updateInput()The microphone opened or closed for an effect, by the permission and the route (the file comment says why the route).standalone::iosapp::updateInput · standalone_ios.h:99 - fn
inline void clockTick(CFRunLoopTimerRef, void*)Twice a second, on the main run loop: a lost route, the permission's answer arriving, headphones in or out.standalone::iosapp::clockTick · standalone_ios.h:127 - fn
inline void layoutEditor()The editor, into the container, at the container's size: opened the first time, resized after.standalone::iosapp::layoutEditor · standalone_ios.h:144 - fn
inline void vcLoadView(id self, SEL)standalone::iosapp::vcLoadView · standalone_ios.h:176 - fn
inline void vcViewDidLayoutSubviews(id self, SEL)The container follows the safe area; the editor follows the container.standalone::iosapp::vcViewDidLayoutSubviews · standalone_ios.h:192 - fn
inline BOOL vcPrefersStatusBarHidden(id, SEL)The status bar off: the editor is the whole screen there is.standalone::iosapp::vcPrefersStatusBarHidden · standalone_ios.h:206 - fn
inline BOOL vcPrefersHomeIndicatorAutoHidden(id, SEL)The home indicator dims when it is not touched, over an instrument.standalone::iosapp::vcPrefersHomeIndicatorAutoHidden · standalone_ios.h:208 - fn
inline Class controllerClass()standalone::iosapp::controllerClass · standalone_ios.h:210 - fn
inline BOOL didFinishLaunching(id, SEL, id, id)standalone::iosapp::didFinishLaunching · standalone_ios.h:230 - fn
inline void didBecomeActive(id, SEL, id)standalone::iosapp::didBecomeActive · standalone_ios.h:256 - fn
inline void didEnterBackground(id, SEL, id)standalone::iosapp::didEnterBackground · standalone_ios.h:257 - fn
inline Class delegateClass()standalone::iosapp::delegateClass · standalone_ios.h:259 - fn
inline int runApp(App& app, const Options& opt)iOS: the app. UIApplicationMain does not return. --play runs the audio for a while with no window, as on every platform, for a test with no screen. standalone.h's runInteractive, on iOS.standalone::iosapp::runApp · standalone_ios.h:280