Ad

Our DNA is written in Swift
Jump

Time-Limited Demo of Our Components

I’m happy to announce today that we will begin to make available test versions of our components so that you can try them out in your apps. This is possible with the help of our Jenkins build server which installs a “time bomb” on every nightly build of the components. This limits the utility of the static universal frameworks to 30 days of testing. Of course you can download a new copy as often as you like to further extend the testing time. But you cannot publish any production apps with that.

Our best-selling component is DTRichTextEditor and also by far the most complex because of the multiple sub-projects. Here’s a guide how to get set up for evaluating the component.

There is a DTRichTextEditorDemo host project available on GitHub. Except for the framework – which we still need to download – this is a fully functioning app.

Download a fresh copy of  http://beta.cocoanetics.com/demo/DTRichTextEditor.embeddedframework.zip and unzip it.

This is an embedded framework because of the DTLoupe.bundle which contains the resources for the magifying glass. The framework itself is also contained in there. The reason for this is that you simply drag the embeddedframework folder into Xcode and it does the right things with what it finds. The resources will be copied to the app bundle, the static universal library will be linked into your app binary.

So you drag the folder into your project.

You want to copy all files into your project folder as well as assign them to the target.

This action achieves several things at the same time:

  • Copies the library and bundle into the project tree
  • Adds the bundle to the “Copy Bundle Resources” build phase
  • Adds the library to the “Link Binary with Libraries” build phase
  • Adds “$(SRCROOT)/DTRichTextEditor.embeddedframework” to the “Framework Search Paths” build setting

We do not need to set up any additional header search paths because all headers required can be found inside the framework’s headers folder.

Finally, I recommend adding the import for the global DTRichTextEditor.h to the PCH file like so:

#ifdef __OBJC__
   #import <UIKit/UIKit.h>
   #import <Foundation/Foundation.h>
   #import <DTRichTextEditor/DTRichTextEditor.h>
#endif

That’s all it takes. (I hope) The Demo is set up to add some rich Hello World text.

Due to the amount of buttons added to the toolbar I made it iPad-only for now so that I didn’t have to invent a user interface suitable for iPhones, too. B, I, U, H are Bold, Italic, Underlined and Highlighted. L,C, R, J are Left-, Center-, Right-aligned and Justified paragraph styles. The 1. and + are an incomplete implementation of list-support. The photo inserts a picture from the photo album. The smiley button inserts an inline smiley graphic. And the URL button shows how to turn some text into a hyperlink.

I am happy to accept your pull requests for nicer UI in exchange for discounts on the component. I’m especially looking for a font picker and style popup like Apple has it in Pages for iOS. 🙂

Conclusion

With this guide and by looking at the demo project you should be able to evaluate the component in the context of your own apps. Then when you’re ready to purchase a full license you simply remove the framework and replace it with the original source code as a sub-project. Now that I have figured out the process end-to-end I will make more and more components available this way.

Let me know if you have any preference which components I should make available as time-limited demo next. Otherwise I’ll approach them by number of recent sales.


Categories: Parts

30 Comments »

  1. Hi,
    I’m trying to take a look at the demo but it crashes when I’m trying to edit the text or insert a picture:

    *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[NSConcreteMutableAttributedString typingAttributesForRange:]: unrecognized selector sent to instance 0x8872550’

    I’m trying to run it in simulator on iOS ver. 5.1.

    I would like to see it in action cause I’m thinking about buying a license for RichTextEditor.
    May you fix a demo or provide a link to any published application that uses RTE component?

  2. Do you have the linker flags set?

  3. The linker flags are: “-objC -all_load”
    DTRichTextEditor.framework is in “Link binary with libraries” list.

  4. I found the problem and will have it fixed soon. Some .m files were not added to the build target.

  5. The problem has been fixed and tested. Please download a fresh copy of the static framework.

  6. Thank you, Drops! It works.
    I’m going to investigate it, but at first sight it looks like what I need.

  7. This is a really nice move!

    I don’t currently have an urgent need of these components, but the ones that caught my attention and that I might want to try would be (in decreasing order of interest):
    DTBannerManager
    DTChartView
    DTAugmentedRealityController
    DTCalendarView
    DTMenuController

    I am also very curious about DTAboutViewController, though a couple of screenshot might be enough to better grasp what is the added value of the component.

  8. HI!
    I’m trying to following the steps .In my project it cannot bulit,92 errors appeared.My ver. 6.0.By the way ,I just dray the framework into it and add the import for the global DTRichTextEditor.h to the PCH file.What wrong with it???I need your help!!!!

  9. Please email me a screenshot of the errors you are seeing.

  10. The framework seems to be missing a header file, DTHTMLParser.h. Here is the build error:

    /Users/*******/Desktop/DTRichTextEditorDemo-master/DTRichTextEditor.embeddedframework/DTRichTextEditor.framework/Headers/DTHTMLAttributedStringBuilder.h:9:9: ‘DTHTMLParser.h’ file not found

  11. Please try again with last nights nightly build.

  12. Drops, I’m trying to test this as well as we’re building a full UI for rich text editing and this would save time. I JUST grabbed the git project and the latest download. But I get an error that DTHTMLParser.h is not found and sure enough its not in the framework.

    DTRichTextEditor.embeddedframework/DTRichTextEditor.framework/Headers/DTHTMLAttributedStringBuilder.h:9:9: fatal error: ‘DTHTMLParser.h’ file not found

    You’ve got a customer here if we can get this working and it meets our needs (HTML editing specifically).

  13. Actually there are a bunch of headers missing. Once I copied the header from the DTCoreText+HTML project, it then asked for UIPasteboard+DTWebArchive and a few other headers. I don’t have all of them.

  14. One thing I’m trying to figure out with the demo is this – I have HTML that looks like this:

    Will the parser handle that? Or does it need to be an ? And if it does support , can I intercept the request for “908ca278561900d6620da9a8b06ecbaf” and pass it the image I have elsewhere?

  15. I’ll check this tomorrow and include the missing headers if necessary.

  16. sorry, I’ll add the missing headers as soon as I can.

  17. I noticed you made an update – but I still get compile time errors that UIFont+DTCoreText.h and UIPasteboard+DTWebArchive.h are missing. I can comment it out and it compiles. But then I get 98 warnings:

    (null): warning: (i386) /Users/groundkeeper/Jenkins/workspace/DTRichTextEditor Demo/build/Debug-iphonesimulator/libDTCoreText.a(DTCoreTextParagraphStyle.o) unable to open object file

    I am able to run the app though, so for demo purposes its at least workable for that. But it does make me a little concerned about paying money for a component that even the demo isn’t right.

  18. Demo works for me. I put it into my project, but now I get two issues:

    1) setHTMLString: is not found. And yup, I cannot find it anywhere…
    2) (null): warning: (i386) /Users/groundkeeper/Jenkins/workspace/DTRichTextEditor Demo/build/objects/DTRichTextEditor.build/Debug-iphonesimulator/Static Framework.build/Objects-normal/i386/DTCoreTextLayoutFrame+DTRichText.o unable to open object file

    I did put in an order request to purchase the component to ship in a major application shortly.

  19. It is missing DTHTMLParserNode.h which can be found in DTCoreText, I am not sure should I include DTCoreText in my project as well or not.

  20. Thanks for letting me know. DTRichTextEditor is repackaging a bunch of headers from DTCoreText. It was missing several new ones. The next nightly build should be including these.

  21. Hello,

    I was wondering if you could provide any details on the current state of lists, bullets and tables in DTRichTextEditor 1.2.

    Thanks

    Mike

  22. Set up the demo project as described. It compiles but will not link in Xcode 4.6.1 due to multiple undefined symbols. DTRichTextEditor.framework is in the list of binaries to link to. Any ideas what might be going on? Thanks.

    Ld “/Volumes/Whitestar HD/Users/michael/Library/Developer/Xcode/DerivedData/DTRichTextEditorDemo-gbvjeehwrwkzmdgrsyvyijxpjyem/Build/Products/Debug-iphonesimulator/DTRichTextEditorDemo.app/DTRichTextEditorDemo” normal i386
    cd “/Volumes/Whitestar HD/Users/michael/Downloads/DTRichTextEditorDemo-master”
    setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin”
    /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.1.sdk “-L/Volumes/Whitestar HD/Users/michael/Library/Developer/Xcode/DerivedData/DTRichTextEditorDemo-gbvjeehwrwkzmdgrsyvyijxpjyem/Build/Products/Debug-iphonesimulator” “-L/Volumes/Whitestar HD/Users/michael/Downloads/DTRichTextEditorDemo-master/DTRichTextEditor.embeddedframework/DTRichTextEditor.framework” “-F/Volumes/Whitestar HD/Users/michael/Library/Developer/Xcode/DerivedData/DTRichTextEditorDemo-gbvjeehwrwkzmdgrsyvyijxpjyem/Build/Products/Debug-iphonesimulator” “-F/Volumes/Whitestar HD/Users/michael/Downloads/DTRichTextEditorDemo-master/DTRichTextEditor.embeddedframework” -filelist “/Volumes/Whitestar HD/Users/michael/Library/Developer/Xcode/DerivedData/DTRichTextEditorDemo-gbvjeehwrwkzmdgrsyvyijxpjyem/Build/Intermediates/DTRichTextEditorDemo.build/Debug-iphonesimulator/DTRichTextEditorDemo.build/Objects-normal/i386/DTRichTextEditorDemo.LinkFileList” -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1 -framework ImageIO -framework CoreText -framework QuartzCore -framework MediaPlayer -framework AssetsLibrary -lxml2 -framework UIKit -framework Foundation -framework CoreGraphics -framework DTRichTextEditor -o “/Volumes/Whitestar HD/Users/michael/Library/Developer/Xcode/DerivedData/DTRichTextEditorDemo-gbvjeehwrwkzmdgrsyvyijxpjyem/Build/Products/Debug-iphonesimulator/DTRichTextEditorDemo.app/DTRichTextEditorDemo”

    Undefined symbols for architecture i386:
    “_CGRectCenter”, referenced from:
    anon in DTRichTextEditor(DTRichTextEditor)
    anon in DTRichTextEditor(DTRichTextEditor)
    anon in DTRichTextEditor(DTRichTextEditor)
    “_DTLoupeDidHide”, referenced from:
    anon in DTRichTextEditor(DTRichTextEditor)
    “_OBJC_CLASS_$_DTBase64Coding”, referenced from:
    objc-class-ref in DTRichTextEditor(DTRichTextEditor)
    “_OBJC_CLASS_$_DTHTMLParser”, referenced from:
    objc-class-ref in DTRichTextEditor(DTRichTextEditor)
    (maybe you meant: _OBJC_CLASS_$_DTHTMLParserNode, _OBJC_CLASS_$_DTHTMLParserTextNode )
    “_OBJC_CLASS_$_DTLoupeView”, referenced from:
    objc-class-ref in DTRichTextEditor(DTRichTextEditor)
    “_OBJC_CLASS_$_DTTiledLayerWithoutFade”, referenced from:
    objc-class-ref in DTRichTextEditor(DTRichTextEditor)
    “_OBJC_CLASS_$_DTVersion”, referenced from:
    objc-class-ref in DTRichTextEditor(DTRichTextEditor)
    “_OBJC_CLASS_$_DTWebArchive”, referenced from:
    objc-class-ref in DTRichTextEditor(DTRichTextEditor)
    “_OBJC_CLASS_$_DTWebResource”, referenced from:
    anon in DTRichTextEditor(DTRichTextEditor)
    objc-class-ref in DTRichTextEditor(DTRichTextEditor)
    “_OBJC_IVAR_$_DTWebResource._data”, referenced from:
    anon in DTRichTextEditor(DTRichTextEditor)
    “_WebArchivePboardType”, referenced from:
    anon in DTRichTextEditor(DTRichTextEditor)
    “_sizeThatFitsKeepingAspectRatio”, referenced from:
    anon in DTRichTextEditor(DTRichTextEditor)
    anon in DTRichTextEditor(DTRichTextEditor)
    anon in DTRichTextEditor(DTRichTextEditor)
    anon in DTRichTextEditor(DTRichTextEditor)
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

  23. Hi,
    I did as you suggested. However it doesn’t compile due to header file mismatches.I get 10 compiler errors on DTRichTexteditorViewController about DTTextAttachment. There’s no property called “contents” or “contentType”. Also there’s no “DTTextAttachmentTypeImage” . When I view the header file where DTTextAttachment is defined, I confirm that this is the wrong header file.
    Where did I go wrong?

  24. Hi, I’m trying to install this in a project but am getting linker errors. One error was because I wasn’t linking against ImageIO. I did that and those disappeared. However, I am still getting linker errors against these symbols: _CGRectCenter, _OBJC_CLASS_$_DTBase64Encoding, _OBJC_CLASS_$_DTHTMLParse, _OBJC_CLASS_$_DTTiledLayerWithoutFade, amongst others. What am I doing wrong?

  25. Hi, I have the embedded archive compiling and building ok, but it required that I added DTFoundation and DTWebArchive to my project, I hope that’s correct. Everything is fine building and running on the simulator. However, when I try to run it on a device, I get many duplicate symbol errors. I am using cocoapods with my project, and that is how I’m including DTFoundation and DTWebArchive, I’m not sure if that matters. This sounds like a configuration problem, but everything looks fine (as far as I can tell) in the Build Settings. I am using Xcode 4.6.2. Can you help?

  26. The demo is a bit messed up at the moment since I released 1.5. need to clean this up. Also Xcode doesn’t help.

  27. Thanks for the reply! If we were to purchase the module, would we have this problem? Like I said, it works in the simulator. If you feel confident the purchased source will build to the phone, we’ll just buy a license.

  28. Hi,

    1) I think it does not work with ipad 5.1 simulator.. The error :
    dyld: Symbol not found: _OBJC_CLASS_$_UITextSelectionRect

    Is this a known issue? Or my simulator sdk is problematic?

    2) What is the status about ios 7 compatibility? Do you have a release plan in near future?

  29. Thanks a lot for providing the demo version. I have tested this and found that it cannot display html table (constructed by tag) properly. Content in the table is displayed line by line like paragraph. Will this problem occur in the paid version?

  30. Is the Jenkins build server down? We’d like to demo to our internal stakeholders before purchasing, but the timed build is preventing us from creating a build that they can see.