react-native-onesignal icon indicating copy to clipboard operation
react-native-onesignal copied to clipboard

xcode15 - react native 0.72.4 [CP-User] [RNFB] Core Configuration error

Open sekizlipenguen opened this issue 1 year ago • 23 comments

Hi,

xcode:15
"react-native": "0.72.4",

Cycle inside *; building could produce unreliable results. This usually can be resolved by moving the shell script phase '[CP-User] [RNFB] Core Configuration' so that it runs before the build phase that depends on its outputs.
Cycle details:
→ Target '*': CodeSign /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app
○ Target '*' has process command with output '/Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/Info.plist'
○ Target '*' has copy command from '/Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/OneSignalNotificationServiceExtension.appex' to '/Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/PlugIns/OneSignalNotificationServiceExtension.appex'
○ That command depends on command in Target '*': script phase “[CP-User] [RNFB] Core Configuration”


Raw dependency cycle trace:

target:  ->

node: <all> ->

command: <all> ->

node: /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/_CodeSignature ->

command: P0:target-*-7955c8fbe0ab4408aecf35bb8f80ca637ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:CodeSign /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app ->

CYCLE POINT ->

node: /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/Info.plist/ ->

directoryTreeSignature: � ->

directoryContents: /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/Info.plist ->

node: /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/Info.plist ->

