Cannot Install Cocoapods - No podfile found in the project directory
Steps to add CocoaPods to manage dependencies in your project:
sudo gem install cocoapods
-> This installs CocoaPods as a piece
of software on your machine.Go to the root of your project directory and execute
pod init
->
This will add a base Podfile to your project.Add the external dependencies that you have to this Podfile by editing it.
Run
pod install
which will fetch all the external dependencies
mentioned by you, and associate it with a.xcworkspace
file of
your project. This.xcworkspace
file will be generated for you if
you already do not have one.
From here on, you should use .xcworkspace
file instead of .xcproject
/ .xcodeproj
.
Example Podfile Syntax:
target 'MyApp' do
pod 'AFNetworking', '~> 3.0'
end
Where AFNetworking
is the pod and 3.0
is the specific version that I want to install.
Documentation: Using CocoaPods
No `Podfile' found in the project directory in Flutter project
change your working directory to ios with:
cd ios
and then run whichever pod commands you'd like
Azure pipeline error: No `Podfile' found in the project directory
Finally, I found the solution:
- stage: iOSStage
dependsOn: []
displayName: iOS
condition: always()
jobs:
- job: iOSJob
displayName: iOS
steps:
- task: FlutterInstall@0
displayName: "Install Flutter SDK"
inputs:
mode: 'auto'
channel: 'stable'
version: 'latest'
- task: InstallAppleCertificate@2
displayName: 'Install Apple Certificate'
inputs:
certSecureFile: '$(p12FileName)'
certPwd: '$(p12Password)'
keychain: 'temp'
deleteCert: true
- task: InstallAppleProvisioningProfile@1
displayName: "Install provisioning file"
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: '$(provisioningProfile)'
- task: Bash@3
displayName: '[Flutter] Configure Flutter'
inputs:
targetType: 'inline'
script: |
$(FlutterToolPath)/flutter doctor -v
$(FlutterToolPath)/flutter config --no-analytics
- task: Bash@3
displayName: '[Flutter] Build project environment'
inputs:
targetType: 'inline'
script: |
$(FlutterToolPath)/flutter pub get
$(FlutterToolPath)/flutter pub global activate junitreport
- task: Bash@3
displayName: '[Flutter] Flutter coverage'
inputs:
targetType: 'inline'
script: |
pip install lcov_cobertura
$(FlutterToolPath)/flutter test --coverage
python -m lcov_cobertura coverage/lcov.info -o coverage/coverage.xml
- task: Bash@3
displayName: '[Flutter] Flutter build'
inputs:
targetType: 'inline'
script: |
$(FlutterToolPath)/flutter build ios --release --no-codesign --build-number $(Build.BuildId)
- task: CocoaPods@0
inputs:
workingDirectory: '$(Build.SourcesDirectory)/ios/Flutter'
forceRepoUpdate: true
- task: Xcode@5
displayName: 'Xcode task'
inputs:
actions: 'build'
sdk: '$(sdk)'
configuration: '$(configuration)'
scheme: '$(scheme)'
xcWorkspacePath: ios/Runner.xcworkspace
signingOption: 'manual'
signingIdentity: $(APPLE_CERTIFICATE_SIGNING_IDENTITY)
provisioningProfileUuid: $(APPLE_PROV_PROFILE_UUID)
packageApp: true
workingDirectory: 'ios'
exportOptions: 'auto'
exportMethod: 'ad-hoc'
archivePath: 'output/$(sdk)/$(configuration)/Runner.xcarchive'
exportPath: 'output/$(sdk)/$(configuration)'
useXcpretty: 'false'
args: '-verbose'
- task: CopyFiles@2
displayName: 'Copy app to staging directory'
inputs:
Contents: '**/*.ipa'
TargetFolder: '$(build.artifactStagingDirectory)'
OverWrite: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Existing Podfile found in directory
I fixed it by reloading the directory path. Running "cd /Users/x/Desktop/x" again, and then "pod init".
Related Topics
Uiscrollview Adjusts Contentoffset When Contentsize Changes
Number of Threads Created by Gcd
How to Custom Modal View Controller Presenting Animation
Does iOS Provide Built in Text to Speech Support or Any Class Like Nsspeechrecognizer
Disable the Uitableview Highlighting But Allow the Selection of Individual Cells
"The Data Couldn't Be Read Because It Is Missing" Error When Decoding JSON in Swift
New React Native Project with Old Version of React Native
Bsxpcmessage Received Error for Message: Connection Interrupted
Uitableview Add Cell Animation
Xcode Instruments Allocations: Look at Live Bytes or Overall Bytes
iOS Floating Video Window Like Youtube App