Exploring HealthKit With Xamarin: Provisioning and Permissions Illustrated Walkthrough
One of the more interesting frameworks in iOS 8 is Health Kit, system-wide persistent storage for health-related information. I'm just beginning to explore the namespace myself, but thought I'd walk through the steps you need to manipulate Health Kit with Xamarin.
Because health-related information is so sensitive, developing for Health …
more ...The Protocol Pattern
In C# (and F#), one can define extension methods on interfaces. These extension methods can have implementations, which can be used as default implementations for implementors of the extension. I haven't heard a name for this technique.
Example:
[code lang="csharp"]
interface IFoo
{
}
static class IFoo_Extensions
{
public static void …
Local Notifications in iOS 8 With Xamarin
As of iOS 8, the user has to provide explicit permission for apps to respond to local notifications. This means that now, the first time the program is run, you need to run code such as:
[code lang="fsharp"]
//F#
UIUserNotificationSettings.GetSettingsForTypes(
UIUserNotificationType.Alert
||| UIUserNotificationType.Badge
||| UIUserNotificationType.Sound,
new NSSet …
F# For Scripting
It's F# Week at Xamarin. Also, in the US, it's only a 4-day work-week. F# saves 20% of your time. QED.
Anyway, I don't have any actually interesting F# to share, but I recommend:
- Mike Bluestein's Scene Kit in F# demo, and
- Frank Kreuger's awesome demo of using F# interactively …
iOS 8, Scene Kit @ 60FPS, programmed in F#, using Xamarin.iOS
I have the best job in the world:
[code lang="fsharp"]
namespace SceneKitFSharp
open System
open MonoTouch.UIKit
open MonoTouch.Foundation
open MonoTouch.SceneKit
open MonoTouch.CoreAnimation
type MySceneKitController () =
inherit UIViewController()
override this.ViewDidLoad () =
let scene = new SCNScene ()
//Positions everyone!
let boxNode = new SCNNode ()
boxNode.Geometry \<- new SCNBox(
Width = 1 …
Using Xamarin.Forms.Maps: You have to Init() first!
The first time I wrote a Xamarin.Forms.Maps program, I couldn't figure out why my map wasn't appearing. And then I put a call to Xamarin.FormsMaps.Init()
into the AppDelegate
(iOS) and MainActivity
(Android):
Shared:
[code lang="csharp"]
public class App
{
public static Page GetMainPage ()
{
return new ContentPage …
50 PRINT "HAPPY BIRTHDAY"
I think BASIC's greatest strength may be that it was something that many people -- not just those with a particular background -- could learn. There was no gatekeeper, either literally or figuratively: you didn't have to push punchcards under a bank-teller window nor did you have to learn recursion before learning …
more ...Reviewing Values for iOS UIViewContentMode with Xamarin and F#
Who can remember the scaling behavior of UIView.ContentMode
? Not me!
So I wrote this quick little F# program to review them:
[code lang="fsharp"]
namespace Simple
open System
open MonoTouch.UIKit
open MonoTouch.Foundation
open System.Drawing
type ContentView ( color : UIColor ) as self =
inherit UIView ()
do
self.BackgroundColor \< - color …
Review of my Xamarin F# Event Code Leads To Improvements
Not at all surprisingly, it turns out that F# events need not be the crufty structures I showed in my previous post.
First, Xamarin's David Siegel suggested "Let the Event type be inferred, don't define a delegate type, and send simple typed values rather than EventArgs:"
open System
type Control …
more ...- ← Previous
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210
- 211
- 212
- 213
- 214
- 215
- 216
- 217
- 218
- 219
- 220
- 221
- 222
- 223
- 224
- 225
- 226
- 227
- 228
- 229
- 230
- 231
- 232
- 233
- 234
- 235
- 236
- Next →