OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.57k stars 373 forks source link

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

Open sekizlipenguen opened 1 year ago

sekizlipenguen commented 1 year ago
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
OguzEkinci commented 1 year ago

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

OguzEkinci commented 1 year ago

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.

AhmedHF commented 1 year ago

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 commented 1 year ago

target's Headers not moving why?

OguzEkinci commented 1 year ago

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

vishaldaher commented 1 year ago

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

AhmedHF commented 1 year ago

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

whyamsx commented 1 year ago

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!

sekizlipenguen commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Screenshot 2023-09-28 at 10 39 26

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

maderesponsively commented 12 months ago

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.

DiorAbjalilov commented 11 months ago

Screenshot 2023-09-28 at 10 39 26

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

Tahnks. worked for me

wuchangming commented 10 months ago

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 commented 10 months ago

image image

I fixed it by adjusting the order.

usamaabutt commented 7 months ago

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 commented 7 months ago

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!

ebnersilva commented 7 months ago

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

RayanAbid commented 6 months ago

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

nameisjayant commented 4 months ago

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

Screenshot 2024-05-17 at 11 51 44 AM
tnson1307 commented 4 months ago

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

charithAmila commented 2 months ago

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

vanhai989 commented 4 weeks ago

I can confirm to resolve this issue we move the [CP-User] [RNFB] Core Configuration to the end of Build Phases. I hope it can help you