iPhone compile error: Invalid Suffix "_0" on Integer Constant on UIAccelerometer - iphone

I have been getting a really strange error using Xcode 3.2.5 AND the latest Xcode 4 where I can build my code on debug on the simulator, but as soon as I try to deploy it onto a device (or build in 'release' mode) I get a really strange compile error on UIAccelerometer.h that resides in the UIKitFramework. The error message is:
invalid suffix "_0" on integer constant
The line in UIAccelerometer.h that causes the issue is:
UIKIT_CLASS_AVAILABLE(2_0) #interface UIAccelerometer : NSObject
I have obviously not changed the UIKit Framework, so I can't understand at all why I'm getting this error. I've tried changing deployment targets to all iOS SDKs, tried changing any settings with minSdk versions on Xcode, etc.

Related

Flutter using cloud_firestore giving errors on IOS Simulator

It's my first time trying to use Firebase cloud_firestore together with Flutter. It works fine with the Android emulator. But I am getting the following errors, when trying to Run on the IOS Sim:
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:50:22: error: no visible #interface for 'FIRQuery' declares the selector 'queryWhereField:arrayContains:'
query = [query queryWhereField:fieldName arrayContains:value];
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:221:29: error: no known class method for selector 'fieldValueForArrayUnion:'
return [FIRFieldValue fieldValueForArrayUnion:[self readValue]];
^~~~~~~~~~~~~~~~~~~~~~~
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:224:29: error: no known class method for selector 'fieldValueForArrayRemove:'
return [FIRFieldValue fieldValueForArrayRemove:[self readValue]];
^~~~~~~~~~~~~~~~~~~~~~~~
8 warnings and 3 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone 6s.
I've also tried running the Runner directly from Xcode and get the same three build errors. Unfortunately I haven't been able to find an answer to this, so am posting the question. Any help would be gratefully received.
Thanks
I just experienced the same thing.
Following these guys
https://github.com/flutter/flutter/issues/24395
I did
pod update Firebase/Firestore
And it worked for me.
I'm using latest version of cloud firestore: 0.9.0+1
I can compile from both Xcode and VS Code.
There are a lot of warning messages when running on simulator. some of them look pretty nasty, but it works.

XCode5 Error: "use of undeclared identifier uistatusbarstylelightcontent" iOS6 deployment

I've been working on a project where the deployment target is iOS 6 but the Build Settings/Base SDK is iOS 7. I was returning UIStatusBarStyleLightContent from (UIStatusBarStyle)preferredStatusBarStyle and the project was compiling.
I tried wrapping the offending code in compiler #if statements like this:
- (UIStatusBarStyle)preferredStatusBarStyle
{
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
return UIStatusBarStyleLightContent;'
#else
return UIStatusBarStyleBlackTranslucent;
#endif
}
But then I got the same error for other identifiers like 'tintColor' and 'cornerRadius' for CALayers.
Initially I was searching for an accidentally changed project setting, but I couldn't find any and my .xcuserdata is in my git ignore file. I added the iOS 6.1 SDK to my XCode 5 installation to compile another test app to my iOS 6 test device last night, so I tried removing that folder from XCode 5's library. Even though I wasn't explicitly targeting the iOS 6 SDK (it was my Deployment Target not Base SDK) XCode was looking at my code as if it was iOS 6 and throwing errors for all my iOS 7 code.

error in compiling .xcdatamodel

i have xcode 4.3 with ios 5.1 and trying to compile and run the project, but it gives error:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/momc failed with exit code 6
i found something in "Data Model Version Compile".. error after upgrading to Lion (Xcode4.1) but it doesn't provide me any suitable solution. It say's to delete unnecessary .xcdatamodel-directories and i did, but i still stuck up there with same issue. Other thing i found that the extension is changed in new xcode its '.xcdatamodeld' instead of '.xcdatamodel'. I copied content content of '.xcdatamodel' file and put in to '.xcdatamodeld' and added to xcode but it gave error at some where else that persistence store might exist. what should i do to run this project..
thanks in advance!!!

Missing stack trace in Xcode debugger when exception is thrown on both iOS simulator and device

When my app throws an exception it prints the following in the debugger output:
First throw call stack:
(0x310f88bf 0x3829d1e5 0x31e76015 0x31e7640d 0x31e764c5 0x9e903 0x9edfb 0x32b15d55 0x32b20e8d 0x310cb2dd 0x3104e4dd 0x3104e3a5 0x33c7cfed 0x330c0743 0x3267 0x3220)
Software stack:
Xcode 4.2 in Lion 10.7.2 (Xcode 4.1 is not installed)
I am leaning towards this this being an Xcode bug, but do you see anything obvious that I missed?
What I have tried / checked
Build Settings:
Debug
Strip Debug Symbols During Copy = NO
Strip Linked Product = NO
Optimization Level = -O0 and-Os
Symbols Hidden By Default = YES and NO
Compiler = LLVM 3.0 and LLVM GCC 4.2
Scheme:
Debugger = GDB and LLDB
Cleaning:
Clean
Clean Build Folder
Delete Derived Data Directory (remove from organizer)
Devices:
iOS 5 Simulator
iOS 5 iPhone 4
iOS 5 iPhone 3Gs
Random:
I originally had this problem with both Xcode 4.1 and 4.2 installed, so uninstalled both and reinstalled just 4.2
Tried with different projects with the same results.
When fiddling with breakpoints I see this in the debugger output before the exception:
Catchpoint 36 (throw)Catchpoint 37 (catch)Pending breakpoint 2 - "__cxa_begin_catch" resolved
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
Catchpoint 36 (exception thrown).warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
Ok, found the issue: Well not me but Joe (a phillyCocoa member)… But since he is not on SO, I will post his solution.
The deployment target was set to 4.0, but since the 4.0 debug symbols must be downloaded separately in Xcode 4.2, the DSYM wasn't valid.
2 ways to fix:
1. Install the debug symbols for 4.0 from the Xcode preferences.
2. Set the deployment target to 4.3 or higher.
The only thing that sticks out is that development builds should probably have optimisation switched off altogether with -O0.

UIKit SDK 3.0 error

I am using iphone_sdk_3.0_beta_5__9m2735 SDK.
When I try to compile my code using simulator 3.0 option I get following error. The code compiles for rest all simulator option ie 2.0, 2.1, 2.2, 2.2.1
While compiling my code I get following error
from /Users/videomac/manish/EXPLab/2009-05-27-11-20 myApp_LL_2/myApp_Prefix.pch:7:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:30,
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:11: error: syntax error before 'AT_NAME' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:19: error: syntax error before '}' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:21: fatal error: method definition not in #implementation context
The errors are located in file UILocalizedIndexedCollation.h which is SDK file.I am using UIKit Framework of SDK 3.0. Can anyone tell me what should I do to remove this error?
I've traced this problem to be the compiler version being used. From what I can tell, [REDACTED] requires GCC 4.2 while iPhone SDK 2.x only works with GCC 4.0.
Here's a way to fix this.
In your Target Info, select Build separator and look for the section Compiler Version. Then:
Select the C/C++ Compiler Version row
Set the default to GCC 4.0
At the bottom-left control, hit Add Build Setting Condition
On the left, choose Device - iPhone OS 3.0
On the right, chose GCC 4.2
Repeat steps 3 to 5, now with Simulator - iPhone OS 3.0 on step 4.
Apple’s engineer had confirmed that they had a bug in UIKit framework:
We do have a simple workaround for this UIKit bug. In UILocalizedIndexedCollation.h change this:
UIKIT_EXTERN #interface UILocalizedIndexedCollation : NSObject
to
UIKIT_EXTERN_CLASS #interface UILocalizedIndexedCollation : NSObject
Denis2342
Firstly you should discuss beta products here.
However, this is not connected with the beta. You have an error in one of your own header filesprobably a missing '#end' statment.
BTW, google could have solved this for you rather than asking here.