Chrisvanwyk

Badges

Third AnniversarySecond AnniversaryFirst AnswerXamarin Certified DeveloperXamarin University Professor First Anniversary5 Likes10 CommentsName DropperFirst Comment

About

Username
Chrisvanwyk
Location
US
Joined
Visits
648
Last Active
Roles
Xamarin Team, University, XamUProfessors, Developer Group Leader
Points
55
Badges
10

Chrisvanwyk Xamurai

About

Username
Chrisvanwyk
Location
US
Joined
Visits
648
Last Active
Roles
Xamarin Team, University, XamUProfessors, Developer Group Leader
Points
55
Badges
10
  • Re: Sharpie 3.4.0 Bug

    Hi @MarkJackMilian

    Run pod --version if you see something like this

    -bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory then you may want to fix your Ruby and CocoaPods gem installs.

    I use Homebrew to manage my installs and took these steps:

    1. run brew up
    2. run brew install ruby
    3. run brew install CocoaPods

    Following all steps to make sure you already existing targets or link all conflicting files.

    Now run sharpie pod init ios AFNetworking

    Hope this helps.

  • Re: Sharpie failed: "Unable to handle compilation, expected exactly one compiler job''"

    Objective-Sharpie inspect and parse header files and does not parse static libraries.

    My suggestion would be to rewrite your command like this assuming you have an umbrella header file called lib.h :

    sharpie bind -output MyOutPutFolder -namespace MyBindingNameSpace -sdk iphoneos11.0 lib.h

  • Re: Peer-to-peer communication between Xamarin.Forms apps

    Hi John,

    The following repo will give you some insight to phone/tablet communication via BLE and BLE enabled devices.

    https://github.com/xamarin/Monkey.Robotics

    From this repo I would suggest looking at https://github.com/xamarin/Monkey.Robotics/tree/master/Sample Apps, specifically BLE Explorer. It is a Xamarin.Forms app that runs on iOS and Android devices and allows you to scan, connect, and read/write to BLE devices.

    This Wikipedia link http://en.wikipedia.org/wiki/Bluetooth_low_energy provides a high level overview on BLE and introduces the generic attribute profile, GATT, which will give you an idea of known profiles such a device may expose.

    Most or all of these profiles are covered in the BLE Explorer application. Some devices however will and do implement their own custom profiles.

    When it comes to these types of BLE devices your best option will be to bind the existing SDKs for iOS and Android into c# libraries you can us in Xamarin.iOS and Xamarin.Android, for example the Estimote iBeacon libraries on the Xamarin component store.

    When it comes to device-to-device communication, frameworks such as the iOS 7 introduced Multipeer framework exisit. Here is a Xamarin blog post introducing the framework, http://blog.xamarin.com/send-the-monkey-a-message-with-multipeer-connectivity/

    The problem with such a framework though is that it does not allow for communication to Android or Windows Phone from iOS devices.

    As a result developers tend to implement solutions, which includes a server component. A server framework such as signalR comes to mind to solve the server side requirements.

    You are at this point reliant on network connectivity and the solution will not work in dead-zone environment like you described above.

    A solution which looks promising is the AllJoyn SDK maintained/hosted by the Allseen Alliance. According to the website:

    “AllJoyn™ is a collaborative open-source software framework that makes it easy for developers to write applications that can discover nearby devices, and communicate with each other directly regardless of brands, categories, transports, and OSes without the need of the cloud.”

    https://allseenalliance.org/developers/learn

    I have not used this project myself and there is no Xamarin bindings available, but this does not mean it would be impossible to create such bindings.

    https://ask.allseenalliance.org/question/677/does-alljoyn-work-with-xamarin/

    I hope this information helps.

    Best,
    Chris

  • Re: REST Sharp

    Hi @jacopo.cappelli‌

    It sounds to me as if you may have created a Xamarin.Forms project with the PCL version of the templates. There is no PCL version of RestSharp available, I would suggest you look at HttpClient to replace RestSharp.

    Hope this helps,
    Chris

  • Re: FontFamily - is there a list of families that work across platforms?

    Hi John,

    Since fonts are native to the platform, I would suggest looking at the following resources for additional information.

    iOS
    http://iosfonts.com

    This gives us a breakdown of all fonts supported per iOS version and device.

    Android
    Android is released with only 3 system wide fonts: normal (Droid Sans), serif (Droid Serif), and monospace (Droid Sans Mono)

    You are however able to make use of custom loaded TrueType fonts as the TypeFace API http://developer.android.com/reference/android/graphics/Typeface.html

    A specific Xamarin example available here: https://github.com/xamarin/monodroid-samples/blob/master/ApiDemo/Graphics/Typefaces.cs

    Windows Phone
    On Windows Phone Font support is specific to the version of Phone you are targeting. The following link describes the available fonts per phone version as well as how to load custom font types as well.

    https://msdn.microsoft.com/en-us/library/windows/apps/hh202920(v=vs.105).aspx

    In terms of specifying a safe font or making sure you control the applied font, I would use the suggested snippet @ShantimohanElchuri has posted, with this you will be able to explicitly specify the font.

    Please let me know if this info is helpful.

    Best,
    Chris