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
| APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" | |
| # This script loops through the frameworks embedded in the application and | |
| # removes unused architectures. | |
| find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK | |
| do | |
| FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) | |
| FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" | |
| echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" |
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
| https://search.umico.az/v1/marketing_names/803?country_id=1&city_id=1 | |
| { | |
| "partner_cpa_network": null, | |
| "name_sortable": "U.S. Polo ASSN.", | |
| "cashback_percentage": 3.5, | |
| "partner_social_accounts": [ | |
| { | |
| "link": "https://www.facebook.com/webuspoloaz/", | |
| "social_network": "facebook" |
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
| Bettingrounds: | |
| { | |
| "status": "success", | |
| "data": { | |
| "advertisement": { | |
| "rounds": [ | |
| { | |
| "ext_id": "0c1f4671-e108-4fef-98ee-95b54bc994a5", | |
| "start_date": "2019-10-20T10:00:00Z", |
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 Bundle { | |
| var apiBaseURL: String { | |
| return object(forInfoDictionaryKey: "serverBaseURL") as? String ?? "" | |
| } | |
| } | |
| //And call it from the code like this: | |
| let baseURL = Bundle.main.apiBaseURL |
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
| #if DEVELOPMENT | |
| let SERVER_URL = "http://dev.server.com/api/" | |
| let API_TOKEN = "asfasdadasdass" | |
| #else | |
| let SERVER_URL = "http://prod.server.com/api/" | |
| let API_TOKEN = "fgbfkbkgbmkgbm" | |
| #endif |
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
| enum Environment { | |
| case development | |
| case staging | |
| case production | |
| } | |
| let environment: Environment = .development | |
| switch environment { | |
| case .development: |
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
| // MARK: - Development | |
| let APIEndpointURL = "http://mysite.com/dev/api" | |
| let analyticsKey = "jsldjcldjkcs" | |
| // MARK: - Production | |
| // let APIEndpointURL = "http://mysite.com/prod/api" | |
| // let analyticsKey = "sdcsdcsdcdc" | |
| // MARK: - Staging | |
| // let APIEndpointURL = "http://mysite.com/staging/api" |
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 dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { | |
| for dragItem in session.items { // (1) | |
| // (2) | |
| dragItem.itemProvider.loadObject(ofClass: UIImage.self, completionHandler: { object, error in | |
| // (3) | |
| guard error == nil else { return print("Failed to load our dragged item") } | |
| guard let draggedImage = object as? UIImage else { return } // (4) | |
| DispatchQueue.main.async { // (5) | |
| let imageView = UIImageView(image: draggedImage) // (6) |
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
| class ViewController: UIViewController, UIDropInteractionDelegate { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| view.addInteraction(UIDropInteraction(delegate: self)) | |
| } | |
| func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) { | |
| } | |
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
| view.addInteraction(UIDropInteraction(delegate: self)) |
NewerOlder