Pick the fix
The app and its widget need the same JSON file. Where should it go?
Hint 1 of 1
Which container do both targets share?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A A shared App Group container
Correct. Both targets with the App Group entitlement can read it.
Why not the others?
- B The app's Documents directory. The widget runs in its own sandbox and can't see it.
- C UserDefaults.standard. standard is per-target; you'd need a suite for the App Group.
- D An absolute path written at build time. Container paths change, and the sandbox blocks other containers.