openid / openid/AppAuth-iOS

Retain Cycle due to strong reference to PresentingViewController

Open
#920 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
Objective-C
Stars
2k
Forks
867
Avg merge
4d 48m
Merged PRs (30d)
1

Description

Describe the bug
When initialize AppAuth in singleton and then pass the presentingViewController, it's resulting in retain cycle.

So we have created this PR, which based on our fork that we are using for almost a year or more with no noticeable issue:
https://github.com/openid/AppAuth-iOS/pull/919

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #919 and the AppAuth initialization path that receives the presentingViewController. Compare the proposed ownership change with the reported singleton lifecycle, then verify that the presenting controller can be released without a retain cycle; done means the regression is covered and the existing SDK behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
authentication, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.