Objective Sharpie Release History
3.4 (October 11, 2017)
- Support for Xcode 9: iOS 11, macOS 10.13, tvOS 11, and watchOS 4
- Issues with SIMD and tgmath should now be fixed
- Telemetry has been removed completely
3.3 (August 3, 2016)
- Support for Xcode 8 Beta 4, iOS 10, macOS 10.12, tvOS 10 and watchOS 3.
- Updated to latest Clang master build (2016-08-02)
- Persist telemetry submission options from
sharpie pod bindto
3.2 (June 14, 2016)
- Support for Xcode 8 Beta 1, iOS 10, macOS 10.12, tvOS 10 and watchOS 3.
3.1 (May 31, 2016)
- Support for CocoaPods 1.0
- Improved CocoaPods binding reliability by first building a native
.frameworkand then binding that
- Copy CocoaPods
.frameworkand binding definition into a
Bindingdirectory to make integration with Xamarin.iOS and Xamarin.Mac binding projects easier
3.0 (October 5, 2015)
- Support for new Objective-C language features including lightweight generics and nullability, as introduced in Xcode 7
- Support for the latest iOS and Mac SDKs.
- Xcode project building and parsing support! You can now pass a full Xcode project to Objective Sharpie and it will do its best to figure out the right thing to do (e.g.
sharpie bind Project.xcodeproj -sdk ios).
- CocoaPods support! You can now configure, build, and bind CocoaPods directly from Objective Sharpie (e.g.
sharpie pod init ios AFNetworking && sharpie pod bind).
- When binding frameworks, Clang modules will be enabled if the framework supports them, resulting in the most correct parsing of a framework, since the structure of the framework is defined by its
- For Xcode projects that build a framework product, parse that product instead of intermediate product targets as non-framework targets in an Xcode project may still have ambiguities which cannot be automatically resolved.
2.1.6 (March 17, 2015)
- Fixed binary operator expression binding: the left-hand side of the expression was incorrectly swapped with the right-hand (e.g.
1 << 0was incorrectly bound as
0 << 1). Thanks to Adam Kemp for noticing this!
- Fixed an issue with
NSUIntegerbeing bound as
-DNS_BUILD_32_LIKE_64is now passed to Clang to make parsing
objc/NSObjCRuntime.hwork as expected on i386.
- The default architecture for Mac OS X SDKs (e.g.
-sdk macosx10.10) is now x86_64 instead of i386, so
-archcan be omitted unless overriding the default is desired.
2.1.0 (March 15, 2015)
- bxc#27849: Ensure
using ObjCRuntime;is produced when
- bxc#27850: Ensure
using System.Runtime.InteropServices;is produced when
- bxc#27852: Default
DllImportto loading symbols from
- bxc#27848: Skip forward-declared Objective-C container declarations.
- bxc#27846: Bind protocol types with a single qualification as concrete interfaces (
- bxc#28037: Bind
Int32to drop the
uLsuffixes when the values can safely fit into
- bxc#28038: Fix enum name mapping when original native name starts with a
sizeofC expressions whose argument type does not map to a C# primitive type will be evaluated in Clang and bound as an integer literal to avoid generating invalid C#.
- Fix Objective-C syntax for properties whose type is a block (Objective-C code appears in comments above bound declarations).
- Bind decayed types as their original type (
int*during semantic analysis in Clang, but bind it as the original as-written
Thanks very much to Dave Dunkin for reporting many of the bugs fixed in this point release!
2.0.0: March 9, 2015
Objective Sharpie 2.0 is a major release that features an improved Clang-based driver and parser and a new NRefactory-based binding engine. These improved components provide for much better bindings, particularly around type binding. Many other improvements have been made that are internal to Objective Sharpie which will yield many user-visible features in future releases.
Objective Sharpie 2.0 is based on Clang 3.6.1.
Type binding improvements
Objective-C blocks are now supported. This includes anonymous/inline blocks and blocks named via
typedef. Anonymous blocks will be bound as
System.Funcdelegates, while named blocks will be bound as strongly named
There is an improved naming heuristic for anonymous enums that are immediately preceded by a
typedefresolving to a builtin integral type such as
C pointers are now bound as C#
unsafepointers instead of
System.IntPtr. This results in more clarity in the binding for when you may wish to turn pointer parameters into
refparameters. It is not possible to always infer whether a parameter should be
ref, so the pointer is retained in the binding to allow for easier auditing.
An exception to the above pointer binding is when a 2-rank pointer to an Objective-C object is encountered as a parameter. In these cases, convention is predominant and the parameter will be bound as
out NSError error).
You will often find that bindings produced by Objective Sharpie will now be annotated with the
[Verify] attribute. These attributes indicate that you should verify that Objective Sharpie did the correct thing by comparing the binding with the original C/Objective-C declaration (which will be provided in a comment above the bound declaration).
Verification is recommended for all bound declarations, but is most likely required for declarations annotated with the
[Verify] attribute. This is because in many situations, there is not enough metadata in the original native source code to infer how to best produce a binding. You may need to reference documentation or code comments inside the header files to make the best binding decision.
See the Verify Attributes documentation for more details.
Other notable improvements
usingstatements are now generated based on types bound. For instance, if an
NSURLwas bound, a
using Foundation;statement will be generated as well.
uniondeclarations will now be bound, using the
[FieldOffset]trick for unions.
Enum values with constant expression initializers will now be properly bound; the full expression is translated to C#.
Variadic methods and blocks are now bound.
Frameworks are now supported via the
-frameworkoption. See the documentation on Binding Native Frameworks for more details.
Objective-C source code will be auto-detected now, which should eliminate the need to pass
-xobjective-cto Clang manually.
Clang module usage (
@import) is now auto-detected, which should eliminate the need to pass
-fmodulesto Clang manually for libraries which use the new module support in Clang.
The Xamarin Unified API is now the default binding target; use the
-classicoption to target the 32-bit only Classic API.
Notable bug fixes
instancetypebinding when used in an Objective-C category
- Fully name Objective-C categories
- Prefix Objective-C protocols with
1.1.35: December 21, 2014
Minor bug fixes.
1.1.1: December 15, 2014
1.1.1 was the first major release after 1.5 years of internal use and development at Xamarin following the initial preview of Objective Sharpie in April 2013. This release is the first to be generally considered stable and usable for a wide variety of native libraries, featuring a new Clang backend.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.