command: P0:target-*-7955c8fbe0ab4408aecf35bb8f80ca637ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:ProcessInfoPlistFile /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/Info.plist /Users/*/Desktop/projelerim/sekizlipenguen/cemal/*/ios/*/Info.plist ->

node: /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/PlugIns/OneSignalNotificationServiceExtension.appex ->

command: P0:target-*-7955c8fbe0ab4408aecf35bb8f80ca637ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:Copy /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/PlugIns/OneSignalNotificationServiceExtension.appex /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/OneSignalNotificationServiceExtension.appex ->

node: <target-*-7955c8fbe0ab4408aecf35bb8f80ca637ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase6--cp-user---rnfb--core-configuration> ->

command: P0:::Gate target-*-7955c8fbe0ab4408aecf35bb8f80ca637ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase6--cp-user---rnfb--core-configuration ->

node: <execute-shell-script-7955c8fbe0ab4408aecf35bb8f80ca63f4b50de62cdc6822a0c2493a9898b9cf-target-*-7955c8fbe0ab4408aecf35bb8f80ca637ceb6b36bcfc2fb90f69ac96de4975d6-> ->

command: P2:target-*-7955c8fbe0ab4408aecf35bb8f80ca637ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:PhaseScriptExecution [CP-User] [RNFB] Core Configuration /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Intermediates.noindex/*.build/Debug-iphonesimulator/*.build/Script-FB2FCEB9CBDD984D9867BDF5.sh ->

  node: /Users/*/Library/Developer/Xcode/DerivedData/*-ghsfobqzgrsysccszfkqabkxxgcy/Build/Products/Debug-iphonesimulator/*.app/Info.plist/


podfile


# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```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
use_frameworks! :linkage => :static
$RNFirebaseAnalyticsWithoutAdIdSupport=true

target 'napios' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    #:hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    :hermes_enabled => false,
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    #:flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'napiosTests' do
    inherit! :complete
    # Pods for testing
  end

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(installer,config[:reactNativePath], :mac_catalyst_enabled => false )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    installer.pods_project.build_configurations.each do |config|
       config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
     end
  end

  # React Native Maps dependencies
  # The following line is only needed if building on an Apple silicon Mac without rosetta.
  pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/Simon-TechForm/google-maps-ios-utils.git', :branch => 'feat/support-apple-silicon'
end

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '>= 3.12.3', '< 4.0'
end



sekizlipenguen avatar Sep 27 '23 15:09 sekizlipenguen

same issue here, when i added the widget extension on app

OguzEkinci avatar Sep 27 '23 22:09 OguzEkinci

omg! i found something, do this:

In fact, you only need to pay attention to Xcode's prompt This usually can be resolved by moving the target's Headers build phase before Compile Sources, and then you can do it.

OguzEkinci avatar Sep 27 '23 22:09 OguzEkinci

omg! i found something, do this:

In fact, you only need to pay attention to Xcode's prompt This usually can be resolved by moving the target's Headers build phase before Compile Sources, and then you can do it.

how to solve this issue?

AhmedHF avatar Sep 27 '23 22:09 AhmedHF

target's Headers not moving why?

AhmedHF avatar Sep 27 '23 22:09 AhmedHF

move "Embed Foundation extension" before "Compile sources". whenever your errors, mine is "Embed Foundation extension" because when i create widgetextension, i face this issue

OguzEkinci avatar Sep 28 '23 00:09 OguzEkinci

move "Embed Foundation extension" before "Compile sources". whenever your errors, mine is "Embed Foundation extension" because when i create widgetextension, i face this issue

This resolved my issue Thanks @OguzEkinci

vishaldaher avatar Sep 28 '23 05:09 vishaldaher

move "Embed Foundation extension" before "Compile sources". whenever your errors, mine is "Embed Foundation extension" because when i create widgetextension, i face this issue

Thanks a lot @OguzEkinci

AhmedHF avatar Sep 28 '23 06:09 AhmedHF

move "Embed Foundation extension" before "Compile sources". whenever your errors, mine is "Embed Foundation extension" because when i create widgetextension, i face this issue

Thank you! This solved the problem for me too!

whyamsx avatar Sep 28 '23 06:09 whyamsx

I observed that this problem started with xcode 15. xcode 14.3.1 works without any problems.

Also, for xcode15, the cause of the problem starts after adding "OneSignalNotificationServiceExtension".

sekizlipenguen avatar Sep 28 '23 07:09 sekizlipenguen

move "Embed Foundation extension" before "Compile sources". whenever your errors, mine is "Embed Foundation extension" because when i create widgetextension, i face this issue

Hi, How can I do this via xcode? I didn't fully understand. Any chance of taking a screenshot?

sekizlipenguen avatar Sep 28 '23 07:09 sekizlipenguen

Screenshot 2023-09-28 at 10 39 26

I solved this problem by ticking this. "copy only when installing"

sekizlipenguen avatar Sep 28 '23 07:09 sekizlipenguen

Screenshot 2023-09-28 at 10 39 26

I solved this problem by ticking this. "copy only when installing"

I can confirm that this worked for me.

maderesponsively avatar Oct 06 '23 12:10 maderesponsively

Screenshot 2023-09-28 at 10 39 26

I solved this problem by ticking this. "copy only when installing"

Tahnks. worked for me

DiorAbjalilov avatar Oct 30 '23 11:10 DiorAbjalilov

Screenshot 2023-09-28 at 10 39 26

I solved this problem by ticking this. "copy only when installing"

However, if checked "copy only when installing", the widget cannot be displayed on the simulator.

wuchangming avatar Nov 19 '23 14:11 wuchangming

image image

I fixed it by adjusting the order.

wuchangming avatar Nov 19 '23 14:11 wuchangming

Screenshot 2023-09-28 at 10 39 26

I solved this problem by ticking this. "copy only when installing"

react-native: v0.68.6 react-native-onesignal: v4.4.1 I also confirmed this works for me. Thank you very much!!!

Screenshot 2024-02-20 at 2 48 23 PM

usamaabutt avatar Feb 20 '24 09:02 usamaabutt

move "Embed Foundation extension" before "Compile sources". whenever your errors, mine is "Embed Foundation extension" because when i create widgetextension, i face this issue

I confirmed this fixed my build archived error. Thanks a lot!

usamaabutt avatar Feb 20 '24 10:02 usamaabutt

@sekizlipenguen thanks man, your solution works for me 🙏🏻

ebnersilva avatar Feb 23 '24 20:02 ebnersilva

move "Embed Foundation extension" before "Compile sources". whenever your errors, mine is "Embed Foundation extension" because when i create widgetextension, i face this issue

Worked for me as well Xcode 15.3 "react-native": "0.73.5", Thanks @OguzEkinci

RayanAbid avatar Mar 17 '24 18:03 RayanAbid

In my case, I move my Copy Bundle Resource above to Compile Source.

Screenshot 2024-05-17 at 11 51 44 AM

nameisjayant avatar May 17 '24 06:05 nameisjayant

Screenshot 2023-09-28 at 10 39 26

I solved this problem by ticking this. "copy only when installing"

yes it's work for me

tnson1307 avatar May 25 '24 13:05 tnson1307

Screenshot 2023-09-28 at 10 39 26 I solved this problem by ticking this. "copy only when installing"

However, if checked "copy only when installing", the widget cannot be displayed on the simulator.

Try this one : https://github.com/OneSignal/react-native-onesignal/issues/1569#issuecomment-1817866408

charithAmila avatar Aug 01 '24 00:08 charithAmila