thingsboard / flutter_thingsboard_pe_app

ThingsBoard PE Mobile Application
https://thingsboard.io/products/mobile-pe/
BSD 3-Clause "New" or "Revised" License
90 stars 73 forks source link

Can't build this 1.3.0 PE APP #165

Closed Sekiro-kost closed 3 weeks ago

Sekiro-kost commented 3 weeks ago

Hello

I tried many new 'fresh' builds, with the release 1.3.0 PE APP, and I've got lot errors during my flutter run, on simulator ou physical devices

[✓] Flutter (Channel stable, 3.22.2, on macOS 15.0.1 24A348 darwin-arm64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)

I try before every attempt :

flutter clean
rm -rf ~/.pub-cache

Some errors :

build/Objects-normal/arm64/GeolocatorPlugin.d -skip-unused-modulemap-deps
    /Users/julien/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.2/ios/Classes/GeolocatorPlugin.m:187:21: warning: 'openURL:' is deprecated: first deprecated in iOS 10.0
    [-Wdeprecated-declarations]
      187 |                     openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
          |                     ^~~~~~~
          |                     openURL:options:completionHandler:
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/geolocator_apple/geolocator_apple-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIApplication.h:97:1: note: 'openURL:' has been explicitly marked deprecated here
       97 | - (BOOL)openURL:(NSURL*)url API_DEPRECATED_WITH_REPLACEMENT("openURL:options:completionHandler:", ios(2.0, 10.0)) API_UNAVAILABLE(visionos, watchos);
          | ^
    1 warning generated.
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -cc1 -Wundef-prefix\=TARGET_OS_ -fdiagnostics-show-note-include-stack
    -fmacro-backtrace-limit\=0 -ferror-limit 19 -serialize-diagnostic-file
    /Users/julien/Library/Developer/Xcode/DerivedData/Runner-elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/flutter_app_badger
    .build/Objects-normal/x86_64/FlutterAppBadgerPlugin.dia -Wdeprecated-objc-isa-usage -Werror\=deprecated-objc-isa-usage -Werror\=implicit-function-declaration
    -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes
    -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars
    -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function
    -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow
    -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion
    -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match
    -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -Wprotocol -Wdeprecated-declarations -Wno-sign-conversion -Winfinite-recursion -Wcomma
    -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -Wno-reorder-init-list
    -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation
    -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base
    -Wno-reserved-identifier -Wno-gnu-folding-constant -fmodule-map-file\=/Users/julien/Desktop/PE\ APP\ FRESH\
    STARTER/build/ios/Debug-iphonesimulator/flutter_app_badger/flutter_app_badger.framework/Modules/module.modulemap
    -fmodule-map-file\=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/UIKit.f
    ramework/Modules/module.modulemap
    -fmodule-map-file\=/Users/julien/Developpement/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Modules/module
    .modulemap -o
elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/flutter_app_badger
    .build/flutter_app_badger-all-non-framework-target-headers.hmap -I /Users/julien/Desktop/PE\ APP\ FRESH\
    STARTER/build/ios/Debug-iphonesimulator/flutter_app_badger/include -I
    /Users/julien/Library/Developer/Xcode/DerivedData/Runner-elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/flutter_app_badger
    .build/DerivedSources-normal/x86_64 -I
    /Users/julien/Library/Developer/Xcode/DerivedData/Runner-elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/flutter_app_badger
    .build/DerivedSources/x86_64 -I
    /Users/julien/Library/Developer/Xcode/DerivedData/Runner-elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/flutter_app_badger
    .build/DerivedSources -F /Users/julien/Desktop/PE\ APP\ FRESH\ STARTER/build/ios/Debug-iphonesimulator/flutter_app_badger -F
    /Users/julien/Developpement/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator -iquote
    /Users/julien/Library/Developer/Xcode/DerivedData/Runner-elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/flutter_app_badger
    .build/flutter_app_badger-generated-files.hmap -iquote
    /Users/julien/Library/Developer/Xcode/DerivedData/Runner-elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/flutter_app_badger
    .build/flutter_app_badger-project-headers.hmap -isystem
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/usr/local/include -isystem
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include -internal-externc-isystem
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/usr/include -internal-externc-isystem
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -ivfsstatcache
    /Users/julien/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache -ivfsoverlay
    /Users/julien/Library/Developer/Xcode/DerivedData/Runner-elkdrprylhpawrfbznammachnnzl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Pods-8699adb1dd336
    b26511df848a716bd42-VFS-iphonesimulator/all-product-headers.yaml -std\=gnu11 -fexceptions -fasm-blocks -fmodules -fmodule-name\=flutter_app_badger
    -fno-implicit-modules -fobjc-exceptions -fmax-type-align\=16 -fpascal-strings -fvisibility-inlines-hidden-static-local-var -mdarwin-stkchk-strong-link
    -fno-odr-hash-protocols -pic-level 2 -fencode-extended-block-signature -stack-protector 1 -fobjc-runtime\=ios-13.0.0 -fobjc-arc -fobjc-runtime-has-weak -fobjc-weak
    -fgnuc-version\=4.2.1 -fblocks -ffp-contract\=on -fclang-abi-compat\=4.0 -fno-experimental-relative-c++-abi-vtables -fno-file-reproducible
    -clang-vendor-feature\=+disableNonDependentMemberExprInCurrentInstantiation -clang-vendor-feature\=+enableAggressiveVLAFolding
    -clang-vendor-feature\=+revert09abecef7bbf -clang-vendor-feature\=+thisNoAlignAttr -clang-vendor-feature\=+thisNoNullAttr
    -clang-vendor-feature\=+disableAtImportPrivateFrameworkInImplementationError -O0 -fdebug-compilation-dir\=/Users/julien/Desktop/PE\ APP\ FRESH\ STARTER/ios/Pods
    -fcoverage-compilation-dir\=/Users/julien/Desktop/PE\ APP\ FRESH\ STARTER/ios/Pods -fregister-global-dtors-with-atexit -fno-strict-return -mrelax-all
    -dwarf-version\=4 -debugger-tuning\=lldb -disable-llvm-verifier -dwarf-ext-refs -mframe-pointer\=all -funwind-tables\=2 -clear-ast-before-backend
    -discard-value-names -main-file-name FlutterAppBadgerPlugin.m -debug-info-kind\=standalone -fdiagnostics-hotness-threshold\=0 -fdiagnostics-misexpect-tolerance\=0 -D
    COCOAPODS\=1 -D DEBUG\=1 -D OBJC_OLD_DISPATCH_PROTOTYPES\=0 -D POD_CONFIGURATION_DEBUG\=1 -D __GCC_HAVE_DWARF2_CFI_ASM\=1 -include /Users/julien/Desktop/PE\ APP\
    FRESH\ STARTER/ios/Pods/Target\ Support\ Files/flutter_app_badger/flutter_app_badger-prefix.pch -MT dependencies -dependency-file

          |         ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:
                       ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
       17 | typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
          |                                ^
    /Users/julien/.pub-cache/hosted/pub.dev/flutter_app_badger-1.5.0/ios/Classes/FlutterAppBadgerPlugin.m:17:135: warning: 'UIUserNotificationTypeBadge' is deprecated:
    first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations]
       17 |         UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert |
       UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:[[UIApplication sharedApplication] currentUserNotificationSettings].categories];
          |                                                                                                                                       ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
       17 | typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
          |                                ^
    /Users/julien/.pub-cache/hosted/pub.dev/flutter_app_badger-1.5.0/ios/Classes/FlutterAppBadgerPlugin.m:17:165: warning: 'UIUserNotificationTypeSound' is deprecated:
    first deprecated in iOS 10.0 - Use UserNotifications Framework's UNAuthorizationOptions [-Wdeprecated-declarations]
       17 |         UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert |
       UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:[[UIApplication sharedApplication] currentUserNotificationSettings].categories];
          |
          ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
       17 | typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
          |                                ^
    /Users/julien/.pub-cache/hosted/pub.dev/flutter_app_badger-1.5.0/ios/Classes/FlutterAppBadgerPlugin.m:17:239: warning: 'currentUserNotificationSettings' is
    deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and
    -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:] [-Wdeprecated-declarations]
       17 |         UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert |
       UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:[[UIApplication sharedApplication] currentUserNotificationSettings].categories];
          |
          ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIApplication.h:235:70: note: property 'currentUserNotificationSettings' is declared deprecated here
      235 | @property(nonatomic, readonly, nullable) UIUserNotificationSettings *currentUserNotificationSettings API_DEPRECATED("Use UserNotifications Framework's
      -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:]",
      ios(8.0, 10.0)) API_UNAVAILABLE(visionos, tvos, watchos);
          |                                                                      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIApplication.h:235:70: note: 'currentUserNotificationSettings' has been explicitly marked deprecated here
    /Users/julien/.pub-cache/hosted/pub.dev/flutter_app_badger-1.5.0/ios/Classes/FlutterAppBadgerPlugin.m:17:88: warning: 'UIUserNotificationSettings' is deprecated:
    first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations]
       17 |         UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert |
       UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:[[UIApplication sharedApplication] currentUserNotificationSettings].categories];
          |                                                                                        ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been explicitly marked deprecated here
       17 | typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
          |                                ^
    /Users/julien/.pub-cache/hosted/pub.dev/flutter_app_badger-1.5.0/ios/Classes/FlutterAppBadgerPlugin.m:17:239: warning: 'currentUserNotificationSettings' is
    deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and
    -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:] [-Wdeprecated-declarations]
       17 |         UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert |
       UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:[[UIApplication sharedApplication] currentUserNotificationSettings].categories];
          |
          ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIApplication.h:235:70: note: property 'currentUserNotificationSettings' is declared deprecated here
      235 | @property(nonatomic, readonly, nullable) UIUserNotificationSettings *currentUserNotificationSettings API_DEPRECATED("Use UserNotifications Framework's
      -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:]",
      ios(8.0, 10.0)) API_UNAVAILABLE(visionos, tvos, watchos);
          |                                                                      ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIApplication.h:235:70: note: 'currentUserNotificationSettings' has been explicitly marked deprecated here
    /Users/julien/.pub-cache/hosted/pub.dev/flutter_app_badger-1.5.0/ios/Classes/FlutterAppBadgerPlugin.m:17:88: warning: 'UIUserNotificationSettings' is deprecated:
    first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationSettings [-Wdeprecated-declarations]
       17 |         UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert |
       UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:[[UIApplication sharedApplication] currentUserNotificationSettings].categories];
          |                                                                                        ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/System/Library/Frameworks/UIKit.framework/Header
    s/UIUserNotificationSettings.h:44:12: note: 'UIUserNotificationSettings' has been explicitly marked deprecated here
       44 | @interface UIUserNotificationSettings : NSObject
          |            ^
    /Users/julien/.pub-cache/hosted/pub.dev/flutter_app_badger-1.5.0/ios/Classes/FlutterAppBadgerPlugin.m:18:44: warning: 'registerUserNotificationSettings:' is
    deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and
    -[UNUserNotificationCenter setNotificationCategories:] [-Wdeprecated-declarations]
       18 |         [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
          |                                            ^
    In module 'UIKit' imported from /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Target Support Files/flutter_app_badger/flutter_app_badger-prefix.pch:2:

    range of supported deployment target versions is 12.0 to 18.0.99. (in target 'FirebaseCoreInternal' from project 'Pods')
    /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the
    range of supported deployment target versions is 12.0 to 18.0.99. (in target 'FirebaseCore-FirebaseCore_Privacy' from project 'Pods')
    /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the
    range of supported deployment target versions is 12.0 to 18.0.99. (in target 'FirebaseCore' from project 'Pods')
    /Users/julien/Desktop/PE APP FRESH STARTER/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the
    range of supported deployment target versions is 12.0 to 18.0.99. (in target 'Firebase' from project 'Pods')
Sekiro-kost commented 3 weeks ago

Does anyone have their config for an operational build in 1.3.0 please ? (flutter sdk version, dart version, Xcode project requirements)

ybeshkarov commented 3 weeks ago

Hello @Sekiro-kost,

This topic will help you https://github.com/thingsboard/flutter_thingsboard_pe_app/issues/163

Sekiro-kost commented 3 weeks ago

Hello @Sekiro-kost,

This topic will help you #163

Thx, I will see this threads ^^

Sekiro-kost commented 3 weeks ago

Yay I managed to build

Override pub spec.yaml:

dependency_overrides:
  flutter_inappwebview_ios:
    git:
      url: https://github.com/pichillilorenzo/flutter_inappwebview.git
      ref: 27fd339172572fe1b16cdcdae235b2a88f432e3c
      path: flutter_inappwebview_ios

Clean Project :

flutter clean
flutter pub get
cd ios
rm -rf Pods && rm -rf Podfile.lock && pod cache clean --all 
pod install

I had to put on Xcode: Xcode Project Format: 15.3 Minimum Deployment: 15.6

In Build Settings :

All => Apple Clang - Language - Modules : set YES to Allow Non-modular inclueds in Framework Modules

And in my project.pbxproj: objectVersion 63

If this helps anyone