{ "id": "117182", "key": "TIMOB-14555", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-07-29T17:32:49.000+0000", "created": "2013-07-15T13:57:33.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-10-31T14:33:46.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": "h4. Description\r\n\r\nI need some help with including a framework in an iOS module. \r\nThe framework was added using the steps described in the guide here: http://docs.appcelerator.com/titanium/latest/#!/guide/iOS_Module_Development_Guide-section-29004946_iOSModuleDevelopmentGuide-AddingSpecialCompilerDirectives\r\n\r\nThe \"Other Link Flags\" added via XCode are -ObjC -all_load -framework StarIO\r\n\r\nWhen building a project with the module, we get the following linker error:\r\n\r\n{code}\r\n[TRACE] : Ld build/Debug-iphonesimulator/testStarPrinter.app/testStarPrinter normal i386\r\n[TRACE] : cd /Users/btran/Desktop/temp/testStarPrinter/build/iphone\r\n[TRACE] : setenv IPHONEOS_DEPLOYMENT_TARGET 5.0\r\n[TRACE] : setenv PATH \"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/lib/node_modules:/usr/bin:/usr/local/bin:/bin:/usr/local/lib/node_modules:/Applications/android-sdk-macosx/platform-tools:/Applications/android-sdk-macosx/tools:/Applications/android-ndk:/Applications/android-sdk-macosx:/user/local/titanium:/Users/btran/Downloads/ImageAlpha.app/Contents/Resources\"\r\n[TRACE] : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/btran/Desktop/temp/testStarPrinter/build/iphone/build/Debug-iphonesimulator -L/Users/btran/Desktop/temp/testStarPrinter/build/iphone/lib -L/Users/btran/Desktop/temp/testStarPrinter/modules/iphone/com.appcelerator.test.star/0.1 -F/Users/btran/Desktop/temp/testStarPrinter/build/iphone/build/Debug-iphonesimulator -filelist /Users/btran/Desktop/temp/testStarPrinter/build/iphone/build/testStarPrinter.build/Debug-iphonesimulator/testStarPrinter.build/Objects-normal/i386/testStarPrinter.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -weak_framework iAd -weak_framework iAd -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0 -framework EventKit -framework EventKitUI -weak_framework Security -licucore -framework Foundation -weak_framework UIKit -framework CoreGraphics -weak_framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreLocation -framework MapKit -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -lsqlite3 -lz -framework AudioToolbox -weak_framework MediaPlayer -framework AVFoundation -lxml2 -framework StoreKit -lTiCore -lcom.appcelerator.test.star -framework ExternalAccessory -ltiverify -lti_ios_debugger -lti_ios_profiler -o /Users/btran/Desktop/temp/testStarPrinter/build/iphone/build/Debug-iphonesimulator/testStarPrinter.app/testStarPrinter\r\n[TRACE] : Undefined symbols for architecture i386:\r\n[TRACE] : \"_OBJC_CLASS_$_AsyncSocket\", referenced from:\r\n[TRACE] : objc-class-ref in libti_ios_debugger.a(TiDebugger.o)\r\n[TRACE] : ld: symbol(s) not found for architecture i386\r\n[TRACE] : clang: error: linker command failed with exit code 1 (use -v to see invocation)\r\n[ERROR] : ** BUILD FAILED **\r\n[ERROR] : The following build commands failed:\r\n[ERROR] : \tLd build/Debug-iphonesimulator/testStarPrinter.app/testStarPrinter normal i386\r\n[ERROR] : (1 failure)\r\n{code}\r\n\r\nPlease find attached the module source and a test project. Not sure if this is a bug or a code issue.\r\n\r\nFor reference, here is a link to the framework: http://www.starmicronics.com/support/SDKDocumentation.aspx", "attachment": [], "flagged": false, "summary": "iOS: Adding a framework to a module, linker error", "creator": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 3.1.1, 2.1.4\r\niOS 5, 6\r\nXCode 4.5.1", "comment": { "comments": [ { "id": "262269", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~btran] Please include a repro case and steps to reproduce this issue.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-18T00:55:39.000+0000", "updated": "2013-07-18T00:55:39.000+0000" }, { "id": "263664", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is closed resolved after we had a call with the customer (brought Jon Alter into the call) to help.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-29T17:26:13.000+0000", "updated": "2013-07-29T17:26:13.000+0000" }, { "id": "283914", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h5. Resolution:\n\n1. `CommonEnum.h`, `MiniPrinterFunctions.h`, and `MiniPrinterFunctions.m` need to be added to the module's Xcode project. They are in the `Classes` folder, but they will not get compiled if they are not added to the project. To do this, open the module's Xcode project with Xcode, grab the files in Finder and drag them into the 'Classes' folder in the Xcode project.\n2. The application project needs to be able to find the `StarIO` framework at build time.\n a. In Finder, move the `StarIO.framework` from the root of the module into the `platform` folder in the module. This will package the framework with the module when it is built.\n b. In the module's Xcode project, remove the framework (it will now show up as red) and re-add it in its new location\n c. In the `module.xcconfig` file add FRAMEWORK_SEARCH_PATHS as seen below. This will allow the application to find the framework.\n Note: Be sure to change the module's version number in these paths whenever the module version is changed.\n\nFRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/starprinter.com/1/platform /Library/Application\\ Support/Titanium/modules/iphone/starprinter.com/1/platform ~/Library/Application\\ Support/Titanium/modules/iphone/starprinter.com/1/platform\nOTHER_LDFLAGS=$(inherited) -framework ExternalAccessory -framework StarIO -frameworkFoundation\n", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-12T01:30:58.000+0000", "updated": "2013-12-12T01:30:58.000+0000" }, { "id": "330195", "author": { "name": "mattapperson", "key": "mattapperson", "displayName": "me@gmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I think I might have a path forward without having to do anything too radical... details forthcoming after some more tests", "updateAuthor": { "name": "mattapperson", "key": "mattapperson", "displayName": "me@gmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-31T14:32:41.000+0000", "updated": "2014-10-31T14:32:41.000+0000" }, { "id": "330196", "author": { "name": "mattapperson", "key": "mattapperson", "displayName": "me@gmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry, commented on the wrong ticket", "updateAuthor": { "name": "mattapperson", "key": "mattapperson", "displayName": "me@gmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-31T14:33:46.000+0000", "updated": "2014-10-31T14:33:46.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }