chat_app icon indicating copy to clipboard operation
chat_app copied to clipboard

ISSUES WHILE BUILDING APP(IOS)

Open kaushik1710 opened this issue 5 years ago • 15 comments

I cannot find the pods folder

kaushik1710 avatar Apr 12 '20 15:04 kaushik1710

Screenshot 2020-04-12 at 9 26 58 PM

kaushik1710 avatar Apr 12 '20 15:04 kaushik1710

Getting the same PermissionGroup error and cannot build. Any help appreciated. Thanks

jtkeyva avatar Apr 23 '20 22:04 jtkeyva

@kaushik1710 I specified an older version: permission_handler: ^3.2.2 since it's the same time the repo was last updated. Still got errors. Then I closed/restarted my IDE and the errors went away.

jtkeyva avatar Apr 24 '20 00:04 jtkeyva

Tried all day but still have not been able to get this to build. @singhbhavneet can you verify what version of Dart/Flutter/XCode/Cocoapods/Swift you are using to get this to work? Any tips to get this to build? Thanks!

jtkeyva avatar Apr 24 '20 07:04 jtkeyva

@jtkeyva @kaushik1710 This probably happened because you didn't specify the versions in the pubspec.yaml file.

Permission handler had a lot of hotfixes lately, and removed the class PermissionGroup in the latest version ^5.x.x.

Either downgrade- (pubspec.yaml) permission_handler: '^4.4.0+hotfix.4'

Or replace PermissionGroup with Permission

Map<Permission, PermissionStatus> statuses = await [
  Permission.camera,
  Permission.storage,
].request();
print((await statuses[Permission.camera]).status);

Read the documentation for the latest version of permission_handler

ishtms avatar May 06 '20 09:05 ishtms

Thank you @Ishtmeet-Singh Your suggestion got rid of the permissions error but now I'm getting more errors such as:

fatal error: 'speech_recognition/speech_recognition-Swift.h' file not found #import <speech_recognition/speech_recognition-Swift.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Could not build the precompiled application for the device.

Error launching application on iPhone.

Any help greatly appreciated!

jtkeyva avatar May 07 '20 21:05 jtkeyva

Thank you @Ishtmeet-Singh Your suggestion got rid of the permissions error but now I'm getting more errors such as:

fatal error: 'speech_recognition/speech_recognition-Swift.h' file not found #import <speech_recognition/speech_recognition-Swift.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Could not build the precompiled application for the device.

Error launching application on iPhone.

Any help greatly appreciated!

Try flutter clean. Make sure your pubspec.yaml file contains the speech_recognition package -

Add this line speech_recognition: ^0.3.0+1

Run flutter pub get and you'll be good to go.

ishtms avatar May 08 '20 01:05 ishtms

Thank you very much @Ishtmeet-Singh I just keep getting new issues every time I fix one. Now it's onesignal. Any ideas how to fix this? I'm going crazy over here! Any help greatly appreciated

