Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1062 from Esri/Ting/Update-SPM-vNext
Browse files Browse the repository at this point in the history
Update: update 11 and SPM, drop toolkit submodule
  • Loading branch information
yo1995 authored Apr 22, 2021
2 parents e0ca9eb + 943803f commit e2cc9a8
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 107 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ xcuserdata/

## Portal Item Data
/Portal\ Data

## Swift Package Manager
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
Packages/
Package.pins
Package.resolved
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ trailing_whitespace:

excluded:
- Pods
- arcgis-runtime-toolkit-ios
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,28 @@ The ```main``` branch of this repository contains samples configured for the lat

The *ArcGIS Runtime SDK Samples app* has a *Target SDK* version of *13.0*, meaning that it can run on devices with *iOS 13.0* or newer.

## Building samples using installed SDK
## Building Samples Using Swift Package Manager

1. **Fork** and then **clone** the repository
> Make sure to use the "recursive" option to ensure you get the **ArcGIS Runtime Toolkit** submodule
>
>`git clone --recursive [URL to Git repo]`
>
> If you've already cloned the repo without the submodule, you can load the submodule using
>
>`git submodule update --init`
1. **Install** the ArcGIS Runtime SDK for iOS to a central location on your Mac as described [here](https://developers.arcgis.com/ios/get-started)
1. **Open** the `arcgis-ios-sdk-samples.xcodeproj` **project** file
> The project has been configured to use the `arcgis-runtime-toolkit-ios` package, which provides the `ArcGISToolkit` framework as well as the `ArcGIS` framework.
1. **Run** the `arcgis-ios-sdk-samples` app target
> If you get the error message saying _"This Copy Files build phase contains a reference to a missing file 'ArcGISToolkit.framework'"_, you probably didn't clone the repo to include it's submodule. See Step 1 above.

## Building samples with CocoaPods
> To add the Swift packages to your own projects, consult the documentation for the [ArcGIS Runtime iOS Toolkit](https://github.com/Esri/arcgis-runtime-toolkit-ios/#swift-package-manager) and [ArcGIS Runtime iOS SDK](https://github.com/Esri/arcgis-runtime-ios#instructions).
## Building Samples Using CocoaPods

1. **Fork** and then **clone** the repository
1. **Install** the ArcGIS Runtime SDK for iOS by running the `pod install` command in the folder where you cloned this repository
1. **Open** the `arcgis-ios-sdk-samples.xcworkspace` **workspace** file
1. **Select** the `arcgis-ios-sdk-samples` project node, go to the `Build Phases` tab, and **delete** the phases for `Embed Frameworks`. (This phase conflicts with CocoaPods and is only required when using the installed SDK as described in the previous section)
1. **Select** the `ArcGISToolkit.xcodeproj` project node and **delete** it. (this project dependency conflicts with CocoaPods and is only required when using the installed SDK as described in the previous section)
1. **Select** the `arcgis-ios-sdk-samples` project node, go to the `Swift Packages` tab, and **delete** the `arcgis-runtime-toolkit-ios` package. This Swift package conflicts with CocoaPods and is only required when using the Swift Package Manager as described in the previous section.
1. **Run** the `arcgis-ios-sdk-samples` app target

## Sample Data

Some sample data is too large to store in the repository, so it is automatically downloaded at build time. The first time the app is built, a build script downloads the necessary data to `Portal Data`. The script only downloads data files that do not already exist, so subsequent builds will take significantly less time.

## Configure app secrets
## Configure App Secrets

As a best-practices principle, the project conceals app secrets from source code by generating and compiling an `AppSecrets.swift` source code file at build time using a custom build rule.

Expand Down
115 changes: 27 additions & 88 deletions arcgis-ios-sdk-samples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
00686FD62481CF4D00EDA705 /* NavigateARNavigatorViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00686FCF2480889900EDA705 /* NavigateARNavigatorViewController.swift */; };
0069F4BE25F0111D00CA7BD2 /* CreateLoadReport.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0069F4BD25F0111D00CA7BD2 /* CreateLoadReport.storyboard */; };
0069F4C225F0118200CA7BD2 /* CreateLoadReportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0069F4C125F0118200CA7BD2 /* CreateLoadReportViewController.swift */; };
006A786A262F9F15001D2A5E /* ArcGISToolkit in Frameworks */ = {isa = PBXBuildFile; productRef = 006A7869262F9F15001D2A5E /* ArcGISToolkit */; };
007FC9482534E8AE00D8D9A1 /* darkmode.css in Resources */ = {isa = PBXBuildFile; fileRef = 007FC9452534E8AE00D8D9A1 /* darkmode.css */; };
007FC9492534E8AE00D8D9A1 /* solarized-dark.css in Resources */ = {isa = PBXBuildFile; fileRef = 007FC9472534E8AE00D8D9A1 /* solarized-dark.css */; };
0083AA192628ED18003A28C8 /* ProgressViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0083AA162628ED18003A28C8 /* ProgressViewController.xib */; };
Expand Down Expand Up @@ -611,7 +612,6 @@
4C6FAE1A22F8A37D00BE2D0B /* ControlAnnotationSublayerVisibilityViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4CE15D4B22F37A2D005F2968 /* ControlAnnotationSublayerVisibilityViewController.swift */; };
4C6FAE1B22F8A38300BE2D0B /* ControlAnnotationSublayerVisibilitySublayersViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4CE15D5222F380FB005F2968 /* ControlAnnotationSublayerVisibilitySublayersViewController.swift */; };
4C6FAE1C22F8A38700BE2D0B /* ControlAnnotationSublayerVisibilitySublayerCell.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C54BF2C22F4C0940096D23C /* ControlAnnotationSublayerVisibilitySublayerCell.swift */; };
4C73C837211130E000B0F9C7 /* ArcGIS.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4C73C83421112B4300B0F9C7 /* ArcGIS.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
4C783F3C2252D61200609B9C /* OpenMobileScene.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4C783F3B2252D61200609B9C /* OpenMobileScene.storyboard */; };
4C783F3E2252D65A00609B9C /* OpenMobileSceneViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C783F3D2252D65A00609B9C /* OpenMobileSceneViewController.swift */; };
4C783F3F2252D80B00609B9C /* OpenMobileSceneViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C783F3D2252D65A00609B9C /* OpenMobileSceneViewController.swift */; };
Expand Down Expand Up @@ -649,7 +649,6 @@
4CCA30D4223AEF2C009D2AEF /* IntegratedWindowsAuthenticationSearchTableViewCell.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C1EF29C220FEBAB00F73EAE /* IntegratedWindowsAuthenticationSearchTableViewCell.swift */; };
4CCA30D5223AEF2C009D2AEF /* IntegratedWindowsAuthenticationPortalMapBrowserViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4CCA30BF223813BF009D2AEF /* IntegratedWindowsAuthenticationPortalMapBrowserViewController.swift */; };
4CCA30D6223AEF2C009D2AEF /* IntegratedWindowsAuthenticationMapViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C1EF2D0221232C500F73EAE /* IntegratedWindowsAuthenticationMapViewController.swift */; };
4CCC0877234E78BB00AD5F9A /* ArcGISToolkit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 97466015234265F6008EF35A /* ArcGISToolkit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
4CCE7BD620D2BD34001238F5 /* DistanceMeasurementAnalysisViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCE7BD520D2BD34001238F5 /* DistanceMeasurementAnalysisViewController.swift */; };
4CCE7BD820D2BD4E001238F5 /* DistanceMeasurementAnalysis.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4CCE7BD720D2BD4E001238F5 /* DistanceMeasurementAnalysis.storyboard */; };
4CD2B55F2142EB2600767D87 /* SampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD2B55E2142EB2600767D87 /* SampleTests.swift */; };
Expand All @@ -673,7 +672,6 @@
940A73F420E588C200A06C80 /* CutGeometry.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 940A73F320E588C200A06C80 /* CutGeometry.storyboard */; };
940A73F620E589AB00A06C80 /* CutGeometryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 940A73F520E589AB00A06C80 /* CutGeometryViewController.swift */; };
940A73F720E6BF3F00A06C80 /* CutGeometryViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 940A73F520E589AB00A06C80 /* CutGeometryViewController.swift */; };
9746601B234266A3008EF35A /* ArcGISToolkit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97466015234265F6008EF35A /* ArcGISToolkit.framework */; };
97DD84671B2B869300184B41 /* xcode.css in Resources */ = {isa = PBXBuildFile; fileRef = 97DD84661B2B869300184B41 /* xcode.css */; };
9D57A46722FDDE4400C750F4 /* LocationHistoryViewController.swift in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9DE9FE3222FDB7CA00142DE1 /* LocationHistoryViewController.swift */; };
9D5EDFE3230741670019C46A /* PreplannedMapAreaTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D5EDFE2230741670019C46A /* PreplannedMapAreaTableViewCell.swift */; };
Expand Down Expand Up @@ -907,34 +905,13 @@
/* End PBXBuildRule section */

