Skip to content

Commit

Permalink
fix: nil userData on marker when clustering/declustering. (#350)
Browse files Browse the repository at this point in the history
* fix: nil userData on marker when clustering/declustering.

Change-Id: Icbb035c74232cbde1a87b5673ad630230a73b2f2

* Using carthage workaround.

Change-Id: Id92c9f5ff823057ff3278e7e237313e748ae99ab

* CocoaPods workaround.

Change-Id: I52ab508e669f2cddb35d711d8500de4a6575b604
  • Loading branch information
arriolac committed Nov 23, 2020
1 parent d6bd94f commit 1a5863e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -35,10 +35,10 @@ jobs:
brew install carthage
- name: Carthage update
run: carthage update --platform iOS
run: ./carthage.sh update --platform iOS

- name: Carthage build
run: carthage build --no-skip-current
run: ./carthage.sh build --no-skip-current

- name: Build DevApp
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Carthage update
run: |
carthage build
./carthage.sh build
- name: Create XCFramework
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -36,10 +36,10 @@ jobs:
sudo gem install cocoapods
- name: Carthage update
run: carthage update --platform iOS
run: ./carthage.sh update --platform iOS

- name: Carthage build
run: carthage build --no-skip-current
run: ./carthage.sh build --no-skip-current

- name: CocoaPods spec lint
run: pod spec lint
Expand Down
2 changes: 2 additions & 0 deletions Google-Maps-iOS-Utils.podspec
Expand Up @@ -22,6 +22,8 @@ Pod::Spec.new do |s|

s.dependency 'GoogleMaps'
s.static_framework = true
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

s.subspec 'QuadTree' do |sp|
sp.public_header_files = "src/#{sp.base_name}/**/*.h"
Expand Down
17 changes: 17 additions & 0 deletions carthage.sh
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# carthage.sh
# Usage example: ./carthage.sh build --platform iOS

set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_iphonesimulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(PLATFORM_NAME)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"
4 changes: 3 additions & 1 deletion src/Clustering/View/GMUDefaultClusterRenderer.m
Expand Up @@ -403,7 +403,9 @@ - (void)clear {

- (void)clearMarkers:(NSArray<GMSMarker *> *)markers {
for (GMSMarker *marker in markers) {
marker.userData = nil;
if ([marker.userData conformsToProtocol:@protocol(GMUCluster)]) {
marker.userData = nil;
}
marker.map = nil;
}
}
Expand Down

0 comments on commit 1a5863e

Please sign in to comment.