Giter Club home page Giter Club logo

Comments (14)

daryll-fourie avatar daryll-fourie commented on August 26, 2024 4

Forcing Flutter to use V2.1.0 fixes the problem for now...
(And if you use the "Geolocator" package, then force both packages to use V2.1.0)

#example code
geolocator: 2.1.0
permission_handler: 2.1.0

Remember to run flutter clean in the terminal and then get your .yaml dependencies again before running your app.

from flutter-permission-handler.

b4rtaz avatar b4rtaz commented on August 26, 2024 3

Version 2.1.2 works for me, after I updated ios/Podfile:

target 'Runner' do
  use_frameworks! # < ADD THIS

  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  ...

from flutter-permission-handler.

mvanbeusekom avatar mvanbeusekom commented on August 26, 2024 3

@muhammadkhayyam, @ahmedb, @562218352, to be able to use version 2.1.2 of the permission handler you'll have to use Xcode 10.1 or higher and make sure you update your Podfile to reflect the following changes:

In your Podfile make sure you add the line use_frameworks! (best is to add this line directly below the target Runner do like so:

target 'Runner' do
  use_frameworks!

Also in your Podfile make sure you add the line config.build_settings['SWIFT_VERSION'] = '4.2' to the post_installer block. After adding this line the post_installer block should look like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['SWIFT_VERSION'] = '4.2'
    end
  end
end

from flutter-permission-handler.

562218352 avatar 562218352 commented on August 26, 2024 1

1: down grade permission_handler's version to 2.1.0
if running into this error : can't find file :<permission_handler/permission_handler-Swift.h> , then go the sec step.
2: open permission_handler source code, find "PermissionHandlerPlugin.m" ,
and edit <permission_handler/permission_handler-Swift.h> into "permission_handler-Swift.h"

solve my issue

from flutter-permission-handler.

kmckinley avatar kmckinley commented on August 26, 2024

Running into the same problem.

from flutter-permission-handler.

chenparty avatar chenparty commented on August 26, 2024

the same problem, only in ios .

from flutter-permission-handler.

deepak-gehlot avatar deepak-gehlot commented on August 26, 2024

Same problem, only in IOS.

from flutter-permission-handler.

daryll-fourie avatar daryll-fourie commented on August 26, 2024

Same problem on my side, also only in iOS... Any update on this?

from flutter-permission-handler.

kmckinley avatar kmckinley commented on August 26, 2024

@daryll-fourie That worked for me.

from flutter-permission-handler.

firsthour avatar firsthour commented on August 26, 2024

I had to downgrade geolocator to 2.0.2 and permission_handler to 2.0.1 to get this to work.

from flutter-permission-handler.

gburnham avatar gburnham commented on August 26, 2024

Thank you @daryll-fourie! I should have looked here first!

from flutter-permission-handler.

ahmedb avatar ahmedb commented on August 26, 2024

I had this problem too. The root-cause is actually that the project generated by Flutter is set to "Swift 4.0" by default, instead of "Swift 4.2".

I had a Pull Request to rollback the API changes for compatibility but 4.0, but closed it because I wasn't sure if it was appropriate for the develop branch.

There are a couple of ways to fix this:

  1. Manually update your "Runner.xcodeproj" to use "4.2" for "Swift Language Version" (You need to update the Project AND Target)
  2. Roll back to tag 2.1.0 or pull a fork with the API rollback (I put the changes on my 'develop' fork: https://github.com/ahmedb/flutter-permission-handler)

from flutter-permission-handler.

muhammadkhayyam avatar muhammadkhayyam commented on August 26, 2024

Dear 562218352 ,
Can you explain in detail your resolution , I am new to mobile development, your detail help will be highly appreciated.

Thanks.

from flutter-permission-handler.

dokinkon avatar dokinkon commented on August 26, 2024

@daryll-fourie That worked for me.

from flutter-permission-handler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.