Skip to content

Commit

Permalink
Add preproccessor check to make sure that files are compiled with ARC
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-hofsteede committed Nov 20, 2013
1 parent f03b58c commit bb4ac48
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Mixpanel/MPSurvey.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "MPSurvey.h"
#import "MPSurveyQuestion.h"

Expand Down
4 changes: 4 additions & 0 deletions Mixpanel/MPSurveyNavigationController.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import <Availability.h>
#import <QuartzCore/QuartzCore.h>

Expand Down
4 changes: 4 additions & 0 deletions Mixpanel/MPSurveyQuestion.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "MPSurveyQuestion.h"

static NSString *MPSurveyQuestionTypeMultipleChoice = @"multiple_choice";
Expand Down
4 changes: 4 additions & 0 deletions Mixpanel/MPSurveyQuestionViewController.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import <QuartzCore/QuartzCore.h>

#import "MPSurveyQuestionViewController.h"
Expand Down
6 changes: 5 additions & 1 deletion Mixpanel/Mixpanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#include <arpa/inet.h>
#include <net/if.h>
#include <net/if_dl.h>
Expand All @@ -34,7 +38,7 @@
#import "NSData+MPBase64.h"
#import "UIView+MPSnapshotImage.h"

#define VERSION @"2.1.0"
#define VERSION @"2.2.0"

#ifdef MIXPANEL_LOG
#define MixpanelLog(...) NSLog(__VA_ARGS__)
Expand Down
4 changes: 4 additions & 0 deletions Mixpanel/NSData+MPBase64.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// appreciated but not required.
//

#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "NSData+MPBase64.h"

//
Expand Down
4 changes: 4 additions & 0 deletions Mixpanel/UIImage+MPAverageColor.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "UIImage+MPAverageColor.h"

@implementation UIImage (MPAverageColor)
Expand Down
4 changes: 4 additions & 0 deletions Mixpanel/UIImage+MPImageEffects.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
5/3/2013
*/

#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import "UIImage+MPImageEffects.h"

#import <Accelerate/Accelerate.h>
Expand Down
4 changes: 4 additions & 0 deletions Mixpanel/UIView+MPSnapshotImage.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if ! __has_feature(objc_arc)
#error This file must be compiled with ARC. Either turn on ARC for the project or use -fobjc-arc flag on this file.
#endif

#import <QuartzCore/QuartzCore.h>

#import "UIView+MPSnapshotImage.h"
Expand Down

0 comments on commit bb4ac48

Please sign in to comment.