{ "id": "176269", "key": "TIMOB-28522", "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": [], "resolution": null, "resolutiondate": null, "created": "2021-08-13T14:45:55.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2021-08-17T09:35:48.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "We have a native SDK which is iOS only, so we want to exclude it from the module build (which is easy to do in Xcode by unchecking it in the Build Phases tab and wrapping the iOS-only code with {{#if !TARGET_OS_MACCATALYST}} statements. But unfortunately, the Titanium module CLI (_buildModule.js) still thinks we use it because it only checks if the file exists, not the Xcode setting of the file.\r\n\r\nAn alternative would be to mark the module iOS only in the tiapp.xml by having something like {{...}} or {{platform=\"ios\"}} vs {{platform=\"ios_catalyst\"}}.\r\n\r\nWithout one of the solution, the Mac support is not finished I think. An example of how the files are marked in the .pbxproj file is attached. The problematic module source is attached as well. Compile it and you will notice the warning:\r\n{code}\r\n[WARN] The module is using frameworks (BytedanceOpenPlatformSDK.framework,SCSDKCoreKit.framework,SCSDKCreativeKit.framework,TikTokOpenSDK.framework) that do not support simulator arm64. Excluding simulator arm64. The app using this module may fail if you're on an arm64 Apple Silicon device.\r\n{code}", "attachment": [ { "id": "67960", "filename": "Bildschirmfoto 2021-08-13 um 16.46.27.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-08-13T14:47:10.000+0000", "size": 337493, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Cannot exclude iOS only modules from universal build", "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, "comment": { "comments": [ { "id": "458988", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (to be verified): https://github.com/appcelerator/titanium_mobile/pull/13022\r\n\r\nIn theory, because we explicitely make the frameworks only available on iOS (in the .xcodeproj) + have guards to only import the frameworks for iOS, it should be okay. Of course, the modules are still not compatible with macOS then, but the app can simply exclude those features until the libraries are ready.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-08-15T10:41:17.000+0000", "updated": "2021-08-15T10:41:17.000+0000" }, { "id": "458989", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~hknoechel] I think maybe doing this via excluding a module in the tiapp might be better? It means that existing modules could be ignored without requiring they be recompiled.\r\n\r\nI had filed TIMOB-28245 to allow this, and I think doing it using the existing {{--target}} options would be best rather than introducing a new syntax", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-08-16T10:08:34.000+0000", "updated": "2021-08-16T10:08:34.000+0000" }, { "id": "458990", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Yep, probably! Also, my fix does not work because the build still tries to evaluate them at a later build stage. But the {{--target}} alone will not help because even the iOS Simulator does not run on an Apple Silicon device (thats the biggest issue right now).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-08-16T14:50:52.000+0000", "updated": "2021-08-16T14:50:52.000+0000" }, { "id": "458993", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Using TIMOB-28525, this will be less critical and only relevant for macOS apps. But still, it would definitely improve the macOS adoption :-)", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-08-17T09:35:48.000+0000", "updated": "2021-08-17T09:35:48.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }