I have a map application that needs to show a line (representing a direct route) that is above everything, including annotations. This is important because the map has lots of annotations (possibly hundreds) and the line is representing a route from point to another. With that many annotations being on top the line / route is basically useless because you can't see it.
I've looked at things like MKOverlayLevel but it only supports .aboveRoads or .aboveLabels. Is there a way to set the z-axis of a map overlay so that it truly is on top of everything else on the map, including annotations? And if not directly in MapKit, what other options might I have?
Worth noting that I'm targeting 16.4 and above, so that's my limitation on this
Post
Replies
Boosts
Views
Activity
I have a .p12 file which contains two certificates, but no identities. When attempting to use SecPKCS12Import against it it returns a success code, but the CFArray is empty:
func testParsingCert() throws {
let bundle = Bundle(for: Self.self)
let certificateURL = bundle.url(forResource: TestConstants.SERVER_CERTIFICATE_NAME, withExtension: TestConstants.CERTIFICATE_FILE_EXTENSION)!
let certificateData = try! Data(contentsOf: certificateURL)
var importResult: CFArray? = nil
let err = SecPKCS12Import(
certificateData as NSData,
[kSecImportExportPassphrase as String: TestConstants.DEFAULT_CERT_PASSWORD] as NSDictionary,
&importResult
)
guard err == errSecSuccess else {
throw NSError(domain: NSOSStatusErrorDomain, code: Int(err), userInfo: nil)
}
let identityDictionaries = importResult as! [[String:Any]]
var chain: CFArray
chain = identityDictionaries[0][kSecImportItemCertChain as String] as! CFArray
print(chain)
}
Above code fails with
Test Case '-[TAKTrackerTests.CertificateSigningRequestTests testParsingCert]' started.
Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range
as the identityDictionaries result contains no results (nor does importResult)
The specific use case for this is that users can do Certificate Enrollment against a server with a self-signed certificate, so they need to be able to upload the trust store prior to connecting for identities.
Hi All,
I have a Swift Package I'm building. I need to import an existing C++ Static Library into this package. It seems to build fine, but when I attempt to run the tests I get a weird linker error. I've put a repro repo up at https://github.com/flighttactics/CppIssueRepro
Here's the steps I took:
I have the C++ library's .a file and the headers. I created a folder in my package for the library, drug the include folder into it, and then added the .a file at the root of the folder.
I created an Umbrella header in the include folder, along with a module.modulemap.
I then created a shim file (per https://github.com/apple/swift-package-manager/issues/5706)
Finally, I modified my package file to build the target, and reference it as a dependency
(Note I also had to go into the GeographicLib headers for DST and comment out two functions I'm not using which reference std::function since that's not supported by Swift)
I find that including the library module works in the main code base, and I can build successfully. However, when I attempt to run tests against the main code base when it's calling into the C++ library I'm getting the following build error:
ld: Undefined symbols:
double GeographicLib::Math::AngNormalize<double>(double), referenced from:
GeographicLib::GeoCoords::Reset(double, double, int) in CppIssueRepro.o
GeographicLib::UTMUPS::Forward(double, double, int&, bool&, double&, double&, double&, double&, int, bool), referenced from:
GeographicLib::GeoCoords::Reset(double, double, int) in CppIssueRepro.o
GeographicLib::GeoCoords::MGRSRepresentation(int) const, referenced from:
CppIssueRepro.CoordinateCalculator.coverttoMGRS(lat: Swift.Double, lon: Swift.Double) -> Swift.String in CppIssueRepro.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Again, if my main code does not call into the C++ library I'm able to run tests and build just fine.
Not sure what else I can do - it seems like I'm following everything based on the 5.9 docs but I also feel I'm maybe missing something really simple here.