This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shishirstudio.notification_types_android; | |
import android.app.NotificationChannel; | |
import android.app.NotificationManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.net.Uri; | |
import android.os.AsyncTask; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Foundation | |
internal let ACCEPT_HEADER_KEY: String = "Accept" | |
internal let ACCEPT_HEADER_VALUE: String = "application/json" | |
class NetworkController { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SystemConfiguration | |
public class Reachability { | |
class var connectedToNetwork: Bool { | |
var zeroAddress = sockaddr_in() | |
zeroAddress.sin_len = UInt8(MemoryLayout<sockaddr_in>.size) | |
zeroAddress.sin_family = sa_family_t(AF_INET) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When we make an app, we might feel like renaming the app name before we publish it. | |
But the process in Xcode is a bit complicated than I thought.It becomes more complicated when we have some | |
podfile in our project. So, In this article, I am sharing the process I needed to take to rename the app. | |
## Step 1 - RENAME the project | |
1. Select your project inside "Project navigator" on the left of the Xcode view. | |
2. On the right select the "File inspector" and the name of your project should be in there |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create an App Id with your bundle id in developer.apple.com | |
2. Add new iOS app to the app store connect. | |
3. Create provisional profile both for development & distribution | |
Downald the certificate and double click to add the certificate to the Key-Chain. | |
~ Development Profile is for testing the app with Testflight. | |
~ Distribution Profile is for distributing the app to the appstore. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public class ActivityIndicator { | |
private init(){} | |
public static let shared = ActivityIndicator() | |
var activityLabel: UILabel! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIView { | |
func displayToast(_ message : String) { | |
guard let delegate = UIApplication.shared.delegate as? AppDelegate, let window = delegate.window else { | |
return | |
} | |
if let toast = window.subviews.first(where: { $0 is UILabel && $0.tag == -1001 }) { | |
toast.removeFromSuperview() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func showActionSheet(title:String?, | |
titleColor: UIColor = UIColor.black, | |
message: String?, | |
messageColor: UIColor = UIColor.gray, | |
backgroundColor: UIColor = UIColor.white){ | |
guard let message = message else { return } | |
let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) |
OlderNewer