Requirement | IDFA | IDFV |
---|---|---|
User permission(ATT) needed | Yes | No |
Same ID in all Apps of same device | Yes | No |
Same ID in all Apps of vendor on same device | Yes | Yes |
Same ID on different devices | No | No |
Can be used for Ad Attribution | Yes | No |
Can be used for Ad Frequency Capping | Yes | No (under certain circumstances yes - see article) |
Can be used for Audience Targeting | Yes | Yes |
This file contains 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
sonarqube-check: | |
stage: test | |
image: | |
name: sonarsource/sonar-scanner-cli:latest | |
entrypoint: [""] | |
variables: | |
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache | |
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task | |
cache: | |
key: "${CI_JOB_NAME}" |
This file contains 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
# See https://docs.sonarqube.org/7.2/AnalysisParameters.html for documentation | |
sonar.projectKey=your_project_key | |
sonar.organization=default | |
sonar.links.homepage=https://gitlab.com/aaa/bbb | |
sonar.projectBaseDir=. | |
sonar.sources=YourApp/Classes | |
sonar.host.url=https://sonarqube-instance.yourdomain.com/ | |
sonar.report.export.path=sonar-report.json | |
#sonar.login= add this if running sonar-client locally | |
sonar.qualitygate.wait=true |
This file contains 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
# record video from iOS simulator | |
xcrun simctl io booted recordVideo appVideo.mov |
This file contains 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 | |
public class EmailValidator { | |
public init() { | |
} | |
public func validateEmailAddress(_ email: String) -> Bool { | |
let emailTest = NSPredicate(format: "SELF MATCHES %@", String.emailValidationRegEx) | |
return emailTest.evaluate(with: email) |
This file contains 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 Int { | |
init?(doubleVal: Doube) { | |
guard (doubleVal <= Double(Int.max).nextDown) && (doubleVal >= Double(Int.min).nextUp) else { | |
return nil | |
} | |
self.init(doubleVal) | |
} |
This file contains 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
Date in current timezone as string: | |
let longDateString = Date().description(with: .current) | |
let shortDateString DateFormatter.localizedString(from: expiryDate, dateStyle: .medium, timeStyle: .short) |
This file contains 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
### which shell is used? | |
echo $SHELL | |
echo $0 |
This file contains 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 DEV | |
fileprivate func isDebuggerAttached() -> Bool { | |
var info = kinfo_proc() | |
var mib : [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()] | |
var size = MemoryLayout<kinfo_proc>.stride | |
let junk = sysctl(&mib, UInt32(mib.count), &info, &size, nil, 0) | |
assert(junk == 0, "sysctl failed") | |
return (info.kp_proc.p_flag & P_TRACED) != 0 | |
} | |
#endif |
This file contains 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
private func urlEncodeString(_ string: String) -> String { | |
#if swift(>=3.0) | |
let allowedCharacterSet = (CharacterSet(charactersIn: "!*'();:@&=+$,/?%#[] ").inverted) | |
if let escapedString = string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) { | |
return escapedString | |
} | |
#else | |
let allowedCharacterSet = (NSCharacterSet(charactersInString: "!*'();:@&=+$,/?%#[] ").invertedSet) | |
if let escapedString = string.stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) { | |
return escapedString |
NewerOlder