Move and rename iOS project so it works with KMM plugin

Enables iOS KMP debug on device in Android Studio
This commit is contained in:
Olof Hedman
2025-10-23 15:38:10 +02:00
parent ceb377d8a8
commit e8a3416658
684 changed files with 247 additions and 103 deletions

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.example.GoogleMapsDemos</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Show your location on the map</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,103 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "Maps-SDK-Demo-App_120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "Maps-SDK-Demo-App_180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "Maps-SDK-Demo-App_76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "Maps-SDK-Demo-App_152.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "Maps-SDK-Demo-App_167.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="FA1-J0-KAa">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Table View Controller-->
<scene sceneID="BiP-r6-d2e">
<objects>
<tableViewController clearsSelectionOnViewWillAppear="NO" id="MEq-fz-d5D" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="TxE-uG-WRf">
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections>
<tableViewSection headerTitle=" " id="knR-Pj-As9">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="USa-fA-rSo">
<rect key="frame" x="0.0" y="28" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="USa-fA-rSo" id="B07-0v-1rs">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="cx7-vJ-Uys">
<rect key="frame" x="0.0" y="72" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cx7-vJ-Uys" id="yzB-kq-4h5">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Y7t-7w-LlT">
<rect key="frame" x="0.0" y="116" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Y7t-7w-LlT" id="xEX-UD-8pF">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="MEq-fz-d5D" id="ifl-DD-lEK"/>
<outlet property="delegate" destination="MEq-fz-d5D" id="dSy-kE-SWt"/>
</connections>
</tableView>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
<navigationItem key="navigationItem" id="OVc-ik-KAD"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yhF-d5-Y7D" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1630" y="-96"/>
</scene>
<!--View Controller-->
<scene sceneID="6Gc-8o-0et">
<objects>
<viewController id="YRZ-j4-N6z" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="I2y-I1-GwB"/>
<viewControllerLayoutGuide type="bottom" id="hWz-J8-gdE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="9XH-ez-F0t">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.9137254901960784" green="0.89803921568627454" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
</view>
<navigationItem key="navigationItem" id="gM0-ZE-dNL"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="eOH-9U-1Zu" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1630" y="588"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="GlB-rK-pG2">
<objects>
<navigationController id="WOd-NA-Oqr" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="s66-cv-zc0">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="MEq-fz-d5D" kind="relationship" relationship="rootViewController" id="thR-Dz-4vA"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="72E-Ti-ULj" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="876" y="-96"/>
</scene>
<!--Split View Controller-->
<scene sceneID="EIS-Y8-RQ6">
<objects>
<splitViewController id="FA1-J0-KAa" sceneMemberID="viewController">
<connections>
<segue destination="WOd-NA-Oqr" kind="relationship" relationship="masterViewController" id="Zm1-nY-LVC"/>
<segue destination="l6G-hw-ciz" kind="relationship" relationship="detailViewController" id="gpz-nc-7Ae"/>
</connections>
</splitViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="LLF-Wb-Fvv" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-10" y="235"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="Cv7-Zr-41p">
<objects>
<navigationController id="l6G-hw-ciz" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="rqN-jS-PAw">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="YRZ-j4-N6z" kind="relationship" relationship="rootViewController" id="Xg7-wq-csC"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hgH-vw-zuX" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="876" y="588"/>
</scene>
</scenes>
</document>

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,191 @@
[
{
"featureType": "all",
"elementType": "geometry",
"stylers": [
{
"color": "#242f3e"
}
]
},
{
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": [
{
"lightness": -80
}
]
},
{
"featureType": "administrative",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#746855"
}
]
},
{
"featureType": "administrative.locality",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#d59563"
}
]
},
{
"featureType": "poi",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#d59563"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry",
"stylers": [
{
"color": "#263c3f"
}
]
},
{
"featureType": "poi.park",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#6b9a76"
}
]
},
{
"featureType": "road",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#2b3544"
}
]
},
{
"featureType": "road",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9ca5b3"
}
]
},
{
"featureType": "road.arterial",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#38414e"
}
]
},
{
"featureType": "road.arterial",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#212a37"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#746855"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#1f2835"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#f3d19c"
}
]
},
{
"featureType": "road.local",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#38414e"
}
]
},
{
"featureType": "road.local",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#212a37"
}
]
},
{
"featureType": "transit",
"elementType": "geometry",
"stylers": [
{
"color": "#2f3948"
}
]
},
{
"featureType": "transit.station",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#d59563"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#17263c"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#515c6d"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.stroke",
"stylers": [
{
"lightness": -20
}
]
}
]

View File

@@ -0,0 +1,191 @@
[
{
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#755f5d"
}
]
},
{
"featureType": "administrative",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#d4ccb9"
}
]
},
{
"featureType": "administrative.country",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#baafae"
}
]
},
{
"featureType": "administrative.land_parcel",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#d4ccb9"
}
]
},
{
"featureType": "landscape.man_made",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#ebe3cd"
}
]
},
{
"featureType": "landscape.natural",
"elementType": "geometry",
"stylers": [
{
"color": "#ebe3cd"
}
]
},
{
"featureType": "landscape.natural",
"elementType": "geometry.fill",
"stylers": [
{
"lightness": -10
}
]
},
{
"featureType": "poi",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#d4ccb9"
}
]
},
{
"featureType": "poi",
"elementType": "labels.icon",
"stylers": [
{
"hue": "#ff7f00"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#9ba56f"
}
]
},
{
"featureType": "road",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#f5f1e6"
}
]
},
{
"featureType": "road",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#dfd8c3"
}
]
},
{
"featureType": "road.arterial",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#fdfcf8"
}
]
},
{
"featureType": "road.arterial",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#e4e3df"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#f2cb77"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#ecb43d"
}
]
},
{
"featureType": "road.highway.controlled_access",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#e98d58"
}
]
},
{
"featureType": "road.highway.controlled_access",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#d27f4f"
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{
"color": "#d4ccb9"
}
]
},
{
"featureType": "transit.station.airport",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#d4ccb9"
}
]
},
{
"featureType": "water",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#b9d3c2"
}
]
}
]

View File

@@ -0,0 +1,101 @@
[
{
"featureType": "all",
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
"featureType": "all",
"elementType": "labels.icon",
"stylers": [
{
"saturation": -100
}
]
},
{
"featureType": "all",
"elementType": "labels.text",
"stylers": [
{
"saturation": -100
}
]
},
{
"featureType": "poi",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{
"color": "#ffffff"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry",
"stylers": [
{
"color": "#dadada"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.icon",
"stylers": [
{
"lightness": 30
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "transit.station",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#c9c9c9"
}
]
}
]

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,30 @@
[
{
"key": "h1",
"name": "Hughes H-1",
"lat": 38.8879,
"lng": -77.02085,
"level": "1"
},
{
"key": "voyager",
"name": "Rutan Voyager",
"lat": 38.8880,
"lng": -77.0199,
"level": "1"
},
{
"key": "spitfire",
"name": "Supermarine Spitfire",
"lat": 38.8879,
"lng": -77.0208,
"level": "2"
},
{
"key": "x29",
"name": "Grumman X-29",
"lat": 38.88845,
"lng": -77.01875,
"level": "2"
}
]

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,44 @@
// Copyright 2020 Google LLC. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
import GoogleMaps
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UIWindowSceneDelegate {
private var services: Any?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey(SDKConstants.apiKey)
// Metal is the preferred renderer.
GMSServices.setMetalRendererEnabled(true)
services = GMSServices.sharedServices()
return true
}
func application(
_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
let config = UISceneConfiguration(
name: "Default configuration", sessionRole: connectingSceneSession.role)
config.delegateClass = SceneDelegate.self
return config
}
}

View File

@@ -0,0 +1,29 @@
// Copyright 2020 Google LLC. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
import CoreLocation
enum SDKConstants {
#error("Register for API Key and insert here. Then delete this line.")
static let apiKey = ""
}
extension CLLocationCoordinate2D {
static let sydney = CLLocationCoordinate2D(latitude: -33.8683, longitude: 151.2086)
// Victoria, Australia
static let victoria = CLLocationCoordinate2D(latitude: -37.81969, longitude: 144.966085)
static let newYork = CLLocationCoordinate2D(latitude: 40.761388, longitude: -73.978133)
static let mountainSceneLocation = CLLocationCoordinate2D(
latitude: -33.732022, longitude: 150.312114)
}

View File

@@ -0,0 +1,141 @@
// Copyright 2020 Google LLC. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
import GoogleMaps
import UIKit
class SampleListViewController: UIViewController {
static let sampleCellIdentifier = "sampleCellIdentifier"
var sampleSections = Samples.allSamples()
lazy var tableView: UITableView = UITableView()
var shouldCollapseDetailViewController = true
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(tableView)
tableView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
tableView.topAnchor.constraint(equalTo: view.topAnchor),
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
])
tableView.register(
UITableViewCell.self, forCellReuseIdentifier: SampleListViewController.sampleCellIdentifier)
tableView.dataSource = self
tableView.delegate = self
let searchController = UISearchController()
searchController.searchResultsUpdater = self
searchController.searchBar.autocapitalizationType = .none
searchController.searchBar.accessibilityIdentifier = "SamplesTableViewSearchBar"
searchController.obscuresBackgroundDuringPresentation = false
self.navigationItem.searchController = searchController
}
}
extension SampleListViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return sampleSections[section].samples.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(
withIdentifier: SampleListViewController.sampleCellIdentifier, for: indexPath)
if let sample = sample(at: indexPath) {
cell.textLabel?.text = sample.title
}
return cell
}
func numberOfSections(in tableView: UITableView) -> Int {
return sampleSections.count
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return sampleSections[section].name
}
func sample(at indexPath: IndexPath) -> Sample? {
guard indexPath.section >= 0 && indexPath.section < sampleSections.count else { return nil }
let section = sampleSections[indexPath.section]
guard indexPath.row >= 0 && indexPath.row < section.samples.count else { return nil }
return section.samples[indexPath.row]
}
}
extension SampleListViewController: UITableViewDelegate {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
shouldCollapseDetailViewController = false
tableView.deselectRow(at: indexPath, animated: true)
if let sample = sample(at: indexPath) {
let viewController = sample.viewControllerClass.init()
viewController.title = sample.title
let navController = UINavigationController(rootViewController: viewController)
navController.navigationBar.isTranslucent = false
showDetailViewController(navController, sender: self)
}
}
}
extension SampleListViewController: UISplitViewControllerDelegate {
func primaryViewController(forExpanding splitViewController: UISplitViewController)
-> UIViewController?
{
tableView.reloadData()
return nil
}
func primaryViewController(forCollapsing splitViewController: UISplitViewController)
-> UIViewController?
{
tableView.reloadData()
return nil
}
func splitViewController(
_ splitViewController: UISplitViewController,
collapseSecondary secondaryViewController: UIViewController,
onto primaryViewController: UIViewController
) -> Bool {
return shouldCollapseDetailViewController
}
}
extension SampleListViewController: UISearchResultsUpdating {
func updateSearchResults(for searchController: UISearchController) {
defer { tableView.reloadData() }
let text = searchController.searchBar.text
guard let filterString = text?.trimmingCharacters(in: .whitespaces).lowercased(),
!filterString.isEmpty
else {
sampleSections = Samples.allSamples()
return
}
sampleSections = Samples.allSamples().reduce(into: []) { samples, section in
guard section.samples.contains(where: { $0.matches(filterString) }) else { return }
let filteredSamples = section.samples.filter({ $0.matches(filterString) })
samples.append(Section(name: section.name, samples: filteredSamples))
}
}
}
extension Sample {
func matches(_ filter: String) -> Bool {
return title.lowercased().contains(filter)
|| String(describing: viewControllerClass).lowercased().contains(filter)
}
}

