Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Expo plugin props #589

Merged
merged 39 commits into from
Jan 10, 2025
Merged

Conversation

KiwiKilian
Copy link
Collaborator

@KiwiKilian KiwiKilian commented Jan 3, 2025

This adds quite a few props to the plugin options. It allows to set:

  • Android:
    • locationEngine
    • MapLibre Native and other dependency versions
  • iOS
    • MapLibre Native dependency version

Basically it allows to modify the MapLibre Native version easily from the plugin for more expert use cases.

How to test

  • Expo
    • Modify the currently empty plugin options app.config.ts and prebuild and rebuild again
  • React Native
    • Android: Change packages/react-native/android/gradle.properties, for the defaults see android/gradle.properties
    • iOS
      • Add a $MLRN_NATIVE_VERSION or $MLRN_SPM_SPEC before the target block of the packages/react-native/ios/Podfile
      • Fix Xcode project:
        • Change MapLibre Native XCRemoteSwiftPackageReference in packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/project.pbxproj to the new version
        • Now open with Xcode, it should update Package.resolved files
        • Now it's possible to build iOS again
        • I think this is only necessary, because we have the Package Dependency within the Xcode project, which might not be the case for library consumers with bare RN projects?

# Conflicts:
#	android/build.gradle
# Conflicts:
#	src/__tests__/plugin/ios/__fixtures__/Podfile.ts
#	src/__tests__/plugin/ios/applyCocoaPodsModifications.test.ts
# Conflicts:
#	android/build.gradle
#	android/gradle.properties
#	src/__tests__/plugin/ios/__fixtures__/Podfile.ts
#	src/__tests__/plugin/ios/__snapshots__/applyPodfilePostInstall.test.ts.snap
#	src/__tests__/plugin/ios/applyPodfilePostInstall.test.ts
#	src/plugin/ios.ts
#	src/plugin/withMapLibre.ts
@KiwiKilian KiwiKilian requested a review from tyrauber January 3, 2025 22:11
@KiwiKilian
Copy link
Collaborator Author

I've now also added documentation around the available customizations.

Copy link
Collaborator

@tyrauber tyrauber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go! Code looks good. Both examples build for both platforms (as expected).

Nice work!

@KiwiKilian KiwiKilian merged commit 51fbb00 into maplibre:beta Jan 10, 2025
13 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 10, 2025
# [10.0.0-beta.19](v10.0.0-beta.18...v10.0.0-beta.19) (2025-01-10)

### Features

* add Expo plugin props ([#589](#589)) ([51fbb00](51fbb00))
* upgrade MapLibre Native Android to v11.8.0 ([#597](#597)) ([410d0c3](410d0c3))
* upgrade MapLibre Native iOS to v6.10.0 ([#598](#598)) ([b596c76](b596c76))
Copy link

🎉 This PR is included in version 10.0.0-beta.19 🎉

The release is available on:

Your semantic-release bot 📦🚀

@KiwiKilian KiwiKilian deleted the feat/expo-plugin-props branch January 11, 2025 18:43
github-actions bot pushed a commit that referenced this pull request Jan 14, 2025
# [10.0.0](v9.1.0...v10.0.0) (2025-01-14)

### Bug Fixes

* `VectorSource` `onPress` returning null geometry on Android ([250ee6f](250ee6f)), closes [#538](#538)
* `VectorSource` `onPress` returning null geometry on Android ([a130786](a130786)), closes [#538](#538)
* add @babel/plugin-transform-private-methods for jest ([3a2188f](3a2188f))
* add generic expo config plugin to remove duplicate signature ([#453](#453)) ([2671381](2671381))
* added GeometryCollection to GeoJSONUtils ([#556](#556)) ([e6b7a66](e6b7a66))
* allow MapView and Images to have no children ([#521](#521)) ([1e35bf6](1e35bf6))
* allow resetting contentInset with 0 ([#468](#468)) ([1fe42c6](1fe42c6))
* android example crashing on launch ([#372](#372)) ([aeef5c3](aeef5c3))
* cleanup yarn setup ([#463](#463)) ([d9a4d30](d9a4d30))
* corepack enable  on publish workflow ([2d13f33](2d13f33))
* correct types in MapView ([#268](#268)) ([0ea35c4](0ea35c4))
* disable code signing for release builds ([b3cf088](b3cf088))
* disable library code signing ([22030dd](22030dd))
* empty pbxproj and dwarf-with-dsym plugin config for EAS ([#458](#458)) ([0d54b46](0d54b46))
* expo-app should load library from workspace:. ([016b44a](016b44a))
* export custom header methods ([#552](#552)) ([58abdb0](58abdb0)), closes [#551](#551)
* group dependabot commits by core, dev and example ([#165](#165)) ([b697978](b697978))
* keep [@ts-ignore](https://github.com/ts-ignore) for headingIcon in library [#476](#476) ([#477](#477)) ([ef62454](ef62454))
* make `follow` props on `Camera` deterministic ([#550](#550)) ([e9256e7](e9256e7))
* make MarkerView props with defaults optional ([#460](#460)) ([185cf3e](185cf3e))
* plugin for debug simulator ([#164](#164)) ([06b23d4](06b23d4))
* remove AbortController test mock ([#403](#403)) ([698b558](698b558))
* round compass margins and attribution position to nearest integers [android] ([#294](#294)) ([c89c842](c89c842))
* setMaxAnimationFps on null ([#440](#440)) ([2884256](2884256))
* style expressions ([#466](#466)) ([2202908](2202908))
* trigger release after npm maintenance ([#548](#548)) ([f0fca00](f0fca00))
* types of `getPointInView` and `getCoordinateFromView` ([#601](#601)) ([c7537b5](c7537b5))
* updated Mapbox callstack check for iOS custom headers to check for MapLibre instead ([#461](#461)) ([a6d6216](a6d6216))
* use UIManager exported from react-native ([#511](#511)) ([a4030b5](a4030b5))
* yarn implementation ([#419](#419)) ([39233b1](39233b1))

### Continuous Integration

* add semantic release ([#526](#526)) ([069b6c5](069b6c5))

### Features

* add Expo plugin props ([#589](#589)) ([51fbb00](51fbb00))
* align react and react-native versions for development ([b92abfe](b92abfe))
* allow using google location engine on Android ([#586](#586)) ([92ffdb7](92ffdb7))
* configure packages/examples ([c4510c3](c4510c3))
* drop `MapLibreGL` naming and deprecate `export default` ([#567](#567)) ([aa0c73d](aa0c73d))
* export RegionPayload and MapLibreRNEvent types ([#544](#544)) ([b342f1b](b342f1b))
* extract android UserLocation FPS ([#428](#428)) ([8c0abaa](8c0abaa))
* make `setAccessToken(null)` obsolete ([#593](#593)) ([df44b48](df44b48))
* make Camera pure ([#471](#471)) ([23ecf88](23ecf88))
* MapLibre Android SDK 11.5.0 ([#455](#455)) ([042b759](042b759))
* monorepo configuration ([343e7ac](343e7ac))
* mv example packages/react-native-app ([5c9d3d0](5c9d3d0))
* mv examples, styles, assets, utils and scenes to packages/examples ([13600fe](13600fe))
* packages/expo-app ([c01abd5](c01abd5))
* remove deprecations ([#543](#543)) ([0c41ada](0c41ada))
* remove duplicate of `OfflinePackStatus` type ([#542](#542)) ([9e231b7](9e231b7))
* remove Style component ([#547](#547)) ([9d4c458](9d4c458))
* remove style property enums ([#558](#558)) ([b89a0dd](b89a0dd))
* setup build step ([#504](#504)) ([a017d64](a017d64))
* shared dependencies through packages/examples ([01a9586](01a9586))
* support new arch through interop layer ([#483](#483)) ([951e9cf](951e9cf))
* unify `MapView`s `styleURL` and `styleJSON` to `mapStyle` ([#559](#559)) ([7d22f16](7d22f16))
* update maplibre native version ([#61](#61)) ([25c418a](25c418a))
* upgrade [@Turf](https://github.com/turf) to v7 and remove geo utils ([#478](#478)) ([a45fc55](a45fc55))
* upgrade Android gradle setup ([#539](#539)) ([761ae0d](761ae0d))
* upgrade dependencies ([#535](#535)) ([047f87f](047f87f))
* upgrade MapLibre Native ([#563](#563)) ([d2b7f5d](d2b7f5d))
* upgrade MapLibre Native Android to v11.8.0 ([#597](#597)) ([410d0c3](410d0c3))
* upgrade MapLibre Native iOS to v6.10.0 ([#598](#598)) ([b596c76](b596c76))
* use `withPodfile` instead of `withDangerousMod` in Expo Plugin ([#587](#587)) ([56d02e1](56d02e1))

### BREAKING CHANGES

* remove `styleURL` and `styleJSON` from `MapView`, use `mapStyle` instead
* Removed style property enums
* Remove `Style` component, use `styleJSON` of `MapView` instead
* - Deprecated `UserTrackingModes` is removed in favor of `UserTrackingMode`
- Removed deprecated `setCamera` from `MapView`
- Removed deprecated `byId` methods from `ShapeSource`
- Removed deprecated `children` from `SymbolSource`
- Removed deprecated `assets` key from `Images`
- Removed deprecated event keys
* Replace OfflineProgressStatus with OfflinePackStatus
* Upgrade native packages and migrate components

* ci: move native builds to review

* ci: run release immediate for debugging

* ci: use android working directory for build

* docs: remove RELEASE.md

* chore: remove manual changelog task

* ci: enable release on beta branch

* ci: keep default tagFormat

* ci: setup npm tag fixes

* ci: run review on mr to beta

* ci: run fix tags on beta

* ci: fix name

* ci: clarify workflow_call

* ci: disable debugging

* ci: run fix tags in pr

* ci: setup fix tags to run on beta

* docs: prepare changelog for semantic-release

* ci: remove fix npm tags workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants