查看( 224 ) / 评论( 0 ) 在UIQ3.1上开发,发现关于capability的限制问题,导致某些特性不能在设备上跑,而且安装也发现问题。在MotoZ8设备上不能安装,security check fail. 1. 关于CAPABILITY的问题,通过查询UIQ文档后,加入对应的能力属性就可以解决,但如果需要没有限制的地方跑,还需要通过symbian sign。 解决方法:在mmp上加入对应的能力,如:CAPABILITY SWEvent。 详细的属性,通过run command:tail -f %temp%\epocwind.out 来得到: more details: Symbian introduced what is called Platform. Security. Basically this is a way of limiting what a application/process can do in the system, e.g: - An application cannot read certain directories (data cageing). - An application can only call certain API's by default.
What an application can do is decided upon the Capabilities it possess. Each application/server specifies its Capabilities in the MMP-file.
Please find more information about platform. security in the SDK documentation: > UIQ 3 SDK > Symbian OS v9.1 > Symbian OS guide > Platform. security > UIQ 3 SDK > UIQ Developer Library > UIQ Migration Quick Guide
Regarding the KErrPermissionDenied you experience. It is hard to say what is wrong, but if you develop on for the emulator there is a handy trick that helps pin-point the problem.
While running the emulator and reproducing the error you get, run this command in a Command shell: tail -f %temp%\epocwind.out
This file will produce alot of output from the emulator, one of the things written to this file are PlatSec errors. From that file you should be able to see the type of Capability required for you operation.
E.g: ... *PlatSec* ERROR - Capability check failed - ....and was found to be missing the capabilities: CapabilityName
Here the CapabilityName is the capability required for that operation. This should be added to the project's MMP-file, rebuild and retest.
Please note that it is not a good idea, to keep adding alot of Capabilities to the project. All capabilities needs to be signed for, and some are more or less impossible to get.
Also, the SDK documentation states the capability required for a function: E.g. CTelephony:: DialNewCall() requires the capability NetworkServices.
These API’s under these capbilities has access to sensitive parts of the machine which due programatical errors may corrupt the phone’s Software and hardware. So these capabilities are granted only after symbian signed which after testing is done.
ALLFiles,SwEvent,WriteDeviceData,PowerMgmt,Drm, etc.