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

[Cleanup] Remove '+ [GULAppEnvironmentUtil hasSwiftRuntime]' API #166

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions GoogleUtilities/Environment/GULAppEnvironmentUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,6 @@ + (BOOL)isIOS7OrHigher {
return YES;
}

+ (BOOL)hasSwiftRuntime {
// The class
// [Swift._SwiftObject](https://github.com/apple/swift/blob/5eac3e2818eb340b11232aff83edfbd1c307fa03/stdlib/public/runtime/SwiftObject.h#L35)
// is a part of Swift runtime, so it should be present if Swift runtime is available.

BOOL hasSwiftRuntime =
objc_lookUpClass("Swift._SwiftObject") != nil ||
// Swift object class name before
// https://github.com/apple/swift/commit/9637b4a6e11ddca72f5f6dbe528efc7c92f14d01
objc_getClass("_TtCs12_SwiftObject") != nil;

return hasSwiftRuntime;
}

+ (NSString *)applePlatform {
NSString *applePlatform = @"unknown";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ NS_ASSUME_NONNULL_BEGIN
+ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE(
"Always `YES` because only iOS 8 and higher supported. The method will be removed.");

/// @return YES if Swift runtime detected in the app.
+ (BOOL)hasSwiftRuntime __deprecated;

/// @return An Apple platform. Possible values "ios", "tvos", "macos", "watchos", "maccatalyst", and
/// "visionos".
+ (NSString *)applePlatform;
Expand Down
Loading