Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
update visibility for iOS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorris committed Oct 15, 2015
1 parent 912231e commit ce074bc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/mbgl/ios/MGLAccountManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NS_ASSUME_NONNULL_BEGIN

/** The MGLAccountManager object provides a global way to set a Mapbox API access token, as well as other settings used framework-wide. */
@interface MGLAccountManager : NSObject
MBGL_PUBLIC @interface MGLAccountManager : NSObject

This comment has been minimized.

Copy link
@incanus

incanus Oct 19, 2015

Contributor

Is it possible to move this to the end of the line? Having a weird macro out front on normal public headers is off-putting for Cocoa devs, I think.

This comment has been minimized.

Copy link
@mikemorris

mikemorris Oct 19, 2015

Author Contributor

Nope, compiler errors trying to place it anywhere else. Logically, I think declaring a class as explicitly public/private makes most sense at the beginning of the function declaration anyway.

@interface MBGL_PUBLIC MGLAccountManager : NSObject
postfix attributes are not allowed on Objective-C directives, place them in front of '@interface'
@interface MGLAccountManager MBGL_PUBLIC : NSObject
expected identifier or '('
no known class method for selector 'alloc'
class 'MGLAccountManager' defined without specifying a base class [-Wobjc-root-class]
@interface MGLAccountManager : NSObject MBGL_PUBLIC
expected identifier or '('

/** @name Authorizing Access */

Expand Down
3 changes: 3 additions & 0 deletions include/mbgl/ios/MGLTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

#pragma once

#define MBGL_PUBLIC __attribute__ ((visibility ("default")))
#define MBGL_LOCAL __attribute__ ((visibility ("hidden")))

#if !__has_feature(nullability)
#define NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_END
Expand Down
2 changes: 1 addition & 1 deletion platform/ios/MGLMapboxEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern NSString *const MGLEventGesturePitchStart;
typedef NS_DICTIONARY_OF(NSString *, id) MGLMapboxEventAttributes;
typedef NS_MUTABLE_DICTIONARY_OF(NSString *, id) MGLMutableMapboxEventAttributes;

@interface MGLMapboxEvents : NSObject <NSURLSessionDelegate>
MBGL_PUBLIC @interface MGLMapboxEvents : NSObject <NSURLSessionDelegate>

+ (nullable instancetype)sharedManager;

Expand Down
3 changes: 2 additions & 1 deletion test/ios/ios-tests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down Expand Up @@ -574,6 +574,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down

0 comments on commit ce074bc

Please sign in to comment.