mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This decouples the listing of modules from the linking of those modules into Cocoapods. I've made this backwards compatible, but our internal template wont lean on the community config. The user can now override how they capture a list of React Native modules, providing an escape hatch for Framework authors to build on. Changelog: [General][iOS] Use our fork of the react-native-communti/cli-platform-ios use_native_modues.rb script Reviewed By: cipolleschi Differential Revision: D56242486 fbshipit-source-id: 78505669ab6abd6718348388c3bfba3290f7071b
26 lines
769 B
Ruby
26 lines
769 B
Ruby
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
class AutolinkingUtils
|
|
|
|
def self.nested_path_exists?(object, *path)
|
|
path.reduce(object) do |obj, method|
|
|
return false unless obj.respond_to?(method)
|
|
obj.public_send(method)
|
|
end
|
|
return true
|
|
end
|
|
|
|
def self.is_platform_supported?(current_target_definition, spec)
|
|
platform = current_target_definition.platform
|
|
if !platform
|
|
# Historically we've supported platforms that aren't specifically excluded.
|
|
return true
|
|
end
|
|
return spec.supported_on_platform?(platform.name)
|
|
end
|
|
|
|
end
|