Flutter Array subscript is not an integer - ios

For some reason, I've started getting this when I issue the Flutter run command, I'm unsure if something has updated in the background.
Semantic Issue (Xcode): Property 'userInfo' not found on object of type 'UNNotification *'
/Users/martyn/FlutterDev/flutter/.pubcache/hosted/pub.dartlang.org/flutter_local_notifications-9.4.0/ios/Classes/FlutterLocalNotificationsPlugin.m:156:36
Semantic Issue (Xcode): Array subscript is not an integer
/Users/martyn/FlutterDev/flutter/.pubcache/hosted/pub.dartlang.org/flutter_local_notificztions-9.4.0/ios/Classes/FlutterLocalNotificationsPlugin.m:156:44
I'm also getting a number of deprecated from
/Users/martyn/FlutterDev/flutter/.pubcache/hosted/pub.dartlang.org/flutter_local_notifications-9.4.0/ios/Classes/FlutterLocalNotificationsPlugin.m:335:4:
warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications
Framework's UNNotificationRequest [-Wdeprecated-declarations]
- (UILocalNotification *)buildStandardUILocalNotification:
I don't know how to resolve it.
Thank you

I resolved this by running flutter pub cache repair

Related

M1 App Build iOS Failed Flutter - AMSupportURLConnectionDelegate Location & Geolocator Packages

Please help, I have just paid for some development work and gotten the app back. The Developer claims they have no problem running the app. I can not get it to run on my machine. The app was running before the developer added state management via block.
It looks like package/cocoapods/Xcode error which should be resolvable using latest versions, but nothing I can do clears these errors. Every time I get close I run again and all the errors come right back. I am in an endless troubleshooting loop without resolution. I am a beginner and can not afford to pay the developer $50hr to troubleshoot why an app won't run on my computer so I am tools down and stalled until I get this issue resolved.
I have reinstalled Cocoapods.
I have tried deleting PODS file.
I have tried using an old PODS file.
I have ensured it is the right version for M1 with the ffi arch install.
I have updated my developer certificate.
Pasted Arch 86 into Xcode settings.
Set versions to the latest for deployment.
I have even wiped my Mac out completely and reinstalled ALL environments from scratch but the errors persist.
I have done flutter clean and Flutter pub get and flutter build iOS and flutter run 1000 times in the last week.
I can not get this app to build for iOS and I am losing my mind. I have been trying to get it to run for almost 2 weeks!
Developer spent an hour with me and all they asked me to do was all the stuff I have already done by searching online for known issues.
I am out of ideas. I need help to solve this.
PLEASE HELP
Error output from Xcode build:
↳
objc[19329]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20c172c10) and
/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1141502b8). One of the two will be used. Which one is undefined.
objc[19329]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20c172c60) and
/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x114150308). One of the two will be used. Which one is undefined.
2021-07-22 22:34:26.062 xcodebuild[19329:246509] CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer implemented and should not be called
** BUILD FAILED **
Xcode's output:
↳
/Users/tlcf/Development/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/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
#interface UIAlertView : UIView
^
/Users/tlcf/Development/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/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
#interface UIAlertView : UIView
^
2 warnings generated.
/Users/tlcf/Development/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/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
#interface UIAlertView : UIView
^
/Users/tlcf/Development/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/tlcf/Development/simposi-main/ios/Pods/Target Support Files/location/location-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAler
tView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here
#interface UIAlertView : UIView
^
2 warnings generated.
/Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.3.0/ios/Classes/GeolocatorPlugin.m:156:55: error: expected expression
openURL:options:completionHandler::[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
^
/Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.3.0/ios/Classes/GeolocatorPlugin.m:156:29: error: use of undeclared identifier
'options'
openURL:options:completionHandler::[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
^
/Users/tlcf/Development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.3.0/ios/Classes/GeolocatorPlugin.m:156:37: error: use of undeclared identifier
'completionHandler'
openURL:options:completionHandler::[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
^
3 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/tlcf/Development/simposi-main/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of
supported deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Encountered error while building for device.
Please run the application in xCode, you will get a proper error there.
In my case it was fixed with the help of this answer.
Got it resolved. I went back to my last working version before I hired the Developers and it runs just fine. So I pasted their lib in.... and that errored. They looked at error and it was because I needed to paste in the intl file and then fix a couple settings in Xcode. None of us knows why it was erroring on my computer only or why pasting their lib into my last working copy worked, but it is resolved. I suspect it was a Git conflict, because of the latest update to Xcode but we really don't know why. But it is resolved.
Thank-you to those who tried to help.

Core Plot iOS compiler error with Xcode 11.0- swift

I have an app which uses the CorePlot iOS library.
This app worked well, when it was compiled with Xcode 10.
However, after upgrading to Xcode 11.0 I get the following error message:
Implicit conversion changes signedness: 'CGColorRenderingIntent' (aka 'enum CGColorRenderingIntent') to 'unsigned long'
at line 481 in CPTImage.m.
How can I fix this error?
Make sure you're using the latest code from the release-2.3 branch. This error was fixed back in June.

ionic 2 - run app on ipad device

What could be causing this error? I am using Xcode version 8.
/Users/package/workspace/apps-72dfa722-8/cordova/platforms/ios/dcc-mobile-sample/Plugins/cordova.plugins.diagnostic/Diagnostic.m:826:25: error: no known class method for selector 'isPedometerEventTrackingAvailable'
return [CMPedometer isPedometerEventTrackingAvailable];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/package/workspace/apps-72dfa722-8/cordova/platforms/ios/dcc-mobile-sample/Plugins/cordova.plugins.diagnostic/Diagnostic.m:826:12: warning: incompatible pointer to integer conversion returning 'id' from a function with result type 'BOOL' (aka 'signed char') [-Wint-conversion]
return [CMPedometer isPedometerEventTrackingAvailable];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
The issue is with cordova-plugin-diagnostic, the latest version of which adds support for new functionality in iOS 10 - see this issue.
Make double sure you are building with XCode 8 for iOS 10
Ensure that you're using an up-to-date version of cordova-ios platform - latest is #4.3.1. Check with cordova platform ls
Ensure that Core Motion framework is present in your Xcode project - if not, add it.
Try building and running the plugin example project

Xcode 7.3: app delegate can't access its own objects, context is claiming to capture an objective-C object but self isn't available

In xcode 7.3 on MacOS 10.11.3 and 10.11.4, when I stop the debugger inside any app delegate method and try to examine any object instantiated inside the app delegate, or even the app delegate itself, I get this warning in the debugger:
error: warning: Stopped in a context claiming to capture an Objective-C object pointer, but 'self' isn't available; pretending we are in a generic context
error: member reference type 'AppDelegate *const' is a pointer; did you mean to use '->'?
error: incomplete definition of type 'AppDelegate'
note: forward declaration of 'AppDelegate'
error: 2 errors parsing expression
This particular time I was in the app delegate's application:didFinishLaunchingWithOptions: method, but stopping in any method in the app delegate, at any point in running the app, gives the same error when trying to look at any of the app delegate's objects.
This does not happen with xcode 7.2. I do notice that in 7.2 that self for the app delegate is listed as (AppDelegate *), while in 7.3 it is (AppDelegate *const). Clicking on the disclosure arrow next to self for the app delegate does not reveal anything in 7.3, while it does in 7.2.
This is both in the simulator and on an actual device.
Any ideas as to what might be wrong?
August
I meet problems too with Object C (not tested on swift 2). I try down command line tool to 7.2.1 but not working, after 1 hour I try access property by "[]" instead "." . It worked =)).
Example:
[Restaurant name]
instead of
Restaurant.name
Updated : found another ways to fix this bug for object C project
Xcode 7.3 debugger not showing custom class variables
Hope it helpfull
In Build Settings, try setting Precompile Prefix Header to NO.

Raknet build error

trying to build [Raknet][1] iOS with xCode 6.2
but I am getting error like
/RakNet-master/Source/ReplicaManager3.cpp:141:61: Comparison between
pointer and integer ('RakNet::Connection_RM3 *' and 'int')
do anybody had successfully build RakNet on Xcode 6.2 ?
seems C++ 11 issue, I get resolved with changing false to nullptr
earlier
if (GetConnectionByGUID(participantListIn[index], worldId)==false)
now
if (GetConnectionByGUID(participantListIn[index], worldId)==nullptr)

Resources