QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 358 forks source link

Facing issues in Flutter in iOS #1309

Closed RutvijBhesaniya closed 1 year ago

RutvijBhesaniya commented 2 years ago

@QB-nikolay-zolotarov @QB-maksym-pidhorbunskyi @qbNew Issue Checklist

Environment details

Info Value
iOS Version e.g. 13.0
Xcode Version e.g. Xcode 13.2.1
Screenshot 2022-02-22 at 12 22 48 PM
ghost commented 2 years ago

Hello @RutvijBhesaniya Please try doing the following:

RutvijBhesaniya commented 2 years ago

Xcode's output: ↳ In module 'UIKit' imported from /Users/NeoSOFT/Documents/Food911_customer/ios/Pods/Target Support Files/location/location-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ /Users/NeoSOFT/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:48: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations] UIAlertView alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled" ^ In module 'UIKit' imported from /Users/NeoSOFT/Documents/Food911_customer/ios/Pods/Target Support Files/location/location-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ 2 warnings generated. /Users/NeoSOFT/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:13: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations] UIAlertView alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled" ^ In module 'UIKit' imported from /Users/NeoSOFT/Documents/Food911_customer/ios/Pods/Target Support Files/location/location-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ /Users/NeoSOFT/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.3.0/ios/Classes/LocationPlugin.m:176:48: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations] UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled" ^ In module 'UIKit' imported from /Users/NeoSOFT/Documents/Food911_customer/ios/Pods/Target Support Files/location/location-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ 2 warnings generated. /Users/NeoSOFT/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.0.1/ios/Classes/GeolocatorPlugin.m:199:11: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; ^~~ openURL:options:completionHandler: In module 'UIKit' imported from /Users/NeoSOFT/Documents/Food911_customer/ios/Pods/Target Support Files/geolocator/geolocator-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:124:1: note: 'openURL:' has been explicitly marked deprecated here

Could not build the application for the simulator. Error launching application on iPhone 12 Pro Max.

RutvijBhesaniya commented 2 years ago

after this It is crashing in flutter

ghost commented 2 years ago

@RutvijBhesaniya Please clarify if you tried the provided solutions.

To investigate the issue further, I need the following points:

  1. Please confirm that the iOS version is 13.0.
  2. Flutter version.
  3. Dart version.
  4. When did this issue happen? Did the issue happen before or after implementing recent changes into your code?
  5. Is this issue intermittent or permanent?
  6. Please provide me with step-by-step instructions on how to reproduce the issue on our end.
  7. Please provide your podflie.
RutvijBhesaniya commented 2 years ago

Hello @RutvijBhesaniya Please try doing the following:

  • pod deintegrate && rm Podfile.lock && pod install --repo-update
  • set up platform :ios, '13.0' in Podfile
  • add arm64 to the excluded architectures

first time it was running successfully after that same issue I am facing .

RutvijBhesaniya commented 2 years ago

@RutvijBhesaniya Please clarify if you tried the provided solutions.

To investigate the issue further, I need the following points:

  1. Please confirm that the iOS version is 13.0.
  2. Flutter version.
  3. Dart version.
  4. When did this issue happen? Did the issue happen before or after implementing recent changes into your code?
  5. Is this issue intermittent or permanent?
  6. Please provide me with step-by-step instructions on how to reproduce the issue on our end.
  7. Please provide your podflie.

iOS version -13.2.1 flutter version. -2.8.1 dart version. - 2.15.1 I am facing this issue from first. Permanent issue

RutvijBhesaniya commented 2 years ago

Uncomment this line to define a global platform for your project

platform :ios, '13.0'

CocoaPods analytics sends network stats synchronously affecting flutter build latency.

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, }

def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), FILE) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end

File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do use_frameworks! use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(FILE)) end

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end

-->podfile

ghost commented 2 years ago

@RutvijBhesaniya Please try running our debug flutter sample and let us know if you face the same issue: https://github.com/QuickBlox/quickblox-flutter-samples

If the sample works as expected, you can take it as an example for further integration into your project.

If the issue persists, please provide us with step-by-step instructions on how to reproduce the issue on our end.