hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors when building on Apple Silicon

de1mat opened this issue · comments

I am trying to get my project building on a new MacBook Pro M1 using:

ti build -p ios -T macos

It builds fine until I include the ti.googlemaps module in tiapp.xml.

I am getting the following error:

[TRACE] /Users/Matthew/Titanium/AppName/modules/iphone/ti.googlemaps/7.0.0/ti.googlemaps.xcframework:1:1: error: While building for Mac Catalyst, no library for this platform was found in '/Users/Matthew/Titanium/AppName/modules/iphone/ti.googlemaps/7.0.0/ti.googlemaps.xcframework'. (in target 'AppName' from project 'AppName')
[TRACE] /Users/Matthew/Titanium/AppName/build/iphone/AppName.xcodeproj: warning: Building for Mac Catalyst, but the linked framework 'GooglePlaces.framework' was built for iOS + iOS Simulator. You may need to restrict the platforms for which this framework should be linked in the target editor, or replace it with an XCFramework that supports both platforms. (in target 'AppName' from project 'AppName')
[TRACE] /Users/Matthew/Titanium/AppName/build/iphone/AppName.xcodeproj: warning: Building for Mac Catalyst, but the linked framework 'GoogleMaps.framework' was built for iOS + iOS Simulator. You may need to restrict the platforms for which this framework should be linked in the target editor, or replace it with an XCFramework that supports both platforms. (in target 'AppName' from project 'AppName')
[TRACE] /Users/Matthew/Titanium/AppName/build/iphone/AppName.xcodeproj: warning: Building for Mac Catalyst, but the linked framework 'GoogleMapsCore.framework' was built for iOS + iOS Simulator. You may need to restrict the platforms for which this framework should be linked in the target editor, or replace it with an XCFramework that supports both platforms. (in target 'AppName' from project 'AppName')
[TRACE] /Users/Matthew/Titanium/AppName/build/iphone/AppName.xcodeproj: warning: Building for Mac Catalyst, but the linked framework 'GoogleMapsBase.framework' was built for iOS + iOS Simulator. You may need to restrict the platforms for which this framework should be linked in the target editor, or replace it with an XCFramework that supports both platforms. (in target 'AppName' from project 'AppName')

If I target the iphone instead of macos I get the following error:

[ERROR] Error: The app is using native modules that do not support arm64 simulators and you are on an arm64 device:
- ti.googlemaps
    at iOSBuilder.invokeXcodeBuild (/Users/Matthew/Library/Application Support/Titanium/mobilesdk/osx/10.2.0.v20211119080935/iphone/cli/commands/_build.js:7100:17)

I just wanted to check if this is the expected behaviour for now or should this work ok?

The issue is in the Google Maps iOS SDK in general (unfortunately not only Titanium), because they haven't properly recompiled their libraries for ARM64 (Apple Silicon & macOS Catalyst) so far. If you can find an .xcframework binary, please let me know and I can update it here!

Meanwhile we can use Rosetta2 terminal. It works like a charm ;)

This should not be an issue anymore with recent M1-compatible versions