Flutter Will not run on IOS Simulator - Pods_Runner.framework' is missing one or more architectures - flutter

I upgraded to Flutter 2.5.0 and now I cannot run on an IOS simulator, from either Android Studio or the command line.
It fails with the error
Runner.xcodeproj: error: The linked framework 'Pods_Runner.framework' is missing one or more architectures
required by this target: arm64. (in target 'Runner' from project 'Runner')
I can manage to run on the Simulator from XCode without an issue
I can run on a device from Android Studio or command line
I have tried
restarting the simulator.
cleaning the build folder
upgrading Cocoapods to 1.11.1
Flutter Doctor says that everything is fine.
----------------- Edit ------------------
The situation Eventually Resolved Itself.

This is a problem because of ARM64 for me. This helped for me.
Be sure to open .xcworkspace.
Adding "arm64" to Project -> Build Settings -> Excluded Architecture
The reason why this might have been happened is because Xcode has been updated to a newer version. You gotta love Xcode..

Related

flutter stuck on Compiling, linking and signing

Flutter project is stuck in Compiling, linking and signing... i dont just understand why this is stuck here...
even using verbose i dont get any stack trace on why this is stuck...
Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running pod install... 11.6s
Running Xcode build...
└─Compiling, linking and signing...
The problem should be in the existing project created on previous environment (old versions) and has to be resolved by creating a new one and moving content in.
Move all my custom contents from existing my project (assets, fonts, lib folders and config files...) to this new project and ran the command : the flutter build ios command works well now !
following this : Fixing Xcode 9 issue: "iPhone is busy: Preparing debugger support for iPhone"
I TRIED :
On Xcode:
Go to "Window" -> "Devices and Simulators"
"Unpair iPhone" (on the side list, right clic)
Then:
Unplug and plug again the USB cable
Press Trust in the prompt message in the device
in Flutter Terminal, paste and enter :
flutter clean
flutter pub get
cd ios
pod install --repo-update
cd ..
Then run the app.
==> Worked only 1st time for me.
My work around for launching IOS devices for now:
Each time I want IOS device,
I COPY/ PASTE and press ENTER on the Terminal:
flutter clean
flutter pub get
cd ios
pod install --repo-update
cd ..
flutter run

Xcode fails to build new projects (12.4) - Could not build Objective-C module 'SwiftUI'

As soon as I create an Xcode project I can't build and have a bunch of errors (Xcode version 12.4)
Could not build Objective-C module 'SwiftUI'
I figured it out! MY Xcode was using the wrong toolchain version even tho I tried to uninstall Xcode and reinstall it.
Make sure you have selected the correct version, in my case since I was running Xcode 12.4, I had to use version 12.4 for toolchains. It's weird that Xcode did not manually change it since I updated.
To updated version:
Xcode > Preferences > Components > Toolchains > and then select your
version

Cannot build any Swift project at all due to strange error about MacOSX10.11.sdk

I'm running macOS 10.12.3 with Xcode 8.3.
I cannot build any macOS Swift projects with it.
If I create a new Cocoa application Xcode project and set it to use Swift, when I try to compile it, I immediately get the following error in the "check dependencies" phase:
error: There is no SDK with the name or path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'
I have no idea what's going wrong!
The only clue I have is that earlier I created a symlink with the path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk that pointed to MacOSX.sdk in order to fix an issue where an older build of Qt that required an SDK with that path. However, deleting the symlink has no effect.
I can build Swift projects that targeting other platforms like iOS. Just not macOS.
Help!
try running this command then reopening the project
(Xcode uses xtools in the command line to build its projects)
sudo xcode-select -switch /path/to/file/
(by default the path is)/Applications/Xcode.app/
look at this pic
saw it here yesterday

ionic phonegap-facebook-plugin iOS build - CompileC build error

The plugin had been working beautifully up until last night. Getting the following errors on iOS only after updating to latest Ionic/Cordova (android is fine).
Updated to:
xcode version 7.2.1
ionic version 1.7.14
I have also tested the same app with another mac running previous version of ionic 1.7.13 and cordova 6, and all is good.
After testing with the older version, i built a new mac (fresh wives laptop) with the latest ionic setup and again same error.
Here's the plugin in question https://ionicthemes.com/tutorials/about/native-facebook-login-with-ionic-framework
The following build commands failed:
CompileC build/testFresh.build/Debug-iphonesimulator/testFresh.build/Objects-normal/i386/FacebookConnectPlugin.o testFresh/Plugins/phonegap-facebook-plugin/FacebookConnectPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR running one or more of the platforms: Error code 65 for command: xcodebuild with args: -xcconfig,/Applications/AMPPS/www/ionic/testFresh/platforms/ios/cordova/build-debug.xcconfig,-project,testFresh.xcodeproj,ARCHS=i386,-target,testFresh,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Applications/AMPPS/www/ionic/testFresh/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Applications/AMPPS/www/ionic/testFresh/platforms/ios/build/sharedpch
You may not have the required environment or OS to run this project
After banging my head against a wall for a few days, I found that others were having the same issue though it was labeled as a "cordova 6" problem.
Original github issue:
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1227
Eventually whilst scrolling through known bugs under github for "phonegap-facebook-plugin" i noticed that similar errors had occurred on a previous release, then super Jeduan re-wrote the plugin and released it under the following:
Plugin fix:
https://github.com/jeduan/cordova-plugin-facebook4
The above appears to be working find under cordova 6, xcode version 7.2.1 and ionic version 1.7.14

Titanium Appcelerator Running error on iOS 9.2

Device: iPhone 5 (Model A1429)
iOS version: 9.2 (13C75)
Titanium SDK: 4.0.0.GA
When I tried to run/distribute my app, I faced this error messages
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/iVirtue.build/Debug-iphoneos/iVirtue.build/Objects-normal/arm64/iVirtue normal arm64
[ERROR] : (1 failure)
The warning in TiApp Editor > Deployment Targets said
iOS development requires [5.0, 9.0) but you have 9.2
Initially, when I haven't updated my Titanium Studio and my iOS version, the app was running perfectly. Please help.
I didn't clearly explain it before. The app i made was made on Titanium Studio, so installed the Appcelerator Studio and have the app exported. Now, it's working well. Thank you all, now i can close this matter.
Try to update the Titanium SDK to the latest 5.1.2.GA & all other components as well, because as you said that the app was working fine before so it is something related to the updates.
Use Titanium Studio to update everything available.
This seems to be a problem in your run configuration (or tiapp.xml). I suggest you first delete the run configuration, run the app again to define a new run configuration. Also check tiapp.xml to see if you have any references to iOS version?
You should also clean your project prior to running it after having deleted the run configuration :-)
/John