Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

既存の資産をXamarinで / Utilize existing assets as Xamarin library

117 views

Published on

.NET Conf 2018 Tokyo, Japanで使用した資料
補足: https://teitoku-window.hatenablog.com/entry/2018/10/30/005115

Published in: Mobile
  • Be the first to comment

既存の資産をXamarinで / Utilize existing assets as Xamarin library

  1. 1. .NET / Xamarin VOYAGE GROUP (@y_chu5) .NET Conf 2018, Tokyo
  2. 2. Tw: @y_chu5 Gh: @yamachu VOYAGE GROUP C# Python Scala TypeScript DDD(Deadline Driven Development)
  3. 3. • •
  4. 4. • Android (Java) iOS (Objective-C) • JINS MEME SDK https://github.com/yamachu/JINSMEME.Xamarin •
  5. 5. • Xamarin • NuGet • GitHub • • SDK • • SDK
  6. 6. • like • Xamarin •
  7. 7. • macOS • Visual Studio for Mac
  8. 8. Android
  9. 9. • • •
  10. 10. • • •
  11. 11. Visual Studio for Mac Binding Library Xamarin.Android
  12. 12. ! • •
  13. 13. • jar • aar
  14. 14. Build Action jar • EmbeddedJar • EmbeddedReferenceJar • InputJar • ReferenceJar
  15. 15. Build Action jar • EmbeddedJar • EmbeddedReferenceJar • InputJar • ReferenceJar
  16. 16. Build Action – jar – EmbeddedJar • jar DLL • InputJar • jar DLL • jar •
  17. 17. Build Action aar • LibraryProjectZip aar
  18. 18. ! ! •
  19. 19. API
  20. 20. Reference > Projects
  21. 21. • Class • Method • Class
  22. 22. • Class • MemeLib • Method • • Class • Library4could.Dao
  23. 23. !
  24. 24. ! ! "
  25. 25. ! ! " •
  26. 26. • • Java C# • • • • • etc…
  27. 27. • • • api.xml • Parse api • Metadata.xml •
  28. 28. Warning
  29. 29. Class ~ has unknown base type ~
  30. 30. api.xml
  31. 31. api.xml ! " u$1, u$11, …
  32. 32. • MemeLib • meme.u • MemeLib • public meme.u • meme.u • • u$
  33. 33. • MemeLib • meme.u • MemeLib • public meme.u • meme.u • • u$
  34. 34. Metadata.xml
  35. 35. Metadata.xml https://docs.microsoft.com/ja-jp/xamarin/android/platform/binding-java-library/customizing-bindings/java-bindings-metadata • attr – Sets the value of an attribute of the element specified by the path attribute. • remove-node – Removes nodes matching a specified XPath. add-node
  36. 36. Metadata.xml & • •
  37. 37. Metadata.xml & • •
  38. 38. !
  39. 39. ! ! ! •
  40. 40. • warning • Library4could.Dao namespace
  41. 41. remove-node attr remove-node … warning
  42. 42. remove-node
  43. 43. !
  44. 44. ! ! ! !
  45. 45. • • • • • warning •
  46. 46. • Java => C# • Value Value • EventArgs • • • •
  47. 47. • • h#ps://docs.microso/.com/ja-jp/xamarin/android/pla6orm/binding-java-library/ • • h#ps://www.buildinsider.net/mobile/insidexamarin/10 • GitHub • h#ps://github.com/xamarin/AndroidSupportComponents • • Xamarin • h#ps://xamaritans.booth.pm/items/1049524
  48. 48. iOS
  49. 49. • • • • •
  50. 50. • • • • •
  51. 51. Visual Studio for Mac Binding Library Xamarin.iOS
  52. 52. ! • • • •
  53. 53. • framework • Pods
  54. 54. framework
  55. 55. framework .a static lib
  56. 56. … Static Lib … Shared Library!
  57. 57. Static Lib .a
  58. 58. Shared Lib framework
  59. 59. $( ).linkwith.cs
  60. 60. .csproj
  61. 61. !
  62. 62. ! ! • • •
  63. 63. https://docs.microsoft.com/en-US/xamarin/cross-platform/macios/binding/objective-sharpie/ Objective Sharpie Header
  64. 64. Objective Sharpie SDK
  65. 65. Objective Sharpie
  66. 66. Objective Sharpie
  67. 67. !
  68. 68. ! ! ! • •
  69. 69. !
  70. 70. ! ! ! " •
  71. 71. • Verify Attribute • 2
  72. 72. Verify Attribute https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/binding/objective-sharpie/platform/verify
  73. 73. • API •
  74. 74. API
  75. 75. Interface
  76. 76. ! ! ! ! !
  77. 77. • • • • • •
  78. 78. • • https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/binding/ • GitHub • https://github.com/mono/monotouch-bindings • Web • Qiita @iseebi • https://qiita.com/iseebi/items/36c4fe2bd0c996163db5 • http://qiita.com/iseebi/items/909f2d41c71d7e86a220 • http://qiita.com/iseebi/items/7e645bde85a04ebef371
  79. 79. • •

×