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

Commit

Permalink
Support 8.3.1
Browse files Browse the repository at this point in the history
Note GoogleMaps.bundle needs to be manually added.
  • Loading branch information
s-faychatelard committed Dec 5, 2023
1 parent ae46326 commit fac43ce
Show file tree
Hide file tree
Showing 146 changed files with 55 additions and 86 deletions.
7 changes: 0 additions & 7 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file added GoogleMapsResources/GoogleMaps.bundle/Assets.car
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ...le/GMSCoreResources.bundle/[email protected]
Binary file added ...le/GMSCoreResources.bundle/[email protected]
Binary file added ...undle/GMSCoreResources.bundle/[email protected]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added GoogleMapsResources/GoogleMaps.bundle/Info.plist
Binary file not shown.
Binary file added GoogleMapsResources/GoogleMaps.bundle/ic_error.png
Binary file not shown.
13 changes: 7 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PackageDescription

let package = Package(
name: "GoogleMaps",
defaultLocalization: "en",
products: [
.library(
name: "GoogleMapsBase",
Expand All @@ -28,18 +29,18 @@ let package = Package(
targets: [
.binaryTarget(
name: "GoogleMaps",
url: "https://github.com/gomore/GoogleMaps-SPM/releases/download/8.0.0/GoogleMaps.xcframework.zip",
checksum: "bf95c3605dc1a27cf95b1ca9d4f0e3c9e27df2764467edfadaf80d41c12201bf"
url: "https://github.com/gomore/GoogleMaps-SPM/releases/download/8.3.1/GoogleMaps.xcframework.zip",
checksum: "36f180556405a1ac6a934dd779fdfd280e19a73121eba45b32e4ee9f1e6370f2"
),
.binaryTarget(
name: "GoogleMapsBase",
url: "https://github.com/gomore/GoogleMaps-SPM/releases/download/8.0.0/GoogleMapsBase.xcframework.zip",
checksum: "fd37243f5b1e260bbf7dbe2a27698fbf799860da1e52f3e21373ae6f429ad92a"
url: "https://github.com/gomore/GoogleMaps-SPM/releases/download/8.3.1/GoogleMapsBase.xcframework.zip",
checksum: "5e0a2259f86e4d83e6ffa307dcab3593bccaf8dbc090cf1fac78ee593a892ef2"
),
.binaryTarget(
name: "GoogleMapsCore",
url: "https://github.com/gomore/GoogleMaps-SPM/releases/download/8.0.0/GoogleMapsCore.xcframework.zip",
checksum: "4fce1d60374422ca5e8ca7c4198eed98ca3d1081a85e1b4b75783e5224f43f56"
url: "https://github.com/gomore/GoogleMaps-SPM/releases/download/8.3.1/GoogleMapsCore.xcframework.zip",
checksum: "3055ba0738bc1e596c1e3f33c37974cfbfa95c3877021b4f06126cd299990065"
)
]
)
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,53 @@ This project rebuilds Google's beta XCFrameworks so they can be added as a depen

## Requirements

* [iOS 13.0](https://wikipedia.org/wiki/IOS_13) or later.
* [Xcode 14.0](https://developer.apple.com/xcode) or later.
- [iOS 13.0](https://wikipedia.org/wiki/IOS_13) or later.
- [Xcode 14.0](https://developer.apple.com/xcode) or later.

## Add as a dependecy to your Swift Package

```swift
dependencies: [
.package(url: "https://github.com/gomore/GoogleMaps-SPM.git", from: "7.2.0")
.package(url: "https://github.com/gomore/GoogleMaps-SPM.git", from: "8.3.1")
]
```

## Build XCFrameworks yourself
## Build XCFrameworks yourself (Deprecated because Google provides already merged binaries)

1. Clone this project.
2. Download official XCFrameworks from Google:
- [GoogleMaps SDK](https://developers.google.com/maps/documentation/ios-sdk/config#install-the-xcframework)
- [GooglePlaces SDK](https://developers.google.com/maps/documentation/places/ios-sdk/config#install-the-xcframework)

- [GoogleMaps SDK](https://developers.google.com/maps/documentation/ios-sdk/config#install-the-xcframework)
- [GooglePlaces SDK](https://developers.google.com/maps/documentation/places/ios-sdk/config#install-the-xcframework)

3. Unzip and put downloaded XCFrameworks inside `GoogleFrameworks` directory
4. Run `make_xcframeworks.sh -x` script.
5. You can find your new XCFrameworks in `Build` directory.

## Setup

For now, the `GoogleMaps.bundle` must be added to your project. You can add it to any SP and use copy.

Here is an example of an SP configuration where you added the bundle to the root.

```
.target(
name: "Map",
dependencies: [
.product(name: "GoogleMaps", package: "GoogleMaps-SPM"),
.product(name: "GoogleMapsBase", package: "GoogleMaps-SPM"),
.product(name: "GoogleMapsCore", package: "GoogleMaps-SPM"),
.product(name: "GoogleMapsResources", package: "GoogleMaps-SPM")
],
resources: [
.copy("GoogleMaps.bundle")
]
),
```

## License & Copyright

The **Google Maps iOS SDK** and **Google Places iOS SDK** libraries are the property of Google and are subject to *Google's Terms of Service*. See [LICENSE.google](LICENSE.google) for details.
The **Google Maps iOS SDK** and **Google Places iOS SDK** libraries are the property of Google and are subject to _Google's Terms of Service_. See [LICENSE.google](LICENSE.google) for details.

This repo is a fork of [darrarski/GoogleMaps-SP](https://github.com/darrarski/GoogleMaps-SP) with some tweeks that adds support for ARM64 simulator.

Expand Down
27 changes: 18 additions & 9 deletions make_xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,40 @@ function create_xcframework() {

# Compress the XCFramework.
zip -r -X "$framework_name.xcframework.zip" "$framework_name.xcframework/"

# Save the SHA-256 checksum.
shasum -a 256 "$framework_name.xcframework.zip" >> checksum
}

function prepare() {
# Create Build directory if not existing.
if [ ! -d "$BUILD_DIRECTORY" ]; then
mkdir $BUILD_DIRECTORY
fi

cd $BUILD_DIRECTORY
}

function cleanup() {
rm -r *.xcframework
rm -r *.xcarchive
}

function print_completion_message() {
echo $'\n** XCFRAMEWORK CREATION FINISHED **\n'
function generate_checksum() {
prepare

# Save the SHA-256 checksum.
shasum -a 256 "GoogleMaps.xcframework.zip" > checksum
shasum -a 256 "GoogleMapsBase.xcframework.zip" >> checksum
shasum -a 256 "GoogleMapsCore.xcframework.zip" >> checksum
}

function build_xcproject_project() {
prepare

cd $BUILD_DIRECTORY

create_xcframework "GoogleMaps" "GoogleMaps"
create_xcframework "GoogleMaps" "GoogleMapsBase"
create_xcframework "GoogleMaps" "GoogleMapsCore"

generate_checksum

cleanup
}

Expand All @@ -81,18 +85,23 @@ function help() {
echo "Syntax: make_xcframework [-x|h]"
echo "options:"
echo "x Create an XCFramework by building the Xcode project."
echo "c Generate checksum."
echo "h Print this Help."
echo
}

while getopts ":hxg" flag; do
while getopts ":hxcg" flag; do
case "${flag}" in
h) # display Help
help
exit;;
x) # Build Xcode project
build_xcproject_project
print_completion_message
echo $'\n** XCFRAMEWORK CREATION FINISHED **\n'
exit;;
c) # Generate checksum for zips
generate_checksum
echo $'\n** CHECKSUM CREATION FINISHED **\n'
exit;;
\?) # Invalid option
echo "Error: Invalid option"
Expand Down

0 comments on commit fac43ce

Please sign in to comment.