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

[Bug]: iOS Build Fails Due to Parse and Semantic Issues in PermissionManager.h and PermissionManager.m #1441

Open
3 of 5 tasks
velan3147 opened this issue Feb 4, 2025 · 0 comments

Comments

@velan3147
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

Description:
I encountered an issue while building my Flutter app for iOS using permission_handler_apple version 9.4.5. The build fails due to multiple Parse Issues and Semantic Issues in PermissionManager.h and PermissionManager.m files.

Steps to Reproduce:

  1. Add permission_handler: ^11.3.1 (or any compatible version) to your pubspec.yaml.
  2. Run flutter pub get.
  3. Attempt to build the project for iOS using flutter build ios or flutter run.
  4. Observe the build failure with the errors listed below.

Expected results

The project should build successfully without any parse or semantic issues.

Actual results

Additional Notes:

  • This issue seems to be related to an incorrect type declaration in PermissionManager.h and PermissionManager.m.
  • I have tried cleaning the project (flutter clean and pod install --repo-update), but the issue persists.
  • If there are any workarounds or fixes, please let me know.

Code sample

Code sample
Running pod install...                                             808ms
Running Xcode build...                                          
Xcode build done.                                           15.5s
Failed to build iOS app

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.h:39:62

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.h:41:71

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.h:42:68

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.h:43:25

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:20:71

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:27:68

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:41:62

Parse Issue (Xcode): Expected a type
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:81:25

Semantic Issue (Xcode): Called object type 'id' is not a function or function pointer
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:24:10

Semantic Issue (Xcode): Called object type 'id' is not a function or function pointer
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:31:14

Semantic Issue (Xcode): Called object type 'id' is not a function or function pointer
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:45:18

Semantic Issue (Xcode): Called object type 'id' is not a function or function pointer
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:66:26

Semantic Issue (Xcode): Called object type 'id' is not a function or function pointer
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:86:43

Semantic Issue (Xcode): Called object type 'id' is not a function or function pointer
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:92:14

Semantic Issue (Xcode): Called object type 'id' is not a function or function pointer
/Users/velan/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.5/ios/Classes/PermissionManager.m:95:14

Encountered error while building for device.
Process finished with exit code 1

Screenshots or video

Screenshots or video demonstration

Image

Version

permission_handler: ^11.3.1, Xcode 16.2, CocoaPods version 1.15.2, permission_handler_apple 9.4.5

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.27.3, on macOS 15.3 24D60 darwin-arm64, locale en-US)
    • Flutter version 3.27.3 on channel stable at /Users/velan/tools/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c519ee916e (2 weeks ago), 2025-01-21 10:32:23 -0800
    • Engine revision e672b006cb
    • Dart version 3.6.1
    • DevTools version 2.40.2

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/velan/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] Connected device (2 available)
    • macOS (desktop)                 • macos                 • darwin-arm64 • macOS 15.3 24D60 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin       • macOS 15.3 24D60 darwin-arm64
    ! Error: Browsing on the local area network for velan’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant