This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Source: http://davidsonblake.wordpress.com/2014/05/29/send-mms-with-image-attachment-using-xamarin-ios/ | |
void SendMMS () | |
{ //Init View Controller | |
var messageController = new MFMessageComposeViewController (); | |
//Verify app can send text message | |
if(MFMessageComposeViewController.CanSendText) | |
{ | |
messageController.Body = "Here's an image for u 2 n joy."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void ReceivedRemoteNotification (UIApplication application, NSDictionary userInfo) | |
{ | |
processNotification(userInfo, false); | |
} | |
void processNotification(NSDictionary options, bool fromFinishedLaunching) | |
{ | |
//Check to see if the dictionary has the aps key. This is the notification payload you would have sent | |
if (null != options && options.ContainsKey(new NSString("aps"))) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using MonoTouch; | |
using MonoTouch.AVFoundation; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string GetSSID(bool withMacAddress = true) | |
{ | |
try { | |
NSDictionary dict; | |
var status = CaptiveNetwork.TryCopyCurrentNetworkInfo ("en0", out dict); | |
if (status == StatusCode.NoKey) | |
return ""; | |
var bssid = dict [CaptiveNetwork.NetworkInfoKeyBSSID]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async void Demo () | |
{ | |
switch (await ShowAlert ("Title", "Message", "Ok", "Cancel")){ | |
case 0: // Ok | |
.... | |
case 1: // Cancel | |
.... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int SystemVersion = Convert.ToInt16(UIDevice.CurrentDevice.SystemVersion.Split ('.') [0].ToString ()); | |
if (SystemVersion >= 7) { | |
this.EdgesForExtendedLayout = UIRectEdge.None; | |
this.AutomaticallyAdjustsScrollViewInsets = false; | |
this.ExtendedLayoutIncludesOpaqueBars = false; | |
} | |
or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIApplication.SharedApplication.OpenUrl(new NSUrl("itms-apps://itunes.apple.com/app/idAPP_ID")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using System.Threading.Tasks; | |
namespace BasicTable { | |
public class TableSource : UITableViewSource { | |
protected string[] tableItems; | |
protected string cellIdentifier = "TableCell"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://handleopenurl.com & http://www.wiki.akosma.com/IPhone_URL_Schemes#Phone | |
tel - telephone (http://handleopenurl.com/scheme/phone) | |
html ex: <a href="tel:0031204637000">Call us</a> | |
native ex1: tel:0031204637000 | |
native ex2: telprompt:########## | |
Apple Settings App (http://handleopenurl.com/scheme/apple-settings-app) | |
native ex: prefs:root=General&path=Bluetooth | |
html ex: <a href="prefs:root=AIRPLANE_MODE">Switch to airplane mode</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aps-environment - Receive push notifications in iOS | |
The entitlement key is different for iOS than it is for OS X. On either platform, however, | |
the provisioning portal assigns a value of development or production to the key, depending | |
only on which activity you are creating the provisioning profile for. | |
http://developer.apple.com/library/ios/#documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingLocalAndPushNotifications.html#//apple_ref/doc/uid/TP40011195-CH3-SW1 |