Flutter App building from xcode but failing from android studio - ios

After upgrading to xcode 15 if I launch my flutter app from android studio it fails to build but works on my iphone11 device. It also builds on the ios emulator if launched from xcode. I keep getting this error :
Xcode's output: ↳
ld: in /Users/macbook/Desktop/dis_or_dat/ios/Pods/mobile-ffmpeg-audio/lame.framework/lame(VbrTag.o),
building for iOS Simulator, but linking in object file built for iOS,
file
'/Users/macbook/Desktop/dis_or_dat/ios/Pods/mobile-ffmpeg-audio/lame.framework/lame'
for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
/Users/macbook/Desktop/dis_or_dat/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
deployment target versions is 9.0 to 15.0.99. (in target 'FMDB' from
project 'Pods')

ios>open "Podfile"write platform :ios, '9.0'

Seems like your project deployment target is set for iOS version 8 and later, you need to update that (iOS 9 should be minimum target).
Navigate to project's ios folder and open 'Podfile'. Uncomment the second line and set it to any later version than 8.
If the problem still doesn't get solved, this thread might help:
https://developer.apple.com/forums/thread/96361

Commenting here for the unwary who like me, spent far too long trying to work out what was going on.
It turns out this is an issue with Flutter sound. The app will build in XCode, and on a real device but not on a simulator.
Bug being tracked here:
https://github.com/Canardoux/flutter_sound/issues/775

Related

Problem building IOS app after flutter upgrade

Folks, please help.
I upgraded flutter and now my project doesnt build.
Here's the messega I get:
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
lib/main.dart:1
Xcode build done. 58.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/0m/j17z1hfn6h18bx6q6dyhs6g80000gp/T/flutter_tools.ScC4jr/flutter_ios_build_temp_dir9oudiu/temporary_xcresult_bundle
: Error: Member not found: 'packageRoot'.
../…/interface/local_platform.dart:46
io.Platform.packageRoot; // ignore: deprecated_member_use
^^^^^^^^^^^
Failed to package /Users/fplopez/StudioProjects/listing_project_DEV.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/fplopez/StudioProjects/listing_project_DEV/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'MTBBarcodeScanner' from project 'Pods')
/Users/fplopez/StudioProjects/listing_project_DEV/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'FMDB' from project 'Pods')
Result bundle written to path:
/var/folders/0m/j17z1hfn6h18bx6q6dyhs6g80000gp/T/flutter_tools.ScC4jr/flutter_ios_build_temp_dir9oudiu/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Exited (sigterm)
I really need help with this. I don't know how to fix it.
Thanks
I had a similar error before, my problem was that I have changed the bundle identifier for some tests and when returning to the old one I faced something like this, after many searches what has worked for me is to create a new project and take the iOS module to my project then handling it again like cloning the old info.plist and so on.

Build fail if i choose IOS Deployment Target below 11.0.0

I'm developing Hybrid app using ionic 3 framework and everything is working fine when Deployment target is set to 11.0.0 or above.
But as soon as I set iOS deployment target to 9.3 or 10.0.0 or 10.3.0(Below 11.0.0) am getting build failure with below error message.
linker command failed with exit code 1 (use -v to see invocation)
So i have to build my app with Deployment target 11.0.0. but if i do that i cant run app in the devices which has vsersion below 11.0.0.
my Xcode version is Version 10.1 (10B61)
I think there must be some packages or methods in the iOS native environment which doesn't work for iOS below then 11.0. You should analyse the error information to see which method or framework is not supported for iOS below 11.0.
The problem is in your pod files i think.
Click on pods.
Select one pod on left side and click on build settings.
Under development section check the version once for all the pods.

Build error - targeted OS version does not support use of thread local variables

What does the below error means? I've never seen this before.
d: targeted OS version does not support use of thread local variables
in __ZN12base_logging10LogMessage5FlushEv for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I'm using cocoapod for google cast sdk and building in Xcode 10 beta and xcode 9.4.
Changing the deployment target to 9.0 worked for me
open Xcode:
select YOUR_PROJECT_NAME from target
change Deployment target to 9.0 or greater under Deployment Info tab.
Hope it helps!
Edit: For visual/image reference
Your project tries to link some C++ code which makes use of a C++11 concept not supported all iOS platforms.
I think thread_local is allowed beginning with iOS 9. Try to set the deployment target to iOS 9 or later.
The offending code is in base_logging::LogMessage::Flush().
Please change deployment target to 9.0 as shown in the image.

Firebase react-native iOS build fails with "-fobjc-weak is not supported on the current deployment target"

If I try to run my react-native app from XCode, xcode fails with the message:
-fobjc-weak is not supported on the current deployment target
If I run from a shell react-native run-ios, then I get also an error message:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/michel/Development/Androdev/Firebase/Sample/FlightLogIos/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/nanopb-dummy.o Target\ Support\ Files/nanopb/nanopb-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
However, the app still runs. It is annoying though as I think I will have at some point to do some Objective C code for my project. Does anybody know how to resolve this issue?
I'm using Firebase in a regular, non-react-native Xcode project. I had the same error when building nanopb target. When I checked settings, deployment target for nanopb was set to 4.3. Just updating it to something more recent, like 9.0 fixed this error for me.
i just ran into the same problem. i fixed it for me by increasing the ios deployment target of the nanopb target to iOS 8.0 (its 4.3 per default). Pods Project -> target: nanopb -> iOS Deployment Target: iOS 8.0
I had the same problem with my ionic app, and I did this steps:
Close xcode
Command line remove ios platform
Command line add ios platform
Open xcode and open PROJECT.xcworkspaces
Xcode give me some recommendations in project and apply
Clean and build and it's works
I hope this helps

xlslib build success in iOS 7 but failed in iOS 8. How can I do?

I have searched http://sourceforge.net/projects/xlslib/files here and download the library. I added the library into my xcode project like this
My xcode version is 6.4 and my project iOS Deployment Target is 8.0.
After I added it into the project without typing any code, I just built to see if it works.
But I failed and get these information:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '(MyProject Directory)/xlslib/libxls.3.dylib' for architecture x86_64
clang: error:
linker command failed with exit code 1 (use -v to see invocation)
When I changed iOS Deployment Target to 7.0, build the project by using iOS simulator with iOS version 7.1, it works. Is the library doesn't support iOS 8.0 and later ?
BTW, other link flag is already be empty, what should I do to solve this problem?
Any help would be appreciated.

Resources