Skip to content

Commit

Permalink
Move examples to the root public folder (#2380)
Browse files Browse the repository at this point in the history
  • Loading branch information
OdNairy authored Dec 10, 2024
1 parent d1963a3 commit 7694081
Show file tree
Hide file tree
Showing 249 changed files with 90 additions and 203 deletions.
2 changes: 1 addition & 1 deletion .depsvalidator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ manifests:
- MapboxCoreMaps
- MapboxCommon
- type: Package.resolved
path: Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved
path: Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
omit_for:
# Temporarily disabled since we use .binaryTarget instead of SPM dependency for MapboxCoreMaps
- MapboxCoreMaps
Expand Down
12 changes: 6 additions & 6 deletions .fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ platform :ios do
sync_code_signing
update_code_signing_settings(
use_automatic_signing: false,
path: "Apps/Examples/Examples.xcodeproj",
path: "Examples.xcodeproj",
team_id: "GJZR2MEM28", # Developer Portal Team ID,
profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["mapbox.ExamplesUITests.xctrunner"],
targets: ["ExamplesUITests"],
code_sign_identity: "Apple Development: Created via API",
)
update_code_signing_settings(
use_automatic_signing: false,
path: "Apps/Examples/Examples.xcodeproj",
path: "Examples.xcodeproj",
team_id: "GJZR2MEM28", # Developer Portal Team ID,
profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["com.mapbox.examples"],
targets: ["Examples"],
code_sign_identity: "Apple Development: Created via API",
)
run_tests(
workspace: 'Apps/Apps.xcworkspace',
project: 'Examples.xcodeproj',
scheme: 'Examples', # XCTest scheme
clean: true, # Recommended: This would ensure the build would not include unnecessary files
# Use the Debug mode here to avoid the compiler crash
Expand Down Expand Up @@ -99,7 +99,7 @@ platform :ios do
api_key_if_needed # Generate API Token
increment_build_number(
build_number: latest_testflight_build_number + 1,
xcodeproj: 'Apps/Examples/Examples.xcodeproj'
xcodeproj: 'Examples.xcodeproj'
)
build_and_submit
end
Expand All @@ -111,7 +111,7 @@ platform :ios do
sync_code_signing(type: "development")
update_code_signing_settings(
use_automatic_signing: false,
path: "Apps/Examples/Examples.xcodeproj",
path: "Examples.xcodeproj",
team_id: "GJZR2MEM28", # Developer Portal Team ID,
profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["com.mapbox.examples"],
targets: ["Examples"],
Expand All @@ -121,7 +121,7 @@ platform :ios do
sync_code_signing(type: "appstore")
build_app(
scheme: "Examples",
workspace: "Apps/Apps.xcworkspace",
project: "Examples.xcodeproj",
xcargs: "SWIFT_TREAT_WARNINGS_AS_ERRORS=NO COMPILER_INDEX_STORE_ENABLE=NO" # Disable to bypass Deprecated error on OfflineManager example
)
upload_to_testflight(
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
analyze:
uses: ./.github/workflows/analyze.yml
with:
project-path: Apps/Examples/Examples.xcodeproj
project-path: Examples.xcodeproj
secrets: inherit
10 changes: 0 additions & 10 deletions Apps/Apps.xcworkspace/contents.xcworkspacedata

This file was deleted.

8 changes: 0 additions & 8 deletions Apps/Apps.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

This file was deleted.

2 changes: 0 additions & 2 deletions Apps/Examples/.gitignore

This file was deleted.

110 changes: 0 additions & 110 deletions Apps/Examples/README.md

This file was deleted.

Binary file removed Apps/Examples/readme-screenshots.png
Binary file not shown.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ That initializer doesn't require to wrap arguments in `Argument` cases. For exam
## 11.8.0-beta.1 - 14 October, 2024

* [SwiftUI] Fixed crash when ForEvery was used with duplicated IDs.
* Introduce experimental Geofencing API. Implementation example: [GeofencingExample.swift](Apps/Examples/Examples/All%20Examples/GeofencingExample.swift)
* Introduce experimental Geofencing API. Implementation example: [GeofencingExample.swift](Sources/Examples/All%20Examples/GeofencingExample.swift)
* Refactor of the experimental Interactions and Featuresets API:
- `InteractiveFeature` is renamed to `FeaturesetFeature`.
- Introduce new `StandardPoiFeature`, `StandardBuildingsFeature`, `StandardPlaceLabelsFeature`.
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ own `UIWindow` and root view controller, before adding the MapView to it.
## Making an Example
* Check out this [doc](https://github.com/mapbox/mapbox-maps-ios/blob/main/Apps/Examples/README.md)
* Check out this [project](https://github.com/mapbox/mapbox-maps-ios/blob/main/Examples.xcodeproj)
to get more information about adding examples to our project.
## Tracing map performance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
DFC64A62538E787D57B6514D /* DynamicViewAnnotationExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3333EF3E0F1C789809F385AF /* DynamicViewAnnotationExample.swift */; platformFilters = (ios, ); };
E121F023995CCF2F3A65BC2A /* LocateMeExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62DA0608D44DEF6C4A82777C /* LocateMeExample.swift */; };
E2617ACF1E2367C012A87CD1 /* ViewAnnotationsExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59AACE9E33102AE90526569F /* ViewAnnotationsExample.swift */; };
E2CD9B66367265509567A4E3 /* .swiftlint.yml in Resources */ = {isa = PBXBuildFile; fileRef = 524D79FF01638A0E8A3C1248 /* .swiftlint.yml */; platformFilters = (ios, ); };
E5A3B926DD7E451F1E660547 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 274D496EC7E47F63FD0D1337 /* AppDelegate.swift */; platformFilters = (ios, ); };
E6B722A64C15CE701287B464 /* OfflineManagerExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 083C452C7342E73F6F16A83C /* OfflineManagerExample.swift */; platformFilters = (ios, ); };
E8CEBC697D805204F129C4FB /* RasterTileSourceExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67FA937DC17F7EA27931763A /* RasterTileSourceExample.swift */; platformFilters = (ios, ); };
Expand Down Expand Up @@ -222,6 +223,7 @@
4DCBE814694CF08A9C2E4A42 /* AddOneMarkerSymbolExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddOneMarkerSymbolExample.swift; sourceTree = "<group>"; };
4EE19F00E87B31FDE5481D56 /* ExamplesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExamplesTests.swift; sourceTree = "<group>"; };
50618B3CF42CCF735CCAE9B4 /* fragment-realestate-NY.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "fragment-realestate-NY.json"; sourceTree = "<group>"; };
524D79FF01638A0E8A3C1248 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = "<group>"; };
588FD640D91E9DD366703F7B /* SnapshotterExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotterExample.swift; sourceTree = "<group>"; };
590D83805AA598D2B0A7638A /* ExamplesTests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = ExamplesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
59AACE9E33102AE90526569F /* ViewAnnotationsExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewAnnotationsExample.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -280,7 +282,7 @@
A615EFC3D6CF2A25C9864086 /* UIViewController+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Extensions.swift"; sourceTree = "<group>"; };
A6B06A1D70F479D8DC5C375A /* FeaturesQueryExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturesQueryExample.swift; sourceTree = "<group>"; };
A8359ECB5024BEF3722C3CA1 /* PointAnnotationClusteringExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PointAnnotationClusteringExample.swift; sourceTree = "<group>"; };
A8700CFE38DA4F1333F9E0F9 /* mapbox-maps-ios */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "mapbox-maps-ios"; path = ../..; sourceTree = SOURCE_ROOT; };
A8700CFE38DA4F1333F9E0F9 /* mapbox-maps-ios */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "mapbox-maps-ios"; path = .; sourceTree = SOURCE_ROOT; };
A9A26CBC58F3271DBFD2EE7D /* CustomLayerShaderTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CustomLayerShaderTypes.h; sourceTree = "<group>"; };
AC5A8729C9AEA4711B56B5F0 /* SnapshotMapExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotMapExample.swift; sourceTree = "<group>"; };
B05B410135D0B466B73C0765 /* annotations.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = annotations.json; sourceTree = "<group>"; };
Expand Down Expand Up @@ -376,6 +378,7 @@
52909911727F239150D4FE30 /* Examples */ = {
isa = PBXGroup;
children = (
524D79FF01638A0E8A3C1248 /* .swiftlint.yml */,
274D496EC7E47F63FD0D1337 /* AppDelegate.swift */,
B31A932A62B6142FE20C39DF /* Assets.xcassets */,
E09DABCB8139643F1BD3B972 /* Examples_CarPlay.entitlements */,
Expand All @@ -389,7 +392,8 @@
846FF5BF97AEEAC876994DF3 /* Models */,
55E0EEEC0D91AF2DFDCD9A33 /* SwiftUI Examples */,
);
path = Examples;
name = Examples;
path = Sources/Examples;
sourceTree = "<group>";
};
55E0EEEC0D91AF2DFDCD9A33 /* SwiftUI Examples */ = {
Expand Down Expand Up @@ -578,7 +582,7 @@
BE18E37A8652B4807D2459F1 /* ExamplesUITests.swift */,
);
name = ExamplesUITests;
path = ../../Tests/ExamplesUITests;
path = Tests/ExamplesUITests;
sourceTree = "<group>";
};
AFDB1EA82615CFDF02CE1D4D = {
Expand Down Expand Up @@ -619,7 +623,7 @@
9CB74046A2FC03770B62B9E6 /* TestableExampleTests.swift */,
);
name = ExamplesTests;
path = ../../Tests/ExamplesTests;
path = Tests/ExamplesTests;
sourceTree = "<group>";
};
F4E57BB1463BD6558C9EE37A /* Lab */ = {
Expand Down Expand Up @@ -726,7 +730,7 @@
mainGroup = AFDB1EA82615CFDF02CE1D4D;
packageReferences = (
B50D5CC28BF0DFBA55456D89 /* XCRemoteSwiftPackageReference "Fingertips" */,
F97B927925CFCEE0B8496DE3 /* XCLocalSwiftPackageReference "../../" */,
4F0A03F138FCA51E80A1893D /* XCLocalSwiftPackageReference "." */,
);
projectDirPath = "";
projectRoot = "";
Expand All @@ -743,6 +747,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E2CD9B66367265509567A4E3 /* .swiftlint.yml in Resources */,
83DCCC7FEFF6D94D3DF0B587 /* 34M_17.dae in Resources */,
C940835B030A20F0C5BC31AD /* Assets.xcassets in Resources */,
F5E96E5798947CA56FD77CF9 /* Fire_Hydrants.geojson in Resources */,
Expand Down Expand Up @@ -1121,15 +1126,15 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = Examples/Info.plist;
INFOPLIST_FILE = Sources/Examples/Info.plist;
INFOPLIST_PREFIX_HEADER = "$(DERIVED_FILE_DIR)/InfoPlist.Prefix.h";
INFOPLIST_PREPROCESS = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MAPBOXMAPS_PATH = ../../;
MAPBOXMAPS_PATH = ./;
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.examples;
SDKROOT = auto;
Expand All @@ -1138,7 +1143,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "$(MAPBOXMAPS_PATH)/Apps/Examples/Examples/Examples-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "$(MAPBOXMAPS_PATH)/Sources/Examples/Examples-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Debug;
Expand Down Expand Up @@ -1236,15 +1241,15 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = Examples/Info.plist;
INFOPLIST_FILE = Sources/Examples/Info.plist;
INFOPLIST_PREFIX_HEADER = "$(DERIVED_FILE_DIR)/InfoPlist.Prefix.h";
INFOPLIST_PREPROCESS = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MAPBOXMAPS_PATH = ../../;
MAPBOXMAPS_PATH = ./;
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.mapbox.examples;
SDKROOT = auto;
Expand All @@ -1253,7 +1258,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "$(MAPBOXMAPS_PATH)/Apps/Examples/Examples/Examples-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "$(MAPBOXMAPS_PATH)/Sources/Examples/Examples-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2,7";
};
name = Release;
Expand Down Expand Up @@ -1349,9 +1354,9 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCLocalSwiftPackageReference section */
F97B927925CFCEE0B8496DE3 /* XCLocalSwiftPackageReference "../../" */ = {
4F0A03F138FCA51E80A1893D /* XCLocalSwiftPackageReference "." */ = {
isa = XCLocalSwiftPackageReference;
relativePath = ../../;
relativePath = .;
};
/* End XCLocalSwiftPackageReference section */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
<TestPlans>
<TestPlanReference
default = "YES"
reference = "container:../../Tests/TestPlans/Examples.xctestplan">
reference = "container:Tests/TestPlans/Examples.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:../../Tests/TestPlans/Examples no unit tests.xctestplan">
reference = "container:Tests/TestPlans/Examples no unit tests.xctestplan">
</TestPlanReference>
</TestPlans>
<MacroExpansion>
Expand Down
Loading

0 comments on commit 7694081

Please sign in to comment.