There is a crash when I use MimeKit in Xamrain.IOS - xamarin.ios

Intalled the Mime Kit and MailKit to packages folder of xamrion.IOS, and try to use them to send an email. It works, but there is a crash when running new MimeMessage()
How to fix this issue.
I am a super beginner with IOS AND Xamarin, thanks very much for your help.
About 6 or 7 lines unable to locate assembly 'I18N' (culture:'')
Log:
2017-07-27 16:18:05.103 AAAA.iOS[523:215341] Xamarin.iOS: Unable to locate assembly 'I18N' (culture: '')
async public void sentEmail(string fileName, string addressEmail)
{
var message = new MimeMessage();
System.Diagnostics.Debug.WriteLine(" SendMail MimeMessage ");

First off, if you are using the simulator you will not be able to send emails using anything that depends on Apple's mail app because it is not installed on the simulator.
If that's not the case, i would recommend using UIMessage instead. Xamarin has great documentation on how to create a pop over view to compose an email and send wit from inside your custom application.
EDIT:
here is the the link to the Xamarin tutorial on sending emails.

You need to go into your iOS Project Options -> iOS Build options and then enable the i18n assemblies to be included.

Related

GCM With Xamarin.ios

I have implemented GCM with Xamarin.ios , I am able to get Device Token and GCM ID , But i am not able to recive Notification sent by Push sharp library . I am seeing log and i am getting below issue.Can this be reason of not receiving notification ?. Also we are new in Xamarin ,It will be hlpful if somebody can help us with podfile.
You have enabled the CloudMessaging service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/CloudMessaging" or you may need to run pod update in your project directory.
You need to add this component and implement it in your AppDelegate There are code examples of how to do so in the Getting Started section.
You need to add this component and implement it in your AppDelegate There are code examples of how to do so in the Getting Started section.

How to programmatically open the Bluetooth settings in iOS 10

I'm trying to access the Bluetooth settings through my application using swift.how can access bluetooth setting?
Xcode version - 8.0
swift - 2.3
iOS - 10
func openBluetooth(){
let url = URL(string: "App-Prefs:root=Bluetooth") //for bluetooth setting
let app = UIApplication.shared
app.openURL(url!)
}
Swift 3.0: working up to iOS 10
Note: This URL is "private API". The app will be rejected by App Store reviewers if used.
You will not be able to use the solution by #Siddharth jain. The Problem: The app will be rejected by Apple with a warning that you should never use non-public APIs anymore. Otherwise, you could risk your developer program.
As far as I know, all you can do is open the iPhone settings in general (or get lead to your app settings if there are some. To do so you need the following code
guard let url = URL(string: UIApplication.openSettingsURLString) else {
// Handling errors that should not happen here
return
}
let app = UIApplication.shared
app.open(url)
By this, you will always get a URL you can use without any problems with apple review.
Until now you cannot access to bluetooth settings from your app from iOS 10.
you can see the following link to keep your mind at peace.
https://forums.developer.apple.com/message/146658#146658
Opening the Settings app from another app
Now that iOS 15 seemed to have broken auto-reconnect for known Bluetooth devices (other than audio gadgets), it's extremely annoying. If someone finds a solution, App Store-safe or not, I'm all ears.

Xamarin iOS HockeyApp best practice setup?

I'm attempting to get HockeyApp to work in my iOS Xamarin Forms app. I installed the iOS HockeyApp component (v4.1.0), and the getting started information for shows the following:
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
var manager = BITHockeyManager.SharedHockeyManager;
manager.Configure("Your_App_Id");
manager.StartManager();
}
When I try this, BITHockeyManager.SharedHockeyManager is null.
I've tried to wrap these lines in HockeyApp.Setup.EnableCustomCrashReporting() and Setup.EnableCustomCrashReporting() as is referenced in this post, but Setup doesn't exist in the namespaces I have.
What am I missing to properly enable HockeyApp in iOS?
Whoo hoo! Figured it out finally! I had the linker options set to link 'All assemblies' because of a suggestion from the New type registrar in Xamarin.iOS 7.2.1, errors MT5210 and MT5211 thread. I was seeing the 'Native linking failed...' error and switching to 'All assemblies' initially fixed it.
Switching to 'Link SDK assemblies only' fixed both problems

error during installation android app

i have an application that collect the motiondata from (accelermeter and gyrscope sensors ) of the android phone and smartwatches at same time). i have problem , when i install the App on the phone i got this error
E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
E/GMPM: Scheduler not set. Not logging error/warn.
E/GMPM: Uploading is not possible. App measurement disabled
the App is designed to collect only five min of the user's motion data and then stop automatically and send the data from the watch to the phone.then finally the phone send the data to my email. howover , the current problem the app doesnt stop in the watch and didnt send the data to the phone .
could i get anyhelp please ?
with my respect.
I have same issue , just add this to string.xml
<string name="google_app_id">your app id</string>
You need to place the configuration file generated by this link
And then as quoted in step 3:
Copy the google-services.json file you just downloaded into the "app"
directory of your Android

Calling Office Communicator via Silverlight Out of Browser

I need to invoke office communicator to create a chat window and phone call directly from Silverlight when running out of browser. When running in browser I do this and it works pretty well:
System.Windows.Browser.HtmlPage.Window.Eval(String.Format("window.open(\"sip:{0}\", target=\"_self\");", sip));
When running out of browser as far as I have gotten is to invoke the Communicator.UIAutomation via a dynamic but honestly I don't know what to do next.
dynamic communicator = AutomationFactory.CreateObject("Communicator.UIAutomation");
Anyone have any suggestions on how to make this work? Searching has yeilded zero results.
A couple thoughts:
Have you tried making the automated Communicator object a var, then setting a breakpoint and digging into the resulting hydrated object? You might find some methods or properties on the object you can use to make things happen.
There's a blog here that describes the Office Communicator SDK and has some sample projects. I think you might be able to include the SDK assemblies in your OOB app and automate Communicator using Microsoft's provided SDK.
The SDK has to be preinstalled in the user machines. There's no easy way to deploy it along your Silvelright OOB application.
You will need the SDK.
You can check the documentation for more details here: C:\Program Files (x86)\Microsoft Office Communicator\SDK\OCSDK.chm
It mainly refers to C#, but most of it could easily be ported to Com Automation. As an example look at the following code to start a conversation
dynamic comm = new ActiveXObject("Communicator.UIAutomation");
dynamic msgrAdv = comm.IMessengerAdvanced;
if(msgrAdv!=null)
{
try
{
object obj = msgrAdv.StartConversation(
1, //CONVERSATION_TYPE.CONVERSATION_TYPE_IM,
sipUris, // object array of signin names
null,
"Testing",
"1",
null);
windowHandle = long.Parse(obj.ToString());
}
catch (COMException ex)
{
this.writeToTextBox(
formReturnErrors.returnComError(ex.ErrorCode)
);
}
I hope this help. Noticed that from the example in the help file I changed some of the members that are defined in the .NET Assembly (which can't be referenced from your C# code). If you need this, I would suggest opening the CommunicatorAPI.dll assembly in Reflector.

Resources