×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    17

    Problems with Signing and the ReadUserData Capabilty

    Hi all,

    i have developed an application, and it's ready no to send to a test house - but on symbiansigned.com while submitting you have to say which capabilities you are using and which API. And there is the problem, to install sucessfully my app on my N95 testphone, i need the ReadUserData Capability, but I've checked the API documentation of that Capability and I am not using any API there specified in my source code!

    I'm accessing *.txt files (read/write) in the private folder of the application, do I need that capability for that, or what is the problem? When I try to install I get the error: "Required Application Access not granted". I have absolutly no idea why I need that cap, so if anyone has an idea, please help

  2. #2
    Nokia Developer Moderator
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,347

    Re: Problems with Signing and the ReadUserData Capabilty

    Accessing your own private folder does not require any capability. ReadUserData/WriteUserData is needed if you want to access user's personal data, such as contacts or calendars.

  3. #3
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: Problems with Signing and the ReadUserData Capabilty

    Quote Originally Posted by greumatt View Post
    And there is the problem, to install sucessfully my app on my N95 testphone, i need the ReadUserData Capability, but I've checked the API documentation of that Capability and I am not using any API there specified in my source code!
    Which capability is needed for an application is not something that you find reading the tea leafs. The subject is decently documented and governed by clear rules. There are also tools that would allow you to determine the exact needs like the epocwind.out log file or Carbide's Capability Scanner and Epocwind.out Scanner plug-ins.

    You start by specifying CAPABILITY NONE in your project's MMP file and only add/remove capabilities to/from your project when you know that such action is needed and why.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  4. #4
    Registered User
    Join Date
    May 2008
    Posts
    17

    Re: Problems with Signing and the ReadUserData Capabilty

    First, thanks for your fast reply. This Capability Check from Carbide cornered the problem a little. However, the result says me, that I would need to include Capability "DEPENDENT". As I found out, this means depending on runtime context one or another cap is needed. But I still don't really know which.

    Code:
    	RFs myFs;
    	User::LeaveIfError(myFs.Connect());
    	myFs.MkDirAll(KFileName);
    MkDirAll causes one of the problems, and KFileName is accessing C://documents. This is not in the private folder of the app, so do I need WriteDeviceData for it?

    The other issues are RFile.Open(),
    Code:
     err = file.Open(aFs,KDescriptionFile,EFileRead);
    and RFile.Replace()

    Code:
     err = file.Replace(CCoeEnv::Static()->FsSession(), KDescriptionFile, EFileWrite);
    In both cases it's again DEPENDENT. But here, KDescriptionFile is in the protected Application Folder - so why do I need here a Capability?

    Last, RConnection.Start() and CRepository.Get() are listed as DEPENDENT as well, but I have included NetworkService Capability, I think that 2 warnings can be ignored, though.

    Thanks for your help in advance

    cheers
    matt

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    17

    Thumbs up Re: Problems with Signing and the ReadUserData Capabilty

    Hey all,

    okay I solved the problem by now, I was to fast to ask again, instead to turn on my brain and figure it out for myself

    I think to access the C:\documents\ directory i need the WriteUserData Capability.

    [edit]
    Well, after longer thinking, is this really the right cap? I think this cap is more used to access the calendar/contacts ? But I can install it on the phone, though.
    [/edit]

    Cheers,

    Matt
    Last edited by greumatt; 2009-01-20 at 03:03.

  6. #6
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: Problems with Signing and the ReadUserData Capabilty

    Matt,

    capabilities are required only when accessing !:\resource\..., !:\private\... or !:\Sys\... and those would be very restrictive capabilities (AllFiles and even TCB depending on location and access type).

    All other locations in the file system are free for you to access (read and write) regardless of the capabilities your application might have.

    Update: About DEPENDENT, it is not a capability, it is just tool's way of saying that, as specified above, the same API may require diferent capabilities depending on the source/destination of the file operation.
    Last edited by ltomuta; 2009-01-20 at 07:45.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  7. #7
    Registered User
    Join Date
    May 2008
    Posts
    17

    Re: Problems with Signing and the ReadUserData Capabilty

    Hi Itomuta,

    thanks for your reply. The error was really not with reading and writing. Problem was, that this carbide capability scanner didn't work properly (i'm using vista). So I had do delete the "Capability" folder in epoc32/data. That way the scanner gets correct information from the web and it listed me another code line, where I needed the "writeDeviceData" cap.

    Cheers,

    Matt
    "Rumor has it that, when they shut down the IBM 7094 at MIT in 1973, they found a low-priority process that had been submitted in 1967 and had not yet been run."

  8. #8
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Problems with Signing and the ReadUserData Capabilty

    As you said yourself,

    I think this cap is more used to access the calendar/contacts
    This is almost certainly the reason why you need read user data.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  9. #9
    Super Contributor
    Join Date
    Jun 2005
    Location
    Berlin
    Posts
    721

    Re: Problems with Signing and the ReadUserData Capabilty

    Quote Originally Posted by ltomuta View Post

    You start by specifying CAPABILITY NONE in your project's MMP file and only add/remove capabilities to/from your project when you know that such action is needed and why.
    This is a really good way!!

    Thanks.

    Pai
    Symbian && Android && iPhoneOS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •