Skip to content

Instantly share code, notes, and snippets.

💭
Before software can be reusable it first has to be usable.- Rich Cook

Henry chihung93

💭
Before software can be reusable it first has to be usable.- Rich Cook
  • Ho Chi Minh city ,Viet Nam
Block or report user

Report or block chihung93

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View url-schemes-settings-ios.mkd

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.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [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
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@chihung93
chihung93 / facebook-page-invite.js
Created Nov 24, 2018 — forked from guiliredu/facebook-page-invite.js
Facebook - Script to auto invite people who liked a page post do like the page
View facebook-page-invite.js
var buttons;
buttons = document.getElementsByClassName('_42ft');
for (var i = 0; i < buttons.length; i++) {
if(buttons[i].getAttribute('ajaxify') != null){
if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){
buttons[i].click();
}
}
}
@chihung93
chihung93 / Foreground.java
Created Apr 24, 2017 — forked from steveliles/Foreground.java
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
View Foreground.java
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;
View BackgroundManager.java
package com.android.utils;
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import android.os.Handler;
import org.apache.log4j.Logger;
import java.util.ArrayList;
import java.util.List;
You can’t perform that action at this time.