"No bundle url present” Error
- Open a terminal window
- cd into
YOUR_PROJECT/ios - Remove the build folder with
rm -r build - Run
react-native run-iosagain
Alternatively, run
| public static void Fade (this UIView view, bool isIn, double duration = 0.3, Action onFinished = null) | |
| { | |
| var minAlpha = (nfloat)0.0f; | |
| var maxAlpha = (nfloat)1.0f; | |
| view.Alpha = isIn ? minAlpha : maxAlpha; | |
| view.Transform = CGAffineTransform.MakeIdentity (); | |
| UIView.Animate (duration, 0, UIViewAnimationOptions.CurveEaseInOut, | |
| () => { | |
| view.Alpha = isIn ? maxAlpha : minAlpha; |
| #import <UIKit/UIKit.h> | |
| #import <ImageIO/ImageIO.h> | |
| #import <MobileCoreServices/MobileCoreServices.h> | |
| static UIImage *frameImage(CGSize size, CGFloat radians) { | |
| UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
| [[UIColor whiteColor] setFill]; | |
| UIRectFill(CGRectInfinite); | |
| CGContextRef gc = UIGraphicsGetCurrentContext(); | |
| CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
| https://spring.io/blog/2015/07/14/microservices-with-spring | |
| http://www.adeveloperdiary.com/java/spring-boot/create-restful-webservices-using-spring-boot/ | |
| https://www.infoq.com/articles/microframeworks1-spring-boot | |
| http://stytex.de/blog/2016/02/01/spring-cloud-security-with-oauth2/ | |
| https://bitbucket.org/ikryvorotenko/microservises-demo/src |
| import UIKit | |
| fileprivate enum Storyboard : String { | |
| case main = "Main" // storyboard name | |
| } | |
| fileprivate extension UIStoryboard { | |
| static func loadFromMain<T>(_ identifier: String) -> T { | |
| return load(from: .main, identifier: identifier) |
| <key>NSExceptionDomains</key> | |
| <dict> | |
| <key>localhost</key> | |
| <dict> | |
| <key>NSExceptionAllowsInsecureHTTPLoads</key> | |
| <true/> | |
| </dict> | |
| <key>NSAllowsArbitraryLoads</key> | |
| <true/> | |
| <key>NSAllowsArbitraryLoadsInWebContent</key> |
"No bundle url present” Error
YOUR_PROJECT/iosrm -r buildreact-native run-ios againAlternatively, run
SOLID represents 5 principles of object-oriented programming: Single responsibility, Open-closed, Liskov Substitution, Interface Segregation and Dependency Inversion.
These principles is to solve the main problems of a bad architecture:
Almost every mobile app now-a-days rely on networking, either for JSON, image or advertisement. It's rare to find an app in the AppStore that doesn't manage data. To make the app fast and responsive sometimes app developer uses caching mechanism. Though caching is not just about improving UX by making the interface fast and responsive, it's about efficiently managing data that will be used frequently. Not to say, it will effectively strip down repetitive tasks.
There are a lot of great third-party caching libraries available. Haneke, PINCache, Cache, Awesome Cache are some of the popular third-parties out there. Even image libraries, like SDWebImage, Kingfisher or Nuke provi
| class APIService: ServiceProtocol { | |
| func get( url: URL, callback: @escaping (_ data: Data?, _ error: Error?) -> Void ) { | |
| URLSession.shared.dataTask(with: url) { (data, _, error) in | |
| callback(data, error) | |
| }.resume() | |
| } | |
| } |
| class APIService: ServiceProtocol { | |
| func get( url: URL, callback: @escaping (_ data: Data?, _ error: Error?) -> Void ) { | |
| let request = URLRequest(url: url, cachePolicy: .returnCacheDataElseLoad, timeoutInterval: 30) | |
| URLSession.shared.dataTask(with: request) { (data, _, error) in | |
| callback(data, error) | |
| }.resume() | |
| } | |
| } |