/* Begin PBXContainerItemProxy section */
4C8C80BB23AC3FF5000333B3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97466010234265F6008EF35A /* ArcGISToolkit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = E4685B03237CA3C400F168CF;
remoteInfo = ArcGISToolkitTests;
};
4CD2B5592142EAF900767D87 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 3E23A9D81AFC28F6002E2214 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 3E23A9DF1AFC28F6002E2214;
remoteInfo = "arcgis-ios-sdk-samples";
};
97466014234265F6008EF35A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97466010234265F6008EF35A /* ArcGISToolkit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 881233701DF601A700B2EA8E;
remoteInfo = ArcGISToolkit;
};
9746601D234266A3008EF35A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97466010234265F6008EF35A /* ArcGISToolkit.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 8812336F1DF601A700B2EA8E;
remoteInfo = ArcGISToolkit;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -1222,18 +1199,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
4C73C838211130E000B0F9C7 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
4CCC0877234E78BB00AD5F9A /* ArcGISToolkit.framework in Embed Frameworks */,
4C73C837211130E000B0F9C7 /* ArcGIS.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -1658,7 +1623,6 @@
4C66AAF62107C4F400EE6346 /* QueryMapImageSublayer.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = QueryMapImageSublayer.storyboard; sourceTree = "<group>"; };
4C66AAF82107C50B00EE6346 /* QueryMapImageSublayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QueryMapImageSublayerViewController.swift; sourceTree = "<group>"; };
4C68A28A22DE9D3E0009F43C /* FileTypes.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = FileTypes.plist; sourceTree = "<group>"; };
4C73C83421112B4300B0F9C7 /* ArcGIS.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = ArcGIS.xcframework; path = $HOME/Library/SDKs/ArcGIS/Frameworks/ArcGIS.xcframework; sourceTree = "<absolute>"; };
4C783F3B2252D61200609B9C /* OpenMobileScene.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = OpenMobileScene.storyboard; sourceTree = "<group>"; };
4C783F3D2252D65A00609B9C /* OpenMobileSceneViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenMobileSceneViewController.swift; sourceTree = "<group>"; };
4C783F412252DBAC00609B9C /* philadelphia.mspk */ = {isa = PBXFileReference; lastKnownFileType = file; path = philadelphia.mspk; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1698,7 +1662,6 @@
4CF6DF1E22F2094F00A3092A /* LothianRiversAnno.mmpk */ = {isa = PBXFileReference; lastKnownFileType = file; path = LothianRiversAnno.mmpk; sourceTree = "<group>"; };
940A73F320E588C200A06C80 /* CutGeometry.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CutGeometry.storyboard; sourceTree = "<group>"; };
940A73F520E589AB00A06C80 /* CutGeometryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CutGeometryViewController.swift; sourceTree = "<group>"; };
97466010234265F6008EF35A /* ArcGISToolkit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ArcGISToolkit.xcodeproj; path = "arcgis-runtime-toolkit-ios/Toolkit/ArcGISToolkit.xcodeproj"; sourceTree = "<group>"; };
97DD84661B2B869300184B41 /* xcode.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = xcode.css; sourceTree = "<group>"; };
9D5EDFE2230741670019C46A /* PreplannedMapAreaTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreplannedMapAreaTableViewCell.swift; sourceTree = "<group>"; };
9DA3CD8B23060687007CB1F3 /* MapSelectionTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapSelectionTableViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1852,7 +1815,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9746601B234266A3008EF35A /* ArcGISToolkit.framework in Frameworks */,
006A786A262F9F15001D2A5E /* ArcGISToolkit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2377,9 +2340,7 @@
4CD2B5552142EAF900767D87 /* arcgis-ios-sdk-samplesTests */,
4CB506D3224C2DBC006A3471 /* Portal Data */,
4CB506D2224C2DA5006A3471 /* Scripts */,
4C73C83321112AFF00B0F9C7 /* Frameworks */,
3E23A9E11AFC28F6002E2214 /* Products */,
97466010234265F6008EF35A /* ArcGISToolkit.xcodeproj */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -3857,14 +3818,6 @@
path = "Query a map image sublayer";
sourceTree = "<group>";
};
4C73C83321112AFF00B0F9C7 /* Frameworks */ = {
isa = PBXGroup;
children = (
4C73C83421112B4300B0F9C7 /* ArcGIS.xcframework */,
);
name = Frameworks;
sourceTree = "<group>";
};
4C783F3A2252D55900609B9C /* Open mobile scene (scene package) */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4044,15 +3997,6 @@
path = "Cut geometry";
sourceTree = "<group>";
};
97466011234265F6008EF35A /* Products */ = {
isa = PBXGroup;
children = (
97466015234265F6008EF35A /* ArcGISToolkit.framework */,
4C8C80BC23AC3FF5000333B3 /* ArcGISToolkitTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
9D4BA6C822FCAFAD0086D5D3 /* Show location history */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4655,16 +4599,17 @@
3E23A9DE1AFC28F6002E2214 /* Resources */,
3E03F0951B056DC40078EB36 /* CopyFiles */,
3ED029A21B8E5D4D00ACA70D /* ShellScript */,
4C73C838211130E000B0F9C7 /* Embed Frameworks */,
4CBDB3192190E88F006E5D39 /* Lint Code */,
);
buildRules = (
007A424F256C747E0025F582 /* PBXBuildRule */,
);
dependencies = (
9746601E234266A3008EF35A /* PBXTargetDependency */,
);
name = "ArcGIS Runtime SDK Samples";
packageProductDependencies = (
006A7869262F9F15001D2A5E /* ArcGISToolkit */,
);
productName = "arcgis-ios-sdk-samples";
productReference = 3E23A9E01AFC28F6002E2214 /* ArcGIS Runtime SDK Samples.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -4761,14 +4706,11 @@
Base,
);
mainGroup = 3E23A9D71AFC28F6002E2214;
packageReferences = (
006A7868262F9F15001D2A5E /* XCRemoteSwiftPackageReference "arcgis-runtime-toolkit-ios" */,
);
productRefGroup = 3E23A9E11AFC28F6002E2214 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 97466011234265F6008EF35A /* Products */;
ProjectRef = 97466010234265F6008EF35A /* ArcGISToolkit.xcodeproj */;
},
);
projectRoot = "";
targets = (
3E23A9DF1AFC28F6002E2214 /* ArcGIS Runtime SDK Samples */,
Expand All @@ -4777,23 +4719,6 @@
};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
4C8C80BC23AC3FF5000333B3 /* ArcGISToolkitTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = ArcGISToolkitTests.xctest;
remoteRef = 4C8C80BB23AC3FF5000333B3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
97466015234265F6008EF35A /* ArcGISToolkit.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = ArcGISToolkit.framework;
remoteRef = 97466014234265F6008EF35A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
3E23A9DE1AFC28F6002E2214 /* Resources */ = {
isa = PBXResourcesBuildPhase;
Expand Down Expand Up @@ -5508,11 +5433,6 @@
target = 3E23A9DF1AFC28F6002E2214 /* ArcGIS Runtime SDK Samples */;
targetProxy = 4CD2B5592142EAF900767D87 /* PBXContainerItemProxy */;
};
9746601E234266A3008EF35A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = ArcGISToolkit;
targetProxy = 9746601D234266A3008EF35A /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -5773,6 +5693,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
006A7868262F9F15001D2A5E /* XCRemoteSwiftPackageReference "arcgis-runtime-toolkit-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Esri/arcgis-runtime-toolkit-ios";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 100.11.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
006A7869262F9F15001D2A5E /* ArcGISToolkit */ = {
isa = XCSwiftPackageProductDependency;
package = 006A7868262F9F15001D2A5E /* XCRemoteSwiftPackageReference "arcgis-runtime-toolkit-ios" */;
productName = ArcGISToolkit;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 3E23A9D81AFC28F6002E2214 /* Project object */;
}
1 change: 0 additions & 1 deletion arcgis-runtime-toolkit-ios
Submodule arcgis-runtime-toolkit-ios deleted from 5f1e65

0 comments on commit e2cc9a8

Please sign in to comment.