Then adding this following code to your app's manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config" ... >
...
</application>
</manifest>
(lldb) thread backtrace | |
* thread #12 | |
frame #0: 0x00007fff7d5c2304 libsystem_malloc.dylib`nanov2_size + 15 | |
frame #1: 0x00007fff7d5b78a4 libsystem_malloc.dylib`free + 107 | |
frame #2: 0x0000000100774be9 TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c850c0) at toggl_api_private.cc:152:5 | |
* frame #3: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85100) at toggl_api_private.cc:164:9 | |
frame #4: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85140) at toggl_api_private.cc:164:9 | |
frame #5: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85180) at toggl_api_private.cc:164:9 | |
frame #6: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c851c0) at toggl_api_private.cc:164:9 | |
frame #7: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85200) at toggl_api_private.cc:164:9 |
Then adding this following code to your app's manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config" ... >
...
</application>
</manifest>
Add a file res/xml/network_security_config.xml to your app:
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
struct VehicleCheck { | |
let sections: [Section] | |
} |
public enum GitHub { | |
case zen | |
case userProfile(String) | |
case userRepositories(String) | |
} | |
extension GitHub: TargetType { | |
public var baseURL: URL { return URL(string: "https://api.github.com")! } | |
public var path: String { | |
switch self { |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
// ----------------------- | |
// User obj | |
// + JSON decode | |
// + Transform to NSManagedObject |
//: Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
// Network service | |
// + Support plugins. For instance, Logger, Credential and NetworkActivity | |
// + Support Caching |
func testOrdinaryCase() { | |
let input = "Linearity is the property of a mathematical relationship or function which means that it can be graphically represented as a straight line. Examples are the relationship of voltage and current across a resistor, or the mass and weight of an object." | |
let expected = ["1/6 Linearity is the property of a mathematical", | |
"2/6 relationship or function which means that it", | |
"3/6 can be graphically represented as a straight", | |
"4/6 line. Examples are the relationship of voltage", | |
"5/6 and current across a resistor, or the mass and", | |
"6/6 weight of an object."] | |
let output = Utils.split(input, limit: limit) |
This document is published in the style of a "Swift evolution manifesto", outlining a long-term view of how to tackle a very large problem. It explores one possible approach to adding a first-class concurrency model to Swift, in an effort to catalyze positive discussion that leads us to a best-possible design. As such, it isn't an approved or finalized design
// Create text attachment | |
NSTextAttachment *textAttachment = [[NSTextAttachment alloc] init]; | |
textAttachment.image = [UIImage imageNamed:nameicon]; | |
textAttachment.bounds = CGRectMake(0, 0, 20, 16); | |
// Attribute | |
NSAttributedString *attrStringWithImage = [NSAttributedString attributedStringWithAttachment:textAttachment]; | |
NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithAttributedString:attrStringWithImage]; | |
// Change base line |