{ "id": "175543", "key": "TIMOB-28138", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "21051", "description": "", "name": "Release 9.2.0", "archived": false, "released": true, "releaseDate": "2020-09-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-09-22T15:49:57.000+0000", "created": "2020-09-15T21:00:11.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-09-23T18:08:00.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "15102", "name": "Mac", "description": "Mac authoring support" } ], "description": "When trying to build an iOS only module, it fails with multiple errors. The error can be reproduced in this module: https://github.com/hansemannn/titanium-widget-kit\r\n\r\nThe reason may be that the module contains the iOS-only framework \"WidgetKit\". I unselected macOS support in the Xcode project, but the CLI still tries to build for Catalyst as well.", "attachment": [], "flagged": false, "summary": "iOS/macOS Catalyst: Cannot build iOS-only modules", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1206, "state": "closed", "name": "2020 Sprint 19", "startDate": "2020-09-14T20:01:00.000Z", "endDate": "2020-09-25T20:01:00.000Z", "completeDate": "2020-09-28T15:30:19.875Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "456898", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~hknoechel] you beat us to filing the ticket! :) Chris and I had been discussing this on a back channel.\r\n\r\nOur current thinking is I think one of the following:\r\n\r\n* Make the target support (iOS, macOS) declarable by a developer via the manifest or timodule. Marking it as not supporting a target will cause it to not build for that target\r\n* Allow the mac build to fail, just warning if it does\r\n\r\nEither would be combined with changes in the app build to detect whether a module supports the target specified by an app developer, erroring if not. As a power-user of module development which sounds more sensible to you?\r\n\r\ncc [~cwilliams]", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-09-15T22:05:34.000+0000", "updated": "2020-09-15T22:05:34.000+0000" }, { "id": "456900", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~eharris] See https://github.com/appcelerator-modules/ti.facebook/pull/128#issuecomment-693011941\r\n1. For above issue I think we can allow mac build fail with warning.\r\n2. Another issue in which third party frameworks do not have simulator 'arm64' architecture, we can check \"platform\" folder of module and if there is any file having '.framework' extension, exclude simulator 'arm64' architecture.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-15T23:28:36.000+0000", "updated": "2020-09-15T23:28:36.000+0000" }, { "id": "456921", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Ewan: I think it should use the setting in Xcode (the platform checkbox), which is saved in the pbxproj. I can do the \"dirty work\" to extract it if it helps.\n\nIs there a workaround to skip macOS compilation for now? Ti.WidgetKit is required to refresh widgets, so it's kind of a thing for us :-)", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-09-16T20:44:28.000+0000", "updated": "2020-09-16T20:44:28.000+0000" }, { "id": "456923", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/12093", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-16T22:56:16.000+0000", "updated": "2020-09-16T22:56:16.000+0000" }, { "id": "456926", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Vijay: Unfortunately your PR does not work so far (see logs below). Also, I would really attempt to not cause the build to ignore a build failure and instead only build what's supposed to be build. Once the check from the pbxproj is present, that should be able to guard similar to what you did now. Here is my attempt to check if macOS is enabled or not (working): https://github.com/appcelerator/titanium_mobile/compare/master...hansemannn:TIMOB-28138\r\n\r\nI probably missed another step / {{next()}} call because it fails at the end with not finding some archs, but maybe it helps!\r\n{code}\r\n[TRACE] [xcode-macos] error: While building for macOS, no library for this platform was found in '~/Library/Application Support/Titanium/mobilesdk/osx/9.2.0.v20200915121722/iphone/Frameworks/TitaniumKit.xcframework'. (in target 'TiWidgetkit' from project 'titanium-widget-kit')\r\n[TRACE] [xcode-macos] error: WidgetKit is not available when building for macOS. (in target 'TiWidgetkit' from project 'titanium-widget-kit')\r\n[ERROR] [xcode-macos] ** ARCHIVE FAILED **\r\n\r\n[WARN] Unable to build for mac target. App including this module may fail for mac target.\r\n[INFO] Creating universal library\r\n[INFO] Looking for /titanium-widget-kit/ios/build/iphoneos.xcarchive/Products/Library/Frameworks/TiWidgetkit.framework\r\n[INFO] Looking for /titanium-widget-kit/ios/build/iphonesimulator.xcarchive/Products/Library/Frameworks/TiWidgetkit.framework\r\n[INFO] Looking for /titanium-widget-kit/ios/build/macosx.xcarchive/Products/Library/Frameworks/TiWidgetkit.framework\r\n[DEBUG] Searching library: /titanium-widget-kit/ios/build/macosx.xcarchive/Products/usr/local/lib/libTiWidgetkit.a\r\n[WARN] The module is missing 64-bit support of macos. Ignoring mac target for this module...\r\n[DEBUG] Running: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -create-xcframework -framework /titanium-widget-kit/ios/build/iphoneos.xcarchive/Products/Library/Frameworks/TiWidgetkit.framework -framework /titanium-widget-kit/ios/build/iphonesimulator.xcarchive/Products/Library/Frameworks/TiWidgetkit.framework -output /titanium-widget-kit/ios/build/TiWidgetkit.xcframework\r\n[INFO] Verifying universal library\r\n[INFO] Looking for /titanium-widget-kit/ios/build/TiWidgetkit.xcframework/ios-arm64_armv7/TiWidgetkit.framework\r\n[INFO] Looking for /titanium-widget-kit/ios/build/TiWidgetkit.xcframework/ios-armv7_arm64/TiWidgetkit.framework\r\n[WARN] The module is missing 64-bit support.\r\n[INFO] Looking for /titanium-widget-kit/ios/build/TiWidgetkit.xcframework/ios-arm64_i386_x86_64-simulator/TiWidgetkit.framework\r\n[INFO] Looking for /titanium-widget-kit/ios/build/TiWidgetkit.xcframework/ios-i386_x86_64-simulator/TiWidgetkit.framework\r\n[WARN] The module is missing ios simulator support.\r\n[INFO] Looking for /titanium-widget-kit/ios/build/TiWidgetkit.xcframework/ios-arm64_x86_64-maccatalyst/TiWidgetkit.framework\r\n[WARN] The module is missing maccatalyst support.\r\n[ERROR] There is discrepancy between the architectures specified in module manifest and compiled binary.\r\n[ERROR] Architectures in manifest: armv7,arm64,i386,x86_64\r\n[ERROR] Compiled binary architectures:\r\n[ERROR] Please update manifest to match module binary architectures.\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-09-17T04:58:35.000+0000", "updated": "2020-09-17T05:58:54.000+0000" }, { "id": "456937", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/12093", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-09-17T20:16:10.000+0000", "updated": "2020-09-17T20:16:10.000+0000" }, { "id": "456938", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] \r\n1. The modules which are not generating frameworks (Objc based modules), do not have option to out out from mac-target build in Xcode project. This option is available for frameworks only. I think your PR will not work for all modules.\r\n2. In my PR, the module build is failing because the architectures mentioned in manifest file is not same as in created XCFramework. Reason is, in _buildModule.js we are using hardcoded way to read architecture. [~jvennemann] is working on parsing of Info.plist available inside .xcframework as part of PR https://github.com/appcelerator/titanium_mobile/pull/12092 . After that we can update it to use architectures from there.\r\n ", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-17T22:15:02.000+0000", "updated": "2020-09-17T22:15:02.000+0000" }, { "id": "456965", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "It seems like *NO* modules that contain native frameworks (.framework extension) can be compiled right now. The error is:\r\n\r\n{code}\r\nerror: module 'XXXX' was created for incompatible target arm64-apple-ios8.0: /Users/user/Documents/mymodule/ios/platform/XXXX.framework/Modules/XXXX.swiftmodule/arm64.swiftmodule\r\n{code}\r\n\r\nAnd since the module is a swift module, it cannot be compiled with Xcode 11, because it requires the ABI stability of Swift 5. Therefore all Swift based modules are blocked right now. I hope one of the pending PR's helps. If you need more concrete modules for testing, let me know and I can send it over.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-09-21T15:07:11.000+0000", "updated": "2020-09-21T15:07:11.000+0000" }, { "id": "456976", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] It should be fixed in this PR. Can you try and let me know if you still have issue? Thanks!", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-21T21:22:54.000+0000", "updated": "2020-09-21T21:22:54.000+0000" }, { "id": "456980", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The module build works, the app build as well, but once the module (here: Ti.WidgetKit) is require()'d, it fails to find it for the architecture (tested both iOS Simulator and iOS device)", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-09-22T14:31:17.000+0000", "updated": "2020-09-22T14:31:17.000+0000" }, { "id": "456998", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-22T23:09:28.000+0000", "updated": "2020-09-22T23:09:28.000+0000" }, { "id": "457006", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "One last question from my end: We get the following warning / note during the build for an iPhone XS:\r\n{code}\r\n[TRACE] note: 'modules/iphone/ti.widgetkit/1.0.0/TiWidgetkit.xcframework' is missing architecture(s) required by this target (armv7), but may still be link-compatible. (in target 'MyApp' from project 'MyApp')\r\n[TRACE] note: 'modules/iphone/ti.widgetkit/1.0.0/TiWidgetkit.xcframework' is missing architecture(s) required by this target (armv7), but may still be link-compatible. (in target 'MyApp' from project 'MyApp')\r\n{code}\r\n\r\nIs that fine? Should there be an improvement ticket to properly link armv7 directly?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-09-23T16:52:08.000+0000", "updated": "2020-09-23T16:52:08.000+0000" }, { "id": "457007", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] I think this should be fine.\r\niPhone 5s and later supports arm64. iOS 14 is supported from iPhone SE.\r\nAs WidgetKit framework is only supported for iOS 14+, I think Apple has dropped armv7 support from WidgetKit framework. So it is generating arm64 only for devices.\r\nWe are not excluding \"armv7\" from binary while building module.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-23T18:08:00.000+0000", "updated": "2020-09-23T18:08:00.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }