diff --git a/.circleci/config.yml b/.circleci/config.yml index e1aaca0b9d857d..3999bfb780fded 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -817,6 +817,11 @@ jobs: description: Whether Flipper is enabled. Must be one of "WithFlipper", "WithoutFlipper". type: enum enum: ["WithFlipper", "WithoutFlipper"] + use_frameworks: + default: "StaticLibraries" + description: Which kind of option we want to use for `use_frameworks!` + type: enum + enum: ["StaticLibraries", "StaticFrameworks"] #TODO: Add "DynamicFrameworks" environment: - PROJECT_NAME: "iOSTemplateProject" - HERMES_WS_DIR: *hermes_workspace_root @@ -831,6 +836,24 @@ jobs: steps: - run: command: circleci-agent step halt # this interrupts the job successfully. + # use_frameworks! does not works with Flipper enabled + - when: + condition: + and: + - equal: [ << parameters.use_frameworks >>, "StaticFrameworks"] + - equal: [ << parameters.flipper >>, "WithFlipper" ] + steps: + - run: + command: circleci-agent step halt # this interrupts the job successfully. + # use_frameworks! does not works with the New Architecture enabled + - when: + condition: + and: + - equal: [ << parameters.use_frameworks >>, "StaticFrameworks"] + - equal: [ << parameters.architecture >>, "NewArch" ] + steps: + - run: + command: circleci-agent step halt # this interrupts the job successfully. # Valid configuration, we can continue - checkout_code_with_cache - run_yarn @@ -878,6 +901,10 @@ jobs: export NO_FLIPPER=1 fi + if [[ << parameters.use_frameworks >> == "StaticFrameworks" ]]; then + export USE_FRAMEWORKS=static + fi + bundle exec pod install - run: name: Build template project @@ -1565,6 +1592,7 @@ workflows: flavor: ["Debug", "Release"] jsengine: ["Hermes", "JSC"] flipper: ["WithFlipper", "WithoutFlipper"] + use_frameworks: [ "StaticLibraries", "StaticFrameworks" ] #TODO: make it works with DynamicFrameworks - test_ios_rntester: requires: - build_hermes_macos diff --git a/template/ios/Podfile b/template/ios/Podfile index 579715789c9fcd..f734af96333ae2 100644 --- a/template/ios/Podfile +++ b/template/ios/Podfile @@ -6,6 +6,12 @@ prepare_react_native_project! 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_s +end + target 'HelloWorld' do config = use_native_modules!