Skip to content

Instantly share code, notes, and snippets.

View shercoder's full-sized avatar

Pardeep Singh Sanghera shercoder

View GitHub Profile

###Note Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

[UPDATE : Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.]

[UPDATE 2:The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead]

##[UPDATE 3: For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached]

@shercoder
shercoder / DrawableHelper.java
Created January 7, 2017 20:08
Got this drawable helper from Filibe Bezerra. Pretty cool.
import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.view.MenuItem;
@shercoder
shercoder / MacLocalServer.md
Created February 15, 2017 18:32
Configure Local Web Server Mac
  • Open Terminal
  • run sudo apachectl start
  • run localhost in your browser and it should be good
  • If you need to make changes to index.html, then go to /Library/WebServer/Documents/ and edit index.html.en
  • If you need to further configure Apache server then sudo vim /etc/apache2/httpd.conf and then sudo apachectl restart