• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by HeretixDarx · May 09, 2017 at 05:47 AM · build-error

AWS Sdk Not Working in IOS

I'm about at my wits end with this issue, and I just can't wrap my head around what I am doing wrong. I have my unity project configured to use Facebook sdk as an identity provider for AWS. In the editor on my pc my login and connecting to AWS resources works perfectly, in my android build from my pc again, everything works perfectly. I have a copy of my project on my MacBook Pro and once again everything in the editor works perfectly. However, when I build my project and then compile in xccode my Facebook login is successful, but I get an exception when trying to connect to was cognate identity.

This is the error I get:

Connecting AWS Error during aws: System.TypeInitializationException: The type initializer for 'Amazon.CognitoIdentity.AmazonCognitoIdentityConfig' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Amazon.Util.Internal.InternalSDKUtils' threw an exception. ---> System.NullReferenceException: A null value was found where an object instance was required. at Amazon.Runtime.Internal.Util.InternalLog4netLogger..ctor (System.Type declaringType) [0x00000] in :0 at Amazon.Runtime.Internal.Util.Logger..ctor (System.Type type) [0x00000] in :0 at Amazon.Runtime.Internal.Util.Logger.GetLogger (System.Type type) [0x00000] in :0 at Amazon.Util.Internal.InternalSDKUtils..cctor () [0x00000] in :0 at Amazon.CognitoIdentity.AmazonCognitoIdentityConfig..cctor () [0x00000] in :0 at Amazon.CognitoIdentity.AmazonCognitoIdentityClient..ctor (Amazon.Runtime.AWSCredentials credentials, Amazon.RegionEndpoint region) [0x00000] in :0 at Amazon.CognitoIdentity.CognitoAWSCredentials..ctor (System.String accountId, System.String identityPoolId, System.String unAuthRoleArn, System.String authRoleArn, Amazon.RegionEndpoint region) [0x00000] in :0 at ServerData.ConnectAWS () [0x00000] in :0 at Facebook.Unity.CallbackManager.TryCallCallback[T] (System.Object callback, IResult result) [0x00000] in :0 at Facebook.Unity.CallbackManager.CallCallback (System.Object callback, IResult result) [0x00000] in :0 at Facebook.Unity.CallbackManager.OnFacebookResponse (IInternalResult result) [0x00000] in :0 --- End of inner exception stack trace --- at Amazon.CognitoIdentity.AmazonCognitoIdentityConfig..cctor () [0x00000] in :0 at Amazon.CognitoIdentity.AmazonCognitoIdentityClient..ctor (Amazon.Runtime.AWSCredentials credentials, Amazon.RegionEndpoint region) [0x00000] in :0 at Amazon.CognitoIdentity.CognitoAWSCredentials..ctor (System.String accountId, System.String identityPoolId, System.String unAuthRoleArn, System.String authRoleArn, Amazon.RegionEndpoint region) [0x00000] in :0 at ServerData.ConnectAWS () [0x00000] in :0 at Facebook.Unity.CallbackManager.TryCallCallback[T] (System.Object callback, IResult result) [0x00000] in :0 at Facebook.Unity.CallbackManager.CallCallback (System.Object callback, IResult result) [0x00000] in :0 at Facebook.Unity.CallbackManager.OnFacebookResponse (IInternalResult result) [0x00000] in :0 --- End of inner exception stack trace --- at Amazon.CognitoIdentity.AmazonCognitoIdentityClient..ctor (Amazon.Runtime.AWSCredentials credentials, Amazon.RegionEndpoint region) [0x00000] in :0 at Amazon.CognitoIdentity.CognitoAWSCredentials..ctor (System.String accountId, System.String identityPoolId, System.String unAuthRoleArn, System.String authRoleArn, Amazon.RegionEndpoint region) [0x00000] in :0 at ServerData.ConnectAWS () [0x00000] in :0 at Facebook.Unity.CallbackManager.TryCallCallback[T] (System.Object callback, IResult result) [0x00000] in :0 at Facebook.Unity.CallbackManager.CallCallback (System.Object callback, IResult result) [0x00000] in :0 at Facebook.Unity.CallbackManager.OnFacebookResponse (IInternalResult result) [0x00000] in :0

