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

DynamicLink initializer shouldn't be available from Swift #10000

Closed
ryanwilson opened this issue Jul 12, 2022 · 1 comment · Fixed by #10236
Closed

DynamicLink initializer shouldn't be available from Swift #10000

ryanwilson opened this issue Jul 12, 2022 · 1 comment · Fixed by #10236

Comments

@ryanwilson
Copy link
Member

There's no init marked as NS_UNAVAILABLE, so a bare initializer is currently available in Swift but shouldn't be.

NS_SWIFT_NAME(DynamicLink)
@interface FIRDynamicLink : NSObject
/**
* @property url
* @abstract The URL that was passed to the app.
*/
@property(nonatomic, copy, readonly, nullable) NSURL *url;
/**
* @property matchType
* @abstract The match type of the received Dynamic Link.
*/
@property(nonatomic, assign, readonly) FIRDLMatchType matchType;
/**
* @property utmParametersDictionary
* @abstract UTM parameters associated with a Firebase Dynamic Link.
*/
@property(nonatomic, copy, readonly) NSDictionary<NSString *, id> *utmParametersDictionary;
/**
* @property minimumAppVersion
* @abstract The minimum iOS application version that supports the Dynamic Link. This is retrieved
* from the imv= parameter of the Dynamic Link URL. Note: This is not the minimum iOS system
* version, but the minimum app version. If app version of the opening app is less than the
* value of this property, then app expected to open AppStore to allow user to download most
* recent version. App can notify or ask user before opening AppStore.
*/
@property(nonatomic, copy, readonly, nullable) NSString *minimumAppVersion;
@end

We'll need to determine the right strategy for this: it's a breaking change to remove it, but it doesn't work as is. Introducing an initializer that's deprecated will introduce the API for ObjC users, which we don't want either.

@andrewheard
Copy link
Contributor

Note: this API is also available for ObjC users

FIRDynamicLink *dynamicLink = [[FIRDynamicLink alloc] init];

andrewheard added a commit that referenced this issue Sep 20, 2022
DynamicLink's initializer was not intended to be publicly available. Marking it as NS_UNAVAILABLE hides it from both ObjC and Swift callers; resolves #10000.
andrewheard added a commit that referenced this issue Sep 20, 2022
DynamicLink's bare initializer was not intended to be publicly available. Marking it as NS_UNAVAILABLE hides it from both ObjC and Swift callers; resolves #10000.
@firebase firebase locked and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.