Xamarin Active Directory using native library, storyboard issue - ios

I'm using the Active Directory Authentication Library as found here I've then created a binding project in Xamarin and then created some login code to manage logins to our app via ADAL.
Everything was working fine until I moved the app to a Unified app. Ever since doing that when I try to authenticate, I get the following error:
The required resource bundle could not be loaded. Please read the ADALiOS readme on how to build your application with ADAL provided authentication UI resources.
I have the required storyboards as part of the main iOS app, but for some reason the ADAL library can't seem to find them in the main bundle.
Any insight greatly appreciated!

James, did you try ADAL v3? It supports Xamarin natively, without the need of using bindings against the native ADALs. Although bindings are technically possible, we consider ADAL v3 to be the main way in which we support Xamarin integration.
Please see https://azure.microsoft.com/en-us/documentation/samples/active-directory-dotnet-native-multitarget/ for an example. ADAL v3 is still in preview, but we are working hard to release it ASAP.

For the record, for whatever reason, just adding the Storyboard to the iOS Xamarin project doesn't seem to work any more. If you add the compiled ADALiOS.bundle from the ObjC library to you Xamarin project, it will work.
You add it by selecting add files from folders in Xamarin Studio and selecting the folder directly above the .bundle file in the output tree.
Makes sense I guess.

Related

iOS Embedded Framework with Embedded Framework

I'm working on a framework which embeds another framework (from CocoaPods) for error logging on iOS. This is working very well, and I can embed such a framework in an iOS application for testing, codesign everything, and debug on my own device easily. Unfortunately, when attempting to upload such an application to Apple for distribution, I get an error message as such:
Invalid Bundle. The bundle at '<myapp>.app/Frameworks/<myframework>.framework' contains disallowed file 'Frameworks'. With error code STATE_ERROR.VALIDATION_ERROR.90206 for id ***
I'm not sure if this message indicates that I'm not allowed to embed a framework in another framework or what. It seems the automatic codesigning Xcode is doing is not recursing to the deepest embedded framework upload (I have a script to manually sign everything on build). Does anyone have experience with an error like this or know where to look? It seems others have asked questions about embedding frameworks in other frameworks before, but most of these are how to get linking to work or how to properly reference these nested frameworks. My issue is specifically if I am allowed to upload such things to test flight/the app store, and how to do so if it is possible. Most people having this issue seem to have disabled swift support, but none of the projects I'm using have swift code.
Nested bundle cannot include a framework. You can check this apple document.
iOS and tvOS support frameworks and Swift system libraries at the topmost app level; a nested bundle, like an app extension, can’t include a framework.
And there is a warning block that worth being noticed:
If you put content in the wrong location, you may encounter hard-to-debug code signing and distribution problems. These problems aren’t always immediately obvious. For example, when building a Mac app, incorrectly placed code might work during day-to-day development, but might cause problems during notarization.
So that is the reason everything seems normal while running in debug mode but failed at distribution.

Flash Builder SDK issues

So I needed to install a new SDK to use the Compass ANE that I purchased. Which I did and the issue that I had with it was that the "TabbedViewNavigatorApplication" was not a supported component. So, after some research, the problem was with the new framework file. I took the framework file from the original 4.6.0 (file location shown below):
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks
and put that in the new SDK file. This fixed this issue but now I have another issue where the old code I had working has now broken.
GeolocationEvent.UPDATE is no longer being called
Camera.setMode() causes a crash
UIComponent.addChild(Video) causes a crash
I am able to run the program with no errors.
Event is not being triggered for Geolocation in Flex
This person had a similar problem to me and he says he fixed his issue but I can't work out what he did:
I worked out the ultimate cause of this specific problem. It stems from Flash Builder not installing the complete Android SDK or the IOS SDK. Once I manually installed these by copying the SDK folders to their correct paths in Adobe Flash Builder, my GPS events were called successfully.
To sum up, if you get this trouble where the code and everything looks alright but it wont call up your events, then check to make sure that your latest SDKs for Flex are installed correctly for Android and or iOS
I haven't done any work with flex SDKs and if anyone can either recommend a place to download one which supports these features or has any advice on how to fix my issue I would be most grateful.
Solved issue. In case anyone looks for this, my old SDK would allow me to run the app from a device without requesting for permission for geolocation event. The new SDk forces you to use the permission status event.
Makes sense to me now. Just wish I had an error pop up asking for permission rather than just doing nothing.

Firebase storage download trouble in iOS device (Unity)

I met unknown trouble trying to setup firebase storage for iOS. I can't download even 1 file in device, but it runs perfectly in Editor.
I am using reference.GetFileAsync() method. Firstly I assumed that I made some wrong package setup or some other silly mistake, but I checked it many-many times. Each Quickstart project here works well on my end. My current project settings and firebase storage settings are identical to provided test examples I run in iOS device successfully.
Here is a xCode output trying to download the file. That is looped and contains only that info: codeshare
Any of logs googling doesn't give me any solution or even idea.
Please, give me some thoughts where to search the problem.. I am totally confused.
I am using MacOSx, Unity 5.5.0/5.5.1, latest Firebase Unity SDK (v1.1.2)
The reason was that firebase database package automatically changed from .NET Subset to .NET option. Changing back solved the problem. But anyway, that means we can't use firebase storage + database in same iOS project in Unity.. That's bad
Firebase Developer here. I'm sorry you encountered this error and I can confirm this was a regression from our initial build in January. This issue has since been resolved in the latest version of Firebase Storage for Unity (3.0.0.0) released for general availability for mobile at GDC.
The latest version will work with the full .Net SDK which is also required for the realtime database in Unity.

How to integrate GTM with Firebase analytics enabled Application which developed using Xamarin Android platform

I am developing Mobile application using Xamarin Android. We have integrated Firebase portal with our application successfully. Also we are able to see all automated event and custom event on Dashboard in firebase Console.
Now my requirement is to integrate Google Tag Manager(GTM) SDK with existing Firebase SDK in my application. I tried to integrate by following some below links
https://developers.google.com/tag-manager/android/v5/
https://github.com/IdoTene/XamarinTagManagerAndroid
but ended up with build error Invalid Resource file Name for GTM configuration file(GTM-XXXX.json).
So here is my question, How to integrate GTM SDK with Firebase SDK in Xamarin Android application.
Please any help would be greatly appreciated.
I don't know if you figured it out eventually, but for future reference, the problem is that the IdoTene tagmanager project is for tagmanager v4, which is pre firebase. Instead you should use the version that Xamarin maintains:
https://www.nuget.org/packages/Xamarin.GooglePlayServices.TagManager/
The steps are very simple. Integrate GTM containers (ios and android) as follows:
For Android -> create subfolder in assets folder and name it as containers, copy container in it (make sure it's naming starts with GTM-xxxxxx.json).
For iOS -> create a folder container in the root directory and copy GTM container json there (GTM-xxx.json)
Then install Xamarin.GooglePalyServices.TagManager nuget for Android and Xamarin.Google.iOS.Tagmanger for iOS.
Thats it for Android, but for iOS, there is a one more step.
Integrate following code in AppDelegate.cs
Google.TagManager.TagManager.Configure();
Then you should be good to go!! :)

Building Facebook With Latest iOS SDK for ARC and Multiple Developers

I'm attempting to upgrade from Facebook SDK 2.0 to 3.0 and I'm having basically the same issue as is mentioned in this thread: XCode & Facebook IOS SDK - Instructions incorrect but with a slightly different goal I think.
I'm using the instructions here: http://developers.facebook.com/docs/mobile/ios/build/
When I try to build the static library, I get a "no such file or directory" message. I checked, and sure enough, there is no build_facebook_ios_sdk_static_lib.sh file in the "scripts" directory when I try to execute it.
Here's my dilemma. We have multiple developers on the project (and some other members who basically know how to pull down and build within Xcode but that's about it), and I don't want to require all of them to install the Facebook SDK. Same for a build machine (though in that instance I suppose we could install the SDK directly on the build machine).
It sounds like building a static library has been effectively deprecated, or maybe I'm missing something, but what I really need to just get all the pertinent code into our repository, and in a form in which anyone can just pull it down and build. Is this possible with the 3.0 SDK, and if so, what would be the steps to do that?
Thanks!
For the Facebook SDK 3.1 (latest from 3.0) you should not follow the old instructions, instead check these instructions out:
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/

Resources