Every search I can find on this issue point to saying this is a stripping issue during the build process to IOS, and that I must include a link.xml in my assets folder to combat this. I have tried every variation of suggested formats for this link.xml, and none have seemed to work. Here is my link.xml currently:

 <linker>
       <!-- if you are using AWSConfigs.HttpClient.UnityWebRequest option-->
 
   <assembly fullname="UnityEngine">
       <type fullname="UnityEngine.Networking.UnityWebRequest" preserve="all" />
       <type fullname="UnityEngine.Networking.UploadHandlerRaw" preserve="all" />
       <type fullname="UnityEngine.Networking.UploadHandler" preserve="all" />
       <type fullname="UnityEngine.Networking.DownloadHandler" preserve="all" />
       <type fullname="UnityEngine.Networking.DownloadHandlerBuffer" preserve="all" />
   </assembly>
   
   <assembly fullname="mscorlib">
       <namespace fullname="System.Security.Cryptography" preserve="all"/>
   </assembly>
 
   <assembly fullname="System">
       <namespace fullname="System.Security.Cryptography" preserve="all"/>
   </assembly>
 
   <assembly fullname="AWSSDK.Core" preserve="all">
     <type fullname ="Amazon.*" preserve = "all" />
       <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
   </assembly>
   <assembly fullname="AWSSDK.CognitoIdentity" preserve="all">
       <type fullname ="Amazon.*" preserve = "all" />
       <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
   </assembly>
   <assembly fullname="AWSSDK.CognitoSync" preserve="all">
     <type fullname ="Amazon.*" preserve = "all" />
     <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
   </assembly>
   <assembly fullname="AWSSDK.IdentityManagement" preserve="all">
     <type fullname ="Amazon.*" preserve = "all" />
     <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
   </assembly>
   <assembly fullname="AWSSDK.SecurityToken" preserve="all">
     <type fullname ="Amazon.*" preserve = "all" />
     <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
   </assembly>
   <assembly fullname="AWSSDK.DynamoDBv2" preserve="all">
     <type fullname ="Amazon.*" preserve = "all" />
     <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
   </assembly>
   <assembly fullname="AWSSDK.Lambda" preserve="all">
     <type fullname ="Amazon.*" preserve = "all" />
     <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
   </assembly>
 </linker>

I really don't know what else to try or do, so any help would be appreciated.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image umerPC · Jun 11, 2018 at 03:45 PM 0
Share

I Have a similiar issue, $$anonymous$$e is related to AWSConfigs. It seems to fail when fetching the aws configurations from awsconfigs.xml.

avatar image AdamBebko · Nov 26, 2020 at 07:05 PM 0
Share

Did you ever solve this? I'm having the same issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by umerPC · Dec 01, 2020 at 03:05 PM

@AdamBebko I managed to fix this, posted my solution in another post post2.

Try the following: 1) add this to link.xml

<assembly fullname="System.Configuration" preserve="all"/> <method name=".ctor"/> </type> <type fullname="System.ComponentModel.ReferenceConverter"> <method signature="System.Void .ctor(System.Type)" /> </type> </assembly>

2) Add the following dlls from C:\Program Files\Unity\Hub\Editor\2018.4.8f1\Editor\Data\MonoBleedingEdge\lib\mono\unityjit to Assets/Plugins/iOS

 -System.Configuration.dll
 -System.Core.dll


Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AdamBebko · Dec 01, 2020 at 04:54 PM 0
Share

Thanks, I did that, And it now crashes on boot with

NotSupportedException: System.Web.UI.WebResourceAttribute::set_CdnSupportsSecureConnection at System.Web.UI.WebResourceAttribute.set_CdnSupportsSecureConnection (System.Boolean value) [0x00000] in :0 at System.$$anonymous$$onoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) [0x00000] in :0 at System.$$anonymous$$onoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) [0x00000] in :0 at System.Attribute.GetCustomAttributes (System.Reflection.Assembly element, System.Type attributeType, System.Boolean inherit) [0x00000] in :0 at System.Reflection.CustomAttributeExtensions.GetCustomAttributes[T] (System.Reflection.Assembly element) [0x00000] in :0 at Unity.Entities.Type$$anonymous$$anager.InitializeAllComponentTypes () [0x00000] in :0

and many more lines of errors.

Any ideas?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

103 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to solve this build Error? 1 Answer

Unity 2019.3.9f1 WebGL build error TypeLoadException when making release build 3 Answers

Unable to build Google VR app for Android 0 Answers

Texture importer API doesn't work on build exe 0 Answers

When building on WebGL there is an error, 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges