Ionic 3 - xcode error with cocoapods - ios

I try to build an ionic 3 app with push notification and I have some problem with iOS deployment.
I have this 3 error in xcode :
diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
I have try a lot of solution I found on internet :
use command "pod install", "pod update"
delete and install CocoaPods
update CocoaPods
Delete "Pods" folder, "Podfile.lock" and "Podfile" and run "pod install" command.
Remove libPods-myApp.a from Link Binary From Librairies.
But nothing is effective...
I really don't know what I have to do.
My Podfile :
# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '8.0'
target 'MyProject' do
project 'MyProject.xcodeproj'
pod 'GoogleCloudMessaging', '~> 1.2.0'
pod 'GGLInstanceID', '~> 1.2.1'
end
My Podfile.lock :
PODS:
- GGLInstanceID (1.2.1)
- GoogleCloudMessaging (1.2.0):
- GoogleInterchangeUtilities (~> 1.0)
- GoogleIPhoneUtilities (~> 1.0)
- GoogleSymbolUtilities (~> 1.0)
- GoogleInterchangeUtilities (1.2.2):
- GoogleSymbolUtilities (~> 1.1)
- GoogleIPhoneUtilities (1.2.1):
- GoogleSymbolUtilities (~> 1.0)
- GoogleUtilities (~> 1.0)
- GoogleSymbolUtilities (1.1.2)
- GoogleUtilities (1.3.2):
- GoogleSymbolUtilities (~> 1.1)
DEPENDENCIES:
- GGLInstanceID (~> 1.2.1)
- GoogleCloudMessaging (~> 1.2.0)
SPEC CHECKSUMS:
GGLInstanceID: 4a317044f744281b82cd03015f379899f277cad3
GoogleCloudMessaging: f37ea14dd0f41d4d889c10b5559dd35bbfd9ac26
GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7
GoogleIPhoneUtilities: 63f25e93a3ddcb66884d182aab3a660d98f1479b
GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
GoogleUtilities: 8bbc733218aad26306f9d4a253823986110e3358
PODFILE CHECKSUM: 0ff66d442dc6f28bf0fbc7a6b12af811ecc9a43c
COCOAPODS: 1.2.1
UPDATE
My [CP] Check Pods Manifest.lock :
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
I really need help please. :(
UPDATE
I have modify my [CP] Check Pods Manifest.lock to this :
diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
My tree errors are disapear but I have this new error :
Module 'FirebaseInstanceID' not found
I don't know why. I tried to run pod install but no difference.

Try
pod repo update
pod install

Open up terminal and run
pod deintegrate
This will remove all connections of pods and your project.
Then you can run
pod install

Please check the path of the xcode project
project 'MyProject.xcodeproj'
Does your podfile and the 'MyProject.xcodeproj' are located on the same directory ? If so you can try removing the ligne above from your podfile

Related

Can't Run flutter app on ios after Amplify update 0.3.2

I get the following error
[!] CocoaPods could not find compatible versions for pod "AmplifyPlugins/AWSCognitoAuthPlugin":
In snapshot (Podfile.lock):
AmplifyPlugins/AWSCognitoAuthPlugin (= 1.15.6, ~> 1.15.5)
In Podfile:
amplify_auth_cognito (from `.symlinks/plugins/amplify_auth_cognito/ios`) was resolved to 0.0.1, which depends on
AmplifyPlugins/AWSCognitoAuthPlugin (= 1.19.0)
Specs satisfying the `AmplifyPlugins/AWSCognitoAuthPlugin (= 1.15.6, ~> 1.15.5), AmplifyPlugins/AWSCognitoAuthPlugin (= 1.19.0)` dependency were found, but they required a higher minimum deployment target.
I have set
platform :ios, '15.0'
in podfile
When I try to open in xcode and build the project I get the following error
diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
from your root flutter project open the terminal and type
cd ios
and then run
pod install
if that doesn't work then run
pod deintegrate
and then
pod install

flutter fatal error: module 'FBSDKCoreKit' not found

I'm using flutter_facebook_login 3.0.0
I got this error when i tried to run my app
** BUILD FAILED ** Xcode's output: ↳ In file included from /Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m:21:
In file included from
/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h:19:
In file included from
/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/../FBSDKLoginKit.h:27:
/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h:24:9:
fatal error: module 'FBSDKCoreKit' not found #import FBSDKCoreKit;
for the simulator. Error launching application on iPhone 8.
I have managed to solve this issue by changing the Podfile
target 'Runner' do
# flutter Pod
use_frameworks!
use_modular_headers!
------
flutter clean
Delete Podfile.lock
pod install --repo-update
pod update FBSDKLoginKit
Run
flutter clean && cd ios && sudo rm Podfile.lock && pod install --repo-update && pod update FBSDKLoginKit
open .xcworkspace and in General-> Deployment Info set Target 11.0 also in Podfile set Target 11.0
Until now the only way that worked for me was this
You will have to override Podfile.lock with 5.8.0 version of Facebook SDK.
PODS:
- FBSDKCoreKit (5.8.0):
- FBSDKCoreKit/Basics (= 5.8.0)
- FBSDKCoreKit/Core (= 5.8.0)
- FBSDKCoreKit/Basics (5.8.0)
- FBSDKCoreKit/Core (5.8.0):
- FBSDKCoreKit/Basics
- FBSDKLoginKit (5.8.0):
- FBSDKLoginKit/Login (= 5.8.0)
- FBSDKLoginKit/Login (5.8.0):
- FBSDKCoreKit (~> 5.0)
- Flutter (1.0.0)
....
I've been around the houses and back with this and have eventually got this to work with the 5.13.1 Podfiles on iOS (by work, I mean compiling, linking and installing onto a real iPhone - I don't actually use Facebook but it's required as part of the firebase-ui login package :-D )
Firstly, do a pod clean, e.g.
Run: flutter clean
Go to ios folder, delete Podfile, Podfile.lock, Pods folder, Runner.xcworkspace
Run project again
After building I got errors regarding:
fatal error: module 'FBSDKCoreKit' not found
#import FBSDKCoreKit;
I then added the modular headers override into the ios/podspec file mentioned here https://github.com/roughike/flutter_facebook_login/issues/214#issuecomment-565166295
The start of the podfile looks like this:
platform :ios, '12.0'
use_modular_headers!
I did note that linking errors, about missing Facebook libraries, were due to a spurious entry in the Frameworks section.
Futher details in this thread
I had resolved it by following below steps, I had faced this issue due to facebook_share plugin so
1.downgrade the version of facebook_share plugin to. 0.0.1+1
2.run command in your project's terminal - pod cache clean —all
3.add below two pods in Podfile:
target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'FBSDKCoreKit', '~> 6.0.0'
pod 'FBSDKShareKit', '~> 6.0.0'
4.run command in your project's terminal - Pod install
5.run command in your project's terminal - pod update FBSDKShareKit
done, error removed
This issue solved my problem 'FBSDKCoreKit / FBSDKCoreKit.h' file not found
pod 'FBSDKCoreKit', '4.38'
pod 'FBSDKLoginKit', '4.38'
pod 'FBSDKShareKit', '4.38'

Flutter:error running pod install after upgrading to flutter facebook login v3.00

I just change the flutter facebook plugin from 2.0.0 to 3.0.0 and now I am getting POD error when I execute flutter build.
Need some help how debug and fix this issue
MY POD file snippet
platform :ios, '9.0'
flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
pod 'FBSDKCoreKit', '4.39.1'
pod 'FBSDKLoginKit', '4.39.1'
--- This error message ----
This is the error dump
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
M Flutter
- FBSDKCoreKit
- FBSDKLoginKit
- file_picker
- firebase_analytics
- firebase_auth
- firebase_core
- firebase_crashlytics
- firebase_dynamic_links
- firebase_messaging
- firebase_remote_config
- flutter_facebook_login
- flutter_statusbarcolor
- google_sign_in
- keyboard_visibility
- location
- package_info
- path_provider
- share
- shared_preferences
- url_launcher
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
In snapshot (Podfile.lock):
FBSDKLoginKit (= 4.39.1)
In Podfile:
FBSDKLoginKit (= 4.39.1)
flutter_facebook_login (from `.symlinks/plugins/flutter_facebook_login/ios`) was resolved to 0.0.1, which depends on
FBSDKLoginKit (~> 5.5)
Specs satisfying the `FBSDKLoginKit (= 4.39.1), FBSDKLoginKit (= 4.39.1), FBSDKLoginKit (~> 5.5)` dependency were found, but
they required a higher minimum deployment target.
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'
Error running pod install
I have clear the cache but I still get the error..
Delete
Podfile.lock
Then run
pod install.
It worked for me.
Am using
flutter_facebook_login
You can try to run the following in the ios directory:
$ pod repo update
$ pod install
You might need to delete the Podfile.lock file first (i'm not sure it helps but it's what i did).
to fix used two commands:
- pod repo update
- pod update FBSDKCoreKit
——————————————————————
after pod repo update :
MacRoberto-8:Nixtelecom robertofonseca$ cd ios
MacRoberto-8:ios robertofonseca$ pod update FBSDKCoreKit
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing BoringSSL-GRPC (0.0.3)
Installing FBSDKCoreKit (5.6.0)
Installing FBSDKLoginKit (5.6.0)
Installing firebase_core (0.0.1)
.
.
.
.
Generating Pods project
Integrating client project
Pod installation complete! There are 14 dependencies from the Podfile and 37 total pods installed.
MacRoberto-8:Nixtelecom robertofonseca$ flutter build ios --release
.
.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===

Cocoapod CI on travis can't install dependencies

This is a cocoapod I created with pod lib create according to the cocoapods guide: https://guides.cocoapods.org/making/using-pod-lib-create.html. The directory stucture and files and the example project were generated for me.
My .travis.yml looks like this:
# references:
# * https://www.objc.io/issues/6-build-tools/travis-ci/
# * https://github.com/supermarin/xcpretty#usage
osx_image: xcode10.3
language: objective-c
# cache: cocoapods
xcode_workspace: Example/MUXSDKImaListener.xcworkspace
xcode_scheme: MUXSDKImaListener-Example
podfile: Example/Podfile
xcode_sdk: iphonesimulator9.3
before_install:
- gem install cocoapods # Since Travis is not always on latest version
- pod repo update
- pod install --project-directory=Example
script:
- set -o pipefail && xctool test -enableCodeCoverage YES -workspace Example/MUXSDKImaListener.xcworkspace -scheme MUXSDKImaListener-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
When travis tries to build these tests, it runs into an error when installing Cocoapods. This output is a bit confusing because it seems to say it needs Mux-Stats-AVPlayer 1.0.1, but then it stays it can't find that version.
That version exists: https://cocoapods.org/pods/Mux-Stats-AVPlayer
$ bundle --version
Bundler version 2.0.2
announce
$ xcodebuild -version -sdk
$ pod --version
1.7.5
before_install.1
2.77s$ gem install cocoapods
2.76s$ pod install --repo-update --project-directory=Example
Updating local specs repositories
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Mux-Stats-AVPlayer":
In snapshot (Podfile.lock):
Mux-Stats-AVPlayer (= 1.0.1, ~> 1.0.1)
In Podfile:
Mux-Stats-Google-IMA (from `../`) was resolved to 0.3.0, which depends on
Mux-Stats-AVPlayer (~> 1.0.1)
None of your spec sources contain a spec satisfying the dependencies: `Mux-Stats-AVPlayer (= 1.0.1, ~> 1.0.1), Mux-Stats-AVPlayer (~> 1.0.1)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
[!] Automatically assigning platform `iOS` with version `9.3` on target `MUXSDKImaListener_Tests` 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 command "pod install --repo-update --project-directory=Example" failed and exited with 31 during .
Your build has been stopped.
The full build is here:
https://travis-ci.org/muxinc/mux-stats-google-ima/builds/588638291
It seems like I'm missing something obvious in this .travis.yml config file.
Podfile for the example project
use_frameworks!
target 'MUXSDKImaListener_Tests' do
pod 'Mux-Stats-Google-IMA', :path => '../'
pod 'Specta'
pod 'Expecta'
end
Podfile.lock for Example project
PODS:
- Expecta (1.0.6)
- GoogleAds-IMA-iOS-SDK (3.10.1)
- Mux-Stats-AVPlayer (1.0.1):
- Mux-Stats-Core (~> 2.0.0)
- Mux-Stats-Core (2.0.12)
- Mux-Stats-Google-IMA (0.3.0):
- GoogleAds-IMA-iOS-SDK (~> 3.9)
- Mux-Stats-AVPlayer (~> 1.0.1)
- Specta (1.0.7)
DEPENDENCIES:
- Expecta
- Mux-Stats-Google-IMA (from `../`)
- Specta
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Expecta
- GoogleAds-IMA-iOS-SDK
- Mux-Stats-AVPlayer
- Mux-Stats-Core
- Specta
EXTERNAL SOURCES:
Mux-Stats-Google-IMA:
:path: "../"
SPEC CHECKSUMS:
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
GoogleAds-IMA-iOS-SDK: 0e37ab83b22075ad631a70dcba9528cb246c92bf
Mux-Stats-AVPlayer: e8ab70f9e67ac54958ac6ee87f479e3c0486baf5
Mux-Stats-Core: 73e692799571459722526ff4a721b6872da5c776
Mux-Stats-Google-IMA: 6ef4042dc3a1052ed55edfcc35a55b8106d2a4a3
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
PODFILE CHECKSUM: 95e48c48a4efb20f1822c750f01f9c105d46475a
COCOAPODS: 1.7.5
Mux-Stats-Google-IMA.podspec file for the pod:
#
# Be sure to run `pod lib lint MUXSDKImaListener.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'Mux-Stats-Google-IMA'
s.version = '0.3.0'
s.summary = 'Mux-Stats-Google-IMA is for tracking performance analytics and QoS monitoring for video with mux.com.'
s.description = <<-DESC
The Mux Stats Google IMA is designed to be used with Mux-Stats-AVPlayer and GoogleAds-IMA-iOS-SDK to track performance analytics and QoS monitoring for video.
DESC
s.homepage = 'https://mux.com'
s.social_media_url = 'https://twitter.com/muxhq'
s.license = { :type => 'Apache 2.0', :file => 'LICENSE' }
s.author = { 'Mux' => 'ios-sdk#mux.com' }
s.source = { :git => 'https://github.com/muxinc/mux-sdk-ima-listener.git', :tag => "v#{s.version}" }
s.ios.deployment_target = '9.0'
s.source_files = 'MUXSDKImaListener/Classes/**/*'
s.dependency 'Mux-Stats-AVPlayer', '~> 1.0.1'
s.dependency 'GoogleAds-IMA-iOS-SDK', '~> 3.9'
end
I don't know why the pod install in my example was failing, but reverting back to the auto-generated .travis.yml fixed it. The only thing I had to modify was adding a the instructions under before_install:
pod setup without this line - the pod lib lint failed with a specific error:
ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for Mux-Stats-AVPlayer (~> 1.0.0) depended upon by Mux-Stats-Google-IMA) during validation.
gem update concurrent-ruby without this line - the pod lib lint failed with a different error:
ERROR | [iOS] unknown: Encountered an unknown error (uninitialized constant Concurrent::Promises) during validation.
So, this is what my .travis.yml looks like now and it runs the tests and runs pod lib lint.
# references:
# * https://www.objc.io/issues/6-build-tools/travis-ci/
# * https://github.com/supermarin/xcpretty#usage
osx_image: xcode7.3
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
before_install:
- gem install cocoapods # Since Travis is not always on latest version
# Avoid error: Encountered an unknown error (uninitialized constant Concurrent::Promises) during validation
# https://github.com/CocoaPods/CocoaPods/issues/8948
- gem update concurrent-ruby
- pod setup
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/MUXSDKImaListener.xcworkspace -scheme MUXSDKImaListener-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint

Xcode linker error and pod install indicates only 3 dependencies out of 4

In Xcode 10.1, I'm getting a linker error surrounding SwiftCharts. This is after I began running 10.2, and needed to revert to 10.1, because of an Xcode bug. I shut down Xcode and cleaned the pods with the following:
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
pod install
which resulted in no DerivedData. The output of the install was the following:
pod install
Analyzing dependencies
Downloading dependencies
Installing Realm (3.14.1)
Installing RealmSwift (3.14.1)
Installing SwiftCharts (0.6.5)
Installing SwiftGraph (2.0.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 4 total pods installed.
At this point, there is no data in DerivedData.
When I startup Xcode, I get a linker error:
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/Realm'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/RealmSwift'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftCharts'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftGraph'
: Linker command failed with exit code 1 (use -v to see invocation)
In the editor:
ld: framework not found SwiftCharts
Underneath DerivedData, in the folder Debug-iphonesimulator, I'm not seeing any frameworks that the warnings are indicating should be there. Why are the framework directories missing, and why is SwiftCharts installing but not available to the linker?
Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '12.1'
target 'ProjectCoreData' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'SwiftCharts', '~> 0.6.3'
pod 'SwiftGraph'
pod 'OverlayContainer'
pod 'RealmSwift'
# Pods for ProjectCoreData
target 'ProjectCoreDataTests' do
inherit! :search_paths
# Pods for testing
end
target 'ProjectCoreDataUITests' do
inherit! :search_paths
# Pods for testing
end
"Podfile" 24L, 549C
Podfile.lock:
PODS:
- OverlayContainer (2.0.0)
- Realm (3.14.1):
- Realm/Headers (= 3.14.1)
- Realm/Headers (3.14.1)
- RealmSwift (3.14.1):
- Realm (= 3.14.1)
- SwiftCharts (0.6.5)
- SwiftGraph (3.0.0)
DEPENDENCIES:
- OverlayContainer
- RealmSwift
- SwiftCharts (~> 0.6.3)
- SwiftGraph
I think it's because SwiftCharts (0.6.5) is built for swift 5.0 with Xcode 10.2, so it's not compatible with Xcode 10.1, just use older version of SwiftCharts (0.6.3 or older).

Resources