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.
Related
I'm building a Swift static library with:
Xcode 13.2 (Swift compiler 5.5.2)
iOS Deployment target 12.0
Build library for distribution YES
Skip install NO
Swift language version 5 and tried with 4.2
Dependency managed with CocoaPods:
Japx 3.0.0
Alamofire 5.2.2
RxSwift
When I try to add it to an iOS project with this setup:
Xcode 13.3 (Swift compiler 5.6)
iOS Deployment target 12.0
Swift language version 5 and tried with 4.2
and build I get this error:
Failed to build module 'LibraryX'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 effective-4.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.6 effective-4.2 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)'). Please select a toolchain which matches the SDK.
These are the headers in the .swiftinterface
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 effective-4.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -Onone -module-name LibraryX
Obviously if I build the project with the same compiler version or building the library with the iOS project everything works fine. But the purpose here is to release a precompiled library and not its source code.
Every time that I lookup this error online I've found "You have to set Build library for distribution to Yes"
I tried to add the source code of the static library to a new Framework project, but I get the same result.
I also had this error, in my case it was unable to import a sub-dependency of my XCFramework during reading .swiftinterface file, however was showing this absolutely misleading error.
After repeatedly cleaning up DerivedData and trying different Xcode versions (13.0, 13.4.1) I've seen 2 errors: "this SDK is not supported by the compiler", and "No module named 'AnotherLib'" which was an incorrectly specified dependency inside of my Swift Package.
So, maybe only first part of the message is correct "Failed to build module 'LibraryX'", but the reason is something else, NOT the difference in compiler versions.
I'm facing the issue with distributing compiled swift framework. My framework heavily relies on the libxml2 dynamic library. In order to avoid issues with Swift module compatibility, I've set build flag BUILD_LIBRARY_FOR_DISTRIBUTION = YES.
So I've used Xcode 11.3 Swift v5.1.3 to build my framework. I've integrated it into the Demo.app project. As being expected Demo.app works fine in Xcode 11.3.
However, I have another error trying to build Demo.app in Xcode 11.0 Swift 5.1.
I've got the error:
#import "libxml/HTMLparser.h"
^
/Applications/Xcode_11.0.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.0.sdk/usr/include/libxml2/libxml/HTMLparser.h:15:10: error: 'libxml/xmlversion.h' file not found
#include <libxml/xmlversion.h>
^
/.../DemoApp/ThirdParty/testXML.framework/Modules/testXML.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface:6:8: error: could not build Objective-C module 'libxml2'
import libxml2
^
/.../DemoApp/AppDelegate.swift:11:8: error: failed to load module 'testXML'
import testXML
Here is the repo with both framework and app projects.
I'm using both Xcode version on the same Mac.
Your project runs fine on my Xcode 11.3 tvOS simulator. However there's something I've noticed.
The framework you built only contains x86_64 architectures (simulator only), it won't work on physical devices.
For Xcode before 11.3 it seems like you need to add $(SDKROOT)/usr/include/libxml2 and ${SRCROOT}/libxml2 to Build Settings. That fixed the issue for me on Xcode 11.2.1
How to use Cocos2D 1.1.0, When I am choose a template as Cocos2D Application and name it "NewCocos", When simply run this project without doing anything It gives me
124 errors
of same type = error: missing binary operator before token "("
this errors shows near "#if defined(__has_feature) && __has_feature(objc_arc)"
18 Warnings
of same type = warning: ignoring #pragma clang diagnostic
this warning shows near "#pragma clang diagnostic push" , "#pragma clang diagnostic pop" etc...
I am using XCode 3.2.4 and iOS / iPhone OS 4.1
In short statement gives (124 times) error of
error: missing binary operator before token "("
on the statement without quotes "#if defined(__has_feature) && __has_feature(objc_arc)"
This is working fine in Cocos v1.0.1 older version but not working on cocos v1.1.0
Cocos2D v1.1 requires to set the compiler to "Apple LLVM compiler" in Build Settings. Only Xcode 4.0 and newer are shipped with the Apple LLVM compiler. Furthermore, to enable ARC you must be using at least Xcode 4.2 with the "Apple LLVM compiler 3.0".
You should seriously consider upgrading. Xcode 3.2 is over 2 years old now (released: August 2009). As mentioned here, only apps built with the latest, or if not "too old" the second to latest iOS SDK version are going to be approved by Apple (at the time of this writing iOS 5.0 is the latest SDK but iOS 4.3 apps are also still accepted). Regardless of that, Xcode 4 makes it a lot easier to submit apps through its built-in Organizer.
this is XCode 3.2.4 problem Update Your X-Code Minimum X-Code 4.2.0
I just upgraded my Mac to Lion and then Xcode 4.1. My iPhone project which worked well with Xcode 4.0 had 401 errors in Xcode 4.1.
I googled the solution and got two useful ways.
changed the complier from GCC 4.2 to LLVM 2.1.
changed #import "/usr/include/sqlite3.h" to #import <sqlite3.h>
Now the number of errors reduced to 15, saying
Expected function body after function declarator
on OBJC_ARC_UNAVAILABLE in file Runtime.h, which is a built-in source file.
I tried to change iOS Deployment Target from iOS 3.0 to iOS 4.1 and set Other C Flags as
-D__IPHONE_OS_VERSION_MIN_REQUIRED=040100
But neither of them worked.
Any help will be appreciated. Thank you.
I had the same issue, and was able to resolve it by changing this
#import "/usr/include/objc/runtime.h"
to this
#import <objc/runtime.h>
where ever I included this file. This change appears backward compatible with 4.0.2 running under Snow Leopard as well.
I'm trying to have printing in my application.
While this works, and I can indeed print from my application, I would like to be able to run my application on devices that aren't running iOS 4.2.
Even if I check the version before I run the code.
The method that prints the document has all of the classes that are being used to print.
Whenever I switch the simulator back to 4.1, I get a Symbol not found exception that displays the error:
dyld: Symbol not found: _OBJC_CLASS_$_UIMarkupTextPrintFormatter
Referenced from: /Users/Jack/Library/Application Support/iPhone Simulator/4.1/Applications/794534DB-DB53-42E7-A294-7E78FDD3899B/Documentation.app/Documentation
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit
in /Users/Jack/Library/Application Support/iPhone Simulator/4.1/Applications/794534DB-DB53-42E7-A294-7E78FDD3899B/Documentation.app/Documentation
I don't want to discard the users who haven't upgraded to 4.2.
Any help appreciated.
Which compiler are you using? If you haven't, you should switch to LLVM GCC or LLVM to support automatic weak linking as described by Marco Arment in Supporting older versions of iOS while using new APIs.