Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Writing Keys out of container #3864

Open
9 of 12 tasks
jesus-mg-ios opened this issue May 2, 2024 · 4 comments
Open
9 of 12 tasks

Bug: Writing Keys out of container #3864

jesus-mg-ios opened this issue May 2, 2024 · 4 comments
Labels

Comments

@jesus-mg-ios
Copy link

Describe the bug
A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

  1. Environment
    1. Platform: iOS
    2. SDK version: 4.41.2
    3. StoreKit version:
      • StoreKit 1
      • StoreKit 2 (enabled with usesStoreKit2IfAvailable(true))
    4. OS version: 17.4.1
    5. Xcode version: 15.2
    6. Device and/or simulator:
      • Device
      • Simulator
    7. Environment:
      • Sandbox
      • TestFight
      • Production
    8. How widespread is the issue. Percentage of devices affected. 100%
  2. Debug logs that reproduce the issue. Complete logs with Purchases.logLevel = .verbose will help us debug this issue.
rejecting write of key(s) com.revenuecat.userdefaults.subscriberAttributes in { appGroup.com, mobile, kCFPreferencesAnyHost, /var/mobile/Containers/Shared/AppGroup/2814C7B7-ED2A-49EA-96E8-61F76DFF7F68/Library/Preferences/appGroup.com, managed: 0 } from process 687 () because setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access	cfprefsd
  1. Steps to reproduce, with a description of expected vs. actual behavior

Install an app with an extension, use purchases in extension.

  1. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

  2. Additional context
    Add any other context about the problem here.

@RCGitBot
Copy link
Contributor

RCGitBot commented May 2, 2024

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@mshmoustafa
Copy link
Contributor

@jesus-mg-ios looks like this is an error concerning user defaults, are you specifying your own user defaults or using the standard one? Can you share the debug logs and a code snippet for us to look into?

@jesus-mg-ios
Copy link
Author

I'm specifying mine

@jesus-mg-ios
Copy link
Author

jesus-mg-ios commented May 7, 2024

 var configuration = Configuration.Builder(withAPIKey: KEY).with(appUserID: USERID)
 if let defaults = UserDefaults(suiteName: appGroup) {
      configuration = configuration.with(userDefaults: defaults)
 } 
 Purchases.configure(with: configuration.build())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants