{ "id": "174149", "key": "TIMOB-27410", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-30T18:07:00.000+0000", "created": "2019-09-19T11:38:37.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2019-10-30T18:07: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" } ], "description": "One user is facing error compiling a module. He is using 8.1.1.GA, Xcode 10.3, macOS Mojave 10.14.6. He is unable to build module project with TiApp.h using SDK8.1.1.GA ? His purpose is to use NSURLSessionDelegate, which requires importing TiApp.h according to the following [reference|https://wiki.appcelerator.org/display/guides2/iOS+Modules+-+Use+Native+UI+Application+Delegates+in+Hyperloop+and+Native+Modules]. \r\n\r\nSample module: Click [here| https://drive.google.com/open?id=1jbVe3r4Rm1__Eu73gDdBiT0zBRuMgI9W]\r\n\r\n*Test Steps:*\r\nSteps from the user:\r\n\r\n1. Create new mobile module project [jp.co.ndsoft.NdSyncClinet2] using SDK8.1.1.GA, target iOS.\r\n2. Add code follows into ios/Classes/JpCoNdsoftNdSyncClinet2Module.m\r\n3. Package iOS Module\r\n\r\n*Add code at step2*\r\n{code}\r\n--- a/ios/Classes/JpCoNdsoftNdSyncClinet2Module.m\r\n+++ b/ios/Classes/JpCoNdsoftNdSyncClinet2Module.m\r\n@@ -9,6 +9,7 @@\r\n#import \"TiBase.h\"\r\n#import \"TiHost.h\"\r\n#import \"TiUtils.h\"\r\n+#import \"TiApp.h\"\r\n\r\n@implementation JpCoNdsoftNdSyncClinet2Module\r\n@@ -29,6 +30,12 @@\r\n#pragma mark Lifecycle\r\n+-(void)_configure\r\n+{\r\n+ [super _configure];\r\n+ [[TiApp app] registerApplicationDelegate:self];\r\n+}\r\n+\r\n- (void)startup\r\n{code}\r\nNote: We also tried to compile module shared by the client and receive same error as him.\r\n{code}\r\n[ERROR] [xcode-sim] ** BUILD FAILED **\r\n[ERROR] [xcode-sim] The following build commands failed:\r\n[ERROR] [xcode-sim] \tCompileC build/NdSyncClient2.build/Release-iphonesimulator/NdSyncClient2.build/Objects-normal/x86_64/JpCoNdsoftNdSyncClinet2Module.o Classes/JpCoNdsoftNdSyncClinet2Module.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler\r\n[ERROR] [xcode-sim] \tCompileC build/NdSyncClient2.build/Release-iphonesimulator/NdSyncClient2.build/Objects-normal/i386/JpCoNdsoftNdSyncClinet2Module.o Classes/JpCoNdsoftNdSyncClinet2Module.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler\r\n[ERROR] [xcode-sim] (2 failures)\r\n{code}", "attachment": [ { "id": "66955", "filename": "build_sdk811ga_logs.txt", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-09-19T11:38:23.000+0000", "size": 64376, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS: Module project is not compiling properly on 8.1.1.GA", "creator": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "8.1.1.GA, Xcode 10.3, macOS Mojave 10.14.6", "comment": { "comments": [ { "id": "451634", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "If this is an existing module it is probably due to an outdated module configuration. Please take a look at our current [titanium.xcconfig|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/templates/module/objc/template/ios/titanium.xcconfig.ejs] template and update it accordingly.\r\n\r\nFor example, with SDK 8.1.1.GA it should look something like this:\r\n{code}\r\nTITANIUM_SDK_VERSION = 8.1.1.GA\r\nTITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION)\r\nHEADER_SEARCH_PATHS = $(inherited) \"$(TITANIUM_SDK)/iphone/include\"\r\nFRAMEWORK_SEARCH_PATHS = $(inherited) \"$(TITANIUM_SDK)/iphone/Frameworks\"\r\n{code}\r\n\r\nAlso it is recommended since 8.0.0 to include classes from the {{TitaniumKit}} framework directly, if available from there.\r\n\r\n{code}\r\n#import \r\n{code}", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-09-26T09:59:44.000+0000", "updated": "2019-09-26T10:15:53.000+0000" }, { "id": "452095", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Alright, i took another look and this seems to be an issue with our module template. The error gives a very good hint at what is wrong:\r\n\r\n{code}\r\n[TRACE] [xcode-sim] In file included from /Users/jvennemann/Downloads/NdSyncClient2/ios/Classes/JpCoNdsoftNdSyncClinet2Module.m:12:\r\n[TRACE] [xcode-sim] In file included from /Users/jvennemann/Library/Application Support/Titanium/mobilesdk/osx/8.1.1.GA/iphone/include/TiApp.h:1:\r\n[TRACE] [xcode-sim] In file included from /Users/jvennemann/Library/Application Support/Titanium/mobilesdk/osx/8.1.1.GA/iphone/Frameworks/TitaniumKit.framework/Headers/TiApp.h:11:\r\n[TRACE] [xcode-sim] /Users/jvennemann/Library/Application Support/Titanium/mobilesdk/osx/8.1.1.GA/iphone/Frameworks/TitaniumKit.framework/Headers/KrollBridge.h:15:1: error: use of '@import' when modules are disabled\r\n[TRACE] [xcode-sim] @import Foundation;\r\n{code}\r\n\r\nSo all they need to do is enable modules. This can be done easily by selecting the project in Xcode and then under \"Build Settings\" search for \"Enable Modules (C and Objective-C)\" and set it to \"Yes\".\r\n\r\nPR to update our template with recent clang settings: https://github.com/appcelerator/titanium_mobile/pull/11283\r\n", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-10-16T11:21:18.000+0000", "updated": "2019-10-16T11:21:18.000+0000" }, { "id": "452350", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. The clang setting to Enable Modules (C and Objective-C) is set to Yes by default. The module builds successfully.\r\nWaiting for Jenkins build to pass before merge", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-29T23:26:27.000+0000", "updated": "2019-10-29T23:26:27.000+0000" }, { "id": "452369", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-10-30T15:45:16.000+0000", "updated": "2019-10-30T15:45:16.000+0000" }, { "id": "452383", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS: 10.14.5\r\nSDK: 8.3.0.v20191030085531\r\nAppc CLI: 7.1.1\r\nJDK: 1.8.0_162\r\nNode: 10.5.0\r\nStudio: 5.1.4.201909061933\r\nXcode: 11.1", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-30T18:07:00.000+0000", "updated": "2019-10-30T18:07:00.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }