flutter 프로젝트에서 xcode 실행
✘ nayakim ~/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03 main ±✚ ll
total 40
-rw-r--r--@ 1 nayakim staff 78B Dec 7 11:25 analysis_options.yaml
drwxr-xr-x@ 9 nayakim staff 288B Dec 7 11:33 android
drwxr-xr-x 6 nayakim staff 192B Dec 7 11:34 build
drwxr-xr-x@ 3 nayakim staff 96B Dec 7 11:25 fonts
drwxr-xr-x@ 13 nayakim staff 416B Dec 7 16:01 ios
drwxr-xr-x@ 6 nayakim staff 192B Dec 7 11:25 lib
-rw-r--r-- 1 nayakim staff 10K Dec 7 13:43 pubspec.lock
-rw-r--r--@ 1 nayakim staff 482B Dec 7 11:31 pubspec.yaml
$ open ios/Runner.xcworkspace
안드로이드 스튜디오에서 빌드시 오류
Error (Xcode): Cycle inside Runner; building could produce unreliable results.
Cycle details:
→ Target 'Runner': CodeSign /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app
○ That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
○ Target 'Runner' has copy command from '/Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/NewsWidgetsExtension.appex' to '/Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/NewsWidgetsExtension.appex'
○ That command depends on command in Target 'Runner': script phase “Thin Binary”
○ Target 'Runner' has process command with output '/Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Info.plist'
○ Target 'Runner' has copy command from '/Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/NewsWidgetsExtension.appex' to '/Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/NewsWidgetsExtension.appex'
Raw dependency cycle trace:
target: ->
node: <all> ->
command: <all> ->
node: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/_CodeSignature ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:CodeSign /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app ->
node: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/home_widget.framework/ ->
directoryTreeSignature: � ->
directoryContents: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/home_widget.framework ->
node: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/home_widget.framework ->
command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:PhaseScriptExecution [CP] Embed Pods Frameworks /Users/nayakim/Library/Developer/Xcode/DerivedData/Runner-cbyngmkoviymtrczkbmoisrjpjro/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-EB7A56367F54EA5D752EBF12.sh ->
node: /Users/nayakim/Library/Developer/Xcode/DerivedData/Runner-cbyngmkoviymtrczkbmoisrjpjro/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/InputFileList-EB7A56367F54EA5D752EBF12-Pods-Runner-frameworks-Debug-input-files-8464b52b8aa593256f14846c02e6b9c2-resolved.xcfilelist ->
command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:WriteAuxiliaryFile /Users/nayakim/Library/Developer/Xcode/DerivedData/Runner-cbyngmkoviymtrczkbmoisrjpjro/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/InputFileList-EB7A56367F54EA5D752EBF12-Pods-Runner-frameworks-Debug-input-files-8464b52b8aa593256f14846c02e6b9c2-resolved.xcfilelist ->
node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase5-copy-files> ->
command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase5-copy-files ->
node: <Copy /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/NewsWidgetsExtension.appex> ->
CYCLE POINT ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:Copy /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/NewsWidgetsExtension.appex /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/NewsWidgetsExtension.appex ->
node: <target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase4-thin-binary> ->
command: P0:::Gate target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49--fused-phase4-thin-binary ->
node: <execute-shell-script-18c1723432283e0cc55f10a6dcfd9e02f1eee2015e8ff5ebcd27678f788c2826-target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-> ->
command: P2:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:PhaseScriptExecution Thin Binary /Users/nayakim/Library/Developer/Xcode/DerivedData/Runner-cbyngmkoviymtrczkbmoisrjpjro/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh ->
node: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Info.plist/ ->
directoryTreeSignature: � ->
directoryContents: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Info.plist ->
node: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Info.plist ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:ProcessInfoPlistFile /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/Info.plist /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/ios/Runner/Info.plist ->
node: /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/NewsWidgetsExtension.appex ->
command: P0:target-Runner-18c1723432283e0cc55f10a6dcfd9e0288a783a885d8b0b3beb2e9f90bde3f49-:Debug:Copy /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/Runner.app/PlugIns/NewsWidgetsExtension.appex /Users/nayakim/Documents/naya/program/mobile/flutter/flutter-codelabs/homescreen_codelab/step_03/build/ios/Debug-iphonesimulator/NewsWidgetsExtension.appex
Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.
해결방법
xcode 실행후 원본
드래그로 이동하면 정상적으로 됨
Widget + 추가시 이름 변경
ios/Runner/Info.plist
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Home Widget Test22</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
...
xcode 에서는
위젯 displayName 과 desc 수정
참고
https://pub.dev/packages/home_widget
https://www.youtube.com/watch?v=NoTc1D26HAo
https://developer.apple.com/forums/thread/731825
'프로그래밍 > flutter' 카테고리의 다른 글
[flutter] 안드로이드 apk 만들기 (0) | 2024.03.21 |
---|---|
[flutter] iOS 빌드시 오류 Error (Xcode): Cycle inside Runner (0) | 2024.01.15 |
[flutter] Flutter에서 홈 화면 앱 위젯 웹뷰 메뉴 바로가기 방법 (안드로이드) (0) | 2023.11.14 |
[flutter] Flutter에서 홈 화면 앱 위젯 2개 만드는 방법 (안드로이드) (0) | 2023.10.25 |
[flutter] 인터넷에서 데이터 가져오기 GET/POST (fetch) (0) | 2023.10.25 |