SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppIOS.mm
Go to the documentation of this file.
1 /**
2  * \file AppIOS.cpp
3  * \brief App::run implementation from App.h for the iOS platform
4  * \details For more info about App framework see:
5  * https://cpvrlab.github.io/SLProject4/app-framework.html
6  * For more info on how to create a new app with SLProject see:
7  * https://github.com/cpvrlab/SLProject4/wiki/Creating-a-New-App
8  * For more info on how to build for the iOS platform see:
9  * https://github.com/cpvrlab/SLProject4/wiki/Build-on-MacOS-with-XCode-for-iOS
10  * \date June 2024
11  * \authors Marino von Wattenwyl
12  * \copyright http://opensource.org/licenses/GPL-3.0
13  * \remarks Please use clangformat to format the code. See more code style on
14  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
15 */
16 
17 #include <App.h>
18 
19 #import "AppDelegate.h"
20 #import <UIKit/UIKit.h>
21 
22 //-----------------------------------------------------------------------------
23 // Global variables
24 App::Config App::config; //!< The configuration set in App::run
25 
26 //-----------------------------------------------------------------------------
27 int App::run(Config config)
28 {
30 
31  @autoreleasepool
32  {
33  return UIApplicationMain(config.argc,
34  config.argv,
35  nil,
36  NSStringFromClass([AppDelegate class]));
37  }
38 }
39 //-----------------------------------------------------------------------------
The App namespace declares the App::Config struct and the App::run function.
Declaration of the callbacks in ObjectivC for iOS.
int run(Config config)
App::run implementation from App.h for the Emscripten platform.
Definition: AppAndroid.cpp:78
Config config
The configuration set in App::run.
Definition: AppAndroid.cpp:34
App configuration struct to be passed to the App::run function.
Definition: App.h:57
int argc
Definition: App.h:58
char ** argv
Definition: App.h:59