본문 바로가기
Flutter

push 알림 서비스를 위해 onesignal 설정 중 발생한 오류 Cycle inside Runner; building could produce unreliable results.

by 난타코다옹 2024. 6. 12.

목차

    모바일 앱 개발시 Push Notification 을 설정하려면 push 서버를 만들어야하는데요! 서버를 만들려면 설정할게 한두가지가 아니죠!

    그래서 여러가지 푸시 서비스가 있는데요 onesignal은 사용량이 많지 않으면 무료로 사용할 수 있어서 설정해보려고 합니다.

    Android, ios 각각 따로 설정해주면 되는데요 Android는 설정이 간편하고 ios는 조금 해줘야할 게 있어요.

    ios 설정 중 오류가 발생합니다.

     

    Cycle inside Runner; building could produce unreliable results.
    Cycle details:
    → Target 'Runner': ExtractAppIntentsMetadata
    ○ Target 'Runner' has copy command from '/Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/OneSignalNotificationServiceExtension.appex' to '/Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex'
    ○ That command depends on command in Target 'Runner': script phase “Thin Binary”
    ○ Target 'Runner' has process command with output '/Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/Runner.app/Info.plist'
    ○ Target 'Runner' has copy command from '/Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/OneSignalNotificationServiceExtension.appex' to '/Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex'
    
    Raw dependency cycle trace:
    
    target: ->
    
    node: ->
    
    command: ->
    
    node: /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata ->
    
    command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:ExtractAppIntentsMetadata ->
    
    node: ->
    
    command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase8-copy-files ->
    
    node: <Copy /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex> ->
    
    CYCLE POINT ->
    
    command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:Copy /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/Runner.app/PlugIns/OneSignalNotificationServiceExtension.appex /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Products/Debug-iphonesimulator/OneSignalNotificationServiceExtension.appex ->
    
    node: ->
    
    command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase7--firebase-crashlytics--crashlytics-upload-symbols ->
    
    node: /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-5A84378DFC51C4C3B8B5DCBC.sh ->
    
    command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:WriteAuxiliaryFile /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-5A84378DFC51C4C3B8B5DCBC.sh ->
    
    node: ->
    
    command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase6--cp--copy-pods-resources ->
    
    node: /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/InputFileList-0F708D38A83047967A99FC32-Pods-Runner-resources-Debug-input-files-cdc6197952b1a853ade65ec5821af8d0-resolved.xcfilelist ->
    
    command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:WriteAuxiliaryFile /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/InputFileList-0F708D38A83047967A99FC32-Pods-Runner-resources-Debug-input-files-cdc6197952b1a853ade65ec5821af8d0-resolved.xcfilelist ->
    
    node: ->
    
    command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase5--cp--embed-pods-frameworks ->
    
    node: /Users/myname/Library/Developer/Xcode/DerivedData/Runner-fqxhzypkwnfbnhadadsivwqurudk/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/InputFileList-8FDD03C97B58E44DE8569B0C-Pods-Runner-frameworks-Debug-input-files-9177d09ef6bbf0a13a9f2b226f9c9e2a-

     

    찾아보니 Xcode에서 Build Phases 순서를 변경해주면 된다고 합니다.

    저는 위와 같이 변경했습니다. Xcode 버전 변경에 따른 오류라고 합니다. 저는 다른 사람이 하라는 순서대로 하면 잘 안됐고 Embed Foundation Extensions (1 item)를 run script 위로 올리니 잘 됐습니다.

    다들 잘 해결하시길 바랄게요