{ "id": "147096", "key": "TIMOB-18844", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-04-22T16:56:19.000+0000", "created": "2015-04-20T17:19:53.000+0000", "epic": { "id": 139983, "key": "TIMOB-18052", "name": "iOS: Support WatchKit", "summary": "iOS: Support WatchKit", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [ "Extension", "WatchKit", "ios" ], "versions": [], "issuelinks": [ { "id": "47351", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "147049", "key": "TIMOB-18840", "fields": { "summary": "iOS: Fix packaging WatchKit apps for production", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T18:08:51.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" } ], "description": "I have built a WatchKit extension in Swift. All works beautifully in the simulator when running directly from xcode.\r\n\r\nI have linked to the extension from my Titanium project, and everything builds without error, yet when running the \"xcrun simctl launch booted\" command to launch the watch, I get an infinite loading animation.\r\n\r\nUpon digging through the logs I got many errors such as “Unable to start plugin” and \"activePlugInForIdentifier: returned nil for application\". I also stumbled upon a crash log which seems to point the finger more accurately:\r\n\r\nProcess: JAS Watch WatchKit Extension [27101]\r\n\r\nDyld Error Message:\r\n Library not loaded: @rpath/libswiftCore.dylib\r\n Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/4CEFE848-E6EB-41D2-8968-754C449E19A8/data/Containers/Bundle/Application/5B42A276-DD25-4288-82A4-C1C2CFBE527E/Just a Score.app/PlugIns/JAS Watch WatchKit Extension.appex/JAS Watch WatchKit Extension\r\n Reason: image not found\r\n\r\nIt seems that “libswiftCore.dylib” is not getting included, a quick Google search will lead you to discover that there is a flag in a projects build settings called “Embedded Content Contains Swift Code”. This flag needs to be checked in order to run an objective-c project with embedded Swift content.\r\n\r\nI’m sure this would be the case with any Swift extension and Titanium for reproduction. Hopefully this flag solves the issue. \r\nUrgency in finding a solution to this would be greatly appreciated.", "attachment": [], "flagged": false, "summary": "iOS: Swift is not supported for Extensions", "creator": { "name": "jdrucey", "key": "jdrucey", "displayName": "Jamie Druce", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jdrucey", "key": "jdrucey", "displayName": "Jamie Druce", "active": true, "timeZone": "Europe/London" }, "environment": "iOS 8.3, Xcode 6.3, SDK 4 Beta 3", "closedSprints": [ { "id": 398, "state": "closed", "name": "2015 Sprint 09 SDK", "startDate": "2015-04-25T00:00:00.000Z", "endDate": "2015-05-09T00:00:00.000Z", "completeDate": "2015-05-11T14:11:17.028Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "350261", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Jamie, have you tried switching that flag in the Titanium Xcode project? Give this a try and let us know.\r\n\r\n1. Open the Xcode project of the titanium sdks dir, for example: {{/Users/penrique/Library/Application Support/Titanium/mobilesdk/osx/4.0.0.Beta/iphone/iphone/Titanium.xcodeproj}}\r\n2. Go to the project {{Build Settings}} settings and look for \"Embedded Content Contains Swift Code\" and change it from \"No\" to \"Yes\"\r\n3. Close that\r\n4. Go to Appcelerator Studio (or the command line) and clean your project. \r\n5. Built it again and see if that worked.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-21T16:19:16.000+0000", "updated": "2015-04-21T16:19:16.000+0000" }, { "id": "350300", "author": { "name": "jdrucey", "key": "jdrucey", "displayName": "Jamie Druce", "active": true, "timeZone": "Europe/London" }, "body": "Pedro you are my hero! Thats done it! that was the difference between nothing working and having my watch app running perfectly in the simulator. I'm happy, i guess this just needs to be an option in Titanium somewhere in a future update. Thanks greatly!", "updateAuthor": { "name": "jdrucey", "key": "jdrucey", "displayName": "Jamie Druce", "active": true, "timeZone": "Europe/London" }, "created": "2015-04-21T19:40:38.000+0000", "updated": "2015-04-21T19:40:38.000+0000" }, { "id": "350313", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Great news Jamie! I have field a PR and will soon be merged https://github.com/appcelerator/titanium_mobile/pull/6792", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-21T22:01:23.000+0000", "updated": "2015-04-21T22:01:23.000+0000" }, { "id": "350446", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "body": "sweet", "updateAuthor": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2015-04-22T21:29:18.000+0000", "updated": "2015-04-22T21:29:18.000+0000" }, { "id": "371880", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I did not run into this error while resolving TIMOB-20070 so I assume this ticket actually is already resolved by something between april and now.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-02T07:30:09.000+0000", "updated": "2015-12-02T07:30:09.000+0000" }, { "id": "415320", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed with reference to above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T18:08:51.000+0000", "updated": "2017-03-23T18:08:51.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }