Skip to content

Instantly share code, notes, and snippets.

View rdelrosario's full-sized avatar

Rendy Del Rosario rdelrosario

View GitHub Profile
@nodoid
nodoid / IterateView.cs
Created April 1, 2019 23:39
Iterate views
public class IterateView
{
readonly StringBuilder sb = new StringBuilder();
const string PADDING_STRING = " ";
string sPadding = "";
public string OutputString { get; private set; }
public int NumberOfType { get; private set; }
public List<string> GetText { get; private set; }
@IlyaLavrov97
IlyaLavrov97 / FileHelper.cs
Last active June 28, 2024 04:44
Real Path Hepler class for Xamarin.Android, works for API 21+.
using Android.Content;
using Android.Database;
using Android.OS;
using Android.Provider;
using Android.Text;
using Java.IO;
using System;
using System.IO;
using System.Threading.Tasks;
@DorkNstein
DorkNstein / ios-simulator-build.sh
Created February 2, 2018 16:17
How to make ios simulator builds for facebook review
ditto -ck --sequesterRsrc --keepParent `ls -1 -d -t ~/Library/Developer/Xcode/DerivedData/*/Build/Products/*-iphonesimulator/*.app | head -n 1` path/to/YourApp.zip
## https://developers.facebook.com/docs/ios/getting-started/advanced
@cryophobia
cryophobia / gist:ace5ae71a5948594f6d7901525a67c14
Created April 20, 2017 11:26
object_setClass - Type ObjCRuntime.Class which is passed to unmanaged code must have a StructLayout attribute.
using System;
using System.Runtime.InteropServices;
using AVKit;
using Foundation;
using ObjCRuntime;
namespace Xamarin_ios_language_manager
{
public class ExtendedBundle : NSBundle
{
//
// UIBarButtonItem+Badge.swift
// PiGuardMobile
//
// Created by Stefano Vettor on 12/04/16.
// Copyright © 2016 Stefano Vettor. All rights reserved.
//
import UIKit
@JonDouglas
JonDouglas / xamarinandroidbindings.md
Last active September 8, 2024 20:45
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@vparihar01
vparihar01 / importVideoToAppDir.swift
Created June 26, 2015 14:17
Importing video using the AVAssetExportSession session
Hey Isarathg this is classic use case of IOS devices. Which don't let you access any Photo Album assets directly using path value. To cross check my answer please just check FileExistsAtPath for your file like below -:
println(NSFileManager.defaultManager().fileExistsAtPath( urlvalue.path!))
O/P you will get => False
I also end up with this issue couple of days back After reading the whole IOS documentation. What I have figured it out "We can only access PhotoAlbum Assets if and only if we have PHImageManager session open". To cross check this statement please try below code -:
var currentVideofetch: PHFetchResult!
required init(coder aDecoder: NSCoder) {
import urllib2
import httplib
import json
# have to export the DER certify recived from azul to base64
# openssl x509 -inform der -in MYCERT.cer -out my_cert.crt
# I ended up solving this by concatenating
# the private key you use to generate crs with your converted cert
# cat my_key.key my_cert.crt > certify.pem
CERT = "certify.pem"
@benbahrenburg
benbahrenburg / geo.md
Last active January 16, 2023 09:50
iOS 8: Geo Location Permissions Fix

Fixing Geo Location Permissions in iOS8

In iOS8, Apple has changed how geo location permissions work. This gist outlines an approach to fix this so Geo will continue to work in iOS8.

Before getting started with the code change, we need to update the tiapp.xml with a few keys.

If you wish to have Geo always run, you need to add the below key. The key NSLocationAlwaysUsageDescription is used when requesting permission to use location services whenever the app is running. To enable this, add the below to the tiapp.xml:

NSLocationAlwaysUsageDescription Reason that appears in the authorization prompt

@ianbarber
ianbarber / RetrieveAccessTokenActivity.java
Created March 17, 2014 20:22
A quick example of retrieving an access token with GoogleAuthUtil
package com.google.devrel.samples.gmstest.app;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;