require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, min_ios_version_supported
prepare_react_native_project!
# `react-native-flipper` を使用している場合、`NO_FLIPPER=1` が設定されると iOS ビルドは失敗します。
# `react-native-flipper` は除外される (FlipperKit,...) に依存しているためです
#
# これを修正するには、`react-native.config.js` を使って `react-native-flipper` を除外することもできます
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'PushlyDevApp' do
config = use_native_modules!
# フラグは環境変数の値に応じて変わります。
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes は現在デフォルトで有効です。このフラグを false に設定すると無効になります。
# 今後のバージョンの React Native は get_default_flags() に依存する可能性がありますが、
# React Native のアップグレード作業を助けるため、ここでは明示しています。
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# Flipper を有効にします。
#
# `use_frameworks!` が有効になっている場合、Flipper は動作せず、
# 次の行を無効にする必要があります。
# -- アーカイブの問題により無効化
# :flipper_configuration => flipper_config,
# アプリケーションルートへの絶対パス。
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'PushlyDevAppTests' do
inherit! :complete
# テスト用Pods
end
post_install do |installer|
react_native_post_install(
installer,
# パッチを適用するために `mac_catalyst_enabled` を `true` に設定します
# Mac Catalystビルドに必要です
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
target 'NotificationServiceExtension' do
pod 'Pushly', '>= 1.0', '< 2.0'
end