Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with cocoaPods #50

Open
2 of 7 tasks
am77real opened this issue Nov 19, 2023 · 1 comment
Open
2 of 7 tasks

Problem with cocoaPods #50

am77real opened this issue Nov 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@am77real
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

2.0.1

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

Flutter doctor
armandom@Laptop-de-Armando flutter_application_1 % flutter doctor                   
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.2 23C5047e darwin-arm64, locale es-MX)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2023.2.5)
[✓] VS Code (version 1.84.2)
[✓] VS Code (version 1.85.0-insider)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

</details>


### Minimal code example

<details>
  <summary>Code sample</summary>

<!-- Paste the output below inside ``` and ``` -->

pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  flutter_form_builder: ^9.1.1
  shared_preferences: ^2.2.2
  form_builder_phone_field: ^2.0.1

```dart
import 'package:form_builder_phone_field/form_builder_phone_field.dart';
import 'package:form_builder_validators/form_builder_validators.dart';

Padding(padding: const EdgeInsets.only(left: 30, top: 2, right: 30, bottom: 4),
                        child:
                      FormBuilderPhoneField(
                        name: 'phone_number',
                        keyboardType: TextInputType.number,
                        controller: ctrlPhone,
                        defaultSelectedCountryIsoCode: 'MX',
                        pickerItemHeight: 10,
                        pickerSheetHeight: 10,
                        decoration: const InputDecoration(
                          hintText: 'Phone Number',
                          suffixIcon: Icon(CupertinoIcons.phone),
                          enabledBorder: OutlineInputBorder(
                            borderSide: BorderSide(width: 2, color: Colors.blue),
                            borderRadius: BorderRadius.all(Radius.circular(15)),
                          ),
                      ),
                        priorityListByIsoCode: const ['MX'],
                        validator: FormBuilderValidators.compose([
                          FormBuilderValidators.numeric(),
                          FormBuilderValidators.required(),
                          FormBuilderValidators.minLength(8),
                        ]),
                      ),
                      ),

Current Behavior

I can't run the app on an iOS simulator

Expected Behavior

When form_builder_phone_field: ^2.0.1 is included in the pubspec.yaml file and the app is run in ios simulator (iphone 15 pro).
sends the following error:

[!] CocoaPods could not find compatible versions for pod "PhoneNumberKit/PhoneNumberKitCore":
In Podfile:
phone_number (from .symlinks/plugins/phone_number/ios) was resolved to 2.0.1, which depends on
PhoneNumberKit/PhoneNumberKitCore (= 3.5.10)

Steps To Reproduce

Error to run App

[!] CocoaPods could not find compatible versions for pod "PhoneNumberKit/PhoneNumberKitCore":
       In Podfile:
         phone_number (from `.symlinks/plugins/phone_number/ios`) was resolved to 2.0.1, which depends on
           PhoneNumberKit/PhoneNumberKitCore (= 3.5.10)

Aditional information

No response

@am77real am77real added the bug Something isn't working label Nov 19, 2023
@itsmeabhi12
Copy link

itsmeabhi12 commented Dec 6, 2023

@am77real

add this line in ios/PodFile

pod 'PhoneNumberKit/PhoneNumberKitCore', :git => 'https://github.com/marmelroy/PhoneNumberKit', :tag => '3.5.10'

so a final pod file looks like this

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  pod 'PhoneNumberKit/PhoneNumberKitCore', :git => 'https://github.com/marmelroy/PhoneNumberKit', :tag => '3.5.10'
  
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants