Replies: 6 comments 11 replies
-
Developers can directly override other member methods of UIApplicationDelegate, which is similar to direct inheritance. The inheritance relationship is We can also combine the appdelegate in the engine and put it into myappdelegate, and myappdelegate can directly inherit UIApplicationDelegate.
Appdelegate and platform are different concepts, and the message mechanism similar to windows is different from that of platform. appdelegate is a system-related operation, and platform is the operation logic inside the engine. In theory, there is no need to expose appdelegate too much
In theory, we only care about the application, and don't need to pay attention to other things. The reason why the method provided here is only the way that the platform does not meet the requirements or has special needs. Here is just one way. It requires a threshold to do this. In fact, it is not recommended to do this. The upgrade and maintenance costs are relatively high. |
Beta Was this translation helpful? Give feedback.
-
Application is hesitated as Game =>BaseGame =>Application right? Yet it's in common dir, cannot modify it directory.... |
Beta Was this translation helpful? Give feedback.
-
Yes, in fact, you don't need basegame, you can directly inherit CocosApplication
i didn't understand |
Beta Was this translation helpful? Give feedback.
-
Is there a better way to let developer know fewer detail of engine to write some platform relevant logic ? |
Beta Was this translation helpful? Give feedback.
-
Now I understand the concept of Platform and Application better, documentation is needed still. My suggestion is that we place the AppDelegate in the template, as well as iOS, AppDelegateBridge is a good point and we can use it for all platforms of APPLE since there might be some needs for TVOS or Apple Watch, etc, who knows. |
Beta Was this translation helpful? Give feedback.
-
Can you describe when need to load multiple apps? |
Beta Was this translation helpful? Give feedback.
-
previous issue
The main reason for putting appdelegate into the template layer before is to integrate a third-party SDK
At present, after putting main into the template layer, users can customize the platform and appdelegate. Although it is more troublesome, I think it is reasonable, which can clearly isolate the logic defined by the developer and the logic of the engine
Take the mac platform as an example, customize the platform and appdelegate
1、MyAppdelegate.h
2、自定义平台,文件CustomPlatfor.h
3、main.mm:
Beta Was this translation helpful? Give feedback.
All reactions