Skip to content

Commit c5df1fe

Browse files
authored
Switch to ObjC++ (#849)
* Switch to ObjC++ * Don't include .m files in sources * Embed frameworks per permission
1 parent bcb4c98 commit c5df1fe

25 files changed

+67
-38
lines changed

RNPermissions.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
1515
s.requires_arc = true
1616

1717
s.source = { :git => package["repository"]["url"], :tag => s.version }
18-
s.source_files = "ios/*.{h,m,mm}"
18+
s.source_files = "ios/*.{h,mm}"
1919

2020
if ENV['RCT_NEW_ARCH_ENABLED'] == "1" then
2121
install_modules_dependencies(s)

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ SPEC CHECKSUMS:
13821382
React-runtimescheduler: ed48e5faac6751e66ee1261c4bd01643b436f112
13831383
React-utils: 6e5ad394416482ae21831050928ae27348f83487
13841384
ReactCommon: 840a955d37b7f3358554d819446bffcf624b2522
1385-
RNPermissions: 17daec882a3e12cc1d98baa7bbb7108a3515827e
1385+
RNPermissions: 09766cc679a5bb91aa300d7cbce64db250e1a5c3
13861386
RNVectorIcons: 210f910e834e3485af40693ad4615c1ec22fc02b
13871387
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
13881388
Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312

example/ios/RNPermissionsExample.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1313
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1414
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
15-
DDCFC0EE2B1CDF540082F946 /* PhotosUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDCFC0ED2B1CDF540082F946 /* PhotosUI.framework */; };
1615
/* End PBXBuildFile section */
1716

1817
/* Begin PBXFileReference section */
@@ -26,7 +25,6 @@
2625
5709B34CF0A7D63546082F79 /* Pods-RNPermissionsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample.release.xcconfig"; path = "Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample.release.xcconfig"; sourceTree = "<group>"; };
2726
5DCACB8F33CDC322A6C60F78 /* libPods-RNPermissionsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPermissionsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
2827
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = RNPermissionsExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
29-
DDCFC0ED2B1CDF540082F946 /* PhotosUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhotosUI.framework; path = System/Library/Frameworks/PhotosUI.framework; sourceTree = SDKROOT; };
3028
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
3129
/* End PBXFileReference section */
3230

@@ -36,7 +34,6 @@
3634
buildActionMask = 2147483647;
3735
files = (
3836
0C80B921A6F3F58F76C31292 /* libPods-RNPermissionsExample.a in Frameworks */,
39-
DDCFC0EE2B1CDF540082F946 /* PhotosUI.framework in Frameworks */,
4037
);
4138
runOnlyForDeploymentPostprocessing = 0;
4239
};
@@ -59,7 +56,6 @@
5956
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
6057
isa = PBXGroup;
6158
children = (
62-
DDCFC0ED2B1CDF540082F946 /* PhotosUI.framework */,
6359
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
6460
5DCACB8F33CDC322A6C60F78 /* libPods-RNPermissionsExample.a */,
6561
);

ios/AppTrackingTransparency/RNPermissionHandlerAppTrackingTransparency.m renamed to ios/AppTrackingTransparency/RNPermissionHandlerAppTrackingTransparency.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import "RNPermissionHandlerAppTrackingTransparency.h"
22

3-
@import AppTrackingTransparency;
4-
@import AdSupport;
3+
#import <AdSupport/AdSupport.h>
4+
#import <AppTrackingTransparency/AppTrackingTransparency.h>
55

66
@interface RNPermissionHandlerAppTrackingTransparency()
77

ios/Bluetooth/RNPermissionHandlerBluetooth.m renamed to ios/Bluetooth/RNPermissionHandlerBluetooth.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import "RNPermissionHandlerBluetooth.h"
22

3-
@import CoreBluetooth;
3+
#import <CoreBluetooth/CoreBluetooth.h>
44

55
@interface RNPermissionHandlerBluetooth() <CBPeripheralManagerDelegate>
66

ios/Calendars/RNPermissionHandlerCalendars.m renamed to ios/Calendars/RNPermissionHandlerCalendars.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import "RNPermissionHandlerCalendars.h"
22

3-
@import EventKit;
3+
#import <EventKit/EventKit.h>
44

55
@implementation RNPermissionHandlerCalendars
66

ios/CalendarsWriteOnly/RNPermissionHandlerCalendarsWriteOnly.m renamed to ios/CalendarsWriteOnly/RNPermissionHandlerCalendarsWriteOnly.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import "RNPermissionHandlerCalendarsWriteOnly.h"
22

3-
@import EventKit;
3+
#import <EventKit/EventKit.h>
44

55
@implementation RNPermissionHandlerCalendarsWriteOnly
66

ios/Camera/RNPermissionHandlerCamera.m renamed to ios/Camera/RNPermissionHandlerCamera.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import "RNPermissionHandlerCamera.h"
22

3-
@import AVFoundation;
3+
#import <AVFoundation/AVFoundation.h>
44

55
@implementation RNPermissionHandlerCamera
66

ios/Contacts/RNPermissionHandlerContacts.m renamed to ios/Contacts/RNPermissionHandlerContacts.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import "RNPermissionHandlerContacts.h"
22

3-
@import Contacts;
3+
#import <Contacts/Contacts.h>
44

55
@implementation RNPermissionHandlerContacts
66

ios/FaceID/RNPermissionHandlerFaceID.m renamed to ios/FaceID/RNPermissionHandlerFaceID.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#import "RNPermissionHandlerFaceID.h"
22

3-
@import LocalAuthentication;
4-
@import UIKit;
3+
#import <LocalAuthentication/LocalAuthentication.h>
54

65
static NSString* SETTING_KEY = @"@RNPermissions:Requested";
76

0 commit comments

Comments
 (0)