getting weird errors while trying to build ios app using flutter - ios

this is my debug log
Automatically signing iOS for device deployment using specified development team in Xcode
project: P7NL527WV9
Running Xcode build...
Xcode build done. 75.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.m:575:23: warning: 'requiresUserActionForMediaPlayback' is
deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
configuration.requiresUserActionForMediaPlayback = true;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mediaTypesRequiringUserActionForPlayback
In module 'WebKit' imported from
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.h:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
#property (nonatomic) BOOL requiresUserActionForMediaPlayback
API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.m:587:23: warning: 'requiresUserActionForMediaPlayback' is
deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
configuration.requiresUserActionForMediaPlayback = false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mediaTypesRequiringUserActionForPlayback
In module 'WebKit' imported from
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.h:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
#property (nonatomic) BOOL requiresUserActionForMediaPlayback
API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
^
2 warnings generated.
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.m:575:23: warning: 'requiresUserActionForMediaPlayback' is
deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
configuration.requiresUserActionForMediaPlayback = true;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mediaTypesRequiringUserActionForPlayback
In module 'WebKit' imported from
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.h:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
#property (nonatomic) BOOL requiresUserActionForMediaPlayback
API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.m:587:23: warning: 'requiresUserActionForMediaPlayback' is
deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
configuration.requiresUserActionForMediaPlayback = false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mediaTypesRequiringUserActionForPlayback
In module 'WebKit' imported from
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.h:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
#property (nonatomic) BOOL requiresUserActionForMediaPlayback
API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
^
2 warnings generated.
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariBrowserOptions.swift:34:16: warning: unnecessary check
for 'iOS'; enclosing scope ensures guard will always be true
if #available(iOS 10.0, *) {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariBrowserOptions.swift:12:14: note: enclosing scope here
public class SafariBrowserOptions: Options<SafariViewController> {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariViewController.swift:66:12: warning: unnecessary check
for 'iOS'; enclosing scope ensures guard will always be true
if #available(iOS 10.0, *) {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariViewController.swift:12:14: note: enclosing scope here
public class SafariViewController: SFSafariViewController, FlutterPlugin,
SFSafariViewControllerDelegate {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/InAppBrowser/InAppBrowserWebViewController.swift:557:13: warning: setter for
'statusBarStyle' was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]
UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue:
previousStatusBarStyle)!
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/InAppWebView/InAppWebView.swift:695:34: error: value of type 'WKPDFConfiguration'
has no member 'rect'
pdfConfiguration.rect = CGRect(x: rect["x"]!, y: rect["y"]!, width:
rect["width"]!, height: rect["height"]!)
~~~~~~~~~~~~~~~~ ^~~~
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/InAppWebView/InAppWebView.swift:698:9: error: cannot find 'createPDF' in scope
createPDF(configuration: pdfConfiguration) { (result) in
^~~~~~~~~
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/InAppWebView/InAppWebView.swift:713:29: error: incorrect argument label in call
(have 'completionHandler:', expected 'dataCompletionHandler:')
createWebArchiveData(completionHandler: { (result) in
^~~~~~~~~~~~~~~~~~
dataCompletionHandler
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/InAppWebView/InAppWebView.swift:1237:33: error: extra arguments at positions #2,
#3 in call
super.evaluateJavaScript(javaScript, in: frame, in: contentWorld, completionHandler:
completionHandler)
^
WebKit.WKWebView:46:15: note: 'evaluateJavaScript(_:completionHandler:)' declared here
open func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?,
Error?) -> Void)? = nil)
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/InAppWebView/InAppWebView.swift:1237:94: error: cannot convert value of type
'((Result<Any, Error>) -> Void)?' to expected argument type '((Any?, Error?) -> Void)?'
super.evaluateJavaScript(javaScript, in: frame, in: contentWorld, completionHandler:
completionHandler)
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/InAppWebView/InAppWebView.swift:1254:15: error: value of type 'WKWebView' has no
member 'callAsyncJavaScript'
super.callAsyncJavaScript(functionBody, arguments: arguments, in: frame, in:
contentWorld, completionHandler: completionHandler)
~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariBrowserOptions.swift:34:16: warning: unnecessary check
for 'iOS'; enclosing scope ensures guard will always be true
if #available(iOS 10.0, *) {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariBrowserOptions.swift:12:14: note: enclosing scope here
public class SafariBrowserOptions: Options<SafariViewController> {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariViewController.swift:66:12: warning: unnecessary check
for 'iOS'; enclosing scope ensures guard will always be true
if #available(iOS 10.0, *) {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/SafariViewController/SafariViewController.swift:12:14: note: enclosing scope here
public class SafariViewController: SFSafariViewController, FlutterPlugin,
SFSafariViewControllerDelegate {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/Types/URLCredential.swift:14:25: warning: comparing non-optional value of type
'[Any]' to 'nil' always returns true
if certificates != nil {
~~~~~~~~~~~~ ^ ~~~
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/Util.swift:86:25: warning: 'spotlightSuggestion' was deprecated in iOS 10.0:
renamed to 'WKDataDetectorTypes.lookupSuggestion'
return .spotlightSuggestion
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/Util.swift:86:25: note: use 'WKDataDetectorTypes.lookupSuggestion' instead
return .spotlightSuggestion
^~~~~~~~~~~~~~~~~~~
WKDataDetectorTypes.lookupSuggestion
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/Util.swift:121:31: warning: 'spotlightSuggestion' was deprecated in iOS 10.0:
renamed to 'WKDataDetectorTypes.lookupSuggestion'
if type.contains(.spotlightSuggestion) {
^
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/Util.swift:121:31: note: use 'WKDataDetectorTypes.lookupSuggestion' instead
if type.contains(.spotlightSuggestion) {
^~~~~~~~~~~~~~~~~~~
WKDataDetectorTypes.lookupSuggestion
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
os/Classes/Util.swift:216:21: warning: immutable value 'j' was never used; consider replacing
with '_' or removing it
for j in ipv6.count...8 {
^
_
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
These are the plugins/packages used in the code
flutter_remix: ^0.0.3
flutter_vector_icons: ^1.0.0
Firebase
firebase_core: ^1.1.0
firebase_auth: ^3.0.0
firebase_messaging: ^11.2.6
firebase_in_app_messaging: ^0.6.0+7
cloud_firestore: ^3.1.7
firebase_storage: ^10.2.6
State Management
get: ^4.1.4
get_storage: ^2.0.2
Fonts
google_fonts: ^2.1.0
User Interface
statusbarz: ^1.0.2
lottie: ^1.0.1
flutter_hud: ^0.3.0
multiavatar: ^0.1.5
flutter_svg: ^0.22.0
carousel_slider: ^4.0.0-nullsafety.0
octo_image: ^1.0.0+1
cached_network_image: ^3.0.0
dropdown_search: ^2.0.1
shimmer: ^2.0.0
animated_background: ^2.0.0
image_picker_type: ^1.0.1
flutter_gradient_colors: ^2.0.0-prerelease-nullsafety
flutter_shimmer: ^2.0.0-prerelease-nullsafety
draggable_home: ^1.0.2
timelines: ^0.1.0
syncfusion_flutter_pdfviewer: ^19.2.47-beta
Utils
random_string_generator: ^2.0.0
path_provider: ^2.0.2
image: ^3.0.2
jiffy: ^5.0.0
url_launcher: ^6.0.7
package_info: ^2.0.2
flutter_contact: ^0.9.1+8
permission_handler: ^8.1.2
contactor_picker: ^0.0.4
flutter_native_contact_picker: ^0.0.3
nanoid: ^1.0.0
share_plus: ^3.0.4
package_info_plus: ^1.0.5
crisp: ^0.3.1
Gateway
flutter_paystack: ^1.0.5+1
flutterwave: ^1.0.1
nravepay: ^1.0.5+1

Seems to be a problem with an included dependency.
module 'WebKit' imported from
/Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
7.1/ios/Classes/FlutterWebView.h
Maybe you have imported a PDF webview package that is not compatible with iOS, or you need permissions to use it, normally you can add them in Info.plist file.

Related

Thingsboard provisioning example not working

For some reason https://github.com/thingsboard/thingsboard-arduino-sdk/blob/master/examples/0008-esp8266_provision_device/0008-esp8266_provision_device.ino is not compiling on Windows Arduino IDE 1.8.19 for FireBeetle ESP32. Error as follows:
Arduino: 1.8.19 (Windows 10), Board: "FireBeetle ESP32-E, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None"
C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:7: warning: "WIFI_AP" redefined
#define WIFI_AP "Lemmiku IoT"
In file included from C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi\src/WiFi.h:31,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:4:
C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi\src/WiFiType.h:32: note: this is the location of the previous definition
#define WIFI_AP WIFI_MODE_AP
Provision_test:86:46: error: conversion from 'void(Provision_Data&)' {aka 'void(const ArduinoJson6194_F1::ObjectConstRef&)'} to non-scalar type 'const Provision_Callback' requested
const Provision_Callback provisionCallback = processProvisionResponse;
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayIterator.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayRef.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:24,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Timo\Documents\Arduino\libraries\ThingsBoard\src/ThingsBoard.h:16,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:2:
C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp: In instantiation of 'typename ArduinoJson6194_F1::enable_if<((! ArduinoJson6194_F1::is_same<T, char*>::value) && (! ArduinoJson6194_F1::is_same<T, char>::value)), T>::type ArduinoJson6194_F1::VariantConstRef::as() const [with T = ArduinoJson6194_F1::ObjectRef; typename ArduinoJson6194_F1::enable_if<((! ArduinoJson6194_F1::is_same<T, char*>::value) && (! ArduinoJson6194_F1::is_same<T, char>::value)), T>::type = ArduinoJson6194_F1::ObjectRef]':
C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:75:76: required from here
C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp:253:34: error: invalid use of incomplete type 'class ArduinoJson6194_F1::InvalidConversion<ArduinoJson6194_F1::VariantConstRef, ArduinoJson6194_F1::ObjectRef>'
return Converter::fromJson(*this);
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp:14,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayIterator.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayRef.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:24,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Timo\Documents\Arduino\libraries\ThingsBoard\src/ThingsBoard.h:16,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:2:
C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/Converter.hpp:14:7: note: declaration of 'class ArduinoJson6194_F1::InvalidConversion<ArduinoJson6194_F1::VariantConstRef, ArduinoJson6194_F1::ObjectRef>'
class InvalidConversion; // Error here? See https://arduinojson.org/v6/invalid-conversion/
^~~~~~~~~~~~~~~~~
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi
Not used: C:\Users\Timo\Documents\Arduino\libraries\WiFiEspAT
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
conversion from 'void(Provision_Data&)' {aka 'void(const ArduinoJson6194_F1::ObjectConstRef&)'} to non-scalar type 'const Provision_Callback' requested
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Can anyone help out why it's not working?
#devaskim I tried, but nothing:
C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:6: warning: "WIFI_AP" redefined
#define WIFI_AP "Lemmiku IoT"
In file included from C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi\src/WiFi.h:31,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:3:
C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi\src/WiFiType.h:32: note: this is the location of the previous definition
#define WIFI_AP WIFI_MODE_AP
Provision_test:85:46: error: conversion from 'void (*)(Provision_Data&)' {aka 'void (*)(const ArduinoJson6194_F1::ObjectConstRef&)'} to non-scalar type 'const Provision_Callback' requested
const Provision_Callback provisionCallback = &processProvisionResponse;
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayIterator.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayRef.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:24,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Timo\Documents\Arduino\libraries\ThingsBoard\src/ThingsBoard.h:16,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:2:
C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp: In instantiation of 'typename ArduinoJson6194_F1::enable_if<((! ArduinoJson6194_F1::is_same<T, char*>::value) && (! ArduinoJson6194_F1::is_same<T, char>::value)), T>::type ArduinoJson6194_F1::VariantConstRef::as() const [with T = ArduinoJson6194_F1::ObjectRef; typename ArduinoJson6194_F1::enable_if<((! ArduinoJson6194_F1::is_same<T, char*>::value) && (! ArduinoJson6194_F1::is_same<T, char>::value)), T>::type = ArduinoJson6194_F1::ObjectRef]':
C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:74:76: required from here
C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp:253:34: error: invalid use of incomplete type 'class ArduinoJson6194_F1::InvalidConversion<ArduinoJson6194_F1::VariantConstRef, ArduinoJson6194_F1::ObjectRef>'
return Converter<T>::fromJson(*this);
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp:14,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayIterator.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayRef.hpp:8,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:24,
from C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\Timo\Documents\Arduino\libraries\ThingsBoard\src/ThingsBoard.h:16,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:2:
C:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/Converter.hpp:14:7: note: declaration of 'class ArduinoJson6194_F1::InvalidConversion<ArduinoJson6194_F1::VariantConstRef, ArduinoJson6194_F1::ObjectRef>'
class InvalidConversion; // Error here? See https://arduinojson.org/v6/invalid-conversion/
^~~~~~~~~~~~~~~~~
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Not used: C:\Users\Timo\Documents\Arduino\libraries\WiFiEspAT
exit status 1
conversion from 'void (*)(Provision_Data&)' {aka 'void (*)(const ArduinoJson6194_F1::ObjectConstRef&)'} to non-scalar type 'const Provision_Callback' requested
Hmm, I got something different this time:
C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:6: warning: "WIFI_AP" redefined
#define WIFI_AP "Lemmiku IoT"
In file included from C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi\src/WiFi.h:31,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:3:
C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi\src/WiFiType.h:32: note: this is the location of the previous definition
#define WIFI_AP WIFI_MODE_AP
In file included from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayIterator.hpp:8,
from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayRef.hpp:8,
from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:24,
from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from c:\Users\Timo\Documents\Arduino\libraries\ThingsBoard\src/ThingsBoard.h:16,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:2:
c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp: In instantiation of 'typename ArduinoJson6194_F1::enable_if<((! ArduinoJson6194_F1::is_same<T, char*>::value) && (! ArduinoJson6194_F1::is_same<T, char>::value)), T>::type ArduinoJson6194_F1::VariantConstRef::as() const [with T = ArduinoJson6194_F1::ObjectRef; typename ArduinoJson6194_F1::enable_if<((! ArduinoJson6194_F1::is_same<T, char*>::value) && (! ArduinoJson6194_F1::is_same<T, char>::value)), T>::type = ArduinoJson6194_F1::ObjectRef]':
C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:74:76: required from here
c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp:253:34: error: invalid use of incomplete type 'class ArduinoJson6194_F1::InvalidConversion<ArduinoJson6194_F1::VariantConstRef, ArduinoJson6194_F1::ObjectRef>'
return Converter<T>::fromJson(*this);
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/VariantRef.hpp:14,
from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayIterator.hpp:8,
from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Array/ArrayRef.hpp:8,
from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:24,
from c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from c:\Users\Timo\Documents\Arduino\libraries\ThingsBoard\src/ThingsBoard.h:16,
from C:\Users\Timo\Documents\Arduino\Provision_test\Provision_test.ino:2:
c:\Users\Timo\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Variant/Converter.hpp:14:7: note: declaration of 'class ArduinoJson6194_F1::InvalidConversion<ArduinoJson6194_F1::VariantConstRef, ArduinoJson6194_F1::ObjectRef>'
class InvalidConversion; // Error here? See https://arduinojson.org/v6/invalid-conversion/
^~~~~~~~~~~~~~~~~
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Timo\AppData\Local\Arduino15\packages\DFRobot\hardware\esp32\0.2.1\libraries\WiFi
Not used: C:\Users\Timo\Documents\Arduino\libraries\WiFiEspAT
exit status 1
Compilation error: exit status 1
As you've already noticed, there are two issues to fix, which I've highlighted in the code sample below.
There is also an open issue about this here: https://github.com/thingsboard/thingsboard-arduino-sdk/issues/89
Note that while this fixes the compilation issues, at least my self-hosted ThingsBoard server fails to register the provisioning request, so there's likely more that's broken with it.
// ...
// FIX #1
//
// We're dealing with const data
//
//JsonObject credentials_value = data["credentialsValue"].as<JsonObject>();
JsonObjectConst credentials_value = data["credentialsValue"].as<JsonObjectConst>();
// ...
// FIX #2
//
// Provision_Callback is a class that takes the callback as a constructor parameter
//
//const Provision_Callback provisionCallback = processProvisionResponse;
const Provision_Callback provisionCallback(processProvisionResponse);
// ...

Cannot compile AudioKit 4.2.2

I've just downloaded AudioKit most recent version (4.2.2). When I ran the build_frameworks.sh I get the following error:
[AVAudioUnit?]' has no member 'compactMap'
return _effectsChain.compactMap { $0 }
^~~~~~~~~~~~~ ~~~~~~~~~~
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Nodes/Mixing/Mixer/AKMixer.swift:40:19: error: value of type '[AKNode?]' has no member 'compactMap'
self.init(inputs.compactMap { $0 })
^~~~~~ ~~~~~~~~~~
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Internals/AudioKitHelpers.swift:22:16: error: cannot invoke 'index' with an argument list of type '(Self.Index, offsetBy: Int)'
return index(startIndex, offsetBy: offset)
^
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Internals/AudioKitHelpers.swift:22:16: note: expected an argument list of type '(Self.Index, offsetBy: Self.IndexDistance)'
return index(startIndex, offsetBy: offset)
^
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Internals/CoreAudio/AudioUnit+Helpers.swift:101:29: error: missing argument for parameter 'capacity' in call
data.deallocate()
^
capacity: <#Int#>
Swift.UnsafeMutablePointer:273:17: note: 'deallocate(capacity:)' declared here
public func deallocate(capacity: Int)
^
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Nodes/Effects/Reverb/Convolution/AKConvolution.swift:144:41: error: missing argument for parameter 'capacity' in call
theData?.deallocate()
^
capacity: <#Int#>
Swift.UnsafeMutablePointer:273:17: note: 'deallocate(capacity:)' declared here
public func deallocate(capacity: Int)
^
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Nodes/Playback/Phase-Locked Vocoder/AKPhaseLockedVocoder.swift:226:41: error: missing argument for parameter 'capacity' in call
theData?.deallocate()
^
capacity: <#Int#>
Swift.UnsafeMutablePointer:273:17: note: 'deallocate(capacity:)' declared here
public func deallocate(capacity: Int)
^
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Nodes/Effects/AudioKit Operation-Based Effect/AKOperationEffect.swift:28:17: error: value of type '[NSNumber]' has no member 'compactMap'
$0.compactMap { $0.doubleValue }
^~ ~~~~~~~~~~
I tried to copy the AudioKit source code into the project I was testing: AudioKit's HelloWorld project. In this case I have the following error on XCode:
/Users/sky/Desktop/AudioKit-4.2.2/AudioKit/Common/Internals/AudioUnit Host/AKAudioUnitManager.swift:140:16: Value of type '[AVAudioUnit?]' has no member 'compactMap'
The error is thrown on source code file AKAudioUnitManager.swift on the method below:
private var linkedEffects: [AVAudioUnit] {
return _effectsChain.compactMap { $0 }
}
Also, playground is not working even with compiled framework.
I use MacOS Sierra, XCode 9.2, Swift 4, iOS 9.2.
Thanks!

Unity To xcode Error

[Here's the Errors][1]
i'm Getting this Message Everytime with every code i export from unity
#if UNITY_CAN_USE_METAL
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
#else
typedef NSUInteger MTLPixelFormat;
enum
{
MTLPixelFormatBGRA8Unorm,
MTLPixelFormatBGRA8Unorm_sRGB,
};
......................
#endif
I lack the reputation to comment above, so:
In Unity-iPhone/Classes/Unity/UnityMetalSupport.h, lines 20-25:
typedef NSUInteger MTLPixelFormat;
enum
{
MTLPixelFormatBGRA8Unorm,
MTLPixelFormatBGRA8Unorm_sRGB,
};
Xcode 9.0.1 gives the following errors:
Line 20: Typedef redefinition with different types ('NSUInteger' (aka 'unsigned long') vs 'enum MTLPixelFormat')
Line 23: Redefinition of enumerator 'MTLPixelFormatBGRA8Unorm'
Line 24: Redefinition of enumerator 'MTLPixelFormatBGRA8Unorm_sRGB'
My xcodeproj was generated by Unity 5.5.2f1.

Swift 3 CVaListPointer Type Conflict

I am integrating with a C library - liblinphone. It has the following typedef and function I need to call from my Swift 3 iOS app.
typedef void (*OrtpLogFunc)(const char *domain,
int lev,
const char *fmt,
va_list args);
void linphone_core_set_log_handler(OrtpLogFunc logfunc);
It appears that Swift is interpreting va_list differently when compiling for the simulator than when compiling for a device.
Here is the Swift code that uses the C function and
This compiles only when the target is the Device:
class MyClass {
func setupLogging() {
linphone_core_set_log_handler(my_callback)
}
}
func my_callback(_ domain: Optional<UnsafePointer<Int8>>,
level: OrtpLogLevel,
format: Optional<UnsafePointer<Int8>>,
args: CVaListPointer?) { // NOTE: Optional CVAListPointer
// do some logging
}
This compiles only when the target is the Simulator:
class MyClass {
func setupLogging() {
linphone_core_set_log_handler(my_callback)
}
}
func my_callback(_ domain: Optional<UnsafePointer<Int8>>,
level: OrtpLogLevel,
format: Optional<UnsafePointer<Int8>>,
args: CVaListPointer) { // NOTE: CVAListPointer is NOT optional
// do some logging
}
When I run on the device, logging works, so it appears that using the optional CVaListPoint? is the safest, so how do I get this to compile for the simulator.
The first version only compiles and runs on a device but issues this compiler error when targeting the simulator:
Swift Compiler Error
C function pointer signature
'(Optional<UnsafePointer<Int8>>, OrtpLogLevel,
Optional<UnsafePointer<Int8>>, CVaListPointer?) -> ()'
is not compatible with expected type 'OrtpLogFunc' (aka
'#convention(c)
(Optional<UnsafePointer<Int8>>, OrtpLogLevel,
Optional<UnsafePointer<Int8>>, CVaListPointer) -> ()')
The second version only compiles when targeting the simulator, but when targeting a device, it issues this error:
Swift Compiler Error
Cannot convert value of type
'(Optional<UnsafePointer<Int8>>, OrtpLogLevel,
Optional<UnsafePointer<Int8>>, CVaListPointer) -> ()'
to expected argument type 'OrtpLogFunc!'
Is there some way I can force the simulator to accept this function without changing the C headers?
Or, is there something I can do in Swift to make this work?
You'd better send a bug report to Apple or swift.org as soon as possible.
And, until this issue will be fixed, this sort of coding would be a workaround:
let my_callback: OrtpLogFunc = {domain, level, format, _args in
let args: CVaListPointer? = _args
// do some logging
}

linking QuaZip with Qt 4.8.0 into project

I have a project where I want to unzip files.
I have found Quazip to be close to the implementation I want(check), but....
when build the project the compiler says
Makefile.Release:241: warning: overriding commands for target
release/moc_quazipfile.o' Makefile.Release:219: warning: ignoring
old commands for targetrelease/moc_quazipfile.o'
release\moc_quazipfile.cpp:40: warning: 'static void
QuaZipFile::qt_static_metacall(QObject*, QMetaObject::Call, int,
void**)' redeclared without dllimport attribute: previous dllimport
ignored release\moc_quazipfile.cpp:48: warning:
'QuaZipFile::staticMetaObjectExtraData' redeclared without dllimport
attribute after being referenced with dll linkage
release\moc_quazipfile.cpp:52: warning:
'QuaZipFile::staticMetaObject' redeclared without dllimport attribute
after being referenced with dll linkage
release\moc_quazipfile.cpp:61: warning: 'virtual const QMetaObject*
QuaZipFile::metaObject() const' redeclared without dllimport
attribute: previous dllimport ignored release\moc_quazipfile.cpp:66:
warning: 'virtual void* QuaZipFile::qt_metacast(const char*)'
redeclared without dllimport attribute: previous dllimport ignored
release\moc_quazipfile.cpp:74: warning: 'virtual int
QuaZipFile::qt_metacall(QMetaObject::Call, int, void*)' redeclared
without dllimport attribute: previous dllimport ignored
mingw32-make.exe[1]: Leaving directory `*
**quazip_test-build-desktop-Qt_4_8_0_for_Desktop_-MinGW_Qt_SDK__Release'
release\moc_quazipfile.cpp:48: error: definition of static data
member 'QuaZipFile::staticMetaObjectExtraData' of dllimport'd class
mingw32-make.exe[1]: * [release/moc_quazipfile.o] Error 1
mingw32-make.exe: * [release] Error 2 13:29:01: The process
"C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2. Error while
building project quazip_test (target: Desktop) When executing build
step 'Make'
.pro:
QT += core gui
TARGET = quazip_test
TEMPLATE = app
INCLUDEPATH += C:/QtSDK/QtSources/4.8.0/src/3rdparty/zlib
SOURCES += main.cpp\
mainwindow.cpp \
quazip/quazipnewinfo.cpp \
quazip/quazipfile.cpp \
quazip/quazip.cpp \
quazip/quacrc32.cpp \
quazip/qioapi.cpp \
quazip/moc_quazipfile.cpp \
quazip/JlCompress.cpp \
quazip/quaadler32.cpp
HEADERS += mainwindow.h \
quazip/crypt.h \
quazip/unzip.h \
quazip/quaadler32.h \
quazip/quazipnewinfo.h \
quazip/quazipfileinfo.h \
quazip/quazipfile.h \
quazip/quazip_global.h \
quazip/quazip.h \
quazip/quacrc32.h \
quazip/quachecksum32.h \
quazip/JlCompress.h \
quazip/ioapi.h \
quazip/zip.h
FORMS += mainwindow.ui
mainwindow.h:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "quazip/quazip.h"
#include "quazip/quazipfile.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
mainwindow.cpp:
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QuaZip *temp = new QuaZip();
}
MainWindow::~MainWindow()
{
delete ui;
}
What am I doing wrong??
BR

Resources