Alamofire not working well with swift 3 - swift

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?

Related

CocoaPods could not find compatible versions for pod "Sentry"

[!] CocoaPods could not find compatible versions for pod "Sentry":
In Podfile:
sentry_flutter (from .symlinks/plugins/sentry_flutter/ios) was resolved to 0.0.1, which depends on
Sentry (~> 7.11.0)
None of your spec sources contain a spec satisfying the dependency: `Sentry (~> 7.11.0)`.
I am just trying to install sentry_flutter plugin in my futter project. Currently i am testing in ios device. But it gives the above error.
The error message seems straight forward enough. But i cannot manage to include this plugin in my project.
you can run pod repo update to update your local cache bcause it may be outdated.
If it doesn't fix the issue for you, you can delete your Podfile.look file on ios folder and run pod install

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

Swift Version 5, SwiftyJSON

Build system information
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SwiftyJSON')
how can I deal with it?
SwiftyJSON v4.3.0 supports Swift 5. Check your Podfile to make sure you’re getting the latest release. You may need to update your Pods (with pod update) to make sure you’ve got the latest versions.
Also, you might consider retiring SwiftyJSON and using JSONEncoder/JSONDecoder instead. See Encoding and Decoding Custom Types or the Using JSON with Custom Types sample for more information.
If, on the other hand, you are not using Swift 5 yet, just configure your Podfile indicate that you want to use SwiftyJSON v4.2.0. E.g.
target 'MyApp' do
pod 'SwiftyJSON', '~> 4.2'
end
Either change the build target of your project to Swift 4.x or wait until the project gets support for Swift 5 (you can check that on the GitHub page)
I get this error too when i tried to pod lint or push.
error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2.
I have to stay on xcode 10.1 ans use cocoapods 1.5.3, but on a fresh install (new mac) I received the same error.
Here is my solution:
After comparing my 'gem list' with an other mac, I found that the gem xcodeproj was very high (1.12.0).
So, I installed a lower version required by cocoapods (1.5.3)
"sudo gem install xcodeproj -v 1.5.7"
and remove the never
"sudo gem uninstall xcodeproj -v 1.12.0"
Wrongs fine now, I cant lint and push my pods.

Generamba setup failes when using Cocoapods

Only when using cocoapods(after run pod install), generamba setup failes with the following message when settin path to a .xcodeproj.
The path to a .xcodeproj file of the project is 'GrambaSample.xcodeproj'. Do you want to use it? (yes/no) yes
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project/object.rb:321:in `configure_with_plist': [!] Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa. (RuntimeError)
This error won't appear is not using cocoapods.
How can I be able to setup Generamba while using cocoapods.
To avoid this issue you should update CocoaPods to the latest beta version by executing
gem install cocoapods --pre
Latest beta version of CocoaPods now using inputFileListPaths and outputFileListPaths.
More info here See .xcfilelist Support

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