Browse Source

Merge pull request #372 from Dimon70007/dg/344_invalid_permission

Dg/344 invalid permission
Mathieu Acthernoene 4 years ago
parent
commit
07abf12cbc
No account linked to committer's email address

+ 25
- 0
README.md View File

27
 
27
 
28
 By default no permission handler is installed. Update your `Podfile` by choosing the ones you want to check or request, then run `pod install`.
28
 By default no permission handler is installed. Update your `Podfile` by choosing the ones you want to check or request, then run `pod install`.
29
 
29
 
30
+```ruby
31
+# if you have prebuild dynamic cocoapods dependencies and could not migrate
32
+# to use_modular_headers you should use workaround for linking app with dynamic frameworks
33
+# and with static libraries by placing this code at the top of Podfile
34
+# 
35
+# Add this code at the top of Podfile right after platform definition
36
+use_frameworks!
37
+
38
+dynamic_frameworks = ['RxCocoa', 'RxSwift', 'WhatEverSDKName']
39
+
40
+# make all the other dependencies into static libraries by overriding the static_library
41
+pre_install do |installer|
42
+    installer.pod_targets.each do |pod|
43
+        if !dynamic_frameworks.include?(pod.name)
44
+            puts "Overriding the static_library for #{pod.name}"
45
+            def pod.build_type;
46
+              Pod::Target::BuildType.static_library
47
+              # for static framework -
48
+              # Pod::Target::BuildType.static_framework
49
+            end
50
+        end
51
+    end
52
+end
53
+```
54
+
30
 ```ruby
55
 ```ruby
31
 # 🚨 If you use use_framework! 🚨
56
 # 🚨 If you use use_framework! 🚨
32
 # - Ensure that you have installed at least Cocoapods 1.5.0
57
 # - Ensure that you have installed at least Cocoapods 1.5.0

+ 19
- 0
example/ios/Podfile View File

1
 platform :ios, '9.0'
1
 platform :ios, '9.0'
2
+
3
+# if you have prebuild dynamic cocoapods dependencies and could not migrate
4
+# to use_modular_headers you should use workaround for linking app with dynamic frameworks
5
+# and with static libraries by uncommenting next code
6
+
7
+# use_frameworks!
8
+# dynamic_frameworks = []
9
+# pre_install do |installer|
10
+#   # make all the other libraries into static frameworks by overriding the static_library
11
+#     installer.pod_targets.each do |pod|
12
+#         if !dynamic_frameworks.include?(pod.name)
13
+#             puts "Overriding the static_framework? method for #{pod.name}"
14
+#             def pod.build_type;
15
+#               Pod::Target::BuildType.static_library
16
+#             end
17
+#         end
18
+#     end
19
+# end
20
+
2
 require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
21
 require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3
 
22
 
4
 target 'RNPermissionsExample' do
23
 target 'RNPermissionsExample' do

+ 1
- 1
example/ios/Podfile.lock View File

435
   RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
435
   RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
436
   Yoga: 14927e37bd25376d216b150ab2a561773d57911f
436
   Yoga: 14927e37bd25376d216b150ab2a561773d57911f
437
 
437
 
438
-PODFILE CHECKSUM: fd41fb3cc785483e3289e017b0986b9b143fd760
438
+PODFILE CHECKSUM: 9188a4aace868c237f075e5ce6f84fb03952b3e2
439
 
439
 
440
 COCOAPODS: 1.8.4
440
 COCOAPODS: 1.8.4

+ 4
- 4
example/ios/RNPermissionsExample.xcodeproj/project.pbxproj View File

7
 	objects = {
7
 	objects = {
8
 
8
 
9
 /* Begin PBXBuildFile section */
9
 /* Begin PBXBuildFile section */
10
+		01942B9A460F342DD2C59941 /* libPods-RNPermissionsExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9589A3603474A4FFDED0D10B /* libPods-RNPermissionsExample.a */; };
10
 		13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
11
 		13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
11
 		13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
12
 		13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
12
 		13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13
 		13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13
 		13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14
 		13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14
-		6875196781331FFE9E603F87 /* libPods-RNPermissionsExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD155AF45729590903A0B306 /* libPods-RNPermissionsExample.a */; };
15
 /* End PBXBuildFile section */
15
 /* End PBXBuildFile section */
16
 
16
 
17
 /* Begin PBXFileReference section */
17
 /* Begin PBXFileReference section */
23
 		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNPermissionsExample/Images.xcassets; sourceTree = "<group>"; };
23
 		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNPermissionsExample/Images.xcassets; sourceTree = "<group>"; };
24
 		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNPermissionsExample/Info.plist; sourceTree = "<group>"; };
24
 		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNPermissionsExample/Info.plist; sourceTree = "<group>"; };
25
 		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RNPermissionsExample/main.m; sourceTree = "<group>"; };
25
 		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RNPermissionsExample/main.m; sourceTree = "<group>"; };
26
+		9589A3603474A4FFDED0D10B /* libPods-RNPermissionsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPermissionsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
26
 		AEA89E08943D1AC580FE431E /* 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>"; };
27
 		AEA89E08943D1AC580FE431E /* 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>"; };
27
 		D6698846DE1278CE89BAFBAD /* Pods-RNPermissionsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample.debug.xcconfig"; path = "Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample.debug.xcconfig"; sourceTree = "<group>"; };
28
 		D6698846DE1278CE89BAFBAD /* Pods-RNPermissionsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNPermissionsExample.debug.xcconfig"; path = "Target Support Files/Pods-RNPermissionsExample/Pods-RNPermissionsExample.debug.xcconfig"; sourceTree = "<group>"; };
28
-		DD155AF45729590903A0B306 /* libPods-RNPermissionsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNPermissionsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
29
 		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
29
 		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
30
 		ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
30
 		ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
31
 /* End PBXFileReference section */
31
 /* End PBXFileReference section */
35
 			isa = PBXFrameworksBuildPhase;
35
 			isa = PBXFrameworksBuildPhase;
36
 			buildActionMask = 2147483647;
36
 			buildActionMask = 2147483647;
37
 			files = (
37
 			files = (
38
-				6875196781331FFE9E603F87 /* libPods-RNPermissionsExample.a in Frameworks */,
38
+				01942B9A460F342DD2C59941 /* libPods-RNPermissionsExample.a in Frameworks */,
39
 			);
39
 			);
40
 			runOnlyForDeploymentPostprocessing = 0;
40
 			runOnlyForDeploymentPostprocessing = 0;
41
 		};
41
 		};
70
 			children = (
70
 			children = (
71
 				ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
71
 				ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
72
 				ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
72
 				ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
73
-				DD155AF45729590903A0B306 /* libPods-RNPermissionsExample.a */,
73
+				9589A3603474A4FFDED0D10B /* libPods-RNPermissionsExample.a */,
74
 			);
74
 			);
75
 			name = Frameworks;
75
 			name = Frameworks;
76
 			sourceTree = "<group>";
76
 			sourceTree = "<group>";