johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.56k stars 565 forks source link

Bundle project doesn't recognize NS_OPTIONS #23

Closed sahara108 closed 10 years ago

sahara108 commented 10 years ago

Hi, I have an enum which is defined like that: typedef NS_OPTIONS(NSUInteger, SocialServices) { NoneService = 0, Facebook = 1 << 0, Twitter = 1 << 1, Contact = 1 << 2 };

When trying to inject I get the error : Elaborated type refers to a typedef. Chang to enum SocialServices { NoneService = 0, Facebook = 1 << 0, Twitter = 1 << 1, } will fix it.

johnno1962 commented 10 years ago

Hi, I can’t replicate this problem this end. It must be something to do with compiler optionslanguage dialect. Can you prepare a small example project with this problem and send it to me?

sahara108 commented 10 years ago

I can't also reproduce this problem. The "BundleContents.m" is empty but in my real project, it shows: screen shot 2014-04-02 at 11 12 15 pm The problem is my "ShizzleHomeViewController.m" that has method doA:(enum AnEnum)param and it make bundle project build failed. I don't know why BundleContents.m of my test project is empty. Although, you can get my test project from here: https://github.com/sahara108/TestInjection And, I don't need to re-add GoogleAnalytics library for bundle project. Weird!!!! I don't think Kiwi framework and KIF framework is problem. But I will try ...

johnno1962 commented 10 years ago

Resolved offline