Skip to content
    Back to all Bounties

    Earn 7,200 ($72.00)

    Time Remainingdue 1 year ago
    Canceled

    Fix swift ios share bug

    dominikd2
    dominikd2
    Posted 1 year ago

    Bounty Description

    Problem Description

    I have a simple todo app where I've tried to implement simple share sheet capability. When I click share I don't see the share sheet and see the following errors in my console log in xcode. Someone with swift and xcode experience should probably solve this rather quickly.

    I'm running xcode v. 15.3, Swift v. 5.10, testing on iPhone through xcode build iOS v. 17.4.1

    Couldn't read values in CFPrefsPlistSource<0x30268cb40> (Domain: com.apple.country.carrier_2, User: kCFPreferencesCurrentUser, ByHost: No, Container: /var/mobile/Library/CountryBundles/, Contents Need Refresh: Yes): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access

    Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)}>

    I need a fix.

    You must have experience with swift and xcode. Don't think that you can run this code through an LLM and get a solution. I've tried for 2 days with no luck. Tried many variations.

    Acceptance Criteria

    The error solved. I click share below image and I see a default ios share sheet which would allow me to share the image.
    I see no errors in the log.

    The solution can't be turning off ios logs.

    The only thing in the code that should be modified is the share functionality which would allow me to share the image loaded from the swiftdata which is already stored.

    Image storage is working fine. The solution must be around share functionality.

    Technical Details