Skip to content

Commit

Permalink
Fix Xcode 14 related warnings. (#4146)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximAlien authored Sep 13, 2022
1 parent 07af177 commit 1ceff2a
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 5 deletions.
6 changes: 5 additions & 1 deletion MapboxNavigation-SPM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@
New,
);
LastSwiftUpdateCheck = 1340;
LastUpgradeCheck = 1340;
LastUpgradeCheck = 1400;
ORGANIZATIONNAME = Mapbox;
TargetAttributes = {
358D14621E5E3B7700ADE590 = {
Expand Down Expand Up @@ -625,6 +625,7 @@
/* Begin PBXShellScriptBuildPhase section */
8A506BDB285A846F008A6082 /* Apply Mapbox Access Token */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -644,6 +645,7 @@
};
8AB31424284837EC00348E52 /* Apply Mapbox Access Token */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -663,6 +665,7 @@
};
C53F2F0320EBC95600D9798F /* Apply Mapbox Access Token */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand All @@ -678,6 +681,7 @@
};
DA408F661FB3CA3C004D9661 /* Apply Mapbox Access Token */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions NavigationViewExample/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,15 @@ open class NavigationEventsManager {
preconditionFailure("CFBundleShortVersionString must be set in the Info.plist.")
}
mobileEventsManager.initialize(withAccessToken: accessToken, userAgentBase: userAgent, hostSDKVersion: String(describing:stringForShortVersion))
mobileEventsManager.sendTurnstileEvent()

// FIXME: Running `MobileEventsManager.sendTurnstileEvent()` fixes such main thread checker
// warning in MapboxMobileEvents: This method can cause UI unresponsiveness if invoked on the main thread.
// Instead, consider waiting for the `-locationManagerDidChangeAuthorization:` callback
// and checking `authorizationStatus` first.
DispatchQueue.global().async { [weak self] in
guard let self = self else { return }
self.mobileEventsManager.sendTurnstileEvent()
}
}

// MARK: Sending Feedback Events
Expand Down

0 comments on commit 1ceff2a

Please sign in to comment.