flutter_curl icon indicating copy to clipboard operation
flutter_curl copied to clipboard

Error runing on ios simulator

Open makda-mohammad opened this issue 2 years ago • 4 comments

Error (Xcode): In /Users/{user_name}/.pub-cache/hosted/pub.dev/flutter_curl-0.2.0/ios/Curl.framework/Curl(nghttp2_pq.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/{user_name}/.pub-cache/hosted/pub.dev/flutter_curl-0.2.0/ios/Curl.framework/Curl' for architecture arm64

Could not build the application for the simulator. Error launching application on iPhone 14 Pro Max.

xcode version 14.2 ios version 16.0 flutter doctor -v output

[✓] Flutter (Channel stable, 3.7.9, on macOS 13.3 22E252 darwin-arm64, locale en-IN) • Flutter version 3.7.9 on channel stable at /Users/{user_name}/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 62bd79521d (4 days ago), 2023-03-30 10:59:36 -0700 • Engine revision ec975089ac • Dart version 2.19.6 • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/{user_name}/Library/Android/sdk • Platform android-33, build-tools 33.0.2 • ANDROID_HOME = /Users/{user_name}/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.12.0

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] Connected device (3 available) • iPhone 14 Pro Max (mobile) • A9ED1A36-88A0-485A-9A7A-E350E60A1E12 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-0 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.3 22E252 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.146

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found!

makda-mohammad avatar Apr 04 '23 03:04 makda-mohammad

Interesting. Seems to work fine in my setup which is pretty much same. Is this M1 or M2?

Did you recently update the library to 0.2.0? Then you might have to do a clean build.

Also try running in a device too to see if that works.

ajinasokan avatar Apr 04 '23 03:04 ajinasokan

Its an M1 mac mini No i was already using the 0.2.0 version It works fine in android but cannot launch it on iOS simulator.

after running flutter pub cache clean getting this error

Error (Xcode): Framework not found Curl

Could not build the application for the simulator. Error launching application on iPhone 14 Pro Max.

makda-mohammad avatar Apr 04 '23 03:04 makda-mohammad

after running flutter clean and flutter pub get the same original error comes back

makda-mohammad avatar Apr 04 '23 04:04 makda-mohammad

I have pushed a patch to sim-arch branch. Could you try it?

You can change your pubspec like this:

    flutter_curl:
        git:
            url: https://github.com/ajinasokan/flutter_curl
            ref: sim-arch

ajinasokan avatar Apr 06 '23 07:04 ajinasokan