Bug 19674 - Error while generating ApiDefinition.cs for Xamarin iOS Binding Project from Objective Sharpie
Summary: Error while generating ApiDefinition.cs for Xamarin iOS Binding Project from ...
Status: RESOLVED FIXED
Alias: None
Product: Objective Sharpie
Classification: Desktop
Component: General ()
Version: 2.1.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Aaron Bockover [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2014-05-12 04:06 UTC by Fatima Mudhesh
Modified: 2016-06-01 03:01 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Error file (19.82 KB, text/plain)
2014-05-12 04:08 UTC, Fatima Mudhesh
Details
Successful output from Objective Sharpie (13.00 KB, application/octet-stream)
2014-05-15 02:22 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Fatima Mudhesh 2014-05-12 04:06:44 UTC
Steps I followed: 

1. I have downloaded the Aviary SDK 4.0.1 from https://developers.aviary.com/docs/ios 

2. I Created an iOS binding Project. 

3. Renamed the AviarySDK file to AviarySDK.a 

4. Added this file to the binding project. 

5. Added the AviarySDKResources.bundle to this project. 

6. Now as per the documentation for Binding Projects (http://docs.xamarin.com/guides/ios/advanced_topics/binding_objective-c/binding_walkthrough/offline.pdf), I tried to generate the ApiDefinition.cs in ObjectiveSharpie, by selecting header files from the path "AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/" 

7. This generates an error:

I have attached the text file with the generated Error text.

Please can anyone help me?
Comment 1 Fatima Mudhesh 2014-05-12 04:08:03 UTC
Created attachment 6778 [details]
Error file

Error while generating ApiDefinition.cs from Objective Sharpie
Comment 2 Nischal 2014-05-12 08:21:59 UTC
We are observing same behavior. On creating APIdefinition using ObjectiveSharpie by selecting
header files from the path "AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Versions/A/Headers/" 
results in error.

Screencast for this:  http://screencast.com/t/o4dpB7qUr5

Supplement Info:
Error Details: https://gist.github.com/AkhileshKumar01/bd380681fc7df1739975

Environment Info:
All MAC
XS 4.2.5.0
Xam.iOS 7.2.2.1
Comment 3 Fatima Mudhesh 2014-05-12 09:08:59 UTC
Do you have any solution for it? How can it be resolved? Your immediate attention would be appreciated.
Comment 4 Fatima Mudhesh 2014-05-14 01:55:30 UTC
Please can you inform me if there is any solution to this bug? I really need to generate this binding.
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2014-05-15 02:22:42 UTC
Created attachment 6814 [details]
Successful output from Objective Sharpie

I was able to run Objective Sharpie on Aviary SDK 4.0.1 successfully. Output file attached.

The trickiest step I had to follow was to add an "extra clang command line argument" [1] on the first dialog window of Objective Sharpie. This was required to allow `clang` to find and import the various Aviary header files.

[1] -F /path/to/AviarySDK-4.0.1/AviarySDK/


On the "Select Header Files" screen, I then selected just the "main" `AviarySDK.h` header file [2], and left "Follow #include and #import directives" ON.

[2] /path/to/AviarySDK-4.0.1/AviarySDK/AviarySDK.framework/Headers/AviarySDK.h
Comment 6 Aaron Bockover [MSFT] 2016-06-01 03:01:29 UTC
Closing because of how old this bug is. So much has changed in Objective Sharpie since this was opened (notably the introduction of the -framework option).

If you have problems with the current release (3.1 as of 2016-05-31) on this SDK, please feel free to file a new bug.

FWIW, I can successfully bind the SDK using the new CocoaPods support:

  sharpie pod init ios AviarySDK
  sharpie pod bind

Which produces the following output in the working directory:

  Binding/
  ├── AviarySDK.framework/
  │   ├── AviarySDK -> Versions/Current/AviarySDK
  │   ├── Headers -> Versions/Current/Headers
  │   └── ...
  ├── AviarySDK_ApiDefinitions.cs
  └── AviarySDK_StructsAndEnums.cs