Codemagic builed failed on flutter app on windows with platform error? - flutter

I'm trying to build my flutter app with codemagic for ios but it fails building with this error:
[!] Automatically assigning platform iOS with version 9.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Error running pod install
Build failed :| Failed to build for iOS
exactly like on this thread:
Error while building flutter app for ios on codemagic - Automatically assigning platform `iOS` with version `8.0` on target `Runner`
but couldn't understand the solution.
I'm using windows so have no pod file as well.
I also looked inside the suggested link but it links to the cocoapod website which I don't have on windows.
Any suggestions would help!

Related

Cocoapods Probleme

[Podfile][1]```
Error output from CocoaPods:
↳
[!] The FlutterFire plugin cloud_firestore for macOS requires a macOS
deployment target of 10.12 or later.
Exception: Error running pod install
Hi, I've been stuck on this problem for a while, I'm trying to connect my flutter app with firebase but as soon as I put firestore on I have this problem. I modified the podfile file by putting the right version but nothing is done. I followed a lot of tutorials but none solved my problem. so please i need help.
I created my database on firebase, I configured it with xcode
Cocaopods version : 1.11.3
firebase_core: ^2.1.1
cloud_firestore: ^4.0.3
platform :ios, '12.0'
Podfile :
[1]: https://i.stack.imgur.com/fYqSZ.png
I solved this problem.
Here are the tips:
Run Xcode --> Click Runner --> Change version in 'minimum deployments' f.e. to 11.0 or later
Go to Visual Studio Code --> go to 'macos' folder --> click 'podfile' --> change on the same version like in Xcode in platform :osx, '11.0'
Restart App and start with debugging again.
Let me know if it worked :)
Take a look at the first line of your Podfile in your macOS folder. If it looks like this:
platform :osx, '10.11'
then change it to your desired MACOS_DEPLOYMENT_TARGET

unable to resolve product type 'com.apple.product-type.application.watchapp2' for platform 'iphoneos' (in target 'watchVersion' from

i want to create flutter app for apple watch after Enabling bitcode in Xcode and Adding an Apple Watch target
but app is not running ,
get me this error
error: unable to resolve product type 'com.apple.product-type.watchkit2-extension' for platform 'iphoneos' (in target 'watchVersion Extension' from project 'Runner')
You need to change your project's Xcode Build Settings for your Apple Watch app target (extension also) Base SDK and Supported platform to watchOS. Make sure that the Runner app stays on iOS.
Faced a similar problem with Azure pipeline, the solution was to update sdk which was being passed as sdk:'iphoneos'.
Just passed empty string sdk: ''

Flutter webview_flutter build is failing

I am trying to install webview_flutter plugin but somehow my build is failing every time
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
├─Assembling Flutter resources... 10.2s
└─Compiling, linking and signing... 2.1s
Xcode build done.
17.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
<path_to_project>ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal
error: module 'webview_flutter' not found
#import webview_flutter;
~~~~~~~^~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
pubspec.yml
dependencies:
flutter:
sdk: flutter
webview_flutter: ^0.3.19+8
I tried running but it did not solve it.
flutter clean
flutter pub cache repair
Have you follow all the installation for iOS for this plugin?
This is from the webview_flutter page itself:
To use this plugin on iOS you need to opt-in for the embedded views
preview by adding a boolean property to the app's Info.plist file,
with the key io.flutter.embedded_views_preview and the value YES.
This also seems to be related, take a look: https://github.com/flutter/flutter/issues/50190
In my case, the issue was that I had manually edited the podfile to add in my own (non-flutter) pod to the project. However, the flutter build would make no attempt to edit (or overwrite) the podfile, (maybe this is good) so the podfile would not have the changes necessary to support webview_flutter. I figured this all out by creating a brand new flutter project and comparing the new project's generated podfile against my current version. They looked significantly different.
flutter upgrade solved problem for me

producing flutter (Xcode) testflight archive fails with multiple commands produce

need to produce an archive so we can upload to TestFlight so followed instructions in https://flutter.dev/docs/deployment/ios . my flutter runs on both real iPhone and simulator with no problem. so I produce a release version as required then open the resultant Xcode project (runner). immediately see the error
:-1: Multiple commands produce '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/jmcfet/AndroidStudioProjects/sis/ios/Flutter/Flutter.framework' to '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
now this does not happen when I do the same against the "Flutter Hello world" app so wondering what is messed up in my Flutter app
no luck :
johns-MacBook-Air:ios jmcfet$ pod install
Analyzing dependencies
Fetching podspec for Flutter from .symlinks/flutter/ios
Fetching podspec for video_player from .symlinks/plugins/video_player/ios
Downloading dependencies
Using Flutter (1.0.0)
Using video_player (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig).
not an IOS expert but looks like the install was not successful. little confused as the Xcode project was generated by Flutter so why is Flutter generating a bad config file. if so looks like a bug to me

cordova build error: SDK "iphoneos6.0" cannot be located

i developing a html5-App for Android and iOS. Building for Android and iOS-Simulator works like a charm. But if i want to build the app for iOS-Device the build process stops with following error:
update-ios:
cordova prepare ios
build-ios-xcodebuild:
xcodebuild: error: SDK "iphoneos6.0" cannot be located.
/Users/.../nbproject/build.xml:178: exec returned: 64
For development i using netbeansIDE, xcode 5.1.1 and cordova 3.5.
Also i downloaded the iOS 6.1 sdk and copied into sdk folder of xcode, but that don't work for me. May i have to set an environment variable?
Is there someone, who could give me a hint?
In advance