Skip to content

Commit deba5dc

Browse files
committed
Annotate iOS specific components
Use `#if TARGET_OS_IOS || TARGET_OS_MACCATALYST` to annotate iOS specific components. 1. EMM and MDM related classes. EMM/MDM: Enterprise Mobility Management or Mobile Device Management only apply to iOS. 2. GIDSignInButton. It is created based on UIKit.
1 parent 202cd5f commit deba5dc

File tree

10 files changed

+44
-2
lines changed

10 files changed

+44
-2
lines changed

GoogleSignIn/Sources/GIDEMMErrorHandler.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#include <TargetConditionals.h>
17+
18+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1619

1720
#import <Foundation/Foundation.h>
1821

@@ -35,3 +38,5 @@ NS_ASSUME_NONNULL_BEGIN
3538
@end
3639

3740
NS_ASSUME_NONNULL_END
41+
42+
#endif

GoogleSignIn/Sources/GIDEMMErrorHandler.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
#include <TargetConditionals.h>
15+
16+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1417

1518
#import "GoogleSignIn/Sources/GIDEMMErrorHandler.h"
1619

@@ -283,3 +286,5 @@ - (NSString *)cancelString {
283286
@end
284287

285288
NS_ASSUME_NONNULL_END
289+
290+
#endif

GoogleSignIn/Sources/GIDMDMPasscodeCache.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#include <TargetConditionals.h>
17+
18+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1619

1720
#import <Foundation/Foundation.h>
1821

@@ -39,3 +42,5 @@ NS_ASSUME_NONNULL_BEGIN
3942
@end
4043

4144
NS_ASSUME_NONNULL_END
45+
46+
#endif

GoogleSignIn/Sources/GIDMDMPasscodeCache.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
#include <TargetConditionals.h>
15+
16+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1417

1518
#import "GoogleSignIn/Sources/GIDMDMPasscodeCache.h"
1619

@@ -294,3 +297,5 @@ - (NSString *)info {
294297
@end
295298

296299
NS_ASSUME_NONNULL_END
300+
301+
#endif

GoogleSignIn/Sources/GIDMDMPasscodeState.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#include <TargetConditionals.h>
17+
18+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1619

1720
#import <Foundation/Foundation.h>
1821

@@ -48,3 +51,4 @@ NS_ASSUME_NONNULL_BEGIN
4851

4952
NS_ASSUME_NONNULL_END
5053

54+
#endif

GoogleSignIn/Sources/GIDMDMPasscodeState.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
#include <TargetConditionals.h>
15+
16+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1417

1518
#import "GoogleSignIn/Sources/GIDMDMPasscodeState.h"
1619

@@ -48,3 +51,5 @@ + (instancetype)passcodeState {
4851
@end
4952

5053
NS_ASSUME_NONNULL_END
54+
55+
#endif

GoogleSignIn/Sources/GIDMDMPasscodeState_Private.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#include <TargetConditionals.h>
17+
18+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1619

1720
#import <Foundation/Foundation.h>
1821

@@ -33,3 +36,5 @@ NS_ASSUME_NONNULL_BEGIN
3336
@end
3437

3538
NS_ASSUME_NONNULL_END
39+
40+
#endif

GoogleSignIn/Sources/GIDSignInButton.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
#include <TargetConditionals.h>
15+
16+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1417

1518
#import "GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignInButton.h"
1619

@@ -639,3 +642,5 @@ - (UIImage *)gid_imageWithBlendMode:(CGBlendMode)blendMode color:(UIColor *)colo
639642
@end
640643

641644
NS_ASSUME_NONNULL_END
645+
646+
#endif

GoogleSignIn/Sources/GIDSignInCallbackSchemes.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
#import "GoogleSignIn/Sources/GIDSignInCallbackSchemes.h"
1616

17-
#import <UIKit/UIKit.h>
18-
1917
NS_ASSUME_NONNULL_BEGIN
2018

2119
@implementation GIDSignInCallbackSchemes {

GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignInButton.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#include <TargetConditionals.h>
17+
18+
#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
1619

1720
#import <UIKit/UIKit.h>
1821

@@ -61,3 +64,5 @@ typedef NS_ENUM(NSInteger, GIDSignInButtonColorScheme) {
6164
@end
6265

6366
NS_ASSUME_NONNULL_END
67+
68+
#endif

0 commit comments

Comments
 (0)