[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory+%40+rb_sysopen+-+%2FUsers%2Fjt%2FDownloads%2Fchat_app-master+3%2Fios%2FPods%2FLocal+Podspecs%2Fonesignal.podspec.json&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new

Error output from CocoaPods: ↳ [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig). Exception: Error running pod install

jtkeyva avatar May 08 '20 01:05 jtkeyva

Thank you very much @Ishtmeet-Singh I just keep getting new issues every time I fix one. Now it's onesignal. Any ideas how to fix this? I'm going crazy over here! Any help greatly appreciated

[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory+%40+rb_sysopen+-+%2FUsers%2Fjt%2FDownloads%2Fchat_app-master+3%2Fios%2FPods%2FLocal+Podspecs%2Fonesignal.podspec.json&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new

Error output from CocoaPods: ↳ [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig). Exception: Error running pod install

Can you please copy paste your pubspec.yaml file? It feels like you haven't added most of the dependencies required for the app to run. Make sure you re-check the Pubspec file for this project here

ishtms avatar May 08 '20 04:05 ishtms

I used the pubspec.yaml from the repo then today I changed speech recognition and permission handler as per your advice. Here's my pubspec file

name: chat_app description: A flutter application for chatting

The following defines the version and build number for your application.

A version number is three numbers separated by dots, like 1.2.43

followed by an optional build number separated by a +.

Both the version and the builder number may be overridden in flutter

build by specifying --build-name and --build-number, respectively.

In Android, build-name is used as versionName while build-number used as versionCode.

Read more about Android versioning at https://developer.android.com/studio/publish/versioning

In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.

Read more about iOS versioning at

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

version: 1.0.0+1

environment: sdk: ">=2.1.0 <3.0.0"

dependencies: flutter: sdk: flutter

The following adds the Cupertino Icons font to your application.

Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^0.1.2 firebase_auth: flutter_facebook_login: ^1.1.1 http: json_annotation: ^2.0.0 camera: ^0.5.2+1 path_provider:

permission_handler:

permission_handler: '^4.4.0+hotfix.4' photo_view: cloud_firestore: ^0.12.5+1 firebase_storage: firebase_database: ^3.0.2 image_picker: ^0.6.0+9 cached_network_image: fluttertoast: intl: shared_preferences:

speech_recognition:

speech_recognition: ^0.3.0+1 image: onesignal: ^1.1.0 flutter_native_image: git: https://github.com/btastic/flutter_native_image.git url_launcher: dev_dependencies: flutter_test: sdk: flutter build_runner: ^1.0.0 json_serializable: ^2.0.0 emoji_picker: ^0.0.2

For information on the generic Dart part of this file, see the

following page: https://www.dartlang.org/tools/pub/pubspec

The following section is specific to Flutter.

flutter:

The following line ensures that the Material Icons font is

included with your application, so that you can use the icons in

the material Icons class.

uses-material-design: true

To add assets to your application, add an assets section, like this:

assets:

  • images/font_outline.png
  • images/font_filled.png
  • images/logo.png
  • images/sticker1.png
  • images/sticker2.png
  • images/sticker3.png
  • images/sticker4.png

An image asset can refer to one or more resolution-specific "variants", see

https://flutter.dev/assets-and-images/#resolution-aware.

For details regarding adding assets from package dependencies, see

https://flutter.dev/assets-and-images/#from-packages

To add custom fonts to your application, add a fonts section here,

in this "flutter" section. Each entry in this list should have a

"family" key with the font family name, and a "fonts" key with a

list giving the asset and other descriptors for the font. For

example:

fonts:

  • family: Ubunutu fonts:
    • asset: fonts/Ubuntu-Regular.ttf
  • family: UbunutuMono fonts:
    • asset: fonts/UbuntuMono.ttf
  • family: RobotoMono fonts:
    • asset: fonts/RobotoMono.ttf
  • family: B612Mono fonts:
    • asset: fonts/B612Mono.ttf

- asset: fonts/Schyler-Italic.ttf

style: italic

- family: Trajan Pro

fonts:

- asset: fonts/TrajanPro.ttf

- asset: fonts/TrajanPro_Bold.ttf

weight: 700

For details regarding fonts from package dependencies,

see https://flutter.dev/custom-fonts/#from-packages

jtkeyva avatar May 08 '20 05:05 jtkeyva

@jtkeyva This looks fine, can you copy paste the error log from the terminal too? Or screenshots will help

ishtms avatar May 08 '20 05:05 ishtms

Thanks. Here's the debug console errors now:

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory+%40+rb_sysopen+-+%2FUsers%2Fjt%2FDownloads%2Fchat_app-master+4%2Fios%2FPods%2FLocal+Podspecs%2Fonesignal.podspec.json&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new

Error output from CocoaPods: ↳ [!] <PBXGroup UUID=97C146E51CF9000F007C117D> attempted to initialize an object with an unknown UUID. CF3B75C9A7D2FA2A4C99F110 for attribute: children. This can be the result of a merge and the unknown UUID is being discarded. [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig). Exception: Error running pod install Exited (sigterm)

jtkeyva avatar May 08 '20 05:05 jtkeyva

I tried running .xcworkspace and got this too: Screen Shot 2020-05-07 at 10 59 31 PM

jtkeyva avatar May 08 '20 06:05 jtkeyva

And here's the latest output from today's updated repo. Still shows the onesignal issue:

[!] Oh no, an error occurred. Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=No+such+file+or+directory+%40+rb_sysopen+-+%2FUsers%2Fjt%2FDownloads%2Fchat_app-master+4%2Fios%2FPods%2FLocal+Podspecs%2Fonesignal.podspec.json&type=Issues If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md Don't forget to anonymize any private data! Looking for related issues on cocoapods/cocoapods... Found no similar issues. To create a new issue, please visit: https://github.com/cocoapods/cocoapods/issues/new Error output from CocoaPods: ↳ [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig). Exception: Error running pod install Exited (sigterm)

jtkeyva avatar May 08 '20 06:05 jtkeyva

Hey Can anyone help me with building of this project I am new to Flutter

Karansxa avatar Aug 01 '20 08:08 Karansxa