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

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

Related

purchases_flutter minimum deployment target error

I am receiving the following error when I compile my FLutter project after adding package:
purchases_flutter: ^4.0.1 to it ....
[!] CocoaPods could not find compatible versions for pod "purchases_flutter":
In Podfile:
purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
Specs satisfying the purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
dependency were found, but they required a higher minimum deployment target.
I have checked the Readme in PubDev for this package which says:
minimum targets iOS 9.0+ is required.
However when I look in my PoDFile I have platform :ios, '10.0'. And in Xcode:
Am I missing something here. I haven't seen any other Deployment targets in Xcode or Podfile.
Would really appreciate it, if someone could point me in the correct direction with this.
Many thanks.
I have also tried creating a new Flutter project to test this from the start again and used the terminal commands as suggested below.
I still get the same error... here is a full screen shot of my Android Studio window. Showing the error, my IOS drive and Podfile.
You need to prioritize your dependencies. If the problem is only with this package or plugin, just add it with flutter pub add [dependency name], avoiding directly writing pubspec.yaml It prevents conflict between package versions, automatically finding appropriate version. Then in Podfile top define minimum version. Delete pubspec.lock file, ios/Podfile.lock file and ios/Pods directory. Execute flutter pub get. Enter ios directory via Terminal, execute pod install and try to run application again. If your Mac has apple silicon chip pod install command will be a bit different. Let me know, it worked or not.

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

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!

how to properly install "RxSwift" module?

I'm trying to build a project that uses RxSwift module, XCode keeps complaining with the error "no such module RxSwift"...
I've tried to install this module several times, in the terminal I got the following message after pod install
Analyzing dependencies
Downloading dependencies
Using RxCocoa (4.3.1)
Using RxSwift (4.3.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform `ios` with version `11.4` on target `BTCPrice` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] Automatically assigning platform `watchos` with version `4.3` on target `WatchApp` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] Automatically assigning platform `watchos` with version `4.3` on target `WatchApp Extension` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] The `BTCPriceTests [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-BTCPriceTests/Pods-BTCPriceTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `BTCPriceTests [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-BTCPriceTests/Pods-BTCPriceTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
as I could understand it RxSwift was installed, why does Xcode keep complaining about it?
I'm executing the .xcworkspace file..
thank you in advance for the answers!
How to remove CocoaPods from a project?
Simple Steps to installed pod file:
Close project of Xcode
1.Open terminal (Command + Space & type terminal)
2.Set your project path on terminal.(cd Desktop/PodDemos)
3.Type command on terminal: sudo gem install cocoapods
4.Command : pod init
5.Go to pod file of your project and adding pod which you want to install(Command: open podfile)
6.Added in pod file : pod 'RxSwift'
pod 'RxCocoa'
7.Command : Pod install
8.open your Project from terminals
Command : open PodDemos.xcworkspace
OR
Go to project folder and open PodDemos.xcworkspace

cocoapods Google Mobile ads does not generate .xcworkspace file

I am exporting a project from Unity3d to xcode that uses the last GoogleMobileAds package.
I have installed and updated cocoapods and also have the famous podfile containing de following lines:
source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => false
platform :ios, ‘8.0’
target ‘MyProject’ do
pod 'Google-Mobile-Ads-SDK', '~> 7.14’
pod 'Firebase/Core'
pod 'Firebase/AdMob'
end
and I run
pod install
and
pod update
successfully
dependancies are downloaded alright, as you can see the results below:
Updating local specs repositories
CocoaPods 1.2.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Analyzing dependencies
Downloading dependencies
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Installing Google-Mobile-Ads-SDK (7.14.0)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 8 total pods installed.
According to both cocoapods and google mobile ads documentation, I will need to continue with "MyProject.xcworkspace" but the file is nowhere to be found.
any suggestions?
When using install! 'cocoapods', :integrate_targets => false Cocoapods will not create an xcworkspace for you.
That's the intended behaviour. You'll even notice this if you follow the command prompt. This line is telling you that no integration is taking place.
Skipping User Project Integration
If you want to get an xcworkspace just remove :integrate_targets => false
It seems the problem comes from editing the Podfile using TextEdit.
As it warns you that you should not continue using TextEdit, one could falsely suppose that the program is intelligent enough to understand and correct these unwanted modifications.
This is the solution I have found:
delete the Podfile and Podfile.lock from your working directory
create a new Podfile using pod init
install SublimeText and use it to open the Podfile
add the necessary pods for the project
(I also included the line "use_frameworks!" although it may not be
needed.)
run "pod install" and "pod update"; this time I get
[!] Please close any current Xcode sessions and use Orbit.xcworkspace for this project from now on.
and the file is now available in project directory
You was used this guide for install pod?
In addition to Radu Dita's message. If you do not want that line to be added (so you do not need to delete it later), you need to disable cocoapods integration in "iOS Resolver Settings" by selecting "None", build project and then enable it back "Xcode Workspace". I found this with try and error. I hope my message will save save someone's time

Alamofire not working well with swift 3

I have a project written by swift 2.
I updated to swift 3, I'm using Alamofire and swiftyjson
so I updated their by cocoapods and I fixed all my project issues,
after all that I got this error about Alamofire
The following binaries use incompatible versions of Swift:
also I have these warnings
this is my pod file
this what I see in terminal after pod update
Update all pods
Updating local specs repositories
CocoaPods 1.2.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Analyzing dependencies
Downloading dependencies
Using Alamofire (4.0.1)
Using DropDown (2)
Using SideMenu (2.0.5)
Using SwiftyJSON (3.1.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 4 dependencies from the Podfile and 4 total pods installed.
[!] The `ehtamiApp [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-ehtamiApp/Pods-ehtamiApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `ehtamiApp [Release]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-ehtamiApp/Pods-ehtamiApp.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
what is that mean? and how I can fix it?