com.xd.sdk.common 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (545) hide show
  1. package/ChangeLog.md +1 -0
  2. package/ChangeLog.md.meta +7 -0
  3. package/Editor/Plist.cs +938 -0
  4. package/Editor/Plist.cs.meta +11 -0
  5. package/Editor/XD.SDK.Common.Editor.asmdef +18 -0
  6. package/Editor/XD.SDK.Common.Editor.asmdef.meta +7 -0
  7. package/Editor/XDCommonProcessBuild.cs +18 -0
  8. package/Editor/XDCommonProcessBuild.cs.meta +3 -0
  9. package/Editor/XDConfigModel.cs +123 -0
  10. package/Editor/XDConfigModel.cs.meta +3 -0
  11. package/Editor/XDGAndroidCommonProcessor.cs +57 -0
  12. package/Editor/XDGAndroidCommonProcessor.cs.meta +11 -0
  13. package/Editor/XDGAndroidProcessor.cs +194 -0
  14. package/Editor/XDGAndroidProcessor.cs.meta +11 -0
  15. package/Editor/XDGCommonEditorUtils.cs +52 -0
  16. package/Editor/XDGCommonEditorUtils.cs.meta +3 -0
  17. package/Editor/XDGCommonGradleContextProvider.cs +194 -0
  18. package/Editor/XDGCommonGradleContextProvider.cs.meta +3 -0
  19. package/Editor/XDGIOSCommonProcessor.cs +476 -0
  20. package/Editor/XDGIOSCommonProcessor.cs.meta +11 -0
  21. package/Editor/XDGScriptHandlerProcessor.cs +101 -0
  22. package/Editor/XDGScriptHandlerProcessor.cs.meta +11 -0
  23. package/Editor.meta +8 -0
  24. package/Mobile/Config/XDGConfigsMobile.cs +25 -0
  25. package/Mobile/Config/XDGConfigsMobile.cs.meta +11 -0
  26. package/Mobile/Config.meta +8 -0
  27. package/Mobile/Constant.cs +15 -0
  28. package/Mobile/Constant.cs.meta +3 -0
  29. package/Mobile/Editor/XD.SDK.Common.Mobile.Editor.asmdef +22 -0
  30. package/Mobile/Editor/XD.SDK.Common.Mobile.Editor.asmdef.meta +3 -0
  31. package/Mobile/Editor/XDCommonMobileProcessBuild.cs +20 -0
  32. package/Mobile/Editor/XDCommonMobileProcessBuild.cs.meta +3 -0
  33. package/Mobile/Editor.meta +3 -0
  34. package/Mobile/Http/XDGCommonHttpConfigMobile.cs +30 -0
  35. package/Mobile/Http/XDGCommonHttpConfigMobile.cs.meta +11 -0
  36. package/Mobile/Http.meta +8 -0
  37. package/Mobile/LocalConfigInfo.cs +39 -0
  38. package/Mobile/LocalConfigInfo.cs.meta +11 -0
  39. package/Mobile/Net/EventManager.cs +11 -0
  40. package/Mobile/Net/EventManager.cs.meta +3 -0
  41. package/Mobile/Net/MiniJSON.cs +556 -0
  42. package/Mobile/Net/MiniJSON.cs.meta +3 -0
  43. package/Mobile/Net/Net.cs +172 -0
  44. package/Mobile/Net/Net.cs.meta +3 -0
  45. package/Mobile/Net.meta +3 -0
  46. package/Mobile/Plugins/Android/com/xd/common/bridge/XDGCommonBridge.java +14 -0
  47. package/Mobile/Plugins/Android/com/xd/common/bridge/XDGCommonBridge.java.meta +32 -0
  48. package/Mobile/Plugins/Android/com/xd/common/bridge.meta +8 -0
  49. package/Mobile/Plugins/Android/com/xd/common.meta +8 -0
  50. package/Mobile/Plugins/Android/com/xd.meta +8 -0
  51. package/Mobile/Plugins/Android/com.meta +8 -0
  52. package/Mobile/Plugins/Android.meta +8 -0
  53. package/Mobile/Plugins/iOS/XDCommonBridge.m +23 -0
  54. package/Mobile/Plugins/iOS/XDCommonBridge.m.meta +37 -0
  55. package/Mobile/Plugins/iOS.meta +8 -0
  56. package/Mobile/Plugins.meta +8 -0
  57. package/Mobile/XD.SDK.Common.Mobile.Runtime.asmdef +22 -0
  58. package/Mobile/XD.SDK.Common.Mobile.Runtime.asmdef.meta +7 -0
  59. package/Mobile/XDGBridgeWrapper.cs +77 -0
  60. package/Mobile/XDGBridgeWrapper.cs.meta +11 -0
  61. package/Mobile/XDGCommonMobile.cs +123 -0
  62. package/Mobile/XDGCommonMobile.cs.meta +11 -0
  63. package/Mobile/XDGCommonMobileImpl.cs +547 -0
  64. package/Mobile/XDGCommonMobileImpl.cs.meta +11 -0
  65. package/Mobile/XDGErrorMobile.cs +47 -0
  66. package/Mobile/XDGErrorMobile.cs.meta +11 -0
  67. package/Mobile/XDGRegionInfoMobile.cs +27 -0
  68. package/Mobile/XDGRegionInfoMobile.cs.meta +11 -0
  69. package/Mobile/XDGSettingsMobile.cs +13 -0
  70. package/Mobile/XDGSettingsMobile.cs.meta +3 -0
  71. package/Mobile/XDGTool.cs +50 -0
  72. package/Mobile/XDGTool.cs.meta +11 -0
  73. package/Mobile/XDGUserStatusChangeWrapper.cs +23 -0
  74. package/Mobile/XDGUserStatusChangeWrapper.cs.meta +11 -0
  75. package/Mobile.meta +8 -0
  76. package/Plugins/Android/libs/XDGCommon_6.21.1.aar +0 -0
  77. package/Plugins/Android/libs/XDGCommon_6.21.1.aar.meta +32 -0
  78. package/Plugins/Android/libs.meta +8 -0
  79. package/Plugins/Android.meta +8 -0
  80. package/Plugins/iOS/Resource/Blank.swift +8 -0
  81. package/Plugins/iOS/Resource/Blank.swift.meta +33 -0
  82. package/Plugins/iOS/Resource/XDResources.bundle/agreement/Agreement_local_cn.json +12 -0
  83. package/Plugins/iOS/Resource/XDResources.bundle/agreement/Agreement_local_cn.json.meta +7 -0
  84. package/Plugins/iOS/Resource/XDResources.bundle/agreement/Agreement_local_df.json +223 -0
  85. package/Plugins/iOS/Resource/XDResources.bundle/agreement/Agreement_local_df.json.meta +7 -0
  86. package/Plugins/iOS/Resource/XDResources.bundle/agreement/Agreement_local_kr.json +38 -0
  87. package/Plugins/iOS/Resource/XDResources.bundle/agreement/Agreement_local_kr.json.meta +7 -0
  88. package/Plugins/iOS/Resource/XDResources.bundle/agreement.meta +8 -0
  89. package/Plugins/iOS/Resource/XDResources.bundle/de.lproj/Localizable.strings +84 -0
  90. package/Plugins/iOS/Resource/XDResources.bundle/de.lproj/Localizable.strings.meta +7 -0
  91. package/Plugins/iOS/Resource/XDResources.bundle/de.lproj.meta +8 -0
  92. package/Plugins/iOS/Resource/XDResources.bundle/en.lproj/Localizable.strings +84 -0
  93. package/Plugins/iOS/Resource/XDResources.bundle/en.lproj/Localizable.strings.meta +7 -0
  94. package/Plugins/iOS/Resource/XDResources.bundle/en.lproj.meta +8 -0
  95. package/Plugins/iOS/Resource/XDResources.bundle/es.lproj/Localizable.strings +84 -0
  96. package/Plugins/iOS/Resource/XDResources.bundle/es.lproj/Localizable.strings.meta +7 -0
  97. package/Plugins/iOS/Resource/XDResources.bundle/es.lproj.meta +8 -0
  98. package/Plugins/iOS/Resource/XDResources.bundle/fr.lproj/Localizable.strings +84 -0
  99. package/Plugins/iOS/Resource/XDResources.bundle/fr.lproj/Localizable.strings.meta +7 -0
  100. package/Plugins/iOS/Resource/XDResources.bundle/fr.lproj.meta +8 -0
  101. package/Plugins/iOS/Resource/XDResources.bundle/id.lproj/Localizable.strings +84 -0
  102. package/Plugins/iOS/Resource/XDResources.bundle/id.lproj/Localizable.strings.meta +7 -0
  103. package/Plugins/iOS/Resource/XDResources.bundle/id.lproj.meta +8 -0
  104. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_circle@3x.png +0 -0
  105. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_circle@3x.png.meta +7 -0
  106. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_circle_pressed@3x.png +0 -0
  107. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_circle_pressed@3x.png.meta +7 -0
  108. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_thin@3x.png +0 -0
  109. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_thin@3x.png.meta +7 -0
  110. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_thin_pressed@3x.png +0 -0
  111. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_back_thin_pressed@3x.png.meta +7 -0
  112. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_large_color@3x.png +0 -0
  113. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_large_color@3x.png.meta +7 -0
  114. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_large_color_disabled@3x.png +0 -0
  115. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_large_color_disabled@3x.png.meta +7 -0
  116. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_large_color_pressed@3x.png +0 -0
  117. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_large_color_pressed@3x.png.meta +7 -0
  118. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_medium_color@3x.png +0 -0
  119. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_medium_color@3x.png.meta +7 -0
  120. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_medium_color_pressed@3x.png +0 -0
  121. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_medium_color_pressed@3x.png.meta +7 -0
  122. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_taplogin@3x.png +0 -0
  123. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_taplogin@3x.png.meta +7 -0
  124. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_taplogin_disabled@3x.png +0 -0
  125. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_taplogin_disabled@3x.png.meta +7 -0
  126. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_taplogin_pressed@3x.png +0 -0
  127. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_button_taplogin_pressed@3x.png.meta +7 -0
  128. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_check@3x.png +0 -0
  129. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_check@3x.png.meta +7 -0
  130. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_rc_check@3x.png +0 -0
  131. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_rc_check@3x.png.meta +7 -0
  132. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_rc_checking@3x.png +0 -0
  133. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_rc_checking@3x.png.meta +7 -0
  134. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_rc_uncheck@3x.png +0 -0
  135. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_rc_uncheck@3x.png.meta +7 -0
  136. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_solid_check@3x.png +0 -0
  137. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_solid_check@3x.png.meta +7 -0
  138. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_solid_uncheck@3x.png +0 -0
  139. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_solid_uncheck@3x.png.meta +7 -0
  140. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_static_check@3x.png +0 -0
  141. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_static_check@3x.png.meta +7 -0
  142. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_uncheck@3x.png +0 -0
  143. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_checkbox_uncheck@3x.png.meta +7 -0
  144. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_circle@3x.png +0 -0
  145. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_circle@3x.png.meta +7 -0
  146. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_circle_pressed@3x.png +0 -0
  147. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_circle_pressed@3x.png.meta +7 -0
  148. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_thin@3x.png +0 -0
  149. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_thin@3x.png.meta +7 -0
  150. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_thin_pressed@3x.png +0 -0
  151. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_close_thin_pressed@3x.png.meta +7 -0
  152. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_color_white@3x.png +0 -0
  153. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_color_white@3x.png.meta +7 -0
  154. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_color_white_pressed@3x.png +0 -0
  155. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_color_white_pressed@3x.png.meta +7 -0
  156. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_color_white_pressed_2@3x.png +0 -0
  157. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_color_white_pressed_2@3x.png.meta +7 -0
  158. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_copy@3x.png +0 -0
  159. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_copy@3x.png.meta +7 -0
  160. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_copy_pressed@3x.png +0 -0
  161. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_copy_pressed@3x.png.meta +7 -0
  162. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_indicator@3x.png +0 -0
  163. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_indicator@3x.png.meta +7 -0
  164. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_icon@3x.png +0 -0
  165. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_icon@3x.png.meta +7 -0
  166. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_icon_pressed@3x.png +0 -0
  167. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_icon_pressed@3x.png.meta +7 -0
  168. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_long@3x.png +0 -0
  169. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_long@3x.png.meta +7 -0
  170. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_long_pressed@3x.png +0 -0
  171. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_apple_long_pressed@3x.png.meta +7 -0
  172. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_icon@3x.png +0 -0
  173. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_icon@3x.png.meta +7 -0
  174. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_icon_pressed@3x.png +0 -0
  175. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_icon_pressed@3x.png.meta +7 -0
  176. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_long@3x.png +0 -0
  177. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_long@3x.png.meta +7 -0
  178. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_long_pressed@3x.png +0 -0
  179. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_facebook_long_pressed@3x.png.meta +7 -0
  180. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_icon@3x.png +0 -0
  181. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_icon@3x.png.meta +7 -0
  182. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_icon_pressed@3x.png +0 -0
  183. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_icon_pressed@3x.png.meta +7 -0
  184. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_icon_uc@3x.png +0 -0
  185. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_icon_uc@3x.png.meta +7 -0
  186. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_long@3x.png +0 -0
  187. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_long@3x.png.meta +7 -0
  188. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_long_pressed@3x.png +0 -0
  189. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_google_long_pressed@3x.png.meta +7 -0
  190. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_icon@3x.png +0 -0
  191. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_icon@3x.png.meta +7 -0
  192. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_icon_pressed@3x.png +0 -0
  193. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_icon_pressed@3x.png.meta +7 -0
  194. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_long@3x.png +0 -0
  195. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_long@3x.png.meta +7 -0
  196. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_long_pressed@3x.png +0 -0
  197. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_guest_long_pressed@3x.png.meta +7 -0
  198. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_icon@3x.png +0 -0
  199. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_icon@3x.png.meta +7 -0
  200. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_icon_pressed@3x.png +0 -0
  201. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_icon_pressed@3x.png.meta +7 -0
  202. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_long@3x.png +0 -0
  203. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_long@3x.png.meta +7 -0
  204. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_long_pressed@3x.png +0 -0
  205. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_line_long_pressed@3x.png.meta +7 -0
  206. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_phone_icon@3x.png +0 -0
  207. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_phone_icon@3x.png.meta +7 -0
  208. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_icon@3x.png +0 -0
  209. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_icon@3x.png.meta +7 -0
  210. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_icon_pressed@3x.png +0 -0
  211. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_icon_pressed@3x.png.meta +7 -0
  212. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_long@3x.png +0 -0
  213. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_long@3x.png.meta +7 -0
  214. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_long_pressed@3x.png +0 -0
  215. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_steam_long_pressed@3x.png.meta +7 -0
  216. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_icon@3x.png +0 -0
  217. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_icon@3x.png.meta +7 -0
  218. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_icon_pressed@3x.png +0 -0
  219. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_icon_pressed@3x.png.meta +7 -0
  220. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_long@3x.png +0 -0
  221. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_long@3x.png.meta +7 -0
  222. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_long_pressed@3x.png +0 -0
  223. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_taptap_long_pressed@3x.png.meta +7 -0
  224. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_icon@3x.png +0 -0
  225. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_icon@3x.png.meta +7 -0
  226. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_icon_pressed@3x.png +0 -0
  227. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_icon_pressed@3x.png.meta +7 -0
  228. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_long@3x.png +0 -0
  229. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_long@3x.png.meta +7 -0
  230. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_long_pressed@3x.png +0 -0
  231. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_login_twitter_long_pressed@3x.png.meta +7 -0
  232. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_more_icon@3x.png +0 -0
  233. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_more_icon@3x.png.meta +7 -0
  234. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_payback_button@3x.png +0 -0
  235. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_payback_button@3x.png.meta +7 -0
  236. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_payback_button_pressed@3x.png +0 -0
  237. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_payback_button_pressed@3x.png.meta +7 -0
  238. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_payback_tip@3x.png +0 -0
  239. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_payback_tip@3x.png.meta +7 -0
  240. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_phone_edit@3x.png +0 -0
  241. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_phone_edit@3x.png.meta +7 -0
  242. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_phone_edit_pressed@3x.png +0 -0
  243. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_phone_edit_pressed@3x.png.meta +7 -0
  244. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_tap_logo_cn@3x.png +0 -0
  245. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_tap_logo_cn@3x.png.meta +7 -0
  246. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_uc_error_refresh@3x.png +0 -0
  247. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_uc_error_refresh@3x.png.meta +7 -0
  248. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_uc_load_fail@3x.png +0 -0
  249. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_uc_load_fail@3x.png.meta +7 -0
  250. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_xd_logo_cn@3x.png +0 -0
  251. package/Plugins/iOS/Resource/XDResources.bundle/images/tds_xd_logo_cn@3x.png.meta +7 -0
  252. package/Plugins/iOS/Resource/XDResources.bundle/images.meta +8 -0
  253. package/Plugins/iOS/Resource/XDResources.bundle/ja.lproj/Localizable.strings +84 -0
  254. package/Plugins/iOS/Resource/XDResources.bundle/ja.lproj/Localizable.strings.meta +7 -0
  255. package/Plugins/iOS/Resource/XDResources.bundle/ja.lproj.meta +8 -0
  256. package/Plugins/iOS/Resource/XDResources.bundle/ko.lproj/Localizable.strings +84 -0
  257. package/Plugins/iOS/Resource/XDResources.bundle/ko.lproj/Localizable.strings.meta +7 -0
  258. package/Plugins/iOS/Resource/XDResources.bundle/ko.lproj.meta +8 -0
  259. package/Plugins/iOS/Resource/XDResources.bundle/pt.lproj/Localizable.strings +84 -0
  260. package/Plugins/iOS/Resource/XDResources.bundle/pt.lproj/Localizable.strings.meta +7 -0
  261. package/Plugins/iOS/Resource/XDResources.bundle/pt.lproj.meta +8 -0
  262. package/Plugins/iOS/Resource/XDResources.bundle/ru.lproj/Localizable.strings +84 -0
  263. package/Plugins/iOS/Resource/XDResources.bundle/ru.lproj/Localizable.strings.meta +7 -0
  264. package/Plugins/iOS/Resource/XDResources.bundle/ru.lproj.meta +8 -0
  265. package/Plugins/iOS/Resource/XDResources.bundle/th.lproj/Localizable.strings +84 -0
  266. package/Plugins/iOS/Resource/XDResources.bundle/th.lproj/Localizable.strings.meta +7 -0
  267. package/Plugins/iOS/Resource/XDResources.bundle/th.lproj.meta +8 -0
  268. package/Plugins/iOS/Resource/XDResources.bundle/tr.lproj/Localizable.strings +84 -0
  269. package/Plugins/iOS/Resource/XDResources.bundle/tr.lproj/Localizable.strings.meta +7 -0
  270. package/Plugins/iOS/Resource/XDResources.bundle/tr.lproj.meta +8 -0
  271. package/Plugins/iOS/Resource/XDResources.bundle/vi.lproj/Localizable.strings +84 -0
  272. package/Plugins/iOS/Resource/XDResources.bundle/vi.lproj/Localizable.strings.meta +7 -0
  273. package/Plugins/iOS/Resource/XDResources.bundle/vi.lproj.meta +8 -0
  274. package/Plugins/iOS/Resource/XDResources.bundle/zh-Hans.lproj/Localizable.strings +84 -0
  275. package/Plugins/iOS/Resource/XDResources.bundle/zh-Hans.lproj/Localizable.strings.meta +7 -0
  276. package/Plugins/iOS/Resource/XDResources.bundle/zh-Hans.lproj.meta +8 -0
  277. package/Plugins/iOS/Resource/XDResources.bundle/zh-Hant.lproj/Localizable.strings +84 -0
  278. package/Plugins/iOS/Resource/XDResources.bundle/zh-Hant.lproj/Localizable.strings.meta +7 -0
  279. package/Plugins/iOS/Resource/XDResources.bundle/zh-Hant.lproj.meta +8 -0
  280. package/Plugins/iOS/Resource/XDResources.bundle.meta +81 -0
  281. package/Plugins/iOS/Resource.meta +8 -0
  282. package/Plugins/iOS/XDCommonSDK.framework/Headers/NSBundle+XDG.h +21 -0
  283. package/Plugins/iOS/XDCommonSDK.framework/Headers/NSBundle+XDG.h.meta +7 -0
  284. package/Plugins/iOS/XDCommonSDK.framework/Headers/NSDictionary+TDSGlobalJson.h +17 -0
  285. package/Plugins/iOS/XDCommonSDK.framework/Headers/NSDictionary+TDSGlobalJson.h.meta +7 -0
  286. package/Plugins/iOS/XDCommonSDK.framework/Headers/NSString+TDSGlobalTools.h +24 -0
  287. package/Plugins/iOS/XDCommonSDK.framework/Headers/NSString+TDSGlobalTools.h.meta +7 -0
  288. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalAutoLayout.h +55 -0
  289. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalAutoLayout.h.meta +7 -0
  290. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalCommonUtility.h +33 -0
  291. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalCommonUtility.h.meta +7 -0
  292. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalDeviceInfoTool.h +37 -0
  293. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalDeviceInfoTool.h.meta +7 -0
  294. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalNetStatusManager.h +10 -0
  295. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalNetStatusManager.h.meta +7 -0
  296. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalNotifications.h +44 -0
  297. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalNotifications.h.meta +7 -0
  298. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalPopWindowManager.h +27 -0
  299. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalPopWindowManager.h.meta +7 -0
  300. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalRouterSchemes.h +62 -0
  301. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalRouterSchemes.h.meta +7 -0
  302. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalTimer.h +22 -0
  303. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalTimer.h.meta +7 -0
  304. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalUIDefine.h +44 -0
  305. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalUIDefine.h.meta +7 -0
  306. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalViewControllerBase.h +49 -0
  307. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalViewControllerBase.h.meta +7 -0
  308. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalWKCookieWebview.h +14 -0
  309. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalWKCookieWebview.h.meta +7 -0
  310. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalWebController.h +21 -0
  311. package/Plugins/iOS/XDCommonSDK.framework/Headers/TDSGlobalWebController.h.meta +7 -0
  312. package/Plugins/iOS/XDCommonSDK.framework/Headers/UIApplication+XDG.h +18 -0
  313. package/Plugins/iOS/XDCommonSDK.framework/Headers/UIApplication+XDG.h.meta +7 -0
  314. package/Plugins/iOS/XDCommonSDK.framework/Headers/UIImage+TDSSDK.h +18 -0
  315. package/Plugins/iOS/XDCommonSDK.framework/Headers/UIImage+TDSSDK.h.meta +7 -0
  316. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDAdjustInfo.h +22 -0
  317. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDAdjustInfo.h.meta +7 -0
  318. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDAppleInfo.h +17 -0
  319. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDAppleInfo.h.meta +7 -0
  320. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDAppsFlyerInfo.h +19 -0
  321. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDAppsFlyerInfo.h.meta +7 -0
  322. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDCommon-Pch.pch +41 -0
  323. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDCommon-Pch.pch.meta +7 -0
  324. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDCommonSDK.h +95 -0
  325. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDCommonSDK.h.meta +7 -0
  326. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDConfigManager.h +67 -0
  327. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDConfigManager.h.meta +7 -0
  328. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDDouYinInfo.h +18 -0
  329. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDDouYinInfo.h.meta +7 -0
  330. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDFacebookInfo.h +20 -0
  331. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDFacebookInfo.h.meta +7 -0
  332. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDFirebaseInfo.h +17 -0
  333. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDFirebaseInfo.h.meta +7 -0
  334. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGALIAuthUtil.h +19 -0
  335. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGALIAuthUtil.h.meta +7 -0
  336. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAccessToken.h +32 -0
  337. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAccessToken.h.meta +7 -0
  338. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAgreement.h +18 -0
  339. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAgreement.h.meta +7 -0
  340. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAgreementConfig.h +50 -0
  341. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAgreementConfig.h.meta +7 -0
  342. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAgreementManager.h +47 -0
  343. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAgreementManager.h.meta +7 -0
  344. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAlertView.h +67 -0
  345. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGAlertView.h.meta +7 -0
  346. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGBaseDialog.h +20 -0
  347. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGBaseDialog.h.meta +7 -0
  348. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGButton.h +29 -0
  349. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGButton.h.meta +7 -0
  350. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCardView.h +21 -0
  351. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCardView.h.meta +7 -0
  352. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCheckBox.h +43 -0
  353. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCheckBox.h.meta +7 -0
  354. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCloudLogHelper.h +29 -0
  355. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCloudLogHelper.h.meta +7 -0
  356. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCloudLogProperties.h +52 -0
  357. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCloudLogProperties.h.meta +7 -0
  358. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGConfig.h +106 -0
  359. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGConfig.h.meta +7 -0
  360. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGConstants.h +21 -0
  361. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGConstants.h.meta +7 -0
  362. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCoreService.h +93 -0
  363. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGCoreService.h.meta +7 -0
  364. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGDialog.h +62 -0
  365. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGDialog.h.meta +7 -0
  366. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGDouYinShareParam.h +38 -0
  367. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGDouYinShareParam.h.meta +7 -0
  368. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGEntryType.h +41 -0
  369. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGEntryType.h.meta +7 -0
  370. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGErrorView.h +19 -0
  371. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGErrorView.h.meta +7 -0
  372. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGFacebookShareParam.h +34 -0
  373. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGFacebookShareParam.h.meta +7 -0
  374. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGGameBindEntry.h +22 -0
  375. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGGameBindEntry.h.meta +7 -0
  376. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttp.h +20 -0
  377. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttp.h.meta +7 -0
  378. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttpRequest.h +41 -0
  379. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttpRequest.h.meta +7 -0
  380. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttpResponse.h +26 -0
  381. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttpResponse.h.meta +7 -0
  382. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttpUtils.h +16 -0
  383. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGHttpUtils.h.meta +7 -0
  384. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGInputCheckDialog.h +21 -0
  385. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGInputCheckDialog.h.meta +7 -0
  386. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLineShareParam.h +34 -0
  387. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLineShareParam.h.meta +7 -0
  388. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLocalizeManager.h +47 -0
  389. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLocalizeManager.h.meta +7 -0
  390. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLogger.h +32 -0
  391. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLogger.h.meta +7 -0
  392. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLoginLogger.h +91 -0
  393. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGLoginLogger.h.meta +7 -0
  394. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGNavicationBar.h +21 -0
  395. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGNavicationBar.h.meta +7 -0
  396. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGPaymentLogger.h +65 -0
  397. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGPaymentLogger.h.meta +7 -0
  398. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGProgressHUD.h +59 -0
  399. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGProgressHUD.h.meta +7 -0
  400. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGQQShareParam.h +57 -0
  401. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGQQShareParam.h.meta +7 -0
  402. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGRegionInfo.h +29 -0
  403. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGRegionInfo.h.meta +7 -0
  404. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGReportManager.h +25 -0
  405. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGReportManager.h.meta +7 -0
  406. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSDK.h +116 -0
  407. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSDK.h.meta +7 -0
  408. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSDKSettings.h +55 -0
  409. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSDKSettings.h.meta +7 -0
  410. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGShare.h +68 -0
  411. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGShare.h.meta +7 -0
  412. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGShareParamBase.h +60 -0
  413. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGShareParamBase.h.meta +7 -0
  414. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGShareService.h +25 -0
  415. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGShareService.h.meta +7 -0
  416. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSharing.h +30 -0
  417. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSharing.h.meta +7 -0
  418. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSharingService.h +37 -0
  419. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGSharingService.h.meta +7 -0
  420. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGTapTapShareParam.h +46 -0
  421. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGTapTapShareParam.h.meta +7 -0
  422. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGThirdSDKHelper.h +41 -0
  423. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGThirdSDKHelper.h.meta +7 -0
  424. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGThirdSDKProtocol.h +44 -0
  425. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGThirdSDKProtocol.h.meta +7 -0
  426. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGThirdTokenManager.h +22 -0
  427. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGThirdTokenManager.h.meta +7 -0
  428. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGTrackerManager.h +55 -0
  429. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGTrackerManager.h.meta +7 -0
  430. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGTwitterShareParam.h +34 -0
  431. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGTwitterShareParam.h.meta +7 -0
  432. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGUser.h +68 -0
  433. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGUser.h.meta +7 -0
  434. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGUserDataManager.h +29 -0
  435. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGUserDataManager.h.meta +7 -0
  436. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGWeChatShareParam.h +51 -0
  437. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGWeChatShareParam.h.meta +7 -0
  438. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGWeiboShareParam.h +43 -0
  439. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGWeiboShareParam.h.meta +7 -0
  440. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGXHSShareParam.h +40 -0
  441. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGXHSShareParam.h.meta +7 -0
  442. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGoogleInfo.h +19 -0
  443. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDGoogleInfo.h.meta +7 -0
  444. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDLineInfo.h +17 -0
  445. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDLineInfo.h.meta +7 -0
  446. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDPlateWebController.h +23 -0
  447. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDPlateWebController.h.meta +7 -0
  448. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDQQInfo.h +20 -0
  449. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDQQInfo.h.meta +7 -0
  450. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDShare.h +68 -0
  451. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDShare.h.meta +7 -0
  452. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDShareService.h +25 -0
  453. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDShareService.h.meta +7 -0
  454. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDTwitterInfo.h +21 -0
  455. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDTwitterInfo.h.meta +7 -0
  456. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDVersion.h +9 -0
  457. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDVersion.h.meta +7 -0
  458. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDWeChatInfo.h +19 -0
  459. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDWeChatInfo.h.meta +7 -0
  460. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDWeiboInfo.h +19 -0
  461. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDWeiboInfo.h.meta +7 -0
  462. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDXHSInfo.h +19 -0
  463. package/Plugins/iOS/XDCommonSDK.framework/Headers/XDXHSInfo.h.meta +7 -0
  464. package/Plugins/iOS/XDCommonSDK.framework/Headers.meta +8 -0
  465. package/Plugins/iOS/XDCommonSDK.framework/Info.plist +0 -0
  466. package/Plugins/iOS/XDCommonSDK.framework/Info.plist.meta +7 -0
  467. package/Plugins/iOS/XDCommonSDK.framework/Modules/module.modulemap +6 -0
  468. package/Plugins/iOS/XDCommonSDK.framework/Modules/module.modulemap.meta +7 -0
  469. package/Plugins/iOS/XDCommonSDK.framework/Modules.meta +8 -0
  470. package/Plugins/iOS/XDCommonSDK.framework/XDCommonSDK +0 -0
  471. package/Plugins/iOS/XDCommonSDK.framework/XDCommonSDK.meta +7 -0
  472. package/Plugins/iOS/XDCommonSDK.framework.meta +28 -0
  473. package/Plugins/iOS.meta +8 -0
  474. package/Plugins.meta +8 -0
  475. package/README.md +0 -0
  476. package/README.md.meta +7 -0
  477. package/Runtime/Internal/Config/IXDConfigs.cs +6 -0
  478. package/Runtime/Internal/Config/IXDConfigs.cs.meta +11 -0
  479. package/Runtime/Internal/Config/XDConfigs.cs +23 -0
  480. package/Runtime/Internal/Config/XDConfigs.cs.meta +11 -0
  481. package/Runtime/Internal/Config.meta +8 -0
  482. package/Runtime/Internal/Encryption/EncryptionUtils.cs +72 -0
  483. package/Runtime/Internal/Encryption/EncryptionUtils.cs.meta +11 -0
  484. package/Runtime/Internal/Encryption.meta +8 -0
  485. package/Runtime/Internal/Exception/XDException.cs +38 -0
  486. package/Runtime/Internal/Exception/XDException.cs.meta +11 -0
  487. package/Runtime/Internal/Exception/XDHttpException.cs +22 -0
  488. package/Runtime/Internal/Exception/XDHttpException.cs.meta +11 -0
  489. package/Runtime/Internal/Exception.meta +8 -0
  490. package/Runtime/Internal/Http/IXDCommonHttpConfig.cs +7 -0
  491. package/Runtime/Internal/Http/IXDCommonHttpConfig.cs.meta +11 -0
  492. package/Runtime/Internal/Http/Response/BaseResponse.cs +17 -0
  493. package/Runtime/Internal/Http/Response/BaseResponse.cs.meta +11 -0
  494. package/Runtime/Internal/Http/Response/ErrorResponse.cs +9 -0
  495. package/Runtime/Internal/Http/Response/ErrorResponse.cs.meta +11 -0
  496. package/Runtime/Internal/Http/Response.meta +8 -0
  497. package/Runtime/Internal/Http/XDCommonHttpConfig.cs +28 -0
  498. package/Runtime/Internal/Http/XDCommonHttpConfig.cs.meta +11 -0
  499. package/Runtime/Internal/Http/XDDelegatingHandler.cs +41 -0
  500. package/Runtime/Internal/Http/XDDelegatingHandler.cs.meta +3 -0
  501. package/Runtime/Internal/Http/XDHttpClient.cs +160 -0
  502. package/Runtime/Internal/Http/XDHttpClient.cs.meta +11 -0
  503. package/Runtime/Internal/Http/XDHttpClientFactory.cs +82 -0
  504. package/Runtime/Internal/Http/XDHttpClientFactory.cs.meta +11 -0
  505. package/Runtime/Internal/Http/XDHttpUtils.cs +65 -0
  506. package/Runtime/Internal/Http/XDHttpUtils.cs.meta +11 -0
  507. package/Runtime/Internal/Http/XDUrlUtils.cs +35 -0
  508. package/Runtime/Internal/Http/XDUrlUtils.cs.meta +11 -0
  509. package/Runtime/Internal/Http.meta +8 -0
  510. package/Runtime/Internal/IXDGCommon.cs +58 -0
  511. package/Runtime/Internal/IXDGCommon.cs.meta +3 -0
  512. package/Runtime/Internal/IXDGSettings.cs +7 -0
  513. package/Runtime/Internal/IXDGSettings.cs.meta +3 -0
  514. package/Runtime/Internal/LangType.cs +20 -0
  515. package/Runtime/Internal/LangType.cs.meta +11 -0
  516. package/Runtime/Internal/ShareFlavors.cs +9 -0
  517. package/Runtime/Internal/ShareFlavors.cs.meta +11 -0
  518. package/Runtime/Internal/XDGAgreement.cs +8 -0
  519. package/Runtime/Internal/XDGAgreement.cs.meta +3 -0
  520. package/Runtime/Internal/XDGError.cs +14 -0
  521. package/Runtime/Internal/XDGError.cs.meta +3 -0
  522. package/Runtime/Internal/XDGRegionInfo.cs +10 -0
  523. package/Runtime/Internal/XDGRegionInfo.cs.meta +3 -0
  524. package/Runtime/Internal/XDGRegionInfoWrapper.cs +7 -0
  525. package/Runtime/Internal/XDGRegionInfoWrapper.cs.meta +3 -0
  526. package/Runtime/Internal/XDGShareCallback.cs +9 -0
  527. package/Runtime/Internal/XDGShareCallback.cs.meta +11 -0
  528. package/Runtime/Internal/XDUtility.cs +23 -0
  529. package/Runtime/Internal/XDUtility.cs.meta +3 -0
  530. package/Runtime/Internal.meta +3 -0
  531. package/Runtime/Public/Log/XDGLogLevel.cs +11 -0
  532. package/Runtime/Public/Log/XDGLogLevel.cs.meta +11 -0
  533. package/Runtime/Public/Log/XDGLogger.cs +48 -0
  534. package/Runtime/Public/Log/XDGLogger.cs.meta +11 -0
  535. package/Runtime/Public/Log.meta +8 -0
  536. package/Runtime/Public/XDGSettings.cs +33 -0
  537. package/Runtime/Public/XDGSettings.cs.meta +3 -0
  538. package/Runtime/Public.meta +8 -0
  539. package/Runtime/XD.SDK.Common.asmdef +15 -0
  540. package/Runtime/XD.SDK.Common.asmdef.meta +7 -0
  541. package/Runtime/XDGCommon.cs +170 -0
  542. package/Runtime/XDGCommon.cs.meta +3 -0
  543. package/Runtime.meta +3 -0
  544. package/package.json +11 -0
  545. package/package.json.meta +7 -0
@@ -0,0 +1,938 @@
1
+ using System;
2
+ using System.Collections;
3
+ using System.Collections.Generic;
4
+ using System.Globalization;
5
+ using System.IO;
6
+ using System.Text;
7
+ using System.Xml;
8
+ using UnityEngine;
9
+
10
+ namespace XD.SDK.Common.Editor
11
+ {
12
+ public static class Plist
13
+ {
14
+ private static List<int> offsetTable = new List<int>();
15
+ private static List<byte> objectTable = new List<byte>();
16
+ private static int refCount;
17
+ private static int objRefSize;
18
+ private static int offsetByteSize;
19
+ private static long offsetTableOffset;
20
+
21
+ #region Public Functions
22
+
23
+ public static object readPlist(string path)
24
+ {
25
+ using (FileStream f = new FileStream(path, FileMode.Open, FileAccess.Read))
26
+ {
27
+ return readPlist(f, plistType.Auto);
28
+ }
29
+ }
30
+
31
+ public static object readPlistSource(string source)
32
+ {
33
+ return readPlist(Encoding.UTF8.GetBytes(source));
34
+ }
35
+
36
+ public static object readPlist(byte[] data)
37
+ {
38
+ return readPlist(new MemoryStream(data), plistType.Auto);
39
+ }
40
+
41
+ public static plistType getPlistType(Stream stream)
42
+ {
43
+ byte[] magicHeader = new byte[8];
44
+ stream.Read(magicHeader, 0, 8);
45
+
46
+ if (BitConverter.ToInt64(magicHeader, 0) == 3472403351741427810)
47
+ {
48
+ return plistType.Binary;
49
+ }
50
+ else
51
+ {
52
+ return plistType.Xml;
53
+ }
54
+ }
55
+
56
+ public static object readPlist(Stream stream, plistType type)
57
+ {
58
+ if (type == plistType.Auto)
59
+ {
60
+ type = getPlistType(stream);
61
+ stream.Seek(0, SeekOrigin.Begin);
62
+ }
63
+
64
+ if (type == plistType.Binary)
65
+ {
66
+ using (BinaryReader reader = new BinaryReader(stream))
67
+ {
68
+ byte[] data = reader.ReadBytes((int) reader.BaseStream.Length);
69
+ return readBinary(data);
70
+ }
71
+ }
72
+ else
73
+ {
74
+ XmlDocument xml = new XmlDocument();
75
+ xml.XmlResolver = null;
76
+ xml.Load(stream);
77
+ return readXml(xml);
78
+ }
79
+ }
80
+
81
+ public static void writeXml(object value, string path)
82
+ {
83
+ using (StreamWriter writer = new StreamWriter(path))
84
+ {
85
+ writer.Write(writeXml(value));
86
+ }
87
+ }
88
+
89
+ public static void writeXml(object value, Stream stream)
90
+ {
91
+ using (StreamWriter writer = new StreamWriter(stream))
92
+ {
93
+ writer.Write(writeXml(value));
94
+ }
95
+ }
96
+
97
+ public static string writeXml(object value)
98
+ {
99
+ using (MemoryStream ms = new MemoryStream())
100
+ {
101
+ XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
102
+ xmlWriterSettings.Encoding = new UTF8Encoding(false);
103
+ xmlWriterSettings.ConformanceLevel = ConformanceLevel.Document;
104
+ xmlWriterSettings.Indent = true;
105
+
106
+ using (XmlWriter xmlWriter = XmlWriter.Create(ms, xmlWriterSettings))
107
+ {
108
+ xmlWriter.WriteStartDocument();
109
+ //xmlWriter.WriteComment("DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" " + "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"");
110
+ xmlWriter.WriteDocType("plist", "-//Apple Computer//DTD PLIST 1.0//EN", "http://www.apple.com/DTDs/PropertyList-1.0.dtd", null);
111
+ xmlWriter.WriteStartElement("plist");
112
+ xmlWriter.WriteAttributeString("version", "1.0");
113
+ compose(value, xmlWriter);
114
+ xmlWriter.WriteEndElement();
115
+ xmlWriter.WriteEndDocument();
116
+ xmlWriter.Flush();
117
+ xmlWriter.Close();
118
+ return Encoding.UTF8.GetString(ms.ToArray());
119
+ }
120
+ }
121
+ }
122
+
123
+ public static void writeBinary(object value, string path)
124
+ {
125
+ using (BinaryWriter writer = new BinaryWriter(new FileStream(path, FileMode.Create)))
126
+ {
127
+ writer.Write(writeBinary(value));
128
+ }
129
+ }
130
+
131
+ public static void writeBinary(object value, Stream stream)
132
+ {
133
+ using (BinaryWriter writer = new BinaryWriter(stream))
134
+ {
135
+ writer.Write(writeBinary(value));
136
+ }
137
+ }
138
+
139
+ public static byte[] writeBinary(object value)
140
+ {
141
+ offsetTable.Clear();
142
+ objectTable.Clear();
143
+ refCount = 0;
144
+ objRefSize = 0;
145
+ offsetByteSize = 0;
146
+ offsetTableOffset = 0;
147
+
148
+ //Do not count the root node, subtract by 1
149
+ int totalRefs = countObject(value) - 1;
150
+
151
+ refCount = totalRefs;
152
+
153
+ objRefSize = RegulateNullBytes(BitConverter.GetBytes(refCount)).Length;
154
+
155
+ composeBinary(value);
156
+
157
+ writeBinaryString("bplist00", false);
158
+
159
+ offsetTableOffset = (long)objectTable.Count;
160
+
161
+ offsetTable.Add(objectTable.Count - 8);
162
+
163
+ offsetByteSize = RegulateNullBytes(BitConverter.GetBytes(offsetTable[offsetTable.Count-1])).Length;
164
+
165
+ List<byte> offsetBytes = new List<byte>();
166
+
167
+ offsetTable.Reverse();
168
+
169
+ for (int i = 0; i < offsetTable.Count; i++)
170
+ {
171
+ offsetTable[i] = objectTable.Count - offsetTable[i];
172
+ byte[] buffer = RegulateNullBytes(BitConverter.GetBytes(offsetTable[i]), offsetByteSize);
173
+ Array.Reverse(buffer);
174
+ offsetBytes.AddRange(buffer);
175
+ }
176
+
177
+ objectTable.AddRange(offsetBytes);
178
+
179
+ objectTable.AddRange(new byte[6]);
180
+ objectTable.Add(Convert.ToByte(offsetByteSize));
181
+ objectTable.Add(Convert.ToByte(objRefSize));
182
+
183
+ var a = BitConverter.GetBytes((long) totalRefs + 1);
184
+ Array.Reverse(a);
185
+ objectTable.AddRange(a);
186
+
187
+ objectTable.AddRange(BitConverter.GetBytes((long)0));
188
+ a = BitConverter.GetBytes(offsetTableOffset);
189
+ Array.Reverse(a);
190
+ objectTable.AddRange(a);
191
+
192
+ return objectTable.ToArray();
193
+ }
194
+
195
+ #endregion
196
+
197
+ #region Private Functions
198
+
199
+ private static object readXml(XmlDocument xml)
200
+ {
201
+ XmlNode rootNode = xml.DocumentElement.ChildNodes[0];
202
+ return parse(rootNode);
203
+ }
204
+
205
+ private static object readBinary(byte[] data)
206
+ {
207
+ offsetTable.Clear();
208
+ List<byte> offsetTableBytes = new List<byte>();
209
+ objectTable.Clear();
210
+ refCount = 0;
211
+ objRefSize = 0;
212
+ offsetByteSize = 0;
213
+ offsetTableOffset = 0;
214
+
215
+ List<byte> bList = new List<byte>(data);
216
+
217
+ List<byte> trailer = bList.GetRange(bList.Count - 32, 32);
218
+
219
+ parseTrailer(trailer);
220
+
221
+ objectTable = bList.GetRange(0, (int)offsetTableOffset);
222
+
223
+ offsetTableBytes = bList.GetRange((int)offsetTableOffset, bList.Count - (int)offsetTableOffset - 32);
224
+
225
+ parseOffsetTable(offsetTableBytes);
226
+
227
+ return parseBinary(0);
228
+ }
229
+
230
+ private static Dictionary<string, object> parseDictionary(XmlNode node)
231
+ {
232
+ XmlNodeList children = node.ChildNodes;
233
+ if (children.Count % 2 != 0)
234
+ {
235
+ throw new DataMisalignedException("Dictionary elements must have an even number of child nodes");
236
+ }
237
+
238
+ Dictionary<string, object> dict = new Dictionary<string, object>();
239
+
240
+ for (int i = 0; i < children.Count; i += 2)
241
+ {
242
+ XmlNode keynode = children[i];
243
+ XmlNode valnode = children[i + 1];
244
+
245
+ if (keynode.Name != "key")
246
+ {
247
+ Debug.LogError("expected a key node:" + keynode.Name);
248
+ continue;
249
+ }
250
+
251
+ object result = parse(valnode);
252
+
253
+ if (result != null)
254
+ {
255
+ dict.Add(keynode.InnerText, result);
256
+ }
257
+ }
258
+
259
+ return dict;
260
+ }
261
+
262
+ private static List<object> parseArray(XmlNode node)
263
+ {
264
+ List<object> array = new List<object>();
265
+
266
+ foreach (XmlNode child in node.ChildNodes)
267
+ {
268
+ object result = parse(child);
269
+ if (result != null)
270
+ {
271
+ array.Add(result);
272
+ }
273
+ }
274
+
275
+ return array;
276
+ }
277
+
278
+ private static void composeArray(List<object> value, XmlWriter writer)
279
+ {
280
+ writer.WriteStartElement("array");
281
+ foreach (object obj in value)
282
+ {
283
+ compose(obj, writer);
284
+ }
285
+ writer.WriteEndElement();
286
+ }
287
+
288
+ private static object parse(XmlNode node)
289
+ {
290
+ switch (node.Name)
291
+ {
292
+ case "dict":
293
+ return parseDictionary(node);
294
+ case "array":
295
+ return parseArray(node);
296
+ case "string":
297
+ return node.InnerText;
298
+ case "integer":
299
+ // int result;
300
+ //int.TryParse(node.InnerText, System.Globalization.NumberFormatInfo.InvariantInfo, out result);
301
+ return Convert.ToInt32(node.InnerText, NumberFormatInfo.InvariantInfo);
302
+ case "real":
303
+ return Convert.ToDouble(node.InnerText,NumberFormatInfo.InvariantInfo);
304
+ case "false":
305
+ return false;
306
+ case "true":
307
+ return true;
308
+ case "null":
309
+ return null;
310
+ case "date":
311
+ return XmlConvert.ToDateTime(node.InnerText, XmlDateTimeSerializationMode.Utc);
312
+ case "data":
313
+ return Convert.FromBase64String(node.InnerText);
314
+ }
315
+
316
+ throw new ApplicationException(String.Format("Plist Node `{0}' is not supported", node.Name));
317
+ }
318
+
319
+ private static void compose(object value, XmlWriter writer)
320
+ {
321
+
322
+ if (value == null || value is string)
323
+ {
324
+ writer.WriteElementString("string", value as string);
325
+ }
326
+ else if (value is int || value is long)
327
+ {
328
+ writer.WriteElementString("integer", ((int)value).ToString(NumberFormatInfo.InvariantInfo));
329
+ }
330
+ else if (value is Dictionary<string, object> ||
331
+ value.GetType().ToString().StartsWith("System.Collections.Generic.Dictionary`2[System.String"))
332
+ {
333
+ //Convert to Dictionary<string, object>
334
+ Dictionary<string, object> dic = value as Dictionary<string, object>;
335
+ if (dic == null)
336
+ {
337
+ dic = new Dictionary<string, object>();
338
+ IDictionary idic = (IDictionary)value;
339
+ foreach (var key in idic.Keys)
340
+ {
341
+ dic.Add(key.ToString(), idic[key]);
342
+ }
343
+ }
344
+ writeDictionaryValues(dic, writer);
345
+ }
346
+ else if (value is List<object>)
347
+ {
348
+ composeArray((List<object>)value, writer);
349
+ }
350
+ else if (value is byte[])
351
+ {
352
+ writer.WriteElementString("data", Convert.ToBase64String((Byte[])value));
353
+ }
354
+ else if (value is float || value is double)
355
+ {
356
+ writer.WriteElementString("real", ((double)value).ToString(NumberFormatInfo.InvariantInfo));
357
+ }
358
+ else if (value is DateTime)
359
+ {
360
+ DateTime time = (DateTime)value;
361
+ string theString = XmlConvert.ToString(time, XmlDateTimeSerializationMode.Utc);
362
+ writer.WriteElementString("date", theString);//, "yyyy-MM-ddTHH:mm:ssZ"));
363
+ }
364
+ else if (value is bool)
365
+ {
366
+ writer.WriteElementString(value.ToString().ToLower(), "");
367
+ }
368
+ else
369
+ {
370
+ throw new Exception(String.Format("Value type '{0}' is unhandled", value.GetType().ToString()));
371
+ }
372
+ }
373
+
374
+ private static void writeDictionaryValues(Dictionary<string, object> dictionary, XmlWriter writer)
375
+ {
376
+ writer.WriteStartElement("dict");
377
+ foreach (string key in dictionary.Keys)
378
+ {
379
+ object value = dictionary[key];
380
+ writer.WriteElementString("key", key);
381
+ compose(value, writer);
382
+ }
383
+ writer.WriteEndElement();
384
+ }
385
+
386
+ private static int countObject(object value)
387
+ {
388
+ int count = 0;
389
+ switch (value.GetType().ToString())
390
+ {
391
+ case "System.Collections.Generic.Dictionary`2[System.String,System.Object]":
392
+ Dictionary<string, object> dict = (Dictionary<string, object>)value;
393
+ foreach (string key in dict.Keys)
394
+ {
395
+ count += countObject(dict[key]);
396
+ }
397
+ count += dict.Keys.Count;
398
+ count++;
399
+ break;
400
+ case "System.Collections.Generic.List`1[System.Object]":
401
+ List<object> list = (List<object>)value;
402
+ foreach (object obj in list)
403
+ {
404
+ count += countObject(obj);
405
+ }
406
+ count++;
407
+ break;
408
+ default:
409
+ count++;
410
+ break;
411
+ }
412
+ return count;
413
+ }
414
+
415
+ private static byte[] writeBinaryDictionary(Dictionary<string, object> dictionary)
416
+ {
417
+ List<byte> buffer = new List<byte>();
418
+ List<byte> header = new List<byte>();
419
+ List<int> refs = new List<int>();
420
+ for (int i = dictionary.Count - 1; i >= 0; i--)
421
+ {
422
+ var o = new object[dictionary.Count];
423
+ dictionary.Values.CopyTo(o, 0);
424
+ composeBinary(o[i]);
425
+ offsetTable.Add(objectTable.Count);
426
+ refs.Add(refCount);
427
+ refCount--;
428
+ }
429
+ for (int i = dictionary.Count - 1; i >= 0; i--)
430
+ {
431
+ var o = new string[dictionary.Count];
432
+ dictionary.Keys.CopyTo(o, 0);
433
+ composeBinary(o[i]);//);
434
+ offsetTable.Add(objectTable.Count);
435
+ refs.Add(refCount);
436
+ refCount--;
437
+ }
438
+
439
+ if (dictionary.Count < 15)
440
+ {
441
+ header.Add(Convert.ToByte(0xD0 | Convert.ToByte(dictionary.Count)));
442
+ }
443
+ else
444
+ {
445
+ header.Add(0xD0 | 0xf);
446
+ header.AddRange(writeBinaryInteger(dictionary.Count, false));
447
+ }
448
+
449
+
450
+ foreach (int val in refs)
451
+ {
452
+ byte[] refBuffer = RegulateNullBytes(BitConverter.GetBytes(val), objRefSize);
453
+ Array.Reverse(refBuffer);
454
+ buffer.InsertRange(0, refBuffer);
455
+ }
456
+
457
+ buffer.InsertRange(0, header);
458
+
459
+
460
+ objectTable.InsertRange(0, buffer);
461
+
462
+ return buffer.ToArray();
463
+ }
464
+
465
+ private static byte[] composeBinaryArray(List<object> objects)
466
+ {
467
+ List<byte> buffer = new List<byte>();
468
+ List<byte> header = new List<byte>();
469
+ List<int> refs = new List<int>();
470
+
471
+ for (int i = objects.Count - 1; i >= 0; i--)
472
+ {
473
+ composeBinary(objects[i]);
474
+ offsetTable.Add(objectTable.Count);
475
+ refs.Add(refCount);
476
+ refCount--;
477
+ }
478
+
479
+ if (objects.Count < 15)
480
+ {
481
+ header.Add(Convert.ToByte(0xA0 | Convert.ToByte(objects.Count)));
482
+ }
483
+ else
484
+ {
485
+ header.Add(0xA0 | 0xf);
486
+ header.AddRange(writeBinaryInteger(objects.Count, false));
487
+ }
488
+
489
+ foreach (int val in refs)
490
+ {
491
+ byte[] refBuffer = RegulateNullBytes(BitConverter.GetBytes(val), objRefSize);
492
+ Array.Reverse(refBuffer);
493
+ buffer.InsertRange(0, refBuffer);
494
+ }
495
+
496
+ buffer.InsertRange(0, header);
497
+
498
+ objectTable.InsertRange(0, buffer);
499
+
500
+ return buffer.ToArray();
501
+ }
502
+
503
+ private static byte[] composeBinary(object obj)
504
+ {
505
+ byte[] value;
506
+ switch (obj.GetType().ToString())
507
+ {
508
+ case "System.Collections.Generic.Dictionary`2[System.String,System.Object]":
509
+ value = writeBinaryDictionary((Dictionary<string, object>)obj);
510
+ return value;
511
+
512
+ case "System.Collections.Generic.List`1[System.Object]":
513
+ value = composeBinaryArray((List<object>)obj);
514
+ return value;
515
+
516
+ case "System.Byte[]":
517
+ value = writeBinaryByteArray((byte[])obj);
518
+ return value;
519
+
520
+ case "System.Double":
521
+ value = writeBinaryDouble((double)obj);
522
+ return value;
523
+
524
+ case "System.Int32":
525
+ value = writeBinaryInteger((int)obj, true);
526
+ return value;
527
+
528
+ case "System.String":
529
+ value = writeBinaryString((string)obj, true);
530
+ return value;
531
+
532
+ case "System.DateTime":
533
+ value = writeBinaryDate((DateTime)obj);
534
+ return value;
535
+
536
+ case "System.Boolean":
537
+ value = writeBinaryBool((bool)obj);
538
+ return value;
539
+
540
+ default:
541
+ return new byte[0];
542
+ }
543
+ }
544
+
545
+ public static byte[] writeBinaryDate(DateTime obj)
546
+ {
547
+ List<byte> buffer =new List<byte>(RegulateNullBytes(BitConverter.GetBytes(PlistDateConverter.ConvertToAppleTimeStamp(obj)), 8));
548
+ buffer.Reverse();
549
+ buffer.Insert(0, 0x33);
550
+ objectTable.InsertRange(0, buffer);
551
+ return buffer.ToArray();
552
+ }
553
+
554
+ public static byte[] writeBinaryBool(bool obj)
555
+ {
556
+ List<byte> buffer = new List<byte>(new byte[1] { (bool)obj ? (byte)9 : (byte)8 });
557
+ objectTable.InsertRange(0, buffer);
558
+ return buffer.ToArray();
559
+ }
560
+
561
+ private static byte[] writeBinaryInteger(int value, bool write)
562
+ {
563
+ List<byte> buffer = new List<byte>(BitConverter.GetBytes((long) value));
564
+ buffer =new List<byte>(RegulateNullBytes(buffer.ToArray()));
565
+ while (buffer.Count != Math.Pow(2, Math.Log(buffer.Count) / Math.Log(2)))
566
+ buffer.Add(0);
567
+ int header = 0x10 | (int)(Math.Log(buffer.Count) / Math.Log(2));
568
+
569
+ buffer.Reverse();
570
+
571
+ buffer.Insert(0, Convert.ToByte(header));
572
+
573
+ if (write)
574
+ objectTable.InsertRange(0, buffer);
575
+
576
+ return buffer.ToArray();
577
+ }
578
+
579
+ private static byte[] writeBinaryDouble(double value)
580
+ {
581
+ List<byte> buffer =new List<byte>(RegulateNullBytes(BitConverter.GetBytes(value), 4));
582
+ while (buffer.Count != Math.Pow(2, Math.Log(buffer.Count) / Math.Log(2)))
583
+ buffer.Add(0);
584
+ int header = 0x20 | (int)(Math.Log(buffer.Count) / Math.Log(2));
585
+
586
+ buffer.Reverse();
587
+
588
+ buffer.Insert(0, Convert.ToByte(header));
589
+
590
+ objectTable.InsertRange(0, buffer);
591
+
592
+ return buffer.ToArray();
593
+ }
594
+
595
+ private static byte[] writeBinaryByteArray(byte[] value)
596
+ {
597
+ List<byte> buffer = new List<byte>(value);
598
+ List<byte> header = new List<byte>();
599
+ if (value.Length < 15)
600
+ {
601
+ header.Add(Convert.ToByte(0x40 | Convert.ToByte(value.Length)));
602
+ }
603
+ else
604
+ {
605
+ header.Add(0x40 | 0xf);
606
+ header.AddRange(writeBinaryInteger(buffer.Count, false));
607
+ }
608
+
609
+ buffer.InsertRange(0, header);
610
+
611
+ objectTable.InsertRange(0, buffer);
612
+
613
+ return buffer.ToArray();
614
+ }
615
+
616
+ private static byte[] writeBinaryString(string value, bool head)
617
+ {
618
+ List<byte> buffer = new List<byte>();
619
+ List<byte> header = new List<byte>();
620
+ foreach (char chr in value.ToCharArray())
621
+ buffer.Add(Convert.ToByte(chr));
622
+
623
+ if (head)
624
+ {
625
+ if (value.Length < 15)
626
+ {
627
+ header.Add(Convert.ToByte(0x50 | Convert.ToByte(value.Length)));
628
+ }
629
+ else
630
+ {
631
+ header.Add(0x50 | 0xf);
632
+ header.AddRange(writeBinaryInteger(buffer.Count, false));
633
+ }
634
+ }
635
+
636
+ buffer.InsertRange(0, header);
637
+
638
+ objectTable.InsertRange(0, buffer);
639
+
640
+ return buffer.ToArray();
641
+ }
642
+
643
+ private static byte[] RegulateNullBytes(byte[] value)
644
+ {
645
+ return RegulateNullBytes(value, 1);
646
+ }
647
+
648
+ private static byte[] RegulateNullBytes(byte[] value, int minBytes)
649
+ {
650
+ Array.Reverse(value);
651
+ List<byte> bytes = new List<byte>(value);
652
+ for (int i = 0; i < bytes.Count; i++)
653
+ {
654
+ if (bytes[i] == 0 && bytes.Count > minBytes)
655
+ {
656
+ bytes.Remove(bytes[i]);
657
+ i--;
658
+ }
659
+ else
660
+ break;
661
+ }
662
+
663
+ if (bytes.Count < minBytes)
664
+ {
665
+ int dist = minBytes - bytes.Count;
666
+ for (int i = 0; i < dist; i++)
667
+ bytes.Insert(0, 0);
668
+ }
669
+
670
+ value = bytes.ToArray();
671
+ Array.Reverse(value);
672
+ return value;
673
+ }
674
+
675
+ private static void parseTrailer(List<byte> trailer)
676
+ {
677
+ offsetByteSize = BitConverter.ToInt32(RegulateNullBytes(trailer.GetRange(6, 1).ToArray(), 4), 0);
678
+ objRefSize = BitConverter.ToInt32(RegulateNullBytes(trailer.GetRange(7, 1).ToArray(), 4), 0);
679
+ byte[] refCountBytes = trailer.GetRange(12, 4).ToArray();
680
+ Array.Reverse(refCountBytes);
681
+ refCount = BitConverter.ToInt32(refCountBytes, 0);
682
+ byte[] offsetTableOffsetBytes = trailer.GetRange(24, 8).ToArray();
683
+ Array.Reverse(offsetTableOffsetBytes);
684
+ offsetTableOffset = BitConverter.ToInt64(offsetTableOffsetBytes, 0);
685
+ }
686
+
687
+ private static void parseOffsetTable(List<byte> offsetTableBytes)
688
+ {
689
+ for (int i = 0; i < offsetTableBytes.Count; i += offsetByteSize)
690
+ {
691
+ byte[] buffer = offsetTableBytes.GetRange(i, offsetByteSize).ToArray();
692
+ Array.Reverse(buffer);
693
+ offsetTable.Add(BitConverter.ToInt32(RegulateNullBytes(buffer, 4), 0));
694
+ }
695
+ }
696
+
697
+ private static object parseBinaryDictionary(int objRef)
698
+ {
699
+ Dictionary<string, object> buffer = new Dictionary<string, object>();
700
+ List<int> refs = new List<int>();
701
+ int refCount = 0;
702
+
703
+ int refStartPosition;
704
+ refCount = getCount(offsetTable[objRef], out refStartPosition);
705
+
706
+
707
+ if (refCount < 15)
708
+ refStartPosition = offsetTable[objRef] + 1;
709
+ else
710
+ refStartPosition = offsetTable[objRef] + 2 + RegulateNullBytes(BitConverter.GetBytes(refCount), 1).Length;
711
+
712
+ for (int i = refStartPosition; i < refStartPosition + refCount * 2 * objRefSize; i += objRefSize)
713
+ {
714
+ byte[] refBuffer = objectTable.GetRange(i, objRefSize).ToArray();
715
+ Array.Reverse(refBuffer);
716
+ refs.Add(BitConverter.ToInt32(RegulateNullBytes(refBuffer, 4), 0));
717
+ }
718
+
719
+ for (int i = 0; i < refCount; i++)
720
+ {
721
+ buffer.Add((string)parseBinary(refs[i]), parseBinary(refs[i + refCount]));
722
+ }
723
+
724
+ return buffer;
725
+ }
726
+
727
+ private static object parseBinaryArray(int objRef)
728
+ {
729
+ List<object> buffer = new List<object>();
730
+ List<int> refs = new List<int>();
731
+ int refCount = 0;
732
+
733
+ int refStartPosition;
734
+ refCount = getCount(offsetTable[objRef], out refStartPosition);
735
+
736
+
737
+ if (refCount < 15)
738
+ refStartPosition = offsetTable[objRef] + 1;
739
+ else
740
+ //The following integer has a header aswell so we increase the refStartPosition by two to account for that.
741
+ refStartPosition = offsetTable[objRef] + 2 + RegulateNullBytes(BitConverter.GetBytes(refCount), 1).Length;
742
+
743
+ for (int i = refStartPosition; i < refStartPosition + refCount * objRefSize; i += objRefSize)
744
+ {
745
+ byte[] refBuffer = objectTable.GetRange(i, objRefSize).ToArray();
746
+ Array.Reverse(refBuffer);
747
+ refs.Add(BitConverter.ToInt32(RegulateNullBytes(refBuffer, 4), 0));
748
+ }
749
+
750
+ for (int i = 0; i < refCount; i++)
751
+ {
752
+ buffer.Add(parseBinary(refs[i]));
753
+ }
754
+
755
+ return buffer;
756
+ }
757
+
758
+ private static int getCount(int bytePosition, out int newBytePosition)
759
+ {
760
+ byte headerByte = objectTable[bytePosition];
761
+ byte headerByteTrail = Convert.ToByte(headerByte & 0xf);
762
+ int count;
763
+ if (headerByteTrail < 15)
764
+ {
765
+ count = headerByteTrail;
766
+ newBytePosition = bytePosition + 1;
767
+ }
768
+ else
769
+ count = (int)parseBinaryInt(bytePosition + 1, out newBytePosition);
770
+ return count;
771
+ }
772
+
773
+ private static object parseBinary(int objRef)
774
+ {
775
+ byte header = objectTable[offsetTable[objRef]];
776
+ switch (header & 0xF0)
777
+ {
778
+ case 0:
779
+ {
780
+ //If the byte is
781
+ //0 return null
782
+ //9 return true
783
+ //8 return false
784
+ return (objectTable[offsetTable[objRef]] == 0) ? (object)null : ((objectTable[offsetTable[objRef]] == 9) ? true : false);
785
+ }
786
+ case 0x10:
787
+ {
788
+ return parseBinaryInt(offsetTable[objRef]);
789
+ }
790
+ case 0x20:
791
+ {
792
+ return parseBinaryReal(offsetTable[objRef]);
793
+ }
794
+ case 0x30:
795
+ {
796
+ return parseBinaryDate(offsetTable[objRef]);
797
+ }
798
+ case 0x40:
799
+ {
800
+ return parseBinaryByteArray(offsetTable[objRef]);
801
+ }
802
+ case 0x50://String ASCII
803
+ {
804
+ return parseBinaryAsciiString(offsetTable[objRef]);
805
+ }
806
+ case 0x60://String Unicode
807
+ {
808
+ return parseBinaryUnicodeString(offsetTable[objRef]);
809
+ }
810
+ case 0xD0:
811
+ {
812
+ return parseBinaryDictionary(objRef);
813
+ }
814
+ case 0xA0:
815
+ {
816
+ return parseBinaryArray(objRef);
817
+ }
818
+ }
819
+ throw new Exception("This type is not supported");
820
+ }
821
+
822
+ public static object parseBinaryDate(int headerPosition)
823
+ {
824
+ byte[] buffer = objectTable.GetRange(headerPosition + 1, 8).ToArray();
825
+ Array.Reverse(buffer);
826
+ double appleTime = BitConverter.ToDouble(buffer, 0);
827
+ DateTime result = PlistDateConverter.ConvertFromAppleTimeStamp(appleTime);
828
+ return result;
829
+ }
830
+
831
+ private static object parseBinaryInt(int headerPosition)
832
+ {
833
+ int output;
834
+ return parseBinaryInt(headerPosition, out output);
835
+ }
836
+
837
+ private static object parseBinaryInt(int headerPosition, out int newHeaderPosition)
838
+ {
839
+ byte header = objectTable[headerPosition];
840
+ int byteCount = (int)Math.Pow(2, header & 0xf);
841
+ byte[] buffer = objectTable.GetRange(headerPosition + 1, byteCount).ToArray();
842
+ Array.Reverse(buffer);
843
+ //Add one to account for the header byte
844
+ newHeaderPosition = headerPosition + byteCount + 1;
845
+ return BitConverter.ToInt32(RegulateNullBytes(buffer, 4), 0);
846
+ }
847
+
848
+ private static object parseBinaryReal(int headerPosition)
849
+ {
850
+ byte header = objectTable[headerPosition];
851
+ int byteCount = (int)Math.Pow(2, header & 0xf);
852
+ byte[] buffer = objectTable.GetRange(headerPosition + 1, byteCount).ToArray();
853
+ Array.Reverse(buffer);
854
+
855
+ return BitConverter.ToDouble(RegulateNullBytes(buffer, 8), 0);
856
+ }
857
+
858
+ private static object parseBinaryAsciiString(int headerPosition)
859
+ {
860
+ int charStartPosition;
861
+ int charCount = getCount(headerPosition, out charStartPosition);
862
+
863
+ var buffer = objectTable.GetRange(charStartPosition, charCount);
864
+ return buffer.Count > 0 ? Encoding.ASCII.GetString(buffer.ToArray()) : string.Empty;
865
+ }
866
+
867
+ private static object parseBinaryUnicodeString(int headerPosition)
868
+ {
869
+ int charStartPosition;
870
+ int charCount = getCount(headerPosition, out charStartPosition);
871
+ charCount = charCount * 2;
872
+
873
+ byte[] buffer = new byte[charCount];
874
+ byte one, two;
875
+
876
+ for (int i = 0; i < charCount; i+=2)
877
+ {
878
+ one = objectTable.GetRange(charStartPosition+i,1)[0];
879
+ two = objectTable.GetRange(charStartPosition + i+1, 1)[0];
880
+
881
+ if (BitConverter.IsLittleEndian)
882
+ {
883
+ buffer[i] = two;
884
+ buffer[i + 1] = one;
885
+ }
886
+ else
887
+ {
888
+ buffer[i] = one;
889
+ buffer[i + 1] = two;
890
+ }
891
+ }
892
+
893
+ return Encoding.Unicode.GetString(buffer);
894
+ }
895
+
896
+ private static object parseBinaryByteArray(int headerPosition)
897
+ {
898
+ int byteStartPosition;
899
+ int byteCount = getCount(headerPosition, out byteStartPosition);
900
+ return objectTable.GetRange(byteStartPosition, byteCount).ToArray();
901
+ }
902
+
903
+ #endregion
904
+ }
905
+
906
+ public enum plistType
907
+ {
908
+ Auto, Binary, Xml
909
+ }
910
+
911
+ public static class PlistDateConverter
912
+ {
913
+ public static long timeDifference = 978307200;
914
+
915
+ public static long GetAppleTime(long unixTime)
916
+ {
917
+ return unixTime - timeDifference;
918
+ }
919
+
920
+ public static long GetUnixTime(long appleTime)
921
+ {
922
+ return appleTime + timeDifference;
923
+ }
924
+
925
+ public static DateTime ConvertFromAppleTimeStamp(double timestamp)
926
+ {
927
+ DateTime origin = new DateTime(2001, 1, 1, 0, 0, 0, 0);
928
+ return origin.AddSeconds(timestamp);
929
+ }
930
+
931
+ public static double ConvertToAppleTimeStamp(DateTime date)
932
+ {
933
+ DateTime begin = new DateTime(2001, 1, 1, 0, 0, 0, 0);
934
+ TimeSpan diff = date - begin;
935
+ return Math.Floor(diff.TotalSeconds);
936
+ }
937
+ }
938
+ }