View File

@@ -0,0 +1,87 @@
// Copyright 2020 Google LLC. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
import GoogleMaps
import UIKit
final class AnimatedCurrentLocationViewController: UIViewController {
private var locationMarker: GMSMarker?
private let locationManager = CLLocationManager()
private lazy var mapView: GMSMapView = {
let camera = GMSCameraPosition(latitude: 38.8879, longitude: -77.0200, zoom: 17)
return GMSMapView(frame: .zero, camera: camera)
}()
override func loadView() {
mapView.settings.myLocationButton = false
mapView.settings.indoorPicker = false
view = mapView
}
override func viewDidLoad() {
super.viewDidLoad()
// Setup location services
guard CLLocationManager.locationServicesEnabled() else {
print("Please enable location services")
return
}
if CLLocationManager.authorizationStatus() == .denied {
print("Please authorize location services")
return
}
locationManager.requestWhenInUseAuthorization()
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.distanceFilter = 5.0
locationManager.startUpdatingLocation()
}
}
extension AnimatedCurrentLocationViewController: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
if CLLocationManager.authorizationStatus() == .denied {
print("Please authorize location services")
return
}
print("Unable to get current location. Error: \(error.localizedDescription)")
}
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
guard let location = locations.last else { return }
if let existingMaker = locationMarker {
CATransaction.begin()
CATransaction.setAnimationDuration(2.0)
existingMaker.position = location.coordinate
CATransaction.commit()
} else {
let marker = GMSMarker(position: location.coordinate)
// Animated walker images derived from a www.angryanimator.com tutorial.
// See: http://www.angryanimator.com/word/2010/11/26/tutorial-2-walk-cycle/
let animationFrames = (1...8).compactMap {
UIImage(named: "step\($0)")
}
marker.icon = UIImage.animatedImage(with: animationFrames, duration: 0.8)
// Taking into account walker's shadow.
marker.groundAnchor = CGPoint(x: 0.5, y: 0.97)
marker.map = mapView
locationMarker = marker
}
mapView.animate(with: GMSCameraUpdate.setTarget(location.coordinate, zoom: 17))
}
}

View File

