Binary Framework as Swift Package with Yandex mobile maps (full version).
Yandex mobile maps lite version you can find here.
🎉 Works on Apple silicone without Rosetta mode (you can find manual here).
To integrate YandexMapsMobile into your project using SwiftPM do this 👇🏻
https://github.com/c-villain/YandexMapsMobile.git
or add the following code to your Package.swift
:
dependencies: [
.package(url: "https://github.com/c-villain/YandexMapsMobile", from: "4.2.2"),
],
or via XcodeGen insert into your project.yml
:
name: YourProjectName
options:
deploymentTarget:
iOS: 12.0
packages:
YandexMapsMobile:
url: https://github.com/c-villain/YandexMapsMobile
from: 4.2.2
targets:
YourTarget:
type: application
...
dependencies:
- package: YandexMapsMobile
YMKMapView
with vulkanPreferred: true
YMKMapView.init(frame: .zero, vulkanPreferred: isM1Simulator())
....
#if targetEnvironment(simulator)
public static func isM1Simulator() -> Bool {
return TARGET_CPU_ARM64 != 0
}
#else
public static func isM1Simulator() -> Bool { false }
#endif
YMKMapKit.sharedInstance()
in AppDelegate
as in example/**
If you create instance of YMKMapKit not in application:didFinishLaunchingWithOptions:
you should also explicitly call YMKMapKit.sharedInstance().onStart()
*/
YMKMapKit.sharedInstance()
If you use YandexMapsMobile
as subdependency in your own package you should probably add linkerSettings
to the target for successful building:
targets: [
.target(
name: "Your target",
dependencies: [
.product(name: "YandexMapsMobile", package: "YandexMapsMobile")
],
linkerSettings: [ // <===== ‼️LOOK HERE‼️
.linkedFramework("CoreLocation"),
.linkedFramework("CoreTelephony"),
.linkedFramework("SystemConfiguration"),
.linkedLibrary("c++"),
.unsafeFlags(["-ObjC"]),
]),
]
to Igor Makarov for his contributing in the release v.4.0.1
👨🏻💻 Feel free to subscribe to channel SwiftUI dev in telegram.
If you like this repository, please do :star: to make this useful for others.
link |
Stars: 11 |
Last commit: 1 week ago |
❗️ Works on Apple silicone without Rosetta mode.
YMKMapView.init(frame: .zero, vulkanPreferred: isM1Simulator())
....
#if targetEnvironment(simulator)
public static func isM1Simulator() -> Bool {
return TARGET_CPU_ARM64 != 0
}
#else
public static func isM1Simulator() -> Bool { false }
#endif
/**
If you create instance of YMKMapKit not in application:didFinishLaunchingWithOptions:
you should also explicitly call YMKMapKit.sharedInstance().onStart()
*/
YMKMapKit.sharedInstance()
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics