Open imougy opened 7 years ago
@imougy it's trying to compile as Swift 4 instead of Swift 3. It's a known issue on Cocoapods: https://github.com/CocoaPods/CocoaPods/issues/6791
We have Swift 4 in the works and should be out in a few days. You can try set the Swift version or use the branch here: https://github.com/tradingticket/TradeItIosTicketSDK2/tree/swift-4
@imougy were you able to get this resolved? Version 2.0.0
of the SDK has Swift 4 support
Can I get this through pod update somehow?
Yes - you update the pod version to ~> 2.0.0
Still getting an error on
class TradeItYahooNavigationController: UINavigationController {
var navigationBarHeight: CGFloat {
get {
return self.navigationBar.frame.height + UIApplication.shared.statusBarFrame.height
}
}
Saying
.../Pods/TradeItIosTicketSDK2/TradeItIosTicketSDK2/TradeItYahooNavigationController.swift:6:68: 'shared' is unavailable: Use view controller based solutions where appropriate instead.
Hi @ekampf, we've pushed a few updates. Is this still an issue?
@jsom there's still tons of code in that uses UIApplication.shared
...
For example:
static func isDeviceJailBroken() -> Bool {
guard TARGET_IPHONE_SIMULATOR != 1 else {
return false
}
// Check 1 : existence of files that are common for jailbroken devices
if !JAIL_BREAK_FILES.filter(FileManager.default.fileExists).isEmpty || UIApplication.shared.canOpenURL(URL(string:"cydia://package/com.example.package")!) {
return true
}
// Check 2 : Reading and writing in system directories (sandbox violation)
let stringToWrite = "Jailbreak Test"
do {
try stringToWrite.write(toFile: "/private/JailbreakTest.txt", atomically: true, encoding: String.Encoding.utf8)
//Device is jailbroken
return true
} catch {
return false
}
}
Hello @ekampf. This isn't an issue we've seen with other partners. It looks like it's due to this configuration: https://stackoverflow.com/a/34227172
Is this an intentionally set configuration and what led you to change to that configuration?
Seems there are many errors while compiling using Xcode 9. When do you think we can have those issues fixed? Thanks,