From be79942ba9a7c7d953aead4115ca5a1b51711aad Mon Sep 17 00:00:00 2001 From: Sean Wiese Date: Mon, 14 Nov 2016 15:56:50 +0530 Subject: [PATCH] Facebook SDK For Unity 7.9.0 --- .gitignore | 78 +---- .../AndroidWrapper.cs | 26 ++ ...acebook.Unity.Android.StrippingHack.csproj | 38 ++ ...ok.Unity.Android.StrippingHack.csproj.user | 7 + .../Properties/AssemblyInfo.cs | 24 ++ Facebook.Unity.Android/AndroidWrapper.cs | 41 +++ .../Facebook.Unity.Android.csproj | 49 +++ .../Properties/AssemblyInfo.cs | 24 ++ Facebook.Unity.Arcade/ArcadeWrapper.cs | 4 +- .../Facebook.Unity.Arcade.csproj | 4 +- .../Plugins/FacebookNamedPipeClient.dll | Bin 23552 -> 25088 bytes .../Properties/AssemblyInfo.cs | 4 +- Facebook.Unity.Arcade/Settings.StyleCop | 219 ++++++++++++ .../Facebook.Unity.Editor.csproj | 23 +- Facebook.Unity.Editor/FacebookBuild.cs | 17 +- Facebook.Unity.Editor/FacebookPostprocess.cs | 3 +- .../FacebookSettingsEditor.cs | 71 +++- .../Properties/AssemblyInfo.cs | 4 +- Facebook.Unity.Editor/Settings.StyleCop | 219 ++++++++++++ Facebook.Unity.Editor/android/ManifestMod.cs | 1 + .../Facebook.Unity.IOS.StrippingHack.csproj | 38 ++ ...cebook.Unity.IOS.StrippingHack.csproj.user | 7 + .../IOSWrapper.cs | 26 ++ .../Properties/AssemblyInfo.cs | 24 ++ Facebook.Unity.IOS/Facebook.Unity.IOS.csproj | 46 +++ .../IOS => Facebook.Unity.IOS}/IOSWrapper.cs | 59 ++-- Facebook.Unity.IOS/Properties/AssemblyInfo.cs | 24 ++ .../Facebook.Unity.Settings.csproj | 43 +++ .../FacebookSettings.cs | 62 +++- .../Properties/AssemblyInfo.cs | 24 ++ Facebook.Unity.Tests/Canvas/UserAgent.cs | 12 - .../Facebook.Unity.Tests.csproj | 23 +- Facebook.Unity.Tests/FacebookTestClass.cs | 3 +- .../Properties/AssemblyInfo.cs | 4 +- Facebook.Unity.Tests/Settings.StyleCop | 219 ++++++++++++ Facebook.Unity.Tests/VersionNumberCheck.cs | 2 - Facebook.Unity.Tests/packages.config | 4 + Facebook.Unity/Arcade/ArcadeFacebook.cs | 25 ++ Facebook.Unity/Arcade/IArcadeWrapper.cs | 1 + Facebook.Unity/Canvas/CanvasFacebook.cs | 26 +- Facebook.Unity/Constants.cs | 6 +- Facebook.Unity/FB.cs | 54 ++- Facebook.Unity/Facebook.Unity.csproj | 30 +- Facebook.Unity/FacebookBase.cs | 6 +- Facebook.Unity/FacebookSdkVersion.cs | 2 +- Facebook.Unity/FacebookUnityPlatform.cs | 1 - Facebook.Unity/IPayFacebook.cs | 7 + .../Mobile/Android/AndroidFacebook.cs | 20 +- .../Mobile/Android/AndroidWrapper.cs | 179 ---------- Facebook.Unity/Mobile/IOS/IOSFacebook.cs | 2 +- .../PlatformEditor/EditorFacebook.cs | 12 + Facebook.Unity/Properties/AssemblyInfo.cs | 4 +- Facebook.Unity/Settings.StyleCop | 219 ++++++++++++ Facebook.Unity/Utils/AsyncRequestString.cs | 11 +- .../Utils/AsyncRequestStringHandler.cs | 47 +++ .../Utils/AsyncRequestStringWrapper.cs | 47 +++ Facebook.Unity/Utils/FBUnityUtility.cs | 67 ++++ Facebook.Unity/Utils/FacebookScheduler.cs | 41 +++ .../Utils/FacebookSchedulerFactory.cs | 34 ++ .../Utils/IAsyncRequestStringHandler.cs | 41 +++ .../Utils/IAsyncRequestStringWrapper.cs | 41 +++ Facebook.Unity/Utils/IFacebookScheduler.cs | 31 ++ .../Utils/IFacebookSchedulerFactory.cs | 29 ++ Facebook.sln | 32 +- .../Examples/Scripts/SubMenus/GameGroups.cs | 1 + .../Examples/Scripts/SubMenus/MainMenu.cs | 20 +- .../Android/Facebook.Unity.Android.dll.meta | 4 +- .../Android/Facebook.Unity.IOS.dll.meta | 59 ++++ ... animated-vector-drawable-23.4.0.aar.meta} | 13 +- ....aar.meta => appcompat-v7-23.4.0.aar.meta} | 13 +- .../Android/libs/bolts-android-1.4.0.jar.meta | 11 +- .../libs/bolts-applinks-1.4.0.jar.meta | 11 +- .../Android/libs/bolts-tasks-1.4.0.jar.meta | 11 +- .../Android/libs/cardview-v7-23.4.0.aar.meta | 11 +- .../Android/libs/customtabs-23.4.0.aar.meta | 23 ++ .../libs/facebook-android-sdk-4.17.0.aar.meta | 23 ++ .../facebook-android-wrapper-7.9.0.aar.meta | 23 ++ .../libs/support-annotations-23.4.0.jar.meta | 23 ++ .../Android/libs/support-v4-23.4.0.aar.meta | 11 +- .../support-vector-drawable-23.4.0.aar.meta | 23 ++ .../Facebook.Unity.PlatformEditor.dll.meta | 24 ++ .../Assets/FacebookSDK/Plugins/Settings.meta | 9 + .../Settings/Facebook.Unity.Settings.dll.meta | 24 ++ .../Plugins/iOS/Bolts.framework.meta | 46 ++- .../Plugins/iOS/FBSDKCoreKit.framework.meta | 46 ++- .../Plugins/iOS/FBSDKLoginKit.framework.meta | 46 ++- .../Plugins/iOS/FBSDKShareKit.framework.meta | 46 ++- .../iOS/Facebook.Unity.Android.dll.meta | 59 ++++ .../Plugins/iOS/Facebook.Unity.IOS.dll.meta | 59 ++++ .../SDK/Editor/iOS/FBUnityInterface.mm | 28 +- UnitySDK/Assets/FacebookSDK/link.xml | 27 +- UnitySDK/Assets/FacebookSDK/link.xml.meta | 4 +- UnitySDK/Assets/Settings.StyleCop | 219 ++++++++++++ .../ProjectSettings/GraphicsSettings.asset | 36 +- .../ProjectSettings/ProjectSettings.asset | 328 +++++++++++------- facebook-android-wrapper/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../src/com/facebook/unity/FB.java | 18 + .../src/com/facebook/unity/FBLogin.java | 31 +- .../facebook/unity/FBUnityLoginActivity.java | 10 +- scripts/build.properties | 8 +- scripts/build.sh | 72 +++- scripts/common.sh | 23 +- scripts/run_tests.sh | 2 + scripts/setup.sh | 9 +- scripts/setup_android_unity_plugin.sh | 20 +- 106 files changed, 3384 insertions(+), 593 deletions(-) create mode 100644 Facebook.Unity.Android.StrippingHack/AndroidWrapper.cs create mode 100644 Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj create mode 100644 Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj.user create mode 100644 Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs create mode 100644 Facebook.Unity.Android/AndroidWrapper.cs create mode 100644 Facebook.Unity.Android/Facebook.Unity.Android.csproj create mode 100644 Facebook.Unity.Android/Properties/AssemblyInfo.cs create mode 100644 Facebook.Unity.Arcade/Settings.StyleCop create mode 100644 Facebook.Unity.Editor/Settings.StyleCop create mode 100644 Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj create mode 100644 Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj.user create mode 100644 Facebook.Unity.IOS.StrippingHack/IOSWrapper.cs create mode 100644 Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs create mode 100644 Facebook.Unity.IOS/Facebook.Unity.IOS.csproj rename {Facebook.Unity/Mobile/IOS => Facebook.Unity.IOS}/IOSWrapper.cs (83%) create mode 100644 Facebook.Unity.IOS/Properties/AssemblyInfo.cs create mode 100644 Facebook.Unity.Settings/Facebook.Unity.Settings.csproj rename {Facebook.Unity => Facebook.Unity.Settings}/FacebookSettings.cs (87%) create mode 100644 Facebook.Unity.Settings/Properties/AssemblyInfo.cs create mode 100644 Facebook.Unity.Tests/Settings.StyleCop create mode 100644 Facebook.Unity.Tests/packages.config delete mode 100644 Facebook.Unity/Mobile/Android/AndroidWrapper.cs create mode 100644 Facebook.Unity/Settings.StyleCop create mode 100644 Facebook.Unity/Utils/AsyncRequestStringHandler.cs create mode 100644 Facebook.Unity/Utils/AsyncRequestStringWrapper.cs create mode 100644 Facebook.Unity/Utils/FBUnityUtility.cs create mode 100644 Facebook.Unity/Utils/FacebookScheduler.cs create mode 100644 Facebook.Unity/Utils/FacebookSchedulerFactory.cs create mode 100644 Facebook.Unity/Utils/IAsyncRequestStringHandler.cs create mode 100644 Facebook.Unity/Utils/IAsyncRequestStringWrapper.cs create mode 100644 Facebook.Unity/Utils/IFacebookScheduler.cs create mode 100644 Facebook.Unity/Utils/IFacebookSchedulerFactory.cs create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.IOS.dll.meta rename UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/{facebook-android-sdk-4.14.0.aar.meta => animated-vector-drawable-23.4.0.aar.meta} (55%) rename UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/{facebook-android-wrapper-7.7.0.aar.meta => appcompat-v7-23.4.0.aar.meta} (55%) create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/customtabs-23.4.0.aar.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-sdk-4.17.0.aar.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-7.9.0.aar.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-annotations-23.4.0.jar.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-vector-drawable-23.4.0.aar.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.PlatformEditor.dll.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Settings.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.Android.dll.meta create mode 100644 UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll.meta create mode 100644 UnitySDK/Assets/Settings.StyleCop diff --git a/.gitignore b/.gitignore index 2cc0a39b0..414fc16ea 100644 --- a/.gitignore +++ b/.gitignore @@ -64,81 +64,6 @@ FacebookSettings.asset* /facebook-android-wrapper/libs/ # MD Plugins -*.StyleCop -*.StyleCop.meta -StyleCop.Cache -StyleCop.Cache.meta - -# OSX -*.DS_Store - -# built application files -*.apk -*.ap_ - -# files for the dex VM -*.dex - -# Java class files -*.class - -# generated files -bin/ -gen/ -obj/ - -# Local configuration file (sdk path, etc) -local.properties -local.gradle - -# Proguard folder generated by Eclipse -proguard/ - -# Intellij project files -*.iml -*.ipr -*.iws -.idea/ - -# Gradle -.gradle -build - -# vim temp files -*.swp - -# Arc generated -.phutil_module_cache - -# Unity3D generated meta files -*.pidb.meta - -# Unity3D Generated File On Crash Reports -sysinfo.txt - -# Unity project version File -ProjectVersion.txt - -# Export Folder For SDK Package -/TempGenStaticObjects/ -/out/ - -# MD unit test results -test-results/ -unit_test_results.txt -TestResult.xml - -# Ignore Plugin Folders which are build by build -/Facebook.Unity/Assets/Plugins/ - -# Ignore Current Facebook Settings -FacebookSettings.asset* - -# Ignore android wrapper lib created by build scripts -/facebook-android-wrapper/libs/ - -# MD Plugins -*.StyleCop *.StyleCop.meta StyleCop.Cache StyleCop.Cache.meta @@ -151,3 +76,6 @@ StyleCop.Cache.meta # Ignore editor generated user prefs *.userprefs + +# Nuget packages +/packages/ diff --git a/Facebook.Unity.Android.StrippingHack/AndroidWrapper.cs b/Facebook.Unity.Android.StrippingHack/AndroidWrapper.cs new file mode 100644 index 000000000..1c9b1f84b --- /dev/null +++ b/Facebook.Unity.Android.StrippingHack/AndroidWrapper.cs @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity.Android +{ + public class AndroidWrapper + { + } +} diff --git a/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj b/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj new file mode 100644 index 000000000..b22eb2103 --- /dev/null +++ b/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj @@ -0,0 +1,38 @@ + + + + Debug + AnyCPU + {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B} + Library + Facebook.Unity.Android.StrippingHack + Facebook.Unity.Android + v3.5 + + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + + + + + + diff --git a/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj.user b/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj.user new file mode 100644 index 000000000..7306da10b --- /dev/null +++ b/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj.user @@ -0,0 +1,7 @@ + + + + Project + true + + \ No newline at end of file diff --git a/Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs b/Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..0c6492d4b --- /dev/null +++ b/Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.Android/AndroidWrapper.cs b/Facebook.Unity.Android/AndroidWrapper.cs new file mode 100644 index 000000000..e0f8c4b4d --- /dev/null +++ b/Facebook.Unity.Android/AndroidWrapper.cs @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity.Android +{ + using Facebook.Unity.Mobile.Android; + using UnityEngine; + + internal class AndroidWrapper : IAndroidWrapper + { + private const string FacebookJavaClassName = "com.facebook.unity.FB"; + private AndroidJavaClass facebookJavaClass = new AndroidJavaClass(FacebookJavaClassName); + + public T CallStatic(string methodName) + { + return this.facebookJavaClass.CallStatic(methodName); + } + + public void CallStatic(string methodName, params object[] args) + { + this.facebookJavaClass.CallStatic(methodName, args); + } + } +} diff --git a/Facebook.Unity.Android/Facebook.Unity.Android.csproj b/Facebook.Unity.Android/Facebook.Unity.Android.csproj new file mode 100644 index 000000000..b97b7a0db --- /dev/null +++ b/Facebook.Unity.Android/Facebook.Unity.Android.csproj @@ -0,0 +1,49 @@ + + + + Debug + AnyCPU + {D3DF5151-7271-4CBA-8F91-85B7845E2FBD} + Library + Facebook.Unity.Android + Facebook.Unity.Android + + + v3.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + \Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll + + + + + + + + + + {3DFF6C0C-BB04-405D-A23F-95999630E7F8} + Facebook.Unity + + + diff --git a/Facebook.Unity.Android/Properties/AssemblyInfo.cs b/Facebook.Unity.Android/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..c2e7a2f4c --- /dev/null +++ b/Facebook.Unity.Android/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.Arcade/ArcadeWrapper.cs b/Facebook.Unity.Arcade/ArcadeWrapper.cs index b0383c7eb..1c7d13b80 100644 --- a/Facebook.Unity.Arcade/ArcadeWrapper.cs +++ b/Facebook.Unity.Arcade/ArcadeWrapper.cs @@ -98,6 +98,7 @@ public void DoPayRequest( string requestId, string pricepointId, string testCurrency, + string developerPayload, string callbackId, ArcadeFacebook.OnComplete completeDelegate) { @@ -112,7 +113,8 @@ public void DoPayRequest( quantityMax, requestId, pricepointId, - testCurrency); + testCurrency, + developerPayload); this.HandleRequest( request, callbackId, diff --git a/Facebook.Unity.Arcade/Facebook.Unity.Arcade.csproj b/Facebook.Unity.Arcade/Facebook.Unity.Arcade.csproj index bf10ed6b6..907b1ce3c 100644 --- a/Facebook.Unity.Arcade/Facebook.Unity.Arcade.csproj +++ b/Facebook.Unity.Arcade/Facebook.Unity.Arcade.csproj @@ -19,6 +19,7 @@ DEBUG; prompt 4 + true none @@ -27,11 +28,12 @@ prompt 4 false + true - \Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEngine.dll + \Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll Plugins\FacebookNamedPipeClient.dll diff --git a/Facebook.Unity.Arcade/Plugins/FacebookNamedPipeClient.dll b/Facebook.Unity.Arcade/Plugins/FacebookNamedPipeClient.dll index 2e9d53dae0353ea1364ecaab47dae4e7b680814f..e8d118f3d9471802b8bc3a959b184d967f584ca3 100644 GIT binary patch literal 25088 zcmeHvd3apamFIb{R+XeuskD2eyg?z`LS9I0FhsHzBO*((ByV7lO45^DcBx9dD%qC7 zAQQHPeTf4kAvS>o2M9|HO+u0}pgaenWPcsep>r$+49Xk;*!Or|oC0V`sUCnND>q`9*vGMXB)>WYg4i?r&l7NT~; zMZen=+UnGHoEAh1je4T}CPmFP~#T$ob=z0|C#B{PbadjoHHPOc2RLEc)9=^KJZ@$PZ+M~Y>3h@8~)H0`@{@5xvbt#E6{K>x>VE# zl#j)|h3+-i!UVhAfIrdRK>8>uD=zo}I>wBmeSzpnfc=}%(t@h}7~t;3DHt8Nei`a5 zbC5D&O6UtL>da*N9`pA$La+iGlRVfPEY$-XgzO z{NbwF)&fV!*eb*okwQyq{8iFfOG5r?Mfm(RLiojhF6u=#{+JhYmsiyl+PAR7bO3U= zL<6YhWb zk!}~ckm*#;q;fV{(OakHY@2h2ry$Qfe;X2_EG{Np!*Tlb+^frX!KE5?~0;nTno(h znw}`E^O`|-^h{jg2Nw;&4_H009)As@fEj%Vmu1Cf^g&#sXP`05OmD5%Hhoxhqwu9S zg|Y#!9TovRTELA&*C~sIfB>Uj350+Eqh1MwfB@rK350+E16m1$ zfB@rI350+E<5mfTfB=231VTW7XjTFtB$iCN6<7Y~z6rXQmU%G6B+(B03V@noJoaxv zN7u4ziaqvU9A;^G(2d-FKXT6ksN8UU13UoNuj30`-z-;8v{kO&=s9xrMbDM1KiV$W zf@p_a1JN#A*>xB_%48uRK;S5W5CbMwPp8wd8gZv1$i1~+QeC^){ydB_qdkyG7cRCR z6u~A(z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%v9!(GW)t{K0WRdp{$TAPBMiw5l#NgufBfGBVl$_UZ}iY zs6t&d4ZqYTpV#7|OD8SlLG3P@*BkJ-)1ym;reqD0wR(1Tuv&()+$3a3PmfkxM`x$c zTNzy)T^rpH-5k>5Xyv>f7wGXkcC6^;X!6(5m0q+L-JBI&jd&2Dj3&3*uCL%%MR-P% z7f>fFn!N1ui1cW38@lkQ(sIw4D+O7}Im#w@I>m+SDIPBgt@OvMA=-~95ew_X~%cl_Sd zr@EbdS1r4;;R|NgFHO{2d**$yzd(%FYx>iyVL^8 diff --git a/Facebook.Unity.Arcade/Properties/AssemblyInfo.cs b/Facebook.Unity.Arcade/Properties/AssemblyInfo.cs index 4502ea47c..c2e7a2f4c 100644 --- a/Facebook.Unity.Arcade/Properties/AssemblyInfo.cs +++ b/Facebook.Unity.Arcade/Properties/AssemblyInfo.cs @@ -18,7 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -using System.Runtime.CompilerServices; using System.Reflection; +using System.Runtime.CompilerServices; -[assembly: AssemblyVersion("7.8.0")] +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.Arcade/Settings.StyleCop b/Facebook.Unity.Arcade/Settings.StyleCop new file mode 100644 index 000000000..b49c38ebd --- /dev/null +++ b/Facebook.Unity.Arcade/Settings.StyleCop @@ -0,0 +1,219 @@ + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + \ No newline at end of file diff --git a/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj b/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj index cd42f0b65..735b4faad 100644 --- a/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj +++ b/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj @@ -20,6 +20,7 @@ prompt 4 false + true full @@ -28,14 +29,15 @@ prompt 4 false + true - \Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEditor.dll + \Applications\Unity\Unity.app\Contents\Managed\UnityEditor.dll - \Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEngine.dll + \Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll @@ -54,24 +56,15 @@ - - - - - - - - - - - - - {3DFF6C0C-BB04-405D-A23F-95999630E7F8} Facebook.Unity + + {BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6} + Facebook.Unity.Settings + diff --git a/Facebook.Unity.Editor/FacebookBuild.cs b/Facebook.Unity.Editor/FacebookBuild.cs index eaa1caa40..79232b8ad 100644 --- a/Facebook.Unity.Editor/FacebookBuild.cs +++ b/Facebook.Unity.Editor/FacebookBuild.cs @@ -27,7 +27,8 @@ namespace Facebook.Unity.Editor internal class FacebookBuild { - private const string FacebookPath = "Assets/FacebookSDK/SDK/"; + private const string FacebookPath = "Assets/FacebookSDK/"; + private const string SDKPath = "Assets/FacebookSDK/SDK/"; private const string ExamplesPath = "Assets/FacebookSDK/Examples/"; private const string PluginsPath = "Assets/FacebookSDK/Plugins/"; @@ -73,17 +74,19 @@ public static string ExportPackage() AssetDatabase.CreateFolder("Assets", "Temp"); } - AssetDatabase.MoveAsset(FacebookPath + "Resources/FacebookSettings.asset", "Assets/Temp/FacebookSettings.asset"); + AssetDatabase.MoveAsset(SDKPath + "Resources/FacebookSettings.asset", "Assets/Temp/FacebookSettings.asset"); AssetDatabase.DeleteAsset(PluginsPath + "Android/AndroidManifest.xml"); AssetDatabase.DeleteAsset(PluginsPath + "Android/AndroidManifest.xml.meta"); - string[] facebookFiles = (string[])Directory.GetFiles(FacebookPath, "*.*", SearchOption.AllDirectories); + string[] facebookFiles = (string[])Directory.GetFiles(FacebookPath, "*.*", SearchOption.TopDirectoryOnly); + string[] sdkFiles = (string[])Directory.GetFiles(SDKPath, "*.*", SearchOption.AllDirectories); string[] exampleFiles = (string[])Directory.GetFiles(ExamplesPath, "*.*", SearchOption.AllDirectories); string[] pluginsFiles = (string[])Directory.GetFiles(PluginsPath, "*.*", SearchOption.AllDirectories); - string[] files = new string[facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length]; + string[] files = new string[facebookFiles.Length + sdkFiles.Length + exampleFiles.Length + pluginsFiles.Length]; facebookFiles.CopyTo(files, 0); - exampleFiles.CopyTo(files, facebookFiles.Length); - pluginsFiles.CopyTo(files, facebookFiles.Length + exampleFiles.Length); + sdkFiles.CopyTo(files, facebookFiles.Length); + exampleFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length); + pluginsFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length); AssetDatabase.ExportPackage( files, @@ -93,7 +96,7 @@ public static string ExportPackage() finally { // Move files back no matter what - AssetDatabase.MoveAsset("Assets/Temp/FacebookSettings.asset", FacebookPath + "Resources/FacebookSettings.asset"); + AssetDatabase.MoveAsset("Assets/Temp/FacebookSettings.asset", SDKPath + "Resources/FacebookSettings.asset"); AssetDatabase.DeleteAsset("Assets/Temp"); // regenerate the manifest diff --git a/Facebook.Unity.Editor/FacebookPostprocess.cs b/Facebook.Unity.Editor/FacebookPostprocess.cs index 31d82b37e..a51330629 100644 --- a/Facebook.Unity.Editor/FacebookPostprocess.cs +++ b/Facebook.Unity.Editor/FacebookPostprocess.cs @@ -22,6 +22,7 @@ namespace Facebook.Unity.Editor { using System.IO; using Facebook.Unity; + using Facebook.Unity.Settings; using UnityEditor; using UnityEditor.Callbacks; using UnityEngine; @@ -32,7 +33,7 @@ public static class XCodePostProcess public static void OnPostProcessBuild(BuildTarget target, string path) { // If integrating with facebook on any platform, throw a warning if the app id is invalid - if (!Facebook.Unity.FacebookSettings.IsValidAppId) + if (!FacebookSettings.IsValidAppId) { Debug.LogWarning("You didn't specify a Facebook app ID. Please add one using the Facebook menu in the main Unity editor."); } diff --git a/Facebook.Unity.Editor/FacebookSettingsEditor.cs b/Facebook.Unity.Editor/FacebookSettingsEditor.cs index e003d3fc5..a8f029221 100644 --- a/Facebook.Unity.Editor/FacebookSettingsEditor.cs +++ b/Facebook.Unity.Editor/FacebookSettingsEditor.cs @@ -23,6 +23,7 @@ namespace Facebook.Unity.Editor using System.Collections.Generic; using System.IO; using Facebook.Unity; + using Facebook.Unity.Settings; using UnityEditor; using UnityEngine; @@ -31,13 +32,23 @@ namespace Facebook.Unity.Editor public class FacebookSettingsEditor : Editor { private bool showFacebookInitSettings = false; - private bool showAndroidUtils = EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android; - private bool showIOSSettings = EditorUserBuildSettings.activeBuildTarget.ToString() == "iOS"; + private bool showAndroidUtils = false; + private bool showIOSSettings = false; private bool showAppLinksSettings = false; + private bool showFacebookUploadBuildSettings = false; private bool showAboutSection = false; - private GUIContent appNameLabel = new GUIContent("App Name [?]:", "For your own use and organization.\n(ex. 'dev', 'qa', 'prod')"); - private GUIContent appIdLabel = new GUIContent("App Id [?]:", "Facebook App Ids can be found at https://developers.facebook.com/apps"); + private GUIContent appNameLabel = new GUIContent( + "App Name (Optional) [?]:", + "For your own use and organization.\n(ex. 'dev', 'qa', 'prod')"); + + private GUIContent appIdLabel = new GUIContent( + "App Id [?]:", + "Facebook App Ids can be found at https://developers.facebook.com/apps"); + + private GUIContent clientTokenLabel = new GUIContent( + "Client Token (Optional) [?]:", + "For login purposes. Client Token can be found at https://developers.facebook.com/apps, in Settings -> Advanced"); private GUIContent urlSuffixLabel = new GUIContent("URL Scheme Suffix [?]", "Use this to share Facebook APP ID's across multiple iOS apps. https://developers.facebook.com/docs/ios/share-appid-across-multiple-apps-ios-sdk/"); @@ -51,6 +62,10 @@ public class FacebookSettingsEditor : Editor private GUIContent classNameLabel = new GUIContent("Class Name [?]", "aka: the activity name"); private GUIContent debugAndroidKeyLabel = new GUIContent("Debug Android Key Hash [?]", "Copy this key to the Facebook Settings in order to test a Facebook Android app"); + private GUIContent uploadAccessTokenLabel = new GUIContent( + "Upload Access Token [?]", + "Use this to upload build for Facebook platform"); + private GUIContent sdkVersion = new GUIContent("SDK Version [?]", "This Unity Facebook SDK version. If you have problems or compliments please include this so we know exactly what version to look out for."); public FacebookSettingsEditor() @@ -114,6 +129,13 @@ public static void ReportABug() Application.OpenURL(url); } + void OnEnable() + { + this.showAndroidUtils = EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android; + this.showIOSSettings = EditorUserBuildSettings.activeBuildTarget.ToString() == "iOS"; + } + + public override void OnInspectorGUI() { EditorGUILayout.Separator(); @@ -145,23 +167,35 @@ private void AppIdGUI() EditorGUILayout.HelpBox("Invalid App Id", MessageType.Error); } - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.LabelField(this.appNameLabel); - EditorGUILayout.LabelField(this.appIdLabel); - EditorGUILayout.EndHorizontal(); for (int i = 0; i < FacebookSettings.AppIds.Count; ++i) { + EditorGUILayout.BeginVertical(); + + EditorGUILayout.LabelField(string.Format("App #{0}", i + 1)); + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(this.appNameLabel); FacebookSettings.AppLabels[i] = EditorGUILayout.TextField(FacebookSettings.AppLabels[i]); + EditorGUILayout.EndHorizontal(); + GUI.changed = false; + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(this.appIdLabel); FacebookSettings.AppIds[i] = EditorGUILayout.TextField(FacebookSettings.AppIds[i]); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(this.clientTokenLabel); + FacebookSettings.ClientTokens[i] = EditorGUILayout.TextField(FacebookSettings.ClientTokens[i]); + EditorGUILayout.EndHorizontal(); + if (GUI.changed) { this.SettingsChanged(); ManifestMod.GenerateManifest(); } - EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); } EditorGUILayout.BeginHorizontal(); @@ -169,6 +203,7 @@ private void AppIdGUI() { FacebookSettings.AppLabels.Add("New App"); FacebookSettings.AppIds.Add("0"); + FacebookSettings.ClientTokens.Add(string.Empty); FacebookSettings.AppLinkSchemes.Add(new FacebookSettings.UrlSchemes()); this.SettingsChanged(); } @@ -179,6 +214,7 @@ private void AppIdGUI() { FacebookSettings.AppLabels.Pop(); FacebookSettings.AppIds.Pop(); + FacebookSettings.ClientTokens.Pop(); FacebookSettings.AppLinkSchemes.Pop(); this.SettingsChanged(); } @@ -325,6 +361,23 @@ private void AppLinksUtilGUI() } } + private void UploadBuildSettingsGUI() + { + this.showFacebookUploadBuildSettings = EditorGUILayout.Foldout( + this.showFacebookUploadBuildSettings, + "Upload Facebook Build Settings"); + + if (this.showFacebookUploadBuildSettings) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(this.uploadAccessTokenLabel, GUILayout.Width(135), GUILayout.Height(16)); + FacebookSettings.UploadAccessToken = EditorGUILayout.TextField(FacebookSettings.UploadAccessToken); + EditorGUILayout.EndHorizontal(); + } + + EditorGUILayout.Space(); + } + private void AboutGUI() { this.showAboutSection = EditorGUILayout.Foldout(this.showAboutSection, "About the Facebook SDK"); diff --git a/Facebook.Unity.Editor/Properties/AssemblyInfo.cs b/Facebook.Unity.Editor/Properties/AssemblyInfo.cs index 4502ea47c..c2e7a2f4c 100644 --- a/Facebook.Unity.Editor/Properties/AssemblyInfo.cs +++ b/Facebook.Unity.Editor/Properties/AssemblyInfo.cs @@ -18,7 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -using System.Runtime.CompilerServices; using System.Reflection; +using System.Runtime.CompilerServices; -[assembly: AssemblyVersion("7.8.0")] +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.Editor/Settings.StyleCop b/Facebook.Unity.Editor/Settings.StyleCop new file mode 100644 index 000000000..b49c38ebd --- /dev/null +++ b/Facebook.Unity.Editor/Settings.StyleCop @@ -0,0 +1,219 @@ + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + \ No newline at end of file diff --git a/Facebook.Unity.Editor/android/ManifestMod.cs b/Facebook.Unity.Editor/android/ManifestMod.cs index f019bd8e4..65fb9be38 100644 --- a/Facebook.Unity.Editor/android/ManifestMod.cs +++ b/Facebook.Unity.Editor/android/ManifestMod.cs @@ -26,6 +26,7 @@ namespace Facebook.Unity.Editor using System.Reflection; using System.Xml; using Facebook.Unity; + using Facebook.Unity.Settings; using UnityEditor; using UnityEngine; diff --git a/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj b/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj new file mode 100644 index 000000000..f838f8cd7 --- /dev/null +++ b/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj @@ -0,0 +1,38 @@ + + + + Debug + AnyCPU + {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27} + Library + Facebook.Unity.IOS.StrippingHack + Facebook.Unity.IOS + v3.5 + + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + + + + + + diff --git a/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj.user b/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj.user new file mode 100644 index 000000000..7306da10b --- /dev/null +++ b/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj.user @@ -0,0 +1,7 @@ + + + + Project + true + + \ No newline at end of file diff --git a/Facebook.Unity.IOS.StrippingHack/IOSWrapper.cs b/Facebook.Unity.IOS.StrippingHack/IOSWrapper.cs new file mode 100644 index 000000000..2df94bda1 --- /dev/null +++ b/Facebook.Unity.IOS.StrippingHack/IOSWrapper.cs @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity.IOS +{ + public class IOSWrapper + { + } +} diff --git a/Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs b/Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..0c6492d4b --- /dev/null +++ b/Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.IOS/Facebook.Unity.IOS.csproj b/Facebook.Unity.IOS/Facebook.Unity.IOS.csproj new file mode 100644 index 000000000..04c1335d0 --- /dev/null +++ b/Facebook.Unity.IOS/Facebook.Unity.IOS.csproj @@ -0,0 +1,46 @@ + + + + Debug + AnyCPU + {E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121} + Library + Facebook.Unity.IOS + Facebook.Unity.IOS + v3.5 + + + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + {3DFF6C0C-BB04-405D-A23F-95999630E7F8} + Facebook.Unity + + + \ No newline at end of file diff --git a/Facebook.Unity/Mobile/IOS/IOSWrapper.cs b/Facebook.Unity.IOS/IOSWrapper.cs similarity index 83% rename from Facebook.Unity/Mobile/IOS/IOSWrapper.cs rename to Facebook.Unity.IOS/IOSWrapper.cs index c72371544..96d05c529 100644 --- a/Facebook.Unity/Mobile/IOS/IOSWrapper.cs +++ b/Facebook.Unity.IOS/IOSWrapper.cs @@ -18,9 +18,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -namespace Facebook.Unity +namespace Facebook.Unity.IOS { - using System; using System.Runtime.InteropServices; using Facebook.Unity.Mobile.IOS; @@ -32,7 +31,7 @@ public void Init( string urlSuffix, string unityUserAgentSuffix) { - IOSWrapper.IOSInit( + IOSWrapper.IOSFBInit( appId, frictionlessRequests, urlSuffix, @@ -43,7 +42,7 @@ public void LogInWithReadPermissions( int requestId, string scope) { - IOSWrapper.IOSLogInWithReadPermissions( + IOSWrapper.IOSFBLogInWithReadPermissions( requestId, scope); } @@ -52,19 +51,19 @@ public void LogInWithPublishPermissions( int requestId, string scope) { - IOSWrapper.IOSLogInWithPublishPermissions( + IOSWrapper.IOSFBLogInWithPublishPermissions( requestId, scope); } public void LogOut() { - IOSWrapper.IOSLogOut(); + IOSWrapper.IOSFBLogOut(); } public void SetShareDialogMode(int mode) { - IOSWrapper.IOSSetShareDialogMode(mode); + IOSWrapper.IOSFBSetShareDialogMode(mode); } public void ShareLink( @@ -74,7 +73,7 @@ public void ShareLink( string contentDescription, string photoURL) { - IOSWrapper.IOSShareLink( + IOSWrapper.IOSFBShareLink( requestId, contentURL, contentTitle, @@ -92,7 +91,7 @@ public void FeedShare( string picture, string mediaSource) { - IOSWrapper.IOSFeedShare( + IOSWrapper.IOSFBFeedShare( requestId, toId, link, @@ -118,7 +117,7 @@ public void AppRequest( string data = "", string title = "") { - IOSWrapper.IOSAppRequest( + IOSWrapper.IOSFBAppRequest( requestId, message, actionType, @@ -139,7 +138,7 @@ public void AppInvite( string appLinkUrl, string previewImageUrl) { - IOSWrapper.IOSAppInvite( + IOSWrapper.IOSFBAppInvite( requestId, appLinkUrl, previewImageUrl); @@ -151,7 +150,7 @@ public void CreateGameGroup( string description, string privacy) { - IOSWrapper.IOSCreateGameGroup( + IOSWrapper.IOSFBCreateGameGroup( requestId, name, description, @@ -160,7 +159,7 @@ public void CreateGameGroup( public void JoinGameGroup(int requestId, string groupId) { - IOSWrapper.IOSJoinGameGroup(requestId, groupId); + IOSWrapper.IOSFBJoinGameGroup(requestId, groupId); } public void FBSettingsActivateApp(string appId) @@ -205,7 +204,7 @@ public void FBAppEventsSetLimitEventUsage(bool limitEventUsage) public void GetAppLink(int requestId) { - IOSWrapper.IOSGetAppLink(requestId); + IOSWrapper.IOSFBGetAppLink(requestId); } public string FBSdkVersion() @@ -215,39 +214,39 @@ public string FBSdkVersion() public void FetchDeferredAppLink(int requestId) { - IOSWrapper.IOSFetchDeferredAppLink(requestId); + IOSWrapper.IOSFBFetchDeferredAppLink(requestId); } public void RefreshCurrentAccessToken(int requestId) { - IOSWrapper.IOSRefreshCurrentAccessToken(requestId); + IOSWrapper.IOSFBRefreshCurrentAccessToken(requestId); } [DllImport("__Internal")] - private static extern void IOSInit( + private static extern void IOSFBInit( string appId, bool frictionlessRequests, string urlSuffix, string unityUserAgentSuffix); [DllImport("__Internal")] - private static extern void IOSLogInWithReadPermissions( + private static extern void IOSFBLogInWithReadPermissions( int requestId, string scope); [DllImport("__Internal")] - private static extern void IOSLogInWithPublishPermissions( + private static extern void IOSFBLogInWithPublishPermissions( int requestId, string scope); [DllImport("__Internal")] - private static extern void IOSLogOut(); + private static extern void IOSFBLogOut(); [DllImport("__Internal")] - private static extern void IOSSetShareDialogMode(int mode); + private static extern void IOSFBSetShareDialogMode(int mode); [DllImport("__Internal")] - private static extern void IOSShareLink( + private static extern void IOSFBShareLink( int requestId, string contentURL, string contentTitle, @@ -255,7 +254,7 @@ private static extern void IOSShareLink( string photoURL); [DllImport("__Internal")] - private static extern void IOSFeedShare( + private static extern void IOSFBFeedShare( int requestId, string toId, string link, @@ -266,7 +265,7 @@ private static extern void IOSFeedShare( string mediaSource); [DllImport("__Internal")] - private static extern void IOSAppRequest( + private static extern void IOSFBAppRequest( int requestId, string message, string actionType, @@ -282,20 +281,20 @@ private static extern void IOSAppRequest( string title = ""); [DllImport("__Internal")] - private static extern void IOSAppInvite( + private static extern void IOSFBAppInvite( int requestId, string appLinkUrl, string previewImageUrl); [DllImport("__Internal")] - private static extern void IOSCreateGameGroup( + private static extern void IOSFBCreateGameGroup( int requestId, string name, string description, string privacy); [DllImport("__Internal")] - private static extern void IOSJoinGameGroup(int requestId, string groupId); + private static extern void IOSFBJoinGameGroup(int requestId, string groupId); [DllImport("__Internal")] private static extern void IOSFBSettingsActivateApp(string appId); @@ -320,15 +319,15 @@ private static extern void IOSFBAppEventsLogPurchase( private static extern void IOSFBAppEventsSetLimitEventUsage(bool limitEventUsage); [DllImport("__Internal")] - private static extern void IOSGetAppLink(int requestID); + private static extern void IOSFBGetAppLink(int requestID); [DllImport("__Internal")] private static extern string IOSFBSdkVersion(); [DllImport("__Internal")] - private static extern void IOSFetchDeferredAppLink(int requestID); + private static extern void IOSFBFetchDeferredAppLink(int requestID); [DllImport("__Internal")] - private static extern void IOSRefreshCurrentAccessToken(int requestID); + private static extern void IOSFBRefreshCurrentAccessToken(int requestID); } } diff --git a/Facebook.Unity.IOS/Properties/AssemblyInfo.cs b/Facebook.Unity.IOS/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..c2e7a2f4c --- /dev/null +++ b/Facebook.Unity.IOS/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.Settings/Facebook.Unity.Settings.csproj b/Facebook.Unity.Settings/Facebook.Unity.Settings.csproj new file mode 100644 index 000000000..6216ee3f7 --- /dev/null +++ b/Facebook.Unity.Settings/Facebook.Unity.Settings.csproj @@ -0,0 +1,43 @@ + + + + Debug + AnyCPU + {BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6} + Library + Facebook.Unity.Settings + Facebook.Unity.Settings + + + v3.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + \Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll + + + + + + + + \ No newline at end of file diff --git a/Facebook.Unity/FacebookSettings.cs b/Facebook.Unity.Settings/FacebookSettings.cs similarity index 87% rename from Facebook.Unity/FacebookSettings.cs rename to Facebook.Unity.Settings/FacebookSettings.cs index 1f36401e2..175829804 100644 --- a/Facebook.Unity/FacebookSettings.cs +++ b/Facebook.Unity.Settings/FacebookSettings.cs @@ -18,7 +18,9 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -namespace Facebook.Unity +using System; + +namespace Facebook.Unity.Settings { using System.Collections.Generic; using System.IO; @@ -39,6 +41,8 @@ public class FacebookSettings : ScriptableObject [SerializeField] private int selectedAppIndex = 0; [SerializeField] + private List clientTokens = new List { string.Empty }; + [SerializeField] private List appIds = new List { "0" }; [SerializeField] private List appLabels = new List { "App Name" }; @@ -56,6 +60,8 @@ public class FacebookSettings : ScriptableObject private string iosURLSuffix = string.Empty; [SerializeField] private List appLinkSchemes = new List() { new UrlSchemes() }; + [SerializeField] + private string uploadAccessToken = string.Empty; public delegate void OnChangeCallback(); @@ -122,6 +128,27 @@ public static List AppLabels } } + /// + /// Gets or sets the app client token. + /// + /// The app client token. + public static List ClientTokens + { + get + { + return Instance.clientTokens; + } + + set + { + if (Instance.clientTokens != value) + { + Instance.clientTokens = value; + SettingsChanged(); + } + } + } + /// /// Gets the app identifier. /// @@ -134,6 +161,18 @@ public static string AppId } } + /// + /// Gets the app client token. + /// + /// The app identifier. + public static string ClientToken + { + get + { + return ClientTokens[SelectedAppIndex]; + } + } + /// /// Gets a value indicating whether the app id is valid app identifier. /// @@ -304,6 +343,27 @@ public static List AppLinkSchemes } } + /// + /// Gets or sets the upload access token. + /// + /// The access token to upload build to Facebook hosting. + public static string UploadAccessToken + { + get + { + return Instance.uploadAccessToken; + } + + set + { + if (Instance.uploadAccessToken != value) + { + Instance.uploadAccessToken = value; + SettingsChanged(); + } + } + } + public static FacebookSettings Instance { get diff --git a/Facebook.Unity.Settings/Properties/AssemblyInfo.cs b/Facebook.Unity.Settings/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..c2e7a2f4c --- /dev/null +++ b/Facebook.Unity.Settings/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.Tests/Canvas/UserAgent.cs b/Facebook.Unity.Tests/Canvas/UserAgent.cs index 752ab29c8..26a9159d7 100644 --- a/Facebook.Unity.Tests/Canvas/UserAgent.cs +++ b/Facebook.Unity.Tests/Canvas/UserAgent.cs @@ -38,17 +38,5 @@ public void VerifyUserAgentWebGL() this.VerifyUserAgent(expected); } - - [Test] - public void VerifyUserAgentWebPlayer() - { - Constants.CurrentPlatform = FacebookUnityPlatform.WebPlayer; - string expected = string.Format( - CultureInfo.InvariantCulture, - "FBJSSDK/1.0.0 FBUnityWebPlayer/{0} FBUnitySDK/{0}", - FacebookSdkVersion.Build); - - this.VerifyUserAgent(expected); - } } } diff --git a/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj b/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj index 9341bd134..4b0ff574f 100644 --- a/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj +++ b/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj @@ -20,6 +20,7 @@ prompt 4 False + true none @@ -28,6 +29,7 @@ prompt 4 False + true @@ -103,25 +105,40 @@ - \Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEditor.dll + \Applications\Unity\Unity.app\Contents\Managed\UnityEditor.dll - \Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEngine.dll + \Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll + + ..\packages\NSubstitute.1.10.0.0\lib\net40\NSubstitute.dll + - + + + + + + + + + + {3DFF6C0C-BB04-405D-A23F-95999630E7F8} Facebook.Unity + + + diff --git a/Facebook.Unity.Tests/FacebookTestClass.cs b/Facebook.Unity.Tests/FacebookTestClass.cs index 6d8280dfe..f8c3fcbd4 100644 --- a/Facebook.Unity.Tests/FacebookTestClass.cs +++ b/Facebook.Unity.Tests/FacebookTestClass.cs @@ -29,6 +29,7 @@ namespace Facebook.Unity.Tests using Facebook.Unity.Tests.Editor; using Facebook.Unity.Tests.Mobile.Android; using Facebook.Unity.Tests.Mobile.IOS; + using NSubstitute; using NUnit.Framework; public abstract class FacebookTestClass @@ -81,7 +82,7 @@ public void Init() } else { - throw new Exception("No platform specified on test class"); + throw new Exception("Failed to specify platform specified on test class"); } this.OnInit(); diff --git a/Facebook.Unity.Tests/Properties/AssemblyInfo.cs b/Facebook.Unity.Tests/Properties/AssemblyInfo.cs index 4502ea47c..c2e7a2f4c 100644 --- a/Facebook.Unity.Tests/Properties/AssemblyInfo.cs +++ b/Facebook.Unity.Tests/Properties/AssemblyInfo.cs @@ -18,7 +18,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -using System.Runtime.CompilerServices; using System.Reflection; +using System.Runtime.CompilerServices; -[assembly: AssemblyVersion("7.8.0")] +[assembly: AssemblyVersion("7.9.0")] diff --git a/Facebook.Unity.Tests/Settings.StyleCop b/Facebook.Unity.Tests/Settings.StyleCop new file mode 100644 index 000000000..b49c38ebd --- /dev/null +++ b/Facebook.Unity.Tests/Settings.StyleCop @@ -0,0 +1,219 @@ + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + \ No newline at end of file diff --git a/Facebook.Unity.Tests/VersionNumberCheck.cs b/Facebook.Unity.Tests/VersionNumberCheck.cs index c343ff618..0efc2faf4 100644 --- a/Facebook.Unity.Tests/VersionNumberCheck.cs +++ b/Facebook.Unity.Tests/VersionNumberCheck.cs @@ -34,7 +34,6 @@ public class VersionNumberCheck private static string unityRepoPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName; private static string unityPluginPath = Path.Combine(unityRepoPath, UnityPluginSubPath); private static string coreDLLSubPath = Path.Combine(unityPluginPath, "Facebook.Unity.dll"); - private static string androidDLLSubPath = Path.Combine(unityPluginPath, "Android/Facebook.Unity.Android.dll"); private static string arcadeDLLSubPath = Path.Combine(unityPluginPath, "Arcade/Facebook.Unity.Arcade.dll"); private static string editorDLLSubPath = Path.Combine(unityPluginPath, "Editor/Facebook.Unity.Editor.dll"); @@ -42,7 +41,6 @@ public class VersionNumberCheck public void ValidateDLLVersions() { VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.coreDLLSubPath); - VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.androidDLLSubPath); VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.arcadeDLLSubPath); VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.editorDLLSubPath); } diff --git a/Facebook.Unity.Tests/packages.config b/Facebook.Unity.Tests/packages.config new file mode 100644 index 000000000..1f0fa2686 --- /dev/null +++ b/Facebook.Unity.Tests/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Facebook.Unity/Arcade/ArcadeFacebook.cs b/Facebook.Unity/Arcade/ArcadeFacebook.cs index b2f4ef1ab..3004ac6f6 100755 --- a/Facebook.Unity/Arcade/ArcadeFacebook.cs +++ b/Facebook.Unity/Arcade/ArcadeFacebook.cs @@ -234,6 +234,7 @@ public void Pay( requestId, pricepointId, testCurrency, + /*developerPayload*/ null, callback); } @@ -258,6 +259,28 @@ public void PayWithProductId( requestId, pricepointId, testCurrency, + /*developerPayload*/ null, + callback); + } + + public void PayWithProductId( + string productId, + string action, + string developerPayload, + string testCurrency, + FacebookDelegate callback) + { + this.PayImpl( + /*product*/ null, + productId, + action, + /*quantity*/ 1, + /*quantityMin*/ null, + /*quantityMax*/ null, + /*requestId*/ null, + /*pricepointId*/ null, + testCurrency, + developerPayload, callback); } @@ -364,6 +387,7 @@ private void PayImpl( string requestId, string pricepointId, string testCurrency, + string developerPayload, FacebookDelegate callback) { this.arcadeWrapper.DoPayRequest( @@ -378,6 +402,7 @@ private void PayImpl( requestId, pricepointId, testCurrency, + developerPayload, this.CallbackManager.AddFacebookDelegate(callback), this.OnPayComplete); } diff --git a/Facebook.Unity/Arcade/IArcadeWrapper.cs b/Facebook.Unity/Arcade/IArcadeWrapper.cs index 3db3098c0..4ebdc41c9 100644 --- a/Facebook.Unity/Arcade/IArcadeWrapper.cs +++ b/Facebook.Unity/Arcade/IArcadeWrapper.cs @@ -44,6 +44,7 @@ void DoPayRequest( string requestId, string pricepointId, string testCurrency, + string developerPayload, string callbackID, ArcadeFacebook.OnComplete completeDelegate); diff --git a/Facebook.Unity/Canvas/CanvasFacebook.cs b/Facebook.Unity/Canvas/CanvasFacebook.cs index 4e8e94e81..4fede7113 100644 --- a/Facebook.Unity/Canvas/CanvasFacebook.cs +++ b/Facebook.Unity/Canvas/CanvasFacebook.cs @@ -84,7 +84,6 @@ public override string SDKUserAgent switch (Constants.CurrentPlatform) { case FacebookUnityPlatform.WebGL: - case FacebookUnityPlatform.WebPlayer: webPlatform = string.Format( CultureInfo.InvariantCulture, "FBUnity{0}", @@ -272,6 +271,7 @@ public void Pay( requestId, pricepointId, testCurrency, + /*developerPayload*/ null, callback); } @@ -296,6 +296,28 @@ public void PayWithProductId( requestId, pricepointId, testCurrency, + /*developerPayload*/ null, + callback); + } + + public void PayWithProductId( + string productId, + string action, + string developerPayload, + string testCurrency, + FacebookDelegate callback) + { + this.PayImpl( + /*product*/ null, + productId, + action, + /*quantity*/ 1, + /*quantityMin*/ null, + /*quantityMax*/ null, + /*requestId*/ null, + /*pricepointId*/ null, + testCurrency, + developerPayload, callback); } @@ -547,6 +569,7 @@ private void PayImpl( string requestId, string pricepointId, string testCurrency, + string developerPayload, FacebookDelegate callback) { MethodArguments args = new MethodArguments(); @@ -559,6 +582,7 @@ private void PayImpl( args.AddString("request_id", requestId); args.AddString("pricepoint_id", pricepointId); args.AddString("test_currency", testCurrency); + args.AddString("developer_payload", developerPayload); var call = new CanvasUIMethodCall(this, MethodPay, Constants.OnPayCompleteMethodName); call.Callback = callback; call.Call(args); diff --git a/Facebook.Unity/Constants.cs b/Facebook.Unity/Constants.cs index b06fd27cd..1faacf0ee 100644 --- a/Facebook.Unity/Constants.cs +++ b/Facebook.Unity/Constants.cs @@ -108,8 +108,7 @@ public static bool IsWeb { get { - return Constants.CurrentPlatform == FacebookUnityPlatform.WebGL || - Constants.CurrentPlatform == FacebookUnityPlatform.WebPlayer; + return Constants.CurrentPlatform == FacebookUnityPlatform.WebGL; } } @@ -182,9 +181,6 @@ private static FacebookUnityPlatform GetCurrentPlatform() return FacebookUnityPlatform.Android; case RuntimePlatform.IPhonePlayer: return FacebookUnityPlatform.IOS; - case RuntimePlatform.WindowsWebPlayer: - case RuntimePlatform.OSXWebPlayer: - return FacebookUnityPlatform.WebPlayer; case RuntimePlatform.WebGLPlayer: return FacebookUnityPlatform.WebGL; case RuntimePlatform.WindowsPlayer: diff --git a/Facebook.Unity/FB.cs b/Facebook.Unity/FB.cs index 2638786c4..35e488cb4 100644 --- a/Facebook.Unity/FB.cs +++ b/Facebook.Unity/FB.cs @@ -28,6 +28,7 @@ namespace Facebook.Unity using Facebook.Unity.Mobile; using Facebook.Unity.Mobile.Android; using Facebook.Unity.Mobile.IOS; + using Facebook.Unity.Settings; using UnityEngine; /// @@ -50,6 +51,13 @@ public sealed class FB : ScriptableObject /// The app identifier. public static string AppId { get; private set; } + /// + /// Gets the app client token. ClientToken might be different from FBSettings.ClientToken + /// if using the programmatic version of FB.Init(). + /// + /// The app client token. + public static string ClientToken { get; private set; } + /// /// Gets or sets the graph API version. /// The Unity sdk is by default pegged to the lastest version of the graph api @@ -172,6 +180,7 @@ public static void Init(InitDelegate onInitComplete = null, HideUnityDelegate on { Init( FacebookSettings.AppId, + FacebookSettings.ClientToken, FacebookSettings.Cookie, FacebookSettings.Logging, FacebookSettings.Status, @@ -188,6 +197,7 @@ public static void Init(InitDelegate onInitComplete = null, HideUnityDelegate on /// Useful for a build pipeline that requires no human input. /// /// App identifier. + /// App client token. /// If set to true cookie. /// If set to true logging. /// If set to true status. @@ -207,6 +217,7 @@ public static void Init(InitDelegate onInitComplete = null, HideUnityDelegate on /// public static void Init( string appId, + string clientToken = null, bool cookie = true, bool logging = true, bool status = true, @@ -223,6 +234,7 @@ public static void Init( } FB.AppId = appId; + FB.ClientToken = clientToken; if (!isInitCalled) { @@ -242,7 +254,6 @@ public static void Init( switch (Constants.CurrentPlatform) { case FacebookUnityPlatform.WebGL: - case FacebookUnityPlatform.WebPlayer: FB.OnDLLLoadedDelegate = delegate { ((CanvasFacebook)FB.facebook).Init( @@ -291,7 +302,7 @@ public static void Init( ComponentFactory.GetComponent(); break; default: - throw new NotImplementedException("Facebook API does not yet support this platform"); + throw new NotSupportedException("The facebook sdk does not support this platform"); } } } @@ -306,6 +317,9 @@ public static void Init( /// /// A list of requested permissions. /// Callback to be called when request completes. + /// + /// Thrown when called on a TV device. + /// public static void LogInWithPublishPermissions( IEnumerable permissions = null, FacebookDelegate callback = null) @@ -318,6 +332,9 @@ public static void LogInWithPublishPermissions( /// /// A list of requested permissions. /// Callback to be called when request completes. + /// + /// Thrown when called on a TV device. + /// public static void LogInWithReadPermissions( IEnumerable permissions = null, FacebookDelegate callback = null) @@ -820,6 +837,39 @@ public static void PayWithProductId( testCurrency, callback); } + + /// + /// Pay the specified productId, action, developerPayload, testCurrency and callback. + /// + /// The product Id referencing the product managed by Facebook. + /// Should always be purchaseiap. + /// + /// A string that can be used to provide supplemental information about an order. It can be + /// used to uniquely identify the purchase request. + /// + /// + /// This parameter can be used during debugging and testing your implementation to force the dialog to + /// use a specific currency rather than the current user's preferred currency. This allows you to + /// rapidly prototype your payment experience for different currencies without having to repeatedly + /// change your personal currency preference settings. This parameter is only available for admins, + /// developers and testers associated with the app, in order to minimize the security risk of a + /// malicious JavaScript injection. Provide the 3 letter currency code of the intended forced currency. + /// + /// The callback to use upon completion. + public static void PayWithProductId( + string productId, + string action = "purchaseiap", + string developerPayload = null, + string testCurrency = null, + FacebookDelegate callback = null) + { + FacebookPayImpl.PayWithProductId( + productId, + action, + developerPayload, + testCurrency, + callback); + } } /// diff --git a/Facebook.Unity/Facebook.Unity.csproj b/Facebook.Unity/Facebook.Unity.csproj index b54afe795..aa4f2ea2f 100644 --- a/Facebook.Unity/Facebook.Unity.csproj +++ b/Facebook.Unity/Facebook.Unity.csproj @@ -20,6 +20,7 @@ prompt 4 false + true full @@ -28,12 +29,14 @@ prompt 4 false + true - \Applications\Unity\Unity.app\Contents\Frameworks\Managed\UnityEngine.dll + \Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll + @@ -46,7 +49,6 @@ - @@ -128,12 +130,32 @@ + + + - - + + + + + + + + + + + + + + + + {BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6} + Facebook.Unity.Settings + + diff --git a/Facebook.Unity/FacebookBase.cs b/Facebook.Unity/FacebookBase.cs index 53c142c37..faac26888 100644 --- a/Facebook.Unity/FacebookBase.cs +++ b/Facebook.Unity/FacebookBase.cs @@ -137,7 +137,7 @@ public void API( FB.IsLoggedIn ? AccessToken.CurrentAccessToken.TokenString : string.Empty; } - AsyncRequestString.Request(this.GetGraphUrl(query), method, inputFormData, callback); + FBUnityUtility.AsyncRequestStringWrapper.Request(this.GetGraphUrl(query), method, inputFormData, callback); } public void API( @@ -157,7 +157,7 @@ public void API( Constants.AccessTokenKey, tokenString); - AsyncRequestString.Request(this.GetGraphUrl(query), method, formData, callback); + FBUnityUtility.AsyncRequestStringWrapper.Request(this.GetGraphUrl(query), method, formData, callback); } public abstract void GameGroupCreate( @@ -253,7 +253,7 @@ protected void ValidateAppRequestArgs( } } - protected void OnAuthResponse(LoginResult result) + protected virtual void OnAuthResponse(LoginResult result) { // If the login is cancelled we won't have a access token. // Don't overwrite a valid token diff --git a/Facebook.Unity/FacebookSdkVersion.cs b/Facebook.Unity/FacebookSdkVersion.cs index 8de0891ef..d206ae34d 100644 --- a/Facebook.Unity/FacebookSdkVersion.cs +++ b/Facebook.Unity/FacebookSdkVersion.cs @@ -33,7 +33,7 @@ public static string Build { get { - return "7.8.0"; + return "7.9.0"; } } } diff --git a/Facebook.Unity/FacebookUnityPlatform.cs b/Facebook.Unity/FacebookUnityPlatform.cs index 49501f5a9..f9fa5782e 100644 --- a/Facebook.Unity/FacebookUnityPlatform.cs +++ b/Facebook.Unity/FacebookUnityPlatform.cs @@ -28,7 +28,6 @@ internal enum FacebookUnityPlatform Android, IOS, WebGL, - WebPlayer, Arcade } } diff --git a/Facebook.Unity/IPayFacebook.cs b/Facebook.Unity/IPayFacebook.cs index 2839065cb..649d76fd8 100644 --- a/Facebook.Unity/IPayFacebook.cs +++ b/Facebook.Unity/IPayFacebook.cs @@ -43,5 +43,12 @@ void PayWithProductId( string pricepointId, string testCurrency, FacebookDelegate callback); + + void PayWithProductId( + string productId, + string action, + string developerPayload, + string testCurrency, + FacebookDelegate callback); } } diff --git a/Facebook.Unity/Mobile/Android/AndroidFacebook.cs b/Facebook.Unity/Mobile/Android/AndroidFacebook.cs index fe2d937db..a3831b51a 100644 --- a/Facebook.Unity/Mobile/Android/AndroidFacebook.cs +++ b/Facebook.Unity/Mobile/Android/AndroidFacebook.cs @@ -31,17 +31,17 @@ internal sealed class AndroidFacebook : MobileFacebook // This class holds all the of the wrapper methods that we call into private bool limitEventUsage; - private IAndroidWrapper facebookJava; + private IAndroidWrapper androidWrapper; - public AndroidFacebook() : this(new AndroidWrapper(), new CallbackManager()) + public AndroidFacebook() : this(GetAndroidWrapper(), new CallbackManager()) { } - public AndroidFacebook(IAndroidWrapper facebookJavaClass, CallbackManager callbackManager) + public AndroidFacebook(IAndroidWrapper androidWrapper, CallbackManager callbackManager) : base(callbackManager) { this.KeyHash = string.Empty; - this.facebookJava = facebookJavaClass; + this.androidWrapper = androidWrapper; } // key Hash used for Android SDK @@ -73,7 +73,7 @@ public override string SDKVersion { get { - return this.facebookJava.CallStatic("GetSdkVersion"); + return this.androidWrapper.CallStatic("GetSdkVersion"); } } @@ -313,9 +313,17 @@ protected override void SetShareDialogMode(ShareDialogMode mode) this.CallFB("SetShareDialogMode", mode.ToString()); } + private static IAndroidWrapper GetAndroidWrapper() + { + Assembly assembly = Assembly.Load("Facebook.Unity.Android"); + Type type = assembly.GetType("Facebook.Unity.Android.AndroidWrapper"); + IAndroidWrapper javaClass = (IAndroidWrapper)Activator.CreateInstance(type); + return javaClass; + } + private void CallFB(string method, string args) { - this.facebookJava.CallStatic(method, args); + this.androidWrapper.CallStatic(method, args); } private class JavaMethodCall : MethodCall where T : IResult diff --git a/Facebook.Unity/Mobile/Android/AndroidWrapper.cs b/Facebook.Unity/Mobile/Android/AndroidWrapper.cs deleted file mode 100644 index 2dca7eca7..000000000 --- a/Facebook.Unity/Mobile/Android/AndroidWrapper.cs +++ /dev/null @@ -1,179 +0,0 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, - * copy, modify, and distribute this software in source code or binary form for use - * in connection with the web services and APIs provided by Facebook. - * - * As with any software that integrates with the Facebook platform, your use of - * this software is subject to the Facebook Developer Principles and Policies - * [http://developers.facebook.com/policy/]. This copyright notice shall be - * included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -namespace Facebook.Unity.Mobile.Android -{ - using System; - using System.Linq; - using System.Reflection; - - internal class AndroidWrapper : IAndroidWrapper - { - private const string FacebookJavaClassName = "com.facebook.unity.FB"; - private const string UnityEngineAssemblyName = "UnityEngine"; - private const string AndroidJavaClassName = "UnityEngine.AndroidJavaClass"; - private const string CallStaticMethodInfoName = "CallStatic"; - - private static Type androidJavaClassType; - private static object androidJavaClassObject; - private static MethodInfo callStaticMethodInfo; - private static MethodInfo callStaticMethodInfoGeneric; - - private static Type AndroidJavaClassType - { - get - { - if (androidJavaClassType != null) - { - return AndroidWrapper.androidJavaClassType; - } - - Assembly assembly = Assembly.Load(AndroidWrapper.UnityEngineAssemblyName); - AndroidWrapper.androidJavaClassType = assembly.GetType(AndroidJavaClassName); - - if (AndroidWrapper.androidJavaClassType == null) - { - throw new InvalidOperationException( - "Failed to load type: " + AndroidJavaClassName); - } - - return AndroidWrapper.androidJavaClassType; - } - } - - private static object AndroidJavaClassObject - { - get - { - if (androidJavaClassObject != null) - { - return AndroidWrapper.androidJavaClassObject; - } - - AndroidWrapper.androidJavaClassObject = Activator.CreateInstance( - AndroidWrapper.AndroidJavaClassType, - FacebookJavaClassName); - - if (AndroidWrapper.androidJavaClassObject == null) - { - throw new InvalidOperationException( - "Failed to institate object of type: " + AndroidWrapper.AndroidJavaClassType.FullName); - } - - return AndroidWrapper.androidJavaClassObject; - } - } - - private static MethodInfo CallStaticMethodInfo - { - get - { - if (callStaticMethodInfo != null) - { - return AndroidWrapper.callStaticMethodInfo; - } - - AndroidWrapper.callStaticMethodInfo = AndroidJavaClassType.GetMethod( - AndroidWrapper.CallStaticMethodInfoName, - new Type[] { typeof(string), typeof(object[]) }); - - if (AndroidWrapper.callStaticMethodInfo == null) - { - throw new InvalidOperationException( - "Failed to locate method: " + AndroidWrapper.CallStaticMethodInfoName); - } - - return AndroidWrapper.callStaticMethodInfo; - } - } - - private static MethodInfo CallStaticMethodInfoGeneric - { - get - { - if (callStaticMethodInfoGeneric != null) - { - return AndroidWrapper.callStaticMethodInfoGeneric; - } - - MethodInfo[] methods = AndroidJavaClassType.GetMethods(); - foreach (MethodInfo methodInfo in methods) - { - if (methodInfo.Name != CallStaticMethodInfoName) - { - continue; - } - - if (methodInfo.GetGenericArguments().Count() != 1) - { - continue; - } - - ParameterInfo[] parameters = methodInfo.GetParameters(); - if (parameters.Count() != 2) - { - continue; - } - - if (!parameters[0].ParameterType.IsAssignableFrom(typeof(string))) - { - continue; - } - - if (!parameters[1].ParameterType.IsAssignableFrom(typeof(object[]))) - { - continue; - } - - AndroidWrapper.callStaticMethodInfoGeneric = methodInfo; - break; - } - - if (AndroidWrapper.callStaticMethodInfoGeneric == null) - { - throw new InvalidOperationException( - "Failed to locate generic method: " + AndroidWrapper.CallStaticMethodInfoName); - } - - return AndroidWrapper.callStaticMethodInfoGeneric; - } - } - - public void CallStatic(string methodName, params object[] args) - { - AndroidWrapper.CallStaticMethodInfo.Invoke( - AndroidWrapper.AndroidJavaClassObject, - new object[] { methodName, args }); - } - - public T CallStatic(string methodName) - { - MethodInfo methodInfo = AndroidWrapper.CallStaticMethodInfoGeneric.MakeGenericMethod(typeof(T)); - if (methodInfo == null) - { - throw new InvalidOperationException("Failed to make generic method for calling static"); - } - - return (T)methodInfo.Invoke( - AndroidWrapper.AndroidJavaClassObject, - new object[] { methodName, new object[0] }); - } - } -} diff --git a/Facebook.Unity/Mobile/IOS/IOSFacebook.cs b/Facebook.Unity/Mobile/IOS/IOSFacebook.cs index 80ea66657..8f369228e 100644 --- a/Facebook.Unity/Mobile/IOS/IOSFacebook.cs +++ b/Facebook.Unity/Mobile/IOS/IOSFacebook.cs @@ -32,7 +32,7 @@ internal class IOSFacebook : MobileFacebook private IIOSWrapper iosWrapper; public IOSFacebook() - : this(new IOSWrapper(), new CallbackManager()) + : this(GetIOSWrapper(), new CallbackManager()) { } diff --git a/Facebook.Unity/PlatformEditor/EditorFacebook.cs b/Facebook.Unity/PlatformEditor/EditorFacebook.cs index 75eb5f5da..f9abaaaa0 100644 --- a/Facebook.Unity/PlatformEditor/EditorFacebook.cs +++ b/Facebook.Unity/PlatformEditor/EditorFacebook.cs @@ -255,6 +255,18 @@ public void PayWithProductId( this.CallbackManager.AddFacebookDelegate(callback)); } + public void PayWithProductId( + string productId, + string action, + string developerPayload, + string testCurrency, + FacebookDelegate callback) + { + this.editorWrapper.ShowPayMockDialog( + this.OnPayComplete, + this.CallbackManager.AddFacebookDelegate(callback)); + } + public void RefreshCurrentAccessToken( FacebookDelegate callback) { diff --git a/Facebook.Unity/Properties/AssemblyInfo.cs b/Facebook.Unity/Properties/AssemblyInfo.cs index 5434dfbdc..02ce96097 100644 --- a/Facebook.Unity/Properties/AssemblyInfo.cs +++ b/Facebook.Unity/Properties/AssemblyInfo.cs @@ -18,10 +18,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -using System.Runtime.CompilerServices; using System.Reflection; +using System.Runtime.CompilerServices; -[assembly: AssemblyVersion("7.8.0")] +[assembly: AssemblyVersion("7.9.0")] [assembly: InternalsVisibleTo("Assembly-CSharp")] [assembly: InternalsVisibleTo("Facebook.Unity.Android")] [assembly: InternalsVisibleTo("Facebook.Unity.Arcade")] diff --git a/Facebook.Unity/Settings.StyleCop b/Facebook.Unity/Settings.StyleCop new file mode 100644 index 000000000..b49c38ebd --- /dev/null +++ b/Facebook.Unity/Settings.StyleCop @@ -0,0 +1,219 @@ + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + \ No newline at end of file diff --git a/Facebook.Unity/Utils/AsyncRequestString.cs b/Facebook.Unity/Utils/AsyncRequestString.cs index 34fd1df58..09516e975 100644 --- a/Facebook.Unity/Utils/AsyncRequestString.cs +++ b/Facebook.Unity/Utils/AsyncRequestString.cs @@ -94,7 +94,10 @@ internal IEnumerator Start() Dictionary headers = new Dictionary(); - headers["User-Agent"] = Constants.GraphApiUserAgent; + if (Constants.CurrentPlatform != FacebookUnityPlatform.WebGL) + { + headers["User-Agent"] = Constants.GraphApiUserAgent; + } www = new WWW(this.url + urlParams, null, headers); } @@ -119,7 +122,11 @@ internal IEnumerator Start() } } - this.query.headers["User-Agent"] = Constants.GraphApiUserAgent; + if (Constants.CurrentPlatform != FacebookUnityPlatform.WebGL) + { + this.query.headers["User-Agent"] = Constants.GraphApiUserAgent; + } + www = new WWW(this.url.AbsoluteUri, this.query); } diff --git a/Facebook.Unity/Utils/AsyncRequestStringHandler.cs b/Facebook.Unity/Utils/AsyncRequestStringHandler.cs new file mode 100644 index 000000000..6210fd2f0 --- /dev/null +++ b/Facebook.Unity/Utils/AsyncRequestStringHandler.cs @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Facebook.Unity +{ + internal class AsyncRequestStringHandler : IAsyncRequestStringHandler + { + public void Request( + Uri url, + HttpMethod method, + WWWForm query = null, + FacebookDelegate callback = null) + { + AsyncRequestString.Request(url, method, query, callback); + } + + public void Request( + Uri url, + HttpMethod method, + IDictionary formData = null, + FacebookDelegate callback = null) + { + AsyncRequestString.Request(url, method, formData, callback); + } + } +} diff --git a/Facebook.Unity/Utils/AsyncRequestStringWrapper.cs b/Facebook.Unity/Utils/AsyncRequestStringWrapper.cs new file mode 100644 index 000000000..e22f21c89 --- /dev/null +++ b/Facebook.Unity/Utils/AsyncRequestStringWrapper.cs @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Facebook.Unity +{ + internal class AsyncRequestStringWrapper : IAsyncRequestStringWrapper + { + public void Request( + Uri url, + HttpMethod method, + WWWForm query = null, + FacebookDelegate callback = null) + { + AsyncRequestString.Request(url, method, query, callback); + } + + public void Request( + Uri url, + HttpMethod method, + IDictionary formData = null, + FacebookDelegate callback = null) + { + AsyncRequestString.Request(url, method, formData, callback); + } + } +} diff --git a/Facebook.Unity/Utils/FBUnityUtility.cs b/Facebook.Unity/Utils/FBUnityUtility.cs new file mode 100644 index 000000000..844106566 --- /dev/null +++ b/Facebook.Unity/Utils/FBUnityUtility.cs @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity +{ + using System; + using UnityEngine; + + internal static class FBUnityUtility + { + private static string currentDeviceIdentifier; + private static IAsyncRequestStringWrapper asyncRequestStringWrapper; + + public static string UnityDeviceIdentifier + { + get + { + if (string.IsNullOrEmpty(FBUnityUtility.currentDeviceIdentifier)) + { + FBUnityUtility.currentDeviceIdentifier = SystemInfo.deviceUniqueIdentifier; + } + + return FBUnityUtility.currentDeviceIdentifier; + } + + set + { + FBUnityUtility.currentDeviceIdentifier = value; + } + } + + public static IAsyncRequestStringWrapper AsyncRequestStringWrapper + { + get + { + if (FBUnityUtility.asyncRequestStringWrapper == null) + { + FBUnityUtility.asyncRequestStringWrapper = new AsyncRequestStringWrapper(); + } + + return FBUnityUtility.asyncRequestStringWrapper; + } + + set + { + FBUnityUtility.asyncRequestStringWrapper = value; + } + } + } +} diff --git a/Facebook.Unity/Utils/FacebookScheduler.cs b/Facebook.Unity/Utils/FacebookScheduler.cs new file mode 100644 index 000000000..0f5485c18 --- /dev/null +++ b/Facebook.Unity/Utils/FacebookScheduler.cs @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity +{ + using System; + using System.Collections; + using System.Collections.Generic; + using UnityEngine; + + internal class FacebookScheduler : MonoBehaviour, IFacebookScheduler + { + public void Schedule(Action action, long delay) + { + this.StartCoroutine(DelayEvent(action, delay)); + } + + public IEnumerator DelayEvent(Action action, long delay) + { + yield return new WaitForSeconds(delay); + action(); + } + } +} diff --git a/Facebook.Unity/Utils/FacebookSchedulerFactory.cs b/Facebook.Unity/Utils/FacebookSchedulerFactory.cs new file mode 100644 index 000000000..b34d24cad --- /dev/null +++ b/Facebook.Unity/Utils/FacebookSchedulerFactory.cs @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity +{ + using System; + using UnityEngine; + + internal class FacebookSchedulerFactory : IFacebookSchedulerFactory + { + public IFacebookScheduler GetInstance() + { + FacebookScheduler scheduler = ComponentFactory.GetComponent(); + return scheduler; + } + } +} diff --git a/Facebook.Unity/Utils/IAsyncRequestStringHandler.cs b/Facebook.Unity/Utils/IAsyncRequestStringHandler.cs new file mode 100644 index 000000000..510535646 --- /dev/null +++ b/Facebook.Unity/Utils/IAsyncRequestStringHandler.cs @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity +{ + using System; + using System.Collections.Generic; + using UnityEngine; + + public interface IAsyncRequestStringHandler + { + void Request( + Uri url, + HttpMethod method, + WWWForm query = null, + FacebookDelegate callback = null); + + void Request( + Uri url, + HttpMethod method, + IDictionary formData = null, + FacebookDelegate callback = null); + } +} diff --git a/Facebook.Unity/Utils/IAsyncRequestStringWrapper.cs b/Facebook.Unity/Utils/IAsyncRequestStringWrapper.cs new file mode 100644 index 000000000..e5b71662e --- /dev/null +++ b/Facebook.Unity/Utils/IAsyncRequestStringWrapper.cs @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity +{ + using System; + using System.Collections.Generic; + using UnityEngine; + + internal interface IAsyncRequestStringWrapper + { + void Request( + Uri url, + HttpMethod method, + WWWForm query = null, + FacebookDelegate callback = null); + + void Request( + Uri url, + HttpMethod method, + IDictionary formData = null, + FacebookDelegate callback = null); + } +} diff --git a/Facebook.Unity/Utils/IFacebookScheduler.cs b/Facebook.Unity/Utils/IFacebookScheduler.cs new file mode 100644 index 000000000..e34aad6a2 --- /dev/null +++ b/Facebook.Unity/Utils/IFacebookScheduler.cs @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity +{ + using System; + + internal interface IFacebookScheduler + { + void Schedule( + Action action, + long delay = 0); + } +} diff --git a/Facebook.Unity/Utils/IFacebookSchedulerFactory.cs b/Facebook.Unity/Utils/IFacebookSchedulerFactory.cs new file mode 100644 index 000000000..3fb0263c1 --- /dev/null +++ b/Facebook.Unity/Utils/IFacebookSchedulerFactory.cs @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, + * copy, modify, and distribute this software in source code or binary form for use + * in connection with the web services and APIs provided by Facebook. + * + * As with any software that integrates with the Facebook platform, your use of + * this software is subject to the Facebook Developer Principles and Policies + * [http://developers.facebook.com/policy/]. This copyright notice shall be + * included in all copies or substantial portions of the software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +namespace Facebook.Unity +{ + using System; + + internal interface IFacebookSchedulerFactory + { + IFacebookScheduler GetInstance(); + } +} diff --git a/Facebook.sln b/Facebook.sln index adafc146f..0f1267be2 100644 --- a/Facebook.sln +++ b/Facebook.sln @@ -9,6 +9,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity", "Facebook. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Editor", "Facebook.Unity.Editor\Facebook.Unity.Editor.csproj", "{4F631992-8D32-4AB5-8073-4BDC8A79380B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Android", "Facebook.Unity.Android\Facebook.Unity.Android.csproj", "{D3DF5151-7271-4CBA-8F91-85B7845E2FBD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.IOS", "Facebook.Unity.IOS\Facebook.Unity.IOS.csproj", "{E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Settings", "Facebook.Unity.Settings\Facebook.Unity.Settings.csproj", "{BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Android.StrippingHack", "Facebook.Unity.Android.StrippingHack\Facebook.Unity.Android.StrippingHack.csproj", "{CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.IOS.StrippingHack", "Facebook.Unity.IOS.StrippingHack\Facebook.Unity.IOS.StrippingHack.csproj", "{15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,12 +37,32 @@ Global {4F631992-8D32-4AB5-8073-4BDC8A79380B}.Debug|Any CPU.Build.0 = Debug|Any CPU {4F631992-8D32-4AB5-8073-4BDC8A79380B}.Release|Any CPU.ActiveCfg = Release|Any CPU {4F631992-8D32-4AB5-8073-4BDC8A79380B}.Release|Any CPU.Build.0 = Release|Any CPU + {BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}.Release|Any CPU.Build.0 = Release|Any CPU + {D3DF5151-7271-4CBA-8F91-85B7845E2FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3DF5151-7271-4CBA-8F91-85B7845E2FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3DF5151-7271-4CBA-8F91-85B7845E2FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3DF5151-7271-4CBA-8F91-85B7845E2FBD}.Release|Any CPU.Build.0 = Release|Any CPU {D8F7CF97-7FE9-48B7-A30C-CB14BAA73010}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D8F7CF97-7FE9-48B7-A30C-CB14BAA73010}.Debug|Any CPU.Build.0 = Debug|Any CPU {D8F7CF97-7FE9-48B7-A30C-CB14BAA73010}.Release|Any CPU.ActiveCfg = Release|Any CPU {D8F7CF97-7FE9-48B7-A30C-CB14BAA73010}.Release|Any CPU.Build.0 = Release|Any CPU + {E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}.Release|Any CPU.Build.0 = Release|Any CPU + {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Release|Any CPU.Build.0 = Release|Any CPU + {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution - version = + version = EndGlobalSection EndGlobal diff --git a/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/GameGroups.cs b/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/GameGroups.cs index 63466cf63..9d2b2857c 100644 --- a/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/GameGroups.cs +++ b/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/GameGroups.cs @@ -78,6 +78,7 @@ protected override void GetGui() this.CallFbGetUserGroups(); } + GUI.enabled = enabled && !string.IsNullOrEmpty(this.gamerGroupCurrentGroup); if (this.Button("Make Group Post As User")) { this.CallFbPostToGamerGroup(); diff --git a/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs b/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs index c8b9e3e98..ec838d9a5 100644 --- a/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs +++ b/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/MainMenu.cs @@ -33,6 +33,8 @@ protected override bool ShowBackButton() protected override void GetGui() { + GUILayout.BeginVertical(); + bool enabled = GUI.enabled; if (this.Button("FB.Init")) { @@ -56,16 +58,24 @@ protected override void GetGui() this.Status = "Login (for publish_actions) called"; } - #if UNITY_IOS || UNITY_ANDROID || UNITY_WP8 || UNITY_EDITOR + // Fix GUILayout margin issues + GUILayout.Label(GUIContent.none, GUILayout.MinWidth(ConsoleBase.MarginFix)); + GUILayout.EndHorizontal(); + + + GUILayout.BeginHorizontal(); + + // Fix GUILayout margin issues + GUILayout.Label(GUIContent.none, GUILayout.MinWidth(ConsoleBase.MarginFix)); + GUILayout.EndHorizontal(); + + #if !UNITY_WEBGL if (this.Button("Logout")) { CallFBLogout(); this.Status = "Logout called"; } #endif - // Fix GUILayout margin issues - GUILayout.Label(GUIContent.none, GUILayout.MinWidth(ConsoleBase.MarginFix)); - GUILayout.EndHorizontal(); GUI.enabled = enabled && FB.IsInitialized; if (this.Button("Share Dialog")) @@ -119,6 +129,8 @@ protected override void GetGui() this.SwitchMenu(typeof(AccessTokenMenu)); } + GUILayout.EndVertical(); + GUI.enabled = enabled; } diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll.meta index 8851c7506..d71c68471 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.Android.dll.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 0221af791bab543de83adf81353552b5 -timeCreated: 1468882736 +guid: c8606992c0d3d4cb197947e2812b2296 +timeCreated: 1472847769 licenseType: Pro PluginImporter: serializedVersion: 1 diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.IOS.dll.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.IOS.dll.meta new file mode 100644 index 000000000..3aa05f9b8 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/Facebook.Unity.IOS.dll.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: f4286ffe64a794f578b0a868869ec93e +timeCreated: 1478650392 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 1 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-sdk-4.14.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/animated-vector-drawable-23.4.0.aar.meta similarity index 55% rename from UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-sdk-4.14.0.aar.meta rename to UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/animated-vector-drawable-23.4.0.aar.meta index 291f2e07f..dbeb05ef5 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-sdk-4.14.0.aar.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/animated-vector-drawable-23.4.0.aar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: fb66a0a5090384fc8a3f4cd142bc0ec4 -timeCreated: 1468894394 +guid: 63aab30ace7254e099c62927e3a2ca8f +timeCreated: 1477351391 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-7.7.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/appcompat-v7-23.4.0.aar.meta similarity index 55% rename from UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-7.7.0.aar.meta rename to UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/appcompat-v7-23.4.0.aar.meta index 93ba4cdd7..03862b5c0 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-7.7.0.aar.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/appcompat-v7-23.4.0.aar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: af589eb8366fd489493f8edc990698e3 -timeCreated: 1468894394 +guid: df35ef2d19c3449739b851f15aa2808c +timeCreated: 1477350814 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-android-1.4.0.jar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-android-1.4.0.jar.meta index 04e44e33e..ffbfd321d 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-android-1.4.0.jar.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-android-1.4.0.jar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 52c276477162e4eb38d56fc0c73920ec -timeCreated: 1468894394 +timeCreated: 1477350795 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-applinks-1.4.0.jar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-applinks-1.4.0.jar.meta index 1248acfb2..abbbb2aa7 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-applinks-1.4.0.jar.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-applinks-1.4.0.jar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 3a3f3fa834392439bb599a30a8a5c9f1 -timeCreated: 1468894394 +timeCreated: 1477350795 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-tasks-1.4.0.jar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-tasks-1.4.0.jar.meta index c5aa2b8d3..3276da16c 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-tasks-1.4.0.jar.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/bolts-tasks-1.4.0.jar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 4ed03ed7033a54a66b77c10cf89f141d -timeCreated: 1468894394 +timeCreated: 1477350795 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/cardview-v7-23.4.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/cardview-v7-23.4.0.aar.meta index 30c3e228c..3ef45125f 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/cardview-v7-23.4.0.aar.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/cardview-v7-23.4.0.aar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 9402ba2918e1646ab9ff8f0d7510d9bc -timeCreated: 1468894394 +timeCreated: 1477350795 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/customtabs-23.4.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/customtabs-23.4.0.aar.meta new file mode 100644 index 000000000..f46048595 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/customtabs-23.4.0.aar.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 6752589fe76e54d199c2459e6a9f5fc9 +timeCreated: 1477350814 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-sdk-4.17.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-sdk-4.17.0.aar.meta new file mode 100644 index 000000000..c0c347fd2 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-sdk-4.17.0.aar.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: ccb96b6ea0a9f4dbaa3bd74c45d476ca +timeCreated: 1477678449 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-7.9.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-7.9.0.aar.meta new file mode 100644 index 000000000..aec347bc6 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/facebook-android-wrapper-7.9.0.aar.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 3e5193f42e4c34c0c9637597017da2f5 +timeCreated: 1477677079 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-annotations-23.4.0.jar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-annotations-23.4.0.jar.meta new file mode 100644 index 000000000..055b67209 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-annotations-23.4.0.jar.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: ae287c4ff5ca64e2c9120c01bf330afe +timeCreated: 1477351391 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-v4-23.4.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-v4-23.4.0.aar.meta index c4bf12fc2..c9a14fca9 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-v4-23.4.0.aar.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-v4-23.4.0.aar.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 8e38d18d8ee9c4e47b9b2bc657145538 -timeCreated: 1468894394 +timeCreated: 1477350795 licenseType: Pro PluginImporter: serializedVersion: 1 @@ -8,9 +8,16 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: - Any: + Android: enabled: 1 settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-vector-drawable-23.4.0.aar.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-vector-drawable-23.4.0.aar.meta new file mode 100644 index 000000000..c9cfde1f0 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Android/libs/support-vector-drawable-23.4.0.aar.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 94ea8f6d53d8c462ea58e6a2a9cdd752 +timeCreated: 1477351391 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.PlatformEditor.dll.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.PlatformEditor.dll.meta new file mode 100644 index 000000000..6774b6a55 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Editor/Facebook.Unity.PlatformEditor.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: e08b2110da9b7431e8b9dd128682967d +timeCreated: 1478640936 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Settings.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Settings.meta new file mode 100644 index 000000000..cd37f4962 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Settings.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 206e4007f4e254c0ab4703e0de5521a1 +folderAsset: yes +timeCreated: 1477332011 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll.meta b/UnitySDK/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll.meta new file mode 100644 index 000000000..45bbd6b08 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: 39e483503d2cf46f9a78c3e844ad04a2 +timeCreated: 1477594420 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Bolts.framework.meta b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Bolts.framework.meta index 0c5eab100..7e354c2ce 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Bolts.framework.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Bolts.framework.meta @@ -9,9 +9,53 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU Any: - enabled: 1 + enabled: 0 settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + tvOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKCoreKit.framework.meta b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKCoreKit.framework.meta index 45a76015e..d6b4b2544 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKCoreKit.framework.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKCoreKit.framework.meta @@ -9,9 +9,53 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU Any: - enabled: 1 + enabled: 0 settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + tvOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKLoginKit.framework.meta b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKLoginKit.framework.meta index 94ecf10f0..5d19c139e 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKLoginKit.framework.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKLoginKit.framework.meta @@ -9,9 +9,53 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU Any: - enabled: 1 + enabled: 0 settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + tvOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKShareKit.framework.meta b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKShareKit.framework.meta index ea6b37867..132bf93b6 100644 --- a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKShareKit.framework.meta +++ b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/FBSDKShareKit.framework.meta @@ -9,9 +9,53 @@ PluginImporter: executionOrder: {} isPreloaded: 0 platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU Any: - enabled: 1 + enabled: 0 settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + tvOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: userData: assetBundleName: assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.Android.dll.meta b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.Android.dll.meta new file mode 100644 index 000000000..9dc6db841 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.Android.dll.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 132ed74e3030842218bcb27cbb19f853 +timeCreated: 1478650876 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll.meta b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll.meta new file mode 100644 index 000000000..12fb87ea7 --- /dev/null +++ b/UnitySDK/Assets/FacebookSDK/Plugins/iOS/Facebook.Unity.IOS.dll.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 30238c53c131f4d7cb46fdcbf940f7fc +timeCreated: 1470699192 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + iOS: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnitySDK/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm b/UnitySDK/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm index ed0ab5b10..8a4cb7508 100644 --- a/UnitySDK/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm +++ b/UnitySDK/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm @@ -424,7 +424,7 @@ - (NSDictionary *)getAccessTokenUserData extern "C" { - void IOSInit(const char *_appId, bool _frictionlessRequests, const char *_urlSuffix, const char *_userAgentSuffix) + void IOSFBInit(const char *_appId, bool _frictionlessRequests, const char *_urlSuffix, const char *_userAgentSuffix) { // Set the user agent before calling init to ensure that calls made during // init use the user agent suffix. @@ -435,29 +435,29 @@ void IOSInit(const char *_appId, bool _frictionlessRequests, const char *_urlSuf urlSuffix:_urlSuffix]; } - void IOSLogInWithReadPermissions(int requestId, + void IOSFBLogInWithReadPermissions(int requestId, const char *scope) { [[FBUnityInterface sharedInstance] logInWithReadPermissions:requestId scope:scope]; } - void IOSLogInWithPublishPermissions(int requestId, + void IOSFBLogInWithPublishPermissions(int requestId, const char *scope) { [[FBUnityInterface sharedInstance] logInWithPublishPermissions:requestId scope:scope]; } - void IOSLogOut() + void IOSFBLogOut() { [[FBUnityInterface sharedInstance] logOut]; } - void IOSSetShareDialogMode(int mode) + void IOSFBSetShareDialogMode(int mode) { [FBUnityInterface sharedInstance].shareDialogMode = static_cast(mode); } - void IOSAppRequest(int requestId, + void IOSFBAppRequest(int requestId, const char *message, const char *actionType, const char *objectId, @@ -482,7 +482,7 @@ void IOSAppRequest(int requestId, title: title]; } - void IOSAppInvite(int requestId, + void IOSFBAppInvite(int requestId, const char *appLinkUrl, const char *previewImageUrl) { @@ -491,7 +491,7 @@ void IOSAppInvite(int requestId, previewImageUrl:previewImageUrl]; } - void IOSGetAppLink(int requestId) + void IOSFBGetAppLink(int requestId) { NSURL *url = [NSURL URLWithString:[FBUnityInterface sharedInstance].openURLString]; [FBUnityUtility sendMessageToUnity:FBUnityMessageName_OnGetAppLinkComplete @@ -500,7 +500,7 @@ void IOSGetAppLink(int requestId) [FBUnityInterface sharedInstance].openURLString = nil; } - void IOSShareLink(int requestId, + void IOSFBShareLink(int requestId, const char *contentURL, const char *contentTitle, const char *contentDescription, @@ -513,7 +513,7 @@ void IOSShareLink(int requestId, photoURL:photoURL]; } - void IOSFeedShare(int requestId, + void IOSFBFeedShare(int requestId, const char *toId, const char *link, const char *linkName, @@ -532,12 +532,12 @@ void IOSFeedShare(int requestId, mediaSource:mediaSource]; } - void IOSJoinGameGroup(int requestId, const char *groupId) + void IOSFBJoinGameGroup(int requestId, const char *groupId) { [[FBUnityInterface sharedInstance] showJoinAppGroupDialogWithRequestId:requestId groupId:groupId]; } - void IOSCreateGameGroup(int requestId, const char *groupName, const char *groupDescription, const char *groupPrivacy) + void IOSFBCreateGameGroup(int requestId, const char *groupName, const char *groupDescription, const char *groupPrivacy) { [[FBUnityInterface sharedInstance] showCreateAppGroupDialogWithRequestId:requestId groupName:groupName groupDescription:groupDescription groupPrivacy:groupPrivacy]; } @@ -580,7 +580,7 @@ void IOSFBAppEventsSetLimitEventUsage(BOOL limitEventUsage) return res; } - void IOSFetchDeferredAppLink(int requestId) + void IOSFBFetchDeferredAppLink(int requestId) { [FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) { if (error) { @@ -594,7 +594,7 @@ void IOSFetchDeferredAppLink(int requestId) }]; } - void IOSRefreshCurrentAccessToken(int requestId) + void IOSFBRefreshCurrentAccessToken(int requestId) { [FBSDKAccessToken refreshCurrentAccessToken:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { if (error) { diff --git a/UnitySDK/Assets/FacebookSDK/link.xml b/UnitySDK/Assets/FacebookSDK/link.xml index be919dc5f..a0e2e3d89 100644 --- a/UnitySDK/Assets/FacebookSDK/link.xml +++ b/UnitySDK/Assets/FacebookSDK/link.xml @@ -1,25 +1,8 @@ - - - - + + + + + diff --git a/UnitySDK/Assets/FacebookSDK/link.xml.meta b/UnitySDK/Assets/FacebookSDK/link.xml.meta index d9adde6db..f330c7292 100644 --- a/UnitySDK/Assets/FacebookSDK/link.xml.meta +++ b/UnitySDK/Assets/FacebookSDK/link.xml.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 51f4619c385224a23a3edb9092c7d49b -timeCreated: 1467948044 -licenseType: Free +timeCreated: 1478648849 +licenseType: Pro TextScriptImporter: userData: assetBundleName: diff --git a/UnitySDK/Assets/Settings.StyleCop b/UnitySDK/Assets/Settings.StyleCop new file mode 100644 index 000000000..b49c38ebd --- /dev/null +++ b/UnitySDK/Assets/Settings.StyleCop @@ -0,0 +1,219 @@ + + + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + False + + + + + + + \ No newline at end of file diff --git a/UnitySDK/ProjectSettings/GraphicsSettings.asset b/UnitySDK/ProjectSettings/GraphicsSettings.asset index 794c061b6..057c661a4 100644 --- a/UnitySDK/ProjectSettings/GraphicsSettings.asset +++ b/UnitySDK/ProjectSettings/GraphicsSettings.asset @@ -3,16 +3,31 @@ --- !u!30 &1 GraphicsSettings: m_ObjectHideFlags: 0 - serializedVersion: 5 + serializedVersion: 7 m_Deferred: m_Mode: 1 m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} m_DeferredReflections: m_Mode: 1 m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} + m_ScreenSpaceShadows: + m_Mode: 1 + m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} m_LegacyDeferred: m_Mode: 1 m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} + m_DepthNormals: + m_Mode: 1 + m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} + m_MotionVectors: + m_Mode: 1 + m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} + m_LightHalo: + m_Mode: 1 + m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} + m_LensFlare: + m_Mode: 1 + m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} m_AlwaysIncludedShaders: - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} @@ -21,8 +36,23 @@ GraphicsSettings: - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] - m_ShaderSettings: - useScreenSpaceShadows: 0 + m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, + type: 0} + m_ShaderSettings_Tier1: + useCascadedShadowMaps: 1 + standardShaderQuality: 2 + useReflectionProbeBoxProjection: 1 + useReflectionProbeBlending: 1 + m_ShaderSettings_Tier2: + useCascadedShadowMaps: 1 + standardShaderQuality: 2 + useReflectionProbeBoxProjection: 1 + useReflectionProbeBlending: 1 + m_ShaderSettings_Tier3: + useCascadedShadowMaps: 1 + standardShaderQuality: 2 + useReflectionProbeBoxProjection: 1 + useReflectionProbeBlending: 1 m_BuildTargetShaderSettings: [] m_LightmapStripping: 0 m_FogStripping: 0 diff --git a/UnitySDK/ProjectSettings/ProjectSettings.asset b/UnitySDK/ProjectSettings/ProjectSettings.asset index 18ddf3351..80d8b9883 100644 --- a/UnitySDK/ProjectSettings/ProjectSettings.asset +++ b/UnitySDK/ProjectSettings/ProjectSettings.asset @@ -4,6 +4,7 @@ PlayerSettings: m_ObjectHideFlags: 0 serializedVersion: 8 + productGUID: 4c7bd641802e04cafb43562bb7053c64 AndroidProfiler: 0 defaultScreenOrientation: 4 targetDevice: 2 @@ -13,6 +14,7 @@ PlayerSettings: productName: SDKPackage defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} + m_SplashScreenStyle: 0 m_ShowUnitySplashScreen: 1 m_VirtualRealitySplashScreen: {fileID: 0} defaultScreenWidth: 1024 @@ -24,7 +26,7 @@ PlayerSettings: m_ActiveColorSpace: 0 m_MTRendering: 1 m_MobileMTRendering: 0 - m_Stereoscopic3D: 0 + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 iosAppInBackgroundBehavior: 0 @@ -37,7 +39,7 @@ PlayerSettings: useOSAutorotation: 1 use32BitDisplayBuffer: 1 disableDepthAndStencilBuffers: 0 - defaultIsFullScreen: 1 + defaultIsFullScreen: 0 defaultIsNativeResolution: 1 runInBackground: 0 captureSingleScreen: 0 @@ -47,9 +49,10 @@ PlayerSettings: usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 - resizableWindow: 0 + resizableWindow: 1 useMacAppStoreValidation: 0 gpuSkinning: 0 + graphicsJobs: 0 xboxPIXTextureCapture: 0 xboxEnableAvatar: 0 xboxEnableKinect: 0 @@ -64,7 +67,6 @@ PlayerSettings: xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 xboxEnablePIXSampling: 0 - xboxEnableEnableRenderThreadRunsJobs: 0 n3dsDisableStereoscopicView: 0 n3dsEnableSharedListOpt: 1 n3dsEnableVSync: 0 @@ -72,6 +74,7 @@ PlayerSettings: ignoreAlphaClear: 0 xboxOneResolution: 0 xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 ps3SplashScreen: {fileID: 0} videoMemoryForVertexBuffers: 0 psp2PowerMode: 0 @@ -95,14 +98,13 @@ PlayerSettings: bundleVersion: 1.0 preloadedAssets: [] metroEnableIndependentInputSource: 0 - metroEnableLowLatencyPresentationAPI: 0 xboxOneDisableKinectGpuReservation: 0 - virtualRealitySupported: 0 - productGUID: 4c7bd641802e04cafb43562bb7053c64 + singlePassStereoRendering: 0 + protectGraphicsMemory: 0 AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 15 AndroidPreferredInstallLocation: 1 - aotOptions: + aotOptions: apiCompatibilityLevel: 2 stripEngineCode: 1 iPhoneStrippingLevel: 3 @@ -116,7 +118,7 @@ PlayerSettings: StripUnusedMeshComponents: 0 VertexChannelCompressionMask: serializedVersion: 2 - m_Bits: 238 + m_Bits: 0 iPhoneSdkVersion: 988 iPhoneTargetOSVersion: 22 tvOSSdkVersion: 0 @@ -149,7 +151,7 @@ PlayerSettings: rgba: 0 iOSLaunchScreenFillPct: 100 iOSLaunchScreenSize: 100 - iOSLaunchScreenCustomXibPath: + iOSLaunchScreenCustomXibPath: iOSLaunchScreeniPadType: 0 iOSLaunchScreeniPadImage: {fileID: 0} iOSLaunchScreeniPadBackgroundColor: @@ -157,13 +159,15 @@ PlayerSettings: rgba: 0 iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 - iOSLaunchScreeniPadCustomXibPath: + iOSLaunchScreeniPadCustomXibPath: iOSDeviceRequirements: [] + iOSURLSchemes: [] + appleDeveloperTeamID: AndroidTargetDevice: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} - AndroidKeystoreName: - AndroidKeyaliasName: + AndroidKeystoreName: + AndroidKeyaliasName: AndroidTVCompatibility: 1 AndroidIsGame: 1 androidEnableBanner: 1 @@ -174,7 +178,7 @@ PlayerSettings: androidGamepadSupportLevel: 0 resolutionDialogBanner: {fileID: 0} m_BuildTargetIcons: - - m_BuildTarget: + - m_BuildTarget: m_Icons: - serializedVersion: 2 m_Icon: {fileID: 0} @@ -201,15 +205,17 @@ PlayerSettings: wiiUTVStartupScreen: {fileID: 0} wiiUGamePadStartupScreen: {fileID: 0} wiiUDrcBufferDisabled: 0 - wiiUProfilerLibPath: + wiiUProfilerLibPath: actionOnDotNetUnhandledException: 1 enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 enableCrashReportAPI: 0 - locationUsageDescription: - XboxTitleId: - XboxImageXexPath: - XboxSpaPath: + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + XboxTitleId: + XboxImageXexPath: + XboxSpaPath: XboxGenerateSpa: 0 XboxDeployKinectResources: 0 XboxSplashScreen: {fileID: 0} @@ -217,17 +223,17 @@ PlayerSettings: xboxAdditionalTitleMemorySize: 0 xboxDeployKinectHeadOrientation: 0 xboxDeployKinectHeadPosition: 0 - ps3TitleConfigPath: - ps3DLCConfigPath: - ps3ThumbnailPath: - ps3BackgroundPath: - ps3SoundPath: + ps3TitleConfigPath: + ps3DLCConfigPath: + ps3ThumbnailPath: + ps3BackgroundPath: + ps3SoundPath: ps3NPAgeRating: 12 - ps3TrophyCommId: - ps3NpCommunicationPassphrase: - ps3TrophyPackagePath: + ps3TrophyCommId: + ps3NpCommunicationPassphrase: + ps3TrophyPackagePath: ps3BootCheckMaxSaveGameSizeKB: 128 - ps3TrophyCommSig: + ps3TrophyCommSig: ps3SaveGameSlots: 1 ps3TrialMode: 0 ps3VideoMemoryForAudio: 0 @@ -236,30 +242,31 @@ PlayerSettings: ps3EnableMoveSupport: 1 ps3DisableDolbyEncoding: 0 ps4NPAgeRating: 12 - ps4NPTitleSecret: - ps4NPTrophyPackPath: + ps4NPTitleSecret: + ps4NPTrophyPackPath: ps4ParentalLevel: 1 ps4ContentID: ED1633-NPXX51362_00-0000000000000000 ps4Category: 0 ps4MasterVersion: 01.00 ps4AppVersion: 01.00 ps4AppType: 0 - ps4ParamSfxPath: + ps4ParamSfxPath: ps4VideoOutPixelFormat: 0 - ps4VideoOutResolution: 4 - ps4PronunciationXMLPath: - ps4PronunciationSIGPath: - ps4BackgroundImagePath: - ps4StartupImagePath: - ps4SaveDataImagePath: - ps4SdkOverride: - ps4BGMPath: - ps4ShareFilePath: - ps4ShareOverlayImagePath: - ps4PrivacyGuardImagePath: - ps4NPtitleDatPath: + ps4VideoOutInitialWidth: 1920 + ps4VideoOutReprojectionRate: 120 + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4NPtitleDatPath: ps4RemotePlayKeyAssignment: -1 - ps4RemotePlayKeyMappingDir: + ps4RemotePlayKeyMappingDir: ps4PlayTogetherPlayerCount: 0 ps4EnterButtonAssignment: 1 ps4ApplicationParam1: 0 @@ -275,14 +282,18 @@ PlayerSettings: ps4pnFriends: 1 ps4pnGameCustomData: 1 playerPrefsSupport: 0 + ps4UseResolutionFallback: 0 + restrictedAudioUsageRights: 0 ps4ReprojectionSupport: 0 ps4UseAudio3dBackend: 0 ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 3 ps4Audio3dVirtualSpeakerCount: 14 ps4attribCpuUsage: 0 - ps4PatchPkgPath: - ps4PatchLatestPkgPath: - ps4PatchChangeinfoPath: + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 ps4attribUserManagement: 0 ps4attribMoveSupport: 0 ps4attrib3DSupport: 0 @@ -290,37 +301,37 @@ PlayerSettings: ps4attribExclusiveVR: 0 ps4disableAutoHideSplash: 0 ps4IncludedModules: [] - monoEnv: + monoEnv: psp2Splashimage: {fileID: 0} - psp2NPTrophyPackPath: + psp2NPTrophyPackPath: psp2NPSupportGBMorGJP: 0 psp2NPAgeRating: 12 - psp2NPTitleDatPath: - psp2NPCommsID: - psp2NPCommunicationsID: - psp2NPCommsPassphrase: - psp2NPCommsSig: - psp2ParamSfxPath: - psp2ManualPath: - psp2LiveAreaGatePath: - psp2LiveAreaBackroundPath: - psp2LiveAreaPath: - psp2LiveAreaTrialPath: - psp2PatchChangeInfoPath: - psp2PatchOriginalPackage: + psp2NPTitleDatPath: + psp2NPCommsID: + psp2NPCommunicationsID: + psp2NPCommsPassphrase: + psp2NPCommsSig: + psp2ParamSfxPath: + psp2ManualPath: + psp2LiveAreaGatePath: + psp2LiveAreaBackroundPath: + psp2LiveAreaPath: + psp2LiveAreaTrialPath: + psp2PatchChangeInfoPath: + psp2PatchOriginalPackage: psp2PackagePassword: WRK5RhRXdCdG5nG5azdNMK66MuCV6GXi - psp2KeystoneFile: + psp2KeystoneFile: psp2MemoryExpansionMode: 0 psp2DRMType: 0 psp2StorageType: 0 psp2MediaCapacity: 0 - psp2DLCConfigPath: - psp2ThumbnailPath: - psp2BackgroundPath: - psp2SoundPath: - psp2TrophyCommId: - psp2TrophyPackagePath: - psp2PackagedResourcesPath: + psp2DLCConfigPath: + psp2ThumbnailPath: + psp2BackgroundPath: + psp2SoundPath: + psp2TrophyCommId: + psp2TrophyPackagePath: + psp2PackagedResourcesPath: psp2SaveDataQuota: 10240 psp2ParentalLevel: 1 psp2ShortTitle: Not Set @@ -339,19 +350,19 @@ PlayerSettings: psp2InfoBarColor: 0 psp2UseDebugIl2cppLibs: 0 psmSplashimage: {fileID: 0} - spritePackerPolicy: + spritePackerPolicy: scriptingDefineSymbols: {} metroPackageName: SDKPackage - metroPackageVersion: - metroCertificatePath: - metroCertificatePassword: - metroCertificateSubject: - metroCertificateIssuer: + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: metroCertificateNotAfter: 0000000000000000 metroApplicationDescription: SDKPackage wsaImages: {} - metroTileShortName: - metroCommandLineArgsFile: + metroTileShortName: + metroCommandLineArgsFile: metroTileShowName: 0 metroMediumTileShowName: 0 metroLargeTileShowName: 0 @@ -362,33 +373,16 @@ PlayerSettings: metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} metroSplashScreenUseBackgroundColor: 0 platformCapabilities: {} - metroFTAName: + metroFTAName: metroFTAFileTypes: [] - metroProtocolName: + metroProtocolName: metroCompilationOverrides: 1 - blackberryDeviceAddress: - blackberryDevicePassword: - blackberryTokenPath: - blackberryTokenExires: - blackberryTokenAuthor: - blackberryTokenAuthorId: - blackberryCskPassword: - blackberrySaveLogPath: - blackberrySharedPermissions: 0 - blackberryCameraPermissions: 0 - blackberryGPSPermissions: 0 - blackberryDeviceIDPermissions: 0 - blackberryMicrophonePermissions: 0 - blackberryGamepadSupport: 0 - blackberryBuildId: 0 - blackberryLandscapeSplashScreen: {fileID: 0} - blackberryPortraitSplashScreen: {fileID: 0} - blackberrySquareSplashScreen: {fileID: 0} - tizenProductDescription: - tizenProductURL: - tizenSigningProfileName: + tizenProductDescription: + tizenProductURL: + tizenSigningProfileName: tizenGPSPermissions: 0 tizenMicrophonePermissions: 0 + tizenMinOSVersion: 0 n3dsUseExtSaveData: 0 n3dsCompressStaticMem: 1 n3dsExtSaveDataNumber: 0x12345 @@ -398,26 +392,26 @@ PlayerSettings: n3dsMediaSize: 0 n3dsLogoStyle: 3 n3dsTitle: GameName - n3dsProductCode: + n3dsProductCode: n3dsApplicationId: 0xFF3FF - stvDeviceAddress: - stvProductDescription: - stvProductAuthor: - stvProductAuthorEmail: - stvProductLink: + stvDeviceAddress: + stvProductDescription: + stvProductAuthor: + stvProductAuthorEmail: + stvProductLink: stvProductCategory: 0 - XboxOneProductId: - XboxOneUpdateKey: - XboxOneSandboxId: - XboxOneContentId: - XboxOneTitleId: - XboxOneSCId: - XboxOneGameOsOverridePath: - XboxOnePackagingOverridePath: - XboxOneAppManifestOverridePath: + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: XboxOnePackageEncryption: 0 XboxOnePackageUpdateGranularity: 2 - XboxOneDescription: + XboxOneDescription: XboxOneIsContentPackage: 0 XboxOneEnableGPUVariability: 0 XboxOneSockets: {} @@ -450,22 +444,112 @@ PlayerSettings: tvOS::EnableIncrementalBuildSupportForIl2cpp: 0 tvOS::ScriptingBackend: 1 boolPropertyNames: + - Android::VR::enable + - Metro::VR::enable + - N3DS::VR::enable + - PS3::VR::enable + - PS4::VR::enable + - PSM::VR::enable + - PSP2::VR::enable + - SamsungTV::VR::enable + - Standalone::VR::enable + - Tizen::VR::enable + - WebGL::VR::enable - WebGL::analyzeBuildSize - WebGL::dataCaching - WebGL::useEmbeddedResources + - WebPlayer::VR::enable + - WiiU::VR::enable + - Xbox360::VR::enable + - XboxOne::VR::enable - XboxOne::enus + - iOS::VR::enable + - tvOS::VR::enable + Android::VR::enable: 0 + Metro::VR::enable: 0 + N3DS::VR::enable: 0 + PS3::VR::enable: 0 + PS4::VR::enable: 0 + PSM::VR::enable: 0 + PSP2::VR::enable: 0 + SamsungTV::VR::enable: 0 + Standalone::VR::enable: 0 + Tizen::VR::enable: 0 + WebGL::VR::enable: 0 WebGL::analyzeBuildSize: 0 WebGL::dataCaching: 0 WebGL::useEmbeddedResources: 0 + WebPlayer::VR::enable: 0 + WiiU::VR::enable: 0 + Xbox360::VR::enable: 0 + XboxOne::VR::enable: 0 XboxOne::enus: 1 + iOS::VR::enable: 0 + tvOS::VR::enable: 0 stringPropertyNames: + - Analytics_ServiceEnabled::Analytics_ServiceEnabled + - Build_ServiceEnabled::Build_ServiceEnabled + - Collab_ServiceEnabled::Collab_ServiceEnabled + - ErrorHub_ServiceEnabled::ErrorHub_ServiceEnabled + - Game_Performance_ServiceEnabled::Game_Performance_ServiceEnabled + - Hub_ServiceEnabled::Hub_ServiceEnabled + - Purchasing_ServiceEnabled::Purchasing_ServiceEnabled + - UNet_ServiceEnabled::UNet_ServiceEnabled + - Unity_Ads_ServiceEnabled::Unity_Ads_ServiceEnabled - WebGL::emscriptenArgs - WebGL::template - additionalIl2CppArgs::additionalIl2CppArgs - WebGL::emscriptenArgs: + Analytics_ServiceEnabled::Analytics_ServiceEnabled: False + Build_ServiceEnabled::Build_ServiceEnabled: False + Collab_ServiceEnabled::Collab_ServiceEnabled: False + ErrorHub_ServiceEnabled::ErrorHub_ServiceEnabled: False + Game_Performance_ServiceEnabled::Game_Performance_ServiceEnabled: False + Hub_ServiceEnabled::Hub_ServiceEnabled: False + Purchasing_ServiceEnabled::Purchasing_ServiceEnabled: False + UNet_ServiceEnabled::UNet_ServiceEnabled: False + Unity_Ads_ServiceEnabled::Unity_Ads_ServiceEnabled: False + WebGL::emscriptenArgs: WebGL::template: APPLICATION:Default - additionalIl2CppArgs::additionalIl2CppArgs: - cloudProjectId: - projectName: - organizationId: + additionalIl2CppArgs::additionalIl2CppArgs: + vectorPropertyNames: + - Android::VR::enabledDevices + - Metro::VR::enabledDevices + - N3DS::VR::enabledDevices + - PS3::VR::enabledDevices + - PS4::VR::enabledDevices + - PSM::VR::enabledDevices + - PSP2::VR::enabledDevices + - SamsungTV::VR::enabledDevices + - Standalone::VR::enabledDevices + - Tizen::VR::enabledDevices + - WebGL::VR::enabledDevices + - WebPlayer::VR::enabledDevices + - WiiU::VR::enabledDevices + - Xbox360::VR::enabledDevices + - XboxOne::VR::enabledDevices + - iOS::VR::enabledDevices + - tvOS::VR::enabledDevices + Android::VR::enabledDevices: + - Oculus + Metro::VR::enabledDevices: [] + N3DS::VR::enabledDevices: [] + PS3::VR::enabledDevices: [] + PS4::VR::enabledDevices: + - PlayStationVR + PSM::VR::enabledDevices: [] + PSP2::VR::enabledDevices: [] + SamsungTV::VR::enabledDevices: [] + Standalone::VR::enabledDevices: + - Oculus + Tizen::VR::enabledDevices: [] + WebGL::VR::enabledDevices: [] + WebPlayer::VR::enabledDevices: [] + WiiU::VR::enabledDevices: [] + Xbox360::VR::enabledDevices: [] + XboxOne::VR::enabledDevices: [] + iOS::VR::enabledDevices: [] + tvOS::VR::enabledDevices: [] + cloudProjectId: + projectName: + organizationId: cloudEnabled: 0 diff --git a/facebook-android-wrapper/build.gradle b/facebook-android-wrapper/build.gradle index 0b64b0922..30101d2ce 100644 --- a/facebook-android-wrapper/build.gradle +++ b/facebook-android-wrapper/build.gradle @@ -13,11 +13,11 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:2.1.3' } } -def fbSdkVersion = project.hasProperty("sdkVersion") ? sdkVersion : '4.12.0' +def fbSdkVersion = project.hasProperty("sdkVersion") ? sdkVersion : '4.16.0' repositories { // If we are doing a local build use our local dir @@ -35,9 +35,9 @@ dependencies { // not released to maven. if (project.hasProperty("localRepo")) { compile 'com.facebook.android:facebook-android-sdk:' + fbSdkVersion + '@aar' - compile 'com.android.support:support-v4:23.2.1' - compile 'com.android.support:cardview-v7:23.2.1' - compile 'com.android.support:customtabs:23.2.1' + compile 'com.android.support:support-v4:23.4.0' + compile 'com.android.support:cardview-v7:23.4.0' + compile 'com.android.support:customtabs:23.4.0' compile 'com.parse.bolts:bolts-android:1.4.0' } else { compile 'com.facebook.android:facebook-android-sdk:' + fbSdkVersion diff --git a/facebook-android-wrapper/gradle/wrapper/gradle-wrapper.properties b/facebook-android-wrapper/gradle/wrapper/gradle-wrapper.properties index 40451d683..86a618b75 100644 --- a/facebook-android-wrapper/gradle/wrapper/gradle-wrapper.properties +++ b/facebook-android-wrapper/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/facebook-android-wrapper/src/com/facebook/unity/FB.java b/facebook-android-wrapper/src/com/facebook/unity/FB.java index f0c749015..89ac61fa4 100644 --- a/facebook-android-wrapper/src/com/facebook/unity/FB.java +++ b/facebook-android-wrapper/src/com/facebook/unity/FB.java @@ -129,6 +129,24 @@ public static void Logout(String params_str) { message.send(); } + @UnityCallable + public static void loginForTVWithReadPermissions(String params_str) { + Log.v(TAG, "loginForTVWithReadPermissions(" + params_str + ")"); + Intent intent = new Intent(getUnityActivity(), FBUnityLoginActivity.class); + intent.putExtra(FBUnityLoginActivity.LOGIN_PARAMS, params_str); + intent.putExtra(FBUnityLoginActivity.LOGIN_TYPE, FBUnityLoginActivity.LoginType.TV_READ); + getUnityActivity().startActivity(intent); + } + + @UnityCallable + public static void LoginForTVWithPublishPermissions(String params_str) { + Log.v(TAG, "LoginForTVWithPublishPermissions(" + params_str + ")"); + Intent intent = new Intent(getUnityActivity(), FBUnityLoginActivity.class); + intent.putExtra(FBUnityLoginActivity.LOGIN_PARAMS, params_str); + intent.putExtra(FBUnityLoginActivity.LOGIN_TYPE, FBUnityLoginActivity.LoginType.TV_PUBLISH); + getUnityActivity().startActivity(intent); + } + @UnityCallable public static void AppRequest(String params_str) { Log.v(TAG, "AppRequest(" + params_str + ")"); diff --git a/facebook-android-wrapper/src/com/facebook/unity/FBLogin.java b/facebook-android-wrapper/src/com/facebook/unity/FBLogin.java index cb0bbb8e7..efeb841dc 100644 --- a/facebook-android-wrapper/src/com/facebook/unity/FBLogin.java +++ b/facebook-android-wrapper/src/com/facebook/unity/FBLogin.java @@ -31,6 +31,7 @@ import com.facebook.FacebookCallback; import com.facebook.FacebookException; import com.facebook.FacebookSdk; +import com.facebook.login.DeviceLoginManager; import com.facebook.login.LoginBehavior; import com.facebook.login.LoginManager; import com.facebook.login.LoginResult; @@ -39,13 +40,25 @@ public class FBLogin { public static void loginWithReadPermissions( String params, final FBUnityLoginActivity activity) { - login(params, activity, false); + login(params, activity, false, false); } public static void loginWithPublishPermissions( String params, final FBUnityLoginActivity activity) { - login(params, activity, true); + login(params, activity, true, false); + } + + public static void loginForTVWithReadPermissions( + String params, + final FBUnityLoginActivity activity) { + login(params, activity, false, true); + } + + public static void loginForTVWithPublishPermissions( + String params, + final FBUnityLoginActivity activity) { + login(params, activity, true, true); } public static void sendLoginSuccessMessage(AccessToken token, String callbackID) { @@ -82,7 +95,8 @@ public static void addLoginParametersToMessage( private static void login( String params, final FBUnityLoginActivity activity, - boolean isPublishPermLogin) { + boolean isPublishPermLogin, + boolean isDeviceAuthLogin) { if (!FacebookSdk.isInitialized()) { Log.w(FB.TAG, "Facebook SDK not initialized. Call init() before calling login()"); return; @@ -128,10 +142,17 @@ public void onError(FacebookException e) { } }); + LoginManager loginManager; + if (isDeviceAuthLogin) { + loginManager = DeviceLoginManager.getInstance(); + } else { + loginManager = LoginManager.getInstance(); + } + if (isPublishPermLogin) { - LoginManager.getInstance().logInWithPublishPermissions(activity, permissions); + loginManager.logInWithPublishPermissions(activity, permissions); } else { - LoginManager.getInstance().logInWithReadPermissions(activity, permissions); + loginManager.logInWithReadPermissions(activity, permissions); } } } diff --git a/facebook-android-wrapper/src/com/facebook/unity/FBUnityLoginActivity.java b/facebook-android-wrapper/src/com/facebook/unity/FBUnityLoginActivity.java index 0bf7ad8c2..3182db3c1 100644 --- a/facebook-android-wrapper/src/com/facebook/unity/FBUnityLoginActivity.java +++ b/facebook-android-wrapper/src/com/facebook/unity/FBUnityLoginActivity.java @@ -42,6 +42,12 @@ protected void onCreate(Bundle savedInstanceState) { case PUBLISH: FBLogin.loginWithPublishPermissions(loginParams, this); break; + case TV_READ: + FBLogin.loginForTVWithReadPermissions(loginParams, this); + break; + case TV_PUBLISH: + FBLogin.loginForTVWithPublishPermissions(loginParams, this); + break; } } @@ -51,7 +57,9 @@ public CallbackManager getCallbackManager() { public enum LoginType { READ, - PUBLISH + PUBLISH, + TV_READ, + TV_PUBLISH } } diff --git a/scripts/build.properties b/scripts/build.properties index b815b2360..e4d9d5711 100644 --- a/scripts/build.properties +++ b/scripts/build.properties @@ -15,11 +15,11 @@ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -UNITY_SDK_BUILD_VERSION='7.8.0' +UNITY_SDK_BUILD_VERSION='7.9.0' FB_ANDROID_SDK_GROUP_ID='com.facebook.android' FB_ANDROID_SDK_ARTIFACT_ID='facebook-android-sdk' -FB_ANDROID_SDK_VERSION='4.14.0' +FB_ANDROID_SDK_VERSION='4.17.0' FB_ANDROID_SDK_PACKAGING='aar' BOLTS_GROUP_ID='com.parse.bolts' BOLTS_ARTIFACT_ID='bolts-android' @@ -29,5 +29,5 @@ BOLTS_VERSION='1.4.0' BOLTS_PACKAGING='jar' SUPPORT_LIB_VERSION='23.4.0' -FB_IOS_RESOURCE_NAME='FacebookSDKs-iOS-4.14.0.zip' -FB_IOS_SDK_VERSION='4.14.0' +FB_IOS_RESOURCE_NAME='FacebookSDKs-iOS-4.17.0.zip' +FB_IOS_SDK_VERSION='4.17.0' diff --git a/scripts/build.sh b/scripts/build.sh index 13ae2d790..b9e69a343 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -22,11 +22,46 @@ . $(dirname $0)/common.sh +BUILD_TYPE="Release" +localSettings=false + +while [ $# -gt 0 ]; do + opt="$1" + shift + case $opt in + --debug) + BUILD_TYPE=Debug + ;; + --release) + ;; + --local) + localSettings=true + ;; + *) + die "Invalid arguments" + ;; + esac +done + +# Load settings +source $PROJECT_ROOT/scripts/build.properties +LOCAL_PROPS=$PROJECT_ROOT/scripts/local.properties +if [ "$localSettings" = true ]; then + if [ -f "$LOCAL_PROPS" ]; then + source $LOCAL_PROPS + else + echo "No properties file found at $LOCAL_PROPS" + fi +fi + CSPROJ_ERROR="To generate csproj files open this project in unity at least once" PROJECT_SLN=$PROJECT_ROOT/Facebook.sln UNITY_CSPROJ=$UNITY_PACKAGE_ROOT/Assembly-CSharp.csproj +ANDROID_ROOT=$PROJECT_ROOT/Facebook.Unity.Android +ANDROID_DLL=$ANDROID_ROOT/bin/Release/Facebook.Unity.Android.dll + ARCADE_ROOT=$PROJECT_ROOT/Facebook.Unity.Arcade ARCADE_DLL=$ARCADE_ROOT/bin/Release/Facebook.Unity.Arcade.dll ARCADE_NAMED_PIPE_DLL=$ARCADE_ROOT/bin/Release/FacebookNamedPipeClient.dll @@ -34,7 +69,17 @@ ARCADE_NAMED_PIPE_DLL=$ARCADE_ROOT/bin/Release/FacebookNamedPipeClient.dll EDITOR_ROOT=$PROJECT_ROOT/Facebook.Unity.Editor EDITOR_DLL=$EDITOR_ROOT/bin/Release/Facebook.Unity.Editor.dll -CORE_ROOT=$PROJECT_ROOT/Facebook.Unity +IOS_ROOT=$PROJECT_ROOT/Facebook.Unity.IOS +IOS_DLL=$IOS_ROOT/bin/Release/Facebook.Unity.IOS.dll + +SETTINGS_ROOT=$PROJECT_ROOT/Facebook.Unity.Settings +SETTINGS_DLL=$SETTINGS_ROOT/bin/Release/Facebook.Unity.Settings.dll + +IOS_STRIPPING_HACK_ROOT=$PROJECT_ROOT/Facebook.Unity.IOS.StrippingHack +IOS_STRIPPING_HACK_DLL=$IOS_STRIPPING_HACK_ROOT/bin/Release/Facebook.Unity.IOS.dll +ANDROID_STRIPPING_HACK_ROOT=$PROJECT_ROOT/Facebook.Unity.Android.StrippingHack +ANDROID_STRIPPING_HACK_DLL=$ANDROID_STRIPPING_HACK_ROOT/bin/Release/Facebook.Unity.Android.dll + CORE_DLL=$CORE_ROOT/bin/Release/Facebook.Unity.dll TEST_ROOT=$PROJECT_ROOT/Facebook.Unity.Tests @@ -47,13 +92,16 @@ sed -i "" -e "s/AssemblyVersion(\"[0-9]\.[0-9]\.[0-9]\")/AssemblyVersion(\"$UNIT "$PROJECT_ROOT/Facebook.Unity/Properties/AssemblyInfo.cs" \ "$PROJECT_ROOT/Facebook.Unity.Arcade/Properties/AssemblyInfo.cs" \ "$PROJECT_ROOT/Facebook.Unity.Editor/Properties/AssemblyInfo.cs" \ +"$PROJECT_ROOT/Facebook.Unity.iOS/Properties/AssemblyInfo.cs" \ +"$PROJECT_ROOT/Facebook.Unity.Android/Properties/AssemblyInfo.cs" \ +"$PROJECT_ROOT/Facebook.Unity.Settings/Properties/AssemblyInfo.cs" \ "$PROJECT_ROOT/Facebook.Unity.Tests/Properties/AssemblyInfo.cs" || die "Failed to update the DLL versions" ############################################################################### # BUILD SDK ############################################################################### which mono &>/dev/null || die "mono command not found. Please install mono." -xbuild /p:Configuration=Release $PROJECT_SLN || die "Facebook.sln Build Failed" +xbuild /p:Configuration=$BUILD_TYPE $PROJECT_SLN || die "Facebook.sln Build Failed" ############################################################################### # COPY DLLS @@ -63,11 +111,16 @@ if [ ! -d "$UNITY_PACKAGE_PLUGIN" ]; then fi cp $CORE_DLL $UNITY_PACKAGE_PLUGIN || die "Failed to copy core DLL" +if [ ! -d "$UNITY_ANDROID_PLUGIN" ]; then + mkdir -p $UNITY_ANDROID_PLUGIN || die "Failed to create Android plugins folder" +fi +cp $ANDROID_DLL $UNITY_ANDROID_PLUGIN || die "Failed to copy Android DLL" +cp $IOS_STRIPPING_HACK_DLL $UNITY_ANDROID_PLUGIN || die "Failed to copy ios hack DLL" + if [ ! -d "$UNITY_ARCADE_PLUGIN" ]; then mkdir -p $UNITY_ARCADE_PLUGIN || die "Failed to create Arcade plugins folder" fi cp $ARCADE_DLL $UNITY_ARCADE_PLUGIN || die "Failed to copy Arcade DLL" - cp $ARCADE_NAMED_PIPE_DLL $UNITY_ARCADE_PLUGIN || die "Failed to copy FacebookNamedPipeClient DLL" if [ ! -d "$UNITY_EDITOR_PLUGIN" ]; then @@ -75,8 +128,19 @@ if [ ! -d "$UNITY_EDITOR_PLUGIN" ]; then fi cp $EDITOR_DLL $UNITY_EDITOR_PLUGIN || die "Failed to copy Editor DLL" +if [ ! -d "$UNITY_IOS_PLUGIN" ]; then + mkdir -p $UNITY_IOS_PLUGIN || die "Failed to create IOS plugins folder" +fi +cp $IOS_DLL $UNITY_IOS_PLUGIN || die "Failed to copy IOS DLL" +cp $ANDROID_STRIPPING_HACK_DLL $UNITY_IOS_PLUGIN || die "Failed to copy android hack DLL" + +if [ ! -d "$UNITY_SETTINGS_PLUGIN" ]; then + mkdir -p $UNITY_SETTINGS_PLUGIN || die "Failed to create Settings plugins folder" +fi +cp $SETTINGS_DLL $UNITY_SETTINGS_PLUGIN || die "Failed to copy Settings DLL" + ############################################################################### # BUILD EXAMPLE ############################################################################### validate_file_exists $UNITY_PACKAGE_ROOT/Assembly-CSharp.csproj $CSPROJERROR -xbuild /p:Configuration=Release $UNITY_CSPROJ || die "Failed to build SDK DLL" +xbuild /p:Configuration=$BUILD_TYPE $UNITY_CSPROJ || die "Failed to build SDK DLL" diff --git a/scripts/common.sh b/scripts/common.sh index 473ce0770..3a2ddeee2 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -22,10 +22,15 @@ PROJECT_ROOT=$(pwd) SCRIPTS_DIR="$PROJECT_ROOT/scripts" +CORE_ROOT=$PROJECT_ROOT/Facebook.Unity + UNITY_PACKAGE_ROOT=$PROJECT_ROOT/UnitySDK UNITY_PACKAGE_PLUGIN=$UNITY_PACKAGE_ROOT/Assets/FacebookSDK/Plugins/ +UNITY_ANDROID_PLUGIN=$UNITY_PACKAGE_PLUGIN/Android/ UNITY_ARCADE_PLUGIN=$UNITY_PACKAGE_PLUGIN/Arcade/ UNITY_EDITOR_PLUGIN=$UNITY_PACKAGE_PLUGIN/Editor/ +UNITY_IOS_PLUGIN=$UNITY_PACKAGE_PLUGIN/iOS/ +UNITY_SETTINGS_PLUGIN=$UNITY_PACKAGE_PLUGIN/Settings/ SCRIPTS_DIR="$PROJECT_ROOT/scripts" @@ -33,15 +38,6 @@ RED='\033[0;31m' NC='\033[0m' CYAN='\033[0;36m' -# Load settings -source $PROJECT_ROOT/scripts/build.properties -LOCAL_PROPS=$PROJECT_ROOT/scripts/local.properties -if [ -f "$LOCAL_PROPS" ]; then - source $PROJECT_ROOT/scripts/local.properties -else - echo "No properties file found at $LOCAL_PROPS" -fi - # Extract the SDK version from FacebookSdkVersion.java SDK_VERSION_RAW=$(sed -n 's/.*"\(.*\)\";/\1/p' "$CORE_ROOT/FacebookSdkVersion.cs") SDK_VERSION_MAJOR=$(echo $SDK_VERSION_RAW | awk -F'.' '{print $1}') @@ -88,3 +84,12 @@ function validate_file_exists() { die $2 fi } + +function validate_any_file_exists() { + FILE_COUNT=$(find "$1" -name "$2" | wc -l) + + if [[ $FILE_COUNT -eq 0 ]]; then + echo "${RED}FATAL: File not found $2 ${NC}" >&2 + die $3 + fi +} diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index d526e2943..63b0f6275 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -27,9 +27,11 @@ $SCRIPTS_DIR/build.sh || die "Build failed" which mono &>/dev/null || die "mono command not found. Please install mono." +NSUBSTITUTE_CONSOLE="$PROJECT_ROOT/packages/NSubstitute.1.10.0.0/lib" NUNIT_CONSOLE="/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/nunit-console.exe" TEST_DLL="$PROJECT_ROOT/Facebook.Unity.Tests/bin/Release/Facebook.Unity.Tests.dll" +validate_any_file_exists $NSUBSTITUTE_CONSOLE "NSubstitute.dll" "Make sure NSubstitute is installed at /packages" validate_file_exists $NUNIT_CONSOLE "Make sure mono is installed at this path" validate_file_exists $TEST_DLL "Make sure that the Unity Project successfully built" diff --git a/scripts/setup.sh b/scripts/setup.sh index 071c827a4..a439c9314 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -22,8 +22,13 @@ . $(dirname $0)/common.sh -buildAndCopyCore -buildAndCopyPlatformDLLs +which nuget &>/dev/null || die "nuget command not found. Please install nuget." +echo "checking packages..." +nuget restore $PROJECT_ROOT +echo "checking packages done." $SCRIPTS_DIR/setup_ios_unity_plugin.sh "$@" || die "Failed to setup the ios sdk plugin" $SCRIPTS_DIR/setup_android_unity_plugin.sh "$@" || die "Failed to build the android sdk plugin" + +cd $SCRIPTS_DIR +./build.sh diff --git a/scripts/setup_android_unity_plugin.sh b/scripts/setup_android_unity_plugin.sh index c06989c7a..695ae9d05 100755 --- a/scripts/setup_android_unity_plugin.sh +++ b/scripts/setup_android_unity_plugin.sh @@ -19,6 +19,9 @@ . $(dirname $0)/common.sh +PROPS_PATH="$PROJECT_ROOT/scripts/build.properties" +source $PROPS_PATH + info "Starting build" # Check for required settings if [ -z "$ANDROID_HOME" ]; then @@ -52,6 +55,11 @@ BOLTS_APPLINKS_JAR_PATH="$FB_WRAPPER_LIB_PATH/$BOLTS_APPLINKS_SDK_JAR_NAME" ANDROID_SUPPORT_LIB_PATH="$ANDROID_HOME/extras/android/m2repository/com/android/support/support-v4/$SUPPORT_LIB_VERSION/support-v4-$SUPPORT_LIB_VERSION.aar" ANDROID_CARDVIEW_LIB_PATH="$ANDROID_HOME/extras/android/m2repository/com/android/support/cardview-v7/$SUPPORT_LIB_VERSION/cardview-v7-$SUPPORT_LIB_VERSION.aar" +ANDROID_APP_COMPAT_LIB_PATH="$ANDROID_HOME/extras/android/m2repository/com/android/support/appcompat-v7/$SUPPORT_LIB_VERSION/appcompat-v7-$SUPPORT_LIB_VERSION.aar" +ANDROID_CUSTOMTABS_LIB_PATH="$ANDROID_HOME/extras/android/m2repository/com/android/support/customtabs/$SUPPORT_LIB_VERSION/customtabs-$SUPPORT_LIB_VERSION.aar" +ANDROID_ANNOTATIONS_LIB_PATH="$ANDROID_HOME/extras/android/m2repository/com/android/support/support-annotations/$SUPPORT_LIB_VERSION/support-annotations-$SUPPORT_LIB_VERSION.jar" +ANDROID_SUPPORT_VECTOR_DRAWABLE_LIB_PATH="$ANDROID_HOME/extras/android/m2repository/com/android/support/support-vector-drawable/$SUPPORT_LIB_VERSION/support-vector-drawable-$SUPPORT_LIB_VERSION.aar" +ANDROID_ANIMATED_VECTOR_DRAWABLE_LIB_PATH="$ANDROID_HOME/extras/android/m2repository/com/android/support/animated-vector-drawable/$SUPPORT_LIB_VERSION/animated-vector-drawable-$SUPPORT_LIB_VERSION.aar" # Local build only properties FB_ANDROID_SDK_AAR="$FB_ANDROID_SDK_PATH/facebook/build/outputs/aar/facebook-release.aar" @@ -65,7 +73,7 @@ pushd "$FB_WRAPPER_LIB_PATH" || die "Cannot navigate to directory $FB_WRAPPER_LI find . ! -name $BOLTS_SDK_JAR_NAME ! -name $FB_SDK_AAR_NAME -maxdepth 1 -type f -delete popd -info "Step 2 - Get depenancies for android wrapper" +info "Step 2 - Get dependencies for android wrapper" info "Step 2.1.0 - Download $BOLTS_SDK_JAR_NAME" if [ ! -f "$BOLTS_JAR_PATH" ]; then downloadFromMaven $BOLTS_GROUP_ID $BOLTS_ARTIFACT_ID $BOLTS_PACKAGING $BOLTS_VERSION "$BOLTS_JAR_PATH" || die "Failed to download from maven" @@ -108,6 +116,11 @@ fi info "Step 2.3 - Coping support lib" cp "$ANDROID_SUPPORT_LIB_PATH" $FB_WRAPPER_LIB_PATH || die "Failed to copy '$ANDROID_SUPPORT_LIB_PATH'" cp "$ANDROID_CARDVIEW_LIB_PATH" $FB_WRAPPER_LIB_PATH || die "Failed to copy '$ANDROID_CARDVIEW_LIB_PATH'" +cp "$ANDROID_APP_COMPAT_LIB_PATH" $FB_WRAPPER_LIB_PATH || die "Failed to copy '$ANDROID_APP_COMPAT_LIB_PATH'" +cp "$ANDROID_CUSTOMTABS_LIB_PATH" $FB_WRAPPER_LIB_PATH || die "Failed to copy '$ANDROID_CUSTOMTABS_LIB_PATH'" +cp "$ANDROID_ANNOTATIONS_LIB_PATH" $FB_WRAPPER_LIB_PATH || die "Failed to copy '$ANDROID_ANNOTATIONS_LIB_PATH'" +cp "$ANDROID_SUPPORT_VECTOR_DRAWABLE_LIB_PATH" $FB_WRAPPER_LIB_PATH || die "Failed to copy '$ANDROID_SUPPORT_VECTOR_DRAWABLE_LIB_PATH'" +cp "$ANDROID_ANIMATED_VECTOR_DRAWABLE_LIB_PATH" $FB_WRAPPER_LIB_PATH || die "Failed to copy '$ANDROID_ANIMATED_VECTOR_DRAWABLE_LIB_PATH'" info "Step 3 - Build android wrapper" pushd $FB_WRAPPER_PATH @@ -140,6 +153,11 @@ if [ "$localBuild" = false ]; then cp $BOLTS_APPLINKS_JAR_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy bolts app links jar to unity plugin folder' cp $ANDROID_SUPPORT_LIB_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy support lib to unity plugin folder' cp $ANDROID_CARDVIEW_LIB_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy cardview support lib to unity plugin folder' + cp $ANDROID_APP_COMPAT_LIB_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy appcompat support lib to unity plugin folder' + cp $ANDROID_CUSTOMTABS_LIB_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy customtabs support lib to unity plugin folder' + cp $ANDROID_ANNOTATIONS_LIB_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy annotations support lib to unity plugin folder' + cp $ANDROID_SUPPORT_VECTOR_DRAWABLE_LIB_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy support vector drawable support lib to unity plugin folder' + cp $ANDROID_ANIMATED_VECTOR_DRAWABLE_LIB_PATH $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy animated vector drawable support lib to unity plugin folder' else cp $FB_WRAPPER_LIB_PATH/* $UNITY_PLUGIN_FACEBOOK || die 'Failed to copy wrapper lib files' fi