Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #20 from SafetyCulture/fix-retain-cycle-between-so…
Browse files Browse the repository at this point in the history
…ft-ask-view-and-manager

(FIX) Retain Cycle Between SoftAskView and Manager
  • Loading branch information
AlexApriamashvili committed Feb 24, 2022
2 parents 7ae4922 + 27345c1 commit 43f27a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions PleaseAllow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.safetyculture.PleaseAllow;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -491,6 +492,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.safetyculture.PleaseAllow;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
2 changes: 1 addition & 1 deletion PleaseAllow/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 2 additions & 2 deletions PleaseAllow/PermissionManagers/PermissionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation

/// Common Protocol for all Permissions
public protocol PermissionManager {
public protocol PermissionManager: AnyObject {
/// Returns the `MangerType` for the current Permission Manager
var type : PermissionManagerType { get }

Expand Down Expand Up @@ -84,7 +84,7 @@ extension PermissionManager {
The completion to be called when the request manager is finished with the request
*/

internal mutating func request(handler: Please.Reply? = nil) {
internal func request(handler: Please.Reply? = nil) {
resultHandler = handler
guard isAvailable && canRequest else { return }

Expand Down
3 changes: 2 additions & 1 deletion PleaseAllow/SoftAsk/SoftAskView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ open class DeniedAlert: SoftAskView {
private var sharedWindow: UIWindow?

open class SoftAskView {
private var manager: PermissionManager?

private weak var manager: PermissionManager?

internal var softAskViewController: SoftAskViewController!

Expand Down

0 comments on commit 43f27a6

Please sign in to comment.