Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values - ios

I generated new flutter module project for my existing app which has set iOS target to 15.0
I was following https://docs.flutter.dev/development/add-to-app/ios/project-setup this guide with option A but I'm getting this after pod install:
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing FlutterPluginRegistrant (0.0.1)
Generating Pods project
[!] An error occurred while processing the post-install hook of the Podfile.
[Xcodeproj] Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values: `{"Release"=>"13.0", "Debug"=>"13.0", "Production"=>"15.0", "Store"=>"15.0"}`
I tried changing the iOS version in pod file by setting target to 15.0 but its not working.
Changing anything in flutter .iOS dir is also not working

Related

flutter_native_image not found in xcode build, but pod install log shows otherwise

I have made an app which uses flutter_native_image, image_picker and image_cropper to take pictures and resize them at will. On Android build it works flawless.
While running XCode build to make this work on iOS, the build fails because packages cannot be found, although I followed (to my newbee knowledge) all necessary steps
Steps I did to create a clean build on iOS:
flutter clean
flutter pub get
pod deintegrate; pod install
In the log of the pod install, I can see that the necessary packages are being installed. See log below
#LMAC-C02F5662MD6R ~/work/git/boekelaar/bierpot/frontend/ios> pod deintegrate; pod install
Deintegrating `Runner.xcodeproj`
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
- Pods_Runner.framework
Deleting Pod file references from project
- Pods-Runner.debug.xcconfig
- Pods-Runner.release.xcconfig
- Pods-Runner.profile.xcconfig
Deleted 1 empty `Frameworks` groups from project.
Removing `Pods` directory.
Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing TOCropViewController (2.6.1)
Installing flutter_native_image (0.0.1)
Installing image_cropper (0.0.4)
Installing image_picker_ios (0.0.1)
Installing path_provider_ios (0.0.1)
Installing shared_preferences_ios (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 6 dependencies from the Podfile and 7 total pods installed.
After this install, I tried to build this on a physical device (iPhone X with iOS 15) and my XCode build failed here:
Screenshot of XCode build failure
Does anyone have any clue or ideas?

Getting error while installing Expo modules in React Native iOS Application

I have an application in react-native with minimum iOS version set to 11. I am using Cocoapods as dependency manager. I need to install expo-web-browser and for that I am following this link. So first I need to install Expo modules. But when I run the command npx install-expo-modules#latest,it forces me to update minimum iOS requirement to 12 and after that I get the following error:
Found some duplicated unimodule packages. Installed the ones with the highest version number.
Make sure following dependencies of your project are resolving to one specific version:
expo-file-system, expo-constants
Updating local specs repositories
Analyzing dependencies
[!] There are multiple dependencies with different sources for UMCore in Podfile:
UMCore (from ../node_modules/#unimodules/core/ios)
UMCore (from ../node_modules/#unimodules/core/ios)
Couldn't install Pods. Updating the Pods project and trying again...
Uncaught Error CocoaPodsError: Command pod install failed.
└─ Cause: There are multiple dependencies with different sources for UMCore in Podfile:
UMCore (from ../node_modules/#unimodules/core/ios)
UMCore (from ../node_modules/#unimodules/core/ios)

Flutter Error on Real iOS Device: "module 'fluttertoast' not found"

My flutter app is working properly in iOS Simulator.
I have added fluttertoast by:
Adding it on pubspec.yaml
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
fluttertoast: ^7.0.1
Importing in my dart file
import 'package:fluttertoast/fluttertoast.dart';
So far it works as intended. BUT, when I move to a REAL iOS device, my iPhone XS, It won't compile.
I get this error:
fatal error: module 'fluttertoast' not found
#import fluttertoast;
What am I missing?
Suprisingly, I made it work just now.
What I did:
Tried to modified the podfile.
Tried to run it. Error due to podfile.
Revert podfile to original state.
Tried to build, pop-up asking something like 'would you like to use Xcode version or version on disk (I used Xcode version before which may have caused the problem)
I chose to use VERSION ON DISK.
Program is now working on real iOS device.
So whenever you get the pop-up asking "which version to use", always choose "VERSION ON DISK".
Thanks guys
I have face this issue very recently and the way I fix is like this. I change the pod file min deployment to 11 as needed by some of the pacakges I was using like flutter stripe. but the issue was that in Xcode the deployment was set to 9.0(not changing to 11.0). which was causing the issue to fix the issue follow the step.
1 : delete to /iOS/podfile.lock (if any)
2 : go to /iOS/podfile (platform :ios, '9.0') replace the 9.0 with version required for your packages/app.
3 : in terminal cd ios (pod install)
4 : edit the deployment info version here as well in Xcode
5 : run the app it will work if building archive build archive it will not throw the error.
Today I am facing the same problem, what I do is switch to the project ios folder, run this command:
pod repo update
pod install
from the log output, we can found the pod install the fluttertoast dependencies:
➜ ios git:(master) ✗ pod install
Analyzing dependencies
Downloading dependencies
Installing FMDB (2.7.5)
Installing Flutter (1.0.0)
Installing SwiftAudioEx (0.14.7)
Installing Toast (4.0.0)
Installing device_info_plus (0.0.1)
Installing flutter_secure_storage (3.3.1)
Installing fluttertoast (0.0.2)
Installing in_app_purchase_ios (0.0.1)
Installing music_player (0.0.1)
Installing path_provider_ios (0.0.1)
Installing shared_preferences_ios (0.0.1)
Installing sqflite (0.0.2)
Installing system_clock (0.0.1)
Installing url_launcher_ios (0.0.1)
Installing video_player_avfoundation (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 12 dependencies from the Podfile and 15 total pods installed.
[!] 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 `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
then build the project in xcode success.
I Deleted podfile.lock
I Just Commented
platform :ios, '11.0'
enter image description here
Then I Run pod install

Why doesn't this iOS project build using XCode 11?

I have an iphone app (Swift project) that used to build using an older version of XCode, but I haven't built it for a year (I updated my XCode) and now I can't build it. I tried everything I found after googling the problem. I get this error every time I try to build it:
unable to spawn process (No such file or directory) (in target 'CombineDataSources' from project 'Pods')
I don't get any other error when I try to build the project, just this one.
I tried cleaning the build folder, deleting all pods (Library/Cashes/CocoaPods/Pods), deleting derived data (Library/Developer/XCode/DerivedData), deleting the xcworkspace file, then running pod deintegrate command in terminal, then running pod install command in terminal.
Analyzing dependencies
Downloading dependencies
Installing CombineDataSources (0.2.2)
...
Generating Pods project
Integrating client project
Pod installation complete! There are 14 dependencies from the Podfile and 20 total pods installed.
Podfile (part that contains the package that's part of the Xcode error):
pod 'CombineDataSources', '~> 0.2.2'
Podfile.lock (part that contains the package that's part of the Xcode error):
PODS:
- CombineDataSources (0.2.2)
DEPENDENCIES:
- CombineDataSources (~> 0.2.2)
SPEC REPOS:
trunk:
- CombineDataSources
SPEC CHECKSUMS:
CombineDataSources: 2315365365i8746865375
All pods were successfully installed, no errors, no warnings, but my project still gives the unable to spawn process error. Anyone has any idea what else I could try? Any help, any suggestion would be very much appreciated!
I cannot manage to find the spec 0.2.2 in neither the CombineDataSources nor in the specs repo;
The 0.2.2 release seems that doesn't contain the podspec.
In repo not found: https://github.com/CombineCommunity/CombineDataSources/tree/0.2.2
In cocoapod specs not found:
https://github.com/CocoaPods/Specs/search?q=combinedatasources&unscoped_q=combinedatasources
Only the latest version seems to contain a podspec. (0.2.5)
Could you try with to pod install or bundle exec pod install with that version?

Running Cocoapods "pod install" Causes Libraries to Disappear

We are having a problem with an existing project. Running pod install causes our existing Pods to break.
Our existing project looks like this:
After I run pod install, several of the libraries that appear in the Products directory and under the Targets are gone, and the app won't compile:
Here is the output from pod install --verbose
myapp-Macbook-Air:myapp username$ pod install --verbose
Preparing
Updating local specs repositories
Updating spec repo `master`
$ /usr/bin/git pull --ff-only
Already up-to-date.
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods`:
(`$(ARCHS_STANDARD)`)
Finding Podfile changes
- Dropbox-iOS-SDK
- FiksuSDK
- GoogleAnalytics
- Localytics
- MobileAppTracker
- SDWebImage
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
- Dropbox-iOS-SDK
- FiksuSDK
- GoogleAnalytics
- Localytics
- MobileAppTracker
- SDWebImage
Downloading dependencies
-> Using Dropbox-iOS-SDK (1.3.13)
-> Using FiksuSDK (4.4.1)
-> Using GoogleAnalytics (3.13.0)
-> Using Localytics (3.5.0)
-> Using MobileAppTracker (3.7)
-> Using SDWebImage (3.7.2)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `SDWebImage` iOS 7.0
- Installing target `Pods` iOS 7.0
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
- Generating deterministic UUIDs
- Writing Lockfile in `Podfile.lock`
- Writing Manifest in `Pods/Manifest.lock`
Integrating client project
Integrating target `Pods` (`myapp.xcodeproj` project)
Adding Build Phase 'Embed Pods Frameworks' to project.
- Running post install hooks
- cocoapods-stats from
`/usr/local/lib/ruby/gems/2.1.0/gems/cocoapods-stats-0.6.2/lib/cocoapods_plugin.rb`
Sending stats
- Dropbox-iOS-SDK, 1.3.13
- FiksuSDK, 4.4.1
- GoogleAnalytics, 3.13.0
- Localytics, 3.5.0
- MobileAppTracker, 3.7
- SDWebImage, 3.7.2
Pod installation complete! There are 6 dependencies from the Podfile and 6
total pods installed.
[!] The `myapp [Debug]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
(We've always had that GCC_PREPROCESSOR warning)
Any ideas about what be happening here, would be appreciated.
Some other notes: We are having this problem on Xcode 6 and Xcode 7, but both machines are running OS X 10.11, which might be the problem. Cocoapods v0.39.0. Also tried downgrading to Cocoapods v0.25.0 but the same problem occurs.

Resources