@@ -0,0 +1,114 @@
// Copyright 2020 Google LLC. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
import GoogleMaps
import UIKit
// Sample code for customizing the marker.
class AnimatedUIViewMarkerViewController: UIViewController {
private lazy var mapView: GMSMapView = {
let camera = GMSCameraPosition(latitude: -33.8683, longitude: 151.2086, zoom: 5)
return GMSMapView(frame: .zero, camera: camera)
}()
private var infoView: UIImageView?
override func loadView() {
view = mapView
mapView.delegate = self
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
mapView.clear()
addDefaultMarkers()
}
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(
self, selector: #selector(applicationWillEnterForeground),
name: UIApplication.willEnterForegroundNotification, object: nil)
}
@objc func applicationWillEnterForeground() {
mapView.clear()
addDefaultMarkers()
}
func addDefaultMarkers() {
// Add a custom 'glow' marker with a pulsing blue shadow on Sydney.
let sydneyMarker = GMSMarker(
position: CLLocationCoordinate2D(latitude: -33.8683, longitude: 151.2086))
sydneyMarker.title = "Sydney!"
sydneyMarker.iconView = UIImageView(image: UIImage(named: "glow-marker"))
sydneyMarker.iconView?.contentMode = .center
sydneyMarker.map = mapView
guard let oldBounds = sydneyMarker.iconView?.bounds else { return }
sydneyMarker.iconView?.bounds = CGRect(
origin: oldBounds.origin,
size: CGSize(width: oldBounds.size.width * 2, height: oldBounds.size.height * 2))
sydneyMarker.groundAnchor = CGPoint(x: 0.5, y: 0.75)
sydneyMarker.infoWindowAnchor = CGPoint(x: 0.5, y: 0.25)
let sydneyGlow = UIImageView(image: UIImage(named: "glow-marker"))
sydneyGlow.layer.shadowColor = UIColor.blue.cgColor
sydneyGlow.layer.shadowOffset = .zero
sydneyGlow.layer.shadowRadius = 8
sydneyGlow.layer.shadowOpacity = 1.0
sydneyGlow.layer.opacity = 0.0
sydneyMarker.iconView?.addSubview(sydneyGlow)
sydneyGlow.center = CGPoint(x: oldBounds.size.width, y: oldBounds.size.height)
UIView.animate(
withDuration: 1, delay: 0, options: [.curveEaseInOut, .autoreverse, .repeat],
animations: {
sydneyGlow.layer.opacity = 1.0
},
completion: { _ in
// If the animation is ever terminated, no need to keep tracking the view for changes.
sydneyMarker.tracksViewChanges = false
})
}
}
extension AnimatedUIViewMarkerViewController: GMSMapViewDelegate {
func mapView(_ mapView: GMSMapView, markerInfoContents marker: GMSMarker) -> UIView? {
marker.tracksInfoWindowChanges = true
let infoView = UIImageView(image: UIImage(named: "arrow"))
infoView.backgroundColor = .clear
UIView.animate(
withDuration: 1, delay: 0, options: [.curveLinear],
animations: {
infoView.backgroundColor = UIColor(
hue: CGFloat.random(in: 0..<1), saturation: 1, brightness: 1, alpha: 1)
},
completion: { _ in
UIView.animate(
withDuration: 1, delay: 0, options: [.curveLinear],
animations: {
infoView.backgroundColor = .clear
},
completion: { _ in
marker.tracksInfoWindowChanges = false
})
})
self.infoView = infoView
return infoView
}
func mapView(_ mapView: GMSMapView, didCloseInfoWindowOf marker: GMSMarker) {
infoView = nil
marker.tracksInfoWindowChanges = false
}
}

View File

@@ -0,0 +1,55 @@
// Copyright 2020 Google LLC. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, either express or implied. See the License for the specific language governing
// permissions and limitations under the License.
import GoogleMaps
import UIKit
class BasicMapViewController: UIViewController {
var statusLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Seattle coordinates
let camera = GMSCameraPosition(latitude: 47.6089945, longitude: -122.3410462, zoom: 14)
let mapView = GMSMapView(frame: view.bounds, camera: camera)
mapView.delegate = self
view = mapView
navigationController?.navigationBar.isTranslucent = false
statusLabel = UILabel(frame: .zero)
statusLabel.alpha = 0.0
statusLabel.backgroundColor = .blue
statusLabel.textColor = .white
statusLabel.textAlignment = .center
view.addSubview(statusLabel)
statusLabel.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
statusLabel.topAnchor.constraint(equalTo: view.topAnchor),
statusLabel.heightAnchor.constraint(equalToConstant: 30),
statusLabel.leadingAnchor.constraint(equalTo: view.leadingAnchor),
statusLabel.trailingAnchor.constraint(equalTo: view.trailingAnchor),
])
}
}
extension BasicMapViewController: GMSMapViewDelegate {
func mapViewDidStartTileRendering(_ mapView: GMSMapView) {
statusLabel.alpha = 0.8
statusLabel.text = "Rendering"
}
func mapViewDidFinishTileRendering(_ mapView: GMSMapView) {
statusLabel.alpha = 0.0
}
}

Some files were not shown because too many files have changed in this diff Show More