freerasp-react-native 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -7
- package/ios/TalsecRuntime.xcframework/Info.plist +5 -5
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +122 -47
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +5248 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +54 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +3 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +2 -2
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +234 -94
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +5213 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +54 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +5213 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +54 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +2 -2
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +63 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,11 +20,12 @@ freeRASP for React Native is a mobile in-app protection and security monitoring
|
|
|
20
20
|
- [Dev vs Release version](#dev-vs-release-version)
|
|
21
21
|
- [Callbacks](#callbacks)
|
|
22
22
|
- [Initialization](#initialization)
|
|
23
|
+
- [Alternative: Initialize freeRASP in a Class component](#alternative-initialize-freerasp-in-a-class-component)
|
|
23
24
|
- [Step 5: Additional note about obfuscation](#step-5-additional-note-about-obfuscation)
|
|
24
25
|
- [Step 6: User Data Policies](#step-6-user-data-policies)
|
|
26
|
+
- [Troubleshooting](#troubleshooting)
|
|
25
27
|
- [Security Report](#security-report)
|
|
26
|
-
- [
|
|
27
|
-
- [Commercial version](#commercial-version)
|
|
28
|
+
- [Commercial versions (RASP+ and more)](#bar_chart-commercial-versions-rasp-and-more)
|
|
28
29
|
- [Plans Comparison](#plans-comparison)
|
|
29
30
|
- [About Us](#about-us)
|
|
30
31
|
- [License](#license)
|
|
@@ -73,7 +74,7 @@ in order to run freeRASP in your app:
|
|
|
73
74
|
|
|
74
75
|
# Usage
|
|
75
76
|
|
|
76
|
-
We will guide you step-by-step, but you can always check the expected result in the example.
|
|
77
|
+
We will guide you step-by-step, but you can always check the expected result in the example folder.
|
|
77
78
|
|
|
78
79
|
## (Optional) Create a new React Native demo application
|
|
79
80
|
|
|
@@ -101,9 +102,20 @@ freeRASP React Native plugin uses Pods. Navigate to the `ios` folder and run:
|
|
|
101
102
|
|
|
102
103
|
$ pod install
|
|
103
104
|
|
|
105
|
+
**IMPORTANT:** If you are upgrading from a previous version of freeRASP, please remove the old TalsecRuntime.xcframework and integration script from your project:
|
|
106
|
+
|
|
107
|
+
1. Open up the **.xcworkspace** file
|
|
108
|
+
1. Go to **Target -> Build Phases -> Link Binary With Libraries**
|
|
109
|
+
1. Remove **TalsecRuntime.xcframework**
|
|
110
|
+
1. On top bar select **Product -> Scheme -> Edit Scheme...**
|
|
111
|
+
1. On the left side select **Build -> Pre-actions**
|
|
112
|
+
1. Find integration script and click trash icon on the right side to remove it
|
|
113
|
+
1. Update freeRASP. If you are getting any errors, check that in `node_modules/freerasp-react-native/ios`, TalsecRuntime.xcframework is a folder, not a symlink. If it is a symlink, remove it and reinstall the module.
|
|
114
|
+
1. run `pod install`
|
|
115
|
+
|
|
104
116
|
## Step 3: Import freeRASP into the app
|
|
105
117
|
|
|
106
|
-
We provide a
|
|
118
|
+
We provide a React Custom Hook that handles all required logic as registration of freeRASP, mounting and unmounting of listeners for you. Import the Hook into your app:
|
|
107
119
|
|
|
108
120
|
```ts
|
|
109
121
|
import { useFreeRasp } from 'freerasp-react-native';
|
|
@@ -219,10 +231,46 @@ const actions = {
|
|
|
219
231
|
useFreeRasp(config, actions);
|
|
220
232
|
```
|
|
221
233
|
|
|
234
|
+
_Please note that useFreeRasp Hook should be called outside useEffect._
|
|
235
|
+
|
|
222
236
|
When freeRASP initializes correctly, you should see `freeRASP initialized` message in logs. Otherwise, you'll see warning with description of what went wrong.
|
|
223
237
|
|
|
224
238
|
_You can override this default behavior by extending the `actions` object with `started` key (to change action after successful initialization), and `initializationError` key (to set up action after unsuccessful initialization)_
|
|
225
239
|
|
|
240
|
+
### Alternative: Initialize freeRASP in a Class component
|
|
241
|
+
|
|
242
|
+
- import methods from the freeRASP plugin:
|
|
243
|
+
|
|
244
|
+
```ts
|
|
245
|
+
import {
|
|
246
|
+
talsecStart,
|
|
247
|
+
setThreatListeners,
|
|
248
|
+
removeThreatListeners,
|
|
249
|
+
} from 'freerasp-react-native';
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
- override `constructor()` method in the entry point to your app, set listeners to threats and start freeRASP:
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
constructor(props) {
|
|
256
|
+
super(props);
|
|
257
|
+
|
|
258
|
+
// Add these method calls
|
|
259
|
+
setThreatListeners(actions);
|
|
260
|
+
talsecStart(config);
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
_In this code snippet, `actions` is object with your reactions to threats and `config` is freeRASP configuration object from previous parts of the readme._
|
|
265
|
+
|
|
266
|
+
- override `componentWillUnmount()` method where you clean up the listeners:
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
componentWillUnmount() {
|
|
270
|
+
removeThreatListeners();
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
226
274
|
## Step 5: Additional note about obfuscation
|
|
227
275
|
|
|
228
276
|
The freeRASP contains public API, so the integration process is as simple as possible. Unfortunately, this public API also creates opportunities for the attacker to use publicly available information to interrupt freeRASP operations or modify your custom reaction implementation in threat callbacks. In order for freeRASP to be as effective as possible, it is highly recommended to apply obfuscation to the final package/application, making the public API more difficult to find and also partially randomized for each application so it cannot be automatically abused by generic hooking scripts.
|
|
@@ -273,6 +321,36 @@ If you encounter any other issues, you can see the list of solved issues [here](
|
|
|
273
321
|
- In `package.json`, update `react-native` to a higher patch version and run `npm install` (or `yarn install`).
|
|
274
322
|
- [See this issue to find out which patch version is relevant for you.](https://github.com/facebook/react-native/issues/35210)
|
|
275
323
|
|
|
324
|
+
### `Invalid hook call. Hooks can only be called inside of the body of a function component.`
|
|
325
|
+
|
|
326
|
+
**Reason:**
|
|
327
|
+
The `useFreeRasp` Hook cannot be called inside useEffect.
|
|
328
|
+
|
|
329
|
+
**Solution:**
|
|
330
|
+
|
|
331
|
+
- If you want to initialize freeRASP inside useEffect, you have to handle the initialization on your own. Such inititialization would look like this:
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
import {
|
|
335
|
+
setThreatListeners,
|
|
336
|
+
talsecStart,
|
|
337
|
+
removeThreatListeners,
|
|
338
|
+
} from 'freerasp-react-native';
|
|
339
|
+
|
|
340
|
+
...
|
|
341
|
+
|
|
342
|
+
useEffect(() => {
|
|
343
|
+
setThreatListeners(actions);
|
|
344
|
+
talsecStart(config);
|
|
345
|
+
|
|
346
|
+
return () => {
|
|
347
|
+
removeThreatListeners();
|
|
348
|
+
};
|
|
349
|
+
}, []);
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Where `actions`, `config` are objects described in previous chapters.
|
|
353
|
+
|
|
276
354
|
# Security Report
|
|
277
355
|
|
|
278
356
|
The Security Report is a weekly summary describing the application's security state and characteristics of the devices it runs on in a practical and easy-to-understand way.
|
|
@@ -283,12 +361,10 @@ To receive Security Reports, fill out the _watcherMail_ field in [config](#confi
|
|
|
283
361
|
|
|
284
362
|

|
|
285
363
|
|
|
286
|
-
# :bar_chart:
|
|
364
|
+
# :bar_chart: Commercial versions (RASP+ and more)
|
|
287
365
|
|
|
288
366
|
We provide app security hardening SDK: i.e. AppiCrypt®, Customer Data Encryption (local storage), End-to-end encryption, Strings protection (e.g. API keys) and Dynamic Certificate Pinning to our commercial customers as well. To get the most advanced protection compliant with PSD2 RT and eIDAS and support from our experts, contact us at [talsec.app](https://talsec.app).
|
|
289
367
|
|
|
290
|
-
## Commercial version
|
|
291
|
-
|
|
292
368
|
The commercial version provides a top-notch protection level, extra features, support, and maintenance. One of the most valued commercial features is [AppiCrypt®](https://www.talsec.app/appicrypt) - App Integrity Cryptogram.
|
|
293
369
|
|
|
294
370
|
It allows easy to implement API protection and App Integrity verification on the backend to prevent API abuse:
|
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-
|
|
9
|
+
<string>ios-arm64</string>
|
|
10
10
|
<key>LibraryPath</key>
|
|
11
11
|
<string>TalsecRuntime.framework</string>
|
|
12
12
|
<key>SupportedArchitectures</key>
|
|
13
13
|
<array>
|
|
14
14
|
<string>arm64</string>
|
|
15
|
-
<string>x86_64</string>
|
|
16
15
|
</array>
|
|
17
16
|
<key>SupportedPlatform</key>
|
|
18
17
|
<string>ios</string>
|
|
19
|
-
<key>SupportedPlatformVariant</key>
|
|
20
|
-
<string>simulator</string>
|
|
21
18
|
</dict>
|
|
22
19
|
<dict>
|
|
23
20
|
<key>LibraryIdentifier</key>
|
|
24
|
-
<string>ios-
|
|
21
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
25
22
|
<key>LibraryPath</key>
|
|
26
23
|
<string>TalsecRuntime.framework</string>
|
|
27
24
|
<key>SupportedArchitectures</key>
|
|
28
25
|
<array>
|
|
29
26
|
<string>arm64</string>
|
|
27
|
+
<string>x86_64</string>
|
|
30
28
|
</array>
|
|
31
29
|
<key>SupportedPlatform</key>
|
|
32
30
|
<string>ios</string>
|
|
31
|
+
<key>SupportedPlatformVariant</key>
|
|
32
|
+
<string>simulator</string>
|
|
33
33
|
</dict>
|
|
34
34
|
</array>
|
|
35
35
|
<key>CFBundlePackageType</key>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
#if 0
|
|
2
|
+
#elif defined(__arm64__) && __arm64__
|
|
3
|
+
// Generated by Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
|
|
2
4
|
#ifndef TALSECRUNTIME_SWIFT_H
|
|
3
5
|
#define TALSECRUNTIME_SWIFT_H
|
|
4
6
|
#pragma clang diagnostic push
|
|
@@ -22,10 +24,32 @@
|
|
|
22
24
|
#endif
|
|
23
25
|
|
|
24
26
|
#pragma clang diagnostic ignored "-Wauto-import"
|
|
27
|
+
#if defined(__OBJC__)
|
|
25
28
|
#include <Foundation/Foundation.h>
|
|
29
|
+
#endif
|
|
30
|
+
#if defined(__cplusplus)
|
|
31
|
+
#include <cstdint>
|
|
32
|
+
#include <cstddef>
|
|
33
|
+
#include <cstdbool>
|
|
34
|
+
#include <cstring>
|
|
35
|
+
#include <stdlib.h>
|
|
36
|
+
#include <new>
|
|
37
|
+
#include <type_traits>
|
|
38
|
+
#else
|
|
26
39
|
#include <stdint.h>
|
|
27
40
|
#include <stddef.h>
|
|
28
41
|
#include <stdbool.h>
|
|
42
|
+
#include <string.h>
|
|
43
|
+
#endif
|
|
44
|
+
#if defined(__cplusplus)
|
|
45
|
+
#if __has_include(<ptrauth.h>)
|
|
46
|
+
# include <ptrauth.h>
|
|
47
|
+
#else
|
|
48
|
+
# ifndef __ptrauth_swift_value_witness_function_pointer
|
|
49
|
+
# define __ptrauth_swift_value_witness_function_pointer(x)
|
|
50
|
+
# endif
|
|
51
|
+
#endif
|
|
52
|
+
#endif
|
|
29
53
|
|
|
30
54
|
#if !defined(SWIFT_TYPEDEFS)
|
|
31
55
|
# define SWIFT_TYPEDEFS 1
|
|
@@ -60,53 +84,66 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
60
84
|
# if __has_feature(objc_class_property)
|
|
61
85
|
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
|
|
62
86
|
# else
|
|
63
|
-
# define SWIFT_CLASS_PROPERTY(...)
|
|
87
|
+
# define SWIFT_CLASS_PROPERTY(...)
|
|
64
88
|
# endif
|
|
65
89
|
#endif
|
|
66
|
-
|
|
67
|
-
#if __has_attribute(objc_runtime_name)
|
|
68
|
-
#
|
|
69
|
-
#else
|
|
70
|
-
#
|
|
90
|
+
#if !defined(SWIFT_RUNTIME_NAME)
|
|
91
|
+
# if __has_attribute(objc_runtime_name)
|
|
92
|
+
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
|
|
93
|
+
# else
|
|
94
|
+
# define SWIFT_RUNTIME_NAME(X)
|
|
95
|
+
# endif
|
|
71
96
|
#endif
|
|
72
|
-
#if
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
97
|
+
#if !defined(SWIFT_COMPILE_NAME)
|
|
98
|
+
# if __has_attribute(swift_name)
|
|
99
|
+
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
|
|
100
|
+
# else
|
|
101
|
+
# define SWIFT_COMPILE_NAME(X)
|
|
102
|
+
# endif
|
|
76
103
|
#endif
|
|
77
|
-
#if
|
|
78
|
-
#
|
|
79
|
-
#
|
|
80
|
-
#
|
|
104
|
+
#if !defined(SWIFT_METHOD_FAMILY)
|
|
105
|
+
# if __has_attribute(objc_method_family)
|
|
106
|
+
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
|
|
107
|
+
# else
|
|
108
|
+
# define SWIFT_METHOD_FAMILY(X)
|
|
109
|
+
# endif
|
|
81
110
|
#endif
|
|
82
|
-
#if
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
111
|
+
#if !defined(SWIFT_NOESCAPE)
|
|
112
|
+
# if __has_attribute(noescape)
|
|
113
|
+
# define SWIFT_NOESCAPE __attribute__((noescape))
|
|
114
|
+
# else
|
|
115
|
+
# define SWIFT_NOESCAPE
|
|
116
|
+
# endif
|
|
86
117
|
#endif
|
|
87
|
-
#if
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
#
|
|
118
|
+
#if !defined(SWIFT_RELEASES_ARGUMENT)
|
|
119
|
+
# if __has_attribute(ns_consumed)
|
|
120
|
+
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
|
|
121
|
+
# else
|
|
122
|
+
# define SWIFT_RELEASES_ARGUMENT
|
|
123
|
+
# endif
|
|
91
124
|
#endif
|
|
92
|
-
#if
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
#
|
|
125
|
+
#if !defined(SWIFT_WARN_UNUSED_RESULT)
|
|
126
|
+
# if __has_attribute(warn_unused_result)
|
|
127
|
+
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
|
128
|
+
# else
|
|
129
|
+
# define SWIFT_WARN_UNUSED_RESULT
|
|
130
|
+
# endif
|
|
96
131
|
#endif
|
|
97
|
-
#if
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
#
|
|
132
|
+
#if !defined(SWIFT_NORETURN)
|
|
133
|
+
# if __has_attribute(noreturn)
|
|
134
|
+
# define SWIFT_NORETURN __attribute__((noreturn))
|
|
135
|
+
# else
|
|
136
|
+
# define SWIFT_NORETURN
|
|
137
|
+
# endif
|
|
101
138
|
#endif
|
|
102
139
|
#if !defined(SWIFT_CLASS_EXTRA)
|
|
103
|
-
# define SWIFT_CLASS_EXTRA
|
|
140
|
+
# define SWIFT_CLASS_EXTRA
|
|
104
141
|
#endif
|
|
105
142
|
#if !defined(SWIFT_PROTOCOL_EXTRA)
|
|
106
|
-
# define SWIFT_PROTOCOL_EXTRA
|
|
143
|
+
# define SWIFT_PROTOCOL_EXTRA
|
|
107
144
|
#endif
|
|
108
145
|
#if !defined(SWIFT_ENUM_EXTRA)
|
|
109
|
-
# define SWIFT_ENUM_EXTRA
|
|
146
|
+
# define SWIFT_ENUM_EXTRA
|
|
110
147
|
#endif
|
|
111
148
|
#if !defined(SWIFT_CLASS)
|
|
112
149
|
# if __has_attribute(objc_subclassing_restricted)
|
|
@@ -126,28 +163,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
126
163
|
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
|
|
127
164
|
# endif
|
|
128
165
|
#endif
|
|
129
|
-
|
|
130
166
|
#if !defined(SWIFT_PROTOCOL)
|
|
131
167
|
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
|
132
168
|
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
|
|
133
169
|
#endif
|
|
134
|
-
|
|
135
170
|
#if !defined(SWIFT_EXTENSION)
|
|
136
171
|
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
|
|
137
172
|
#endif
|
|
138
|
-
|
|
139
173
|
#if !defined(OBJC_DESIGNATED_INITIALIZER)
|
|
140
174
|
# if __has_attribute(objc_designated_initializer)
|
|
141
175
|
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
|
142
176
|
# else
|
|
143
|
-
# define OBJC_DESIGNATED_INITIALIZER
|
|
177
|
+
# define OBJC_DESIGNATED_INITIALIZER
|
|
144
178
|
# endif
|
|
145
179
|
#endif
|
|
146
180
|
#if !defined(SWIFT_ENUM_ATTR)
|
|
147
|
-
# if
|
|
181
|
+
# if __has_attribute(enum_extensibility)
|
|
148
182
|
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
|
|
149
183
|
# else
|
|
150
|
-
# define SWIFT_ENUM_ATTR(_extensibility)
|
|
184
|
+
# define SWIFT_ENUM_ATTR(_extensibility)
|
|
151
185
|
# endif
|
|
152
186
|
#endif
|
|
153
187
|
#if !defined(SWIFT_ENUM)
|
|
@@ -176,13 +210,17 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
176
210
|
#if !defined(SWIFT_DEPRECATED_MSG)
|
|
177
211
|
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
|
|
178
212
|
#endif
|
|
179
|
-
#if
|
|
180
|
-
#
|
|
181
|
-
#
|
|
182
|
-
#
|
|
213
|
+
#if !defined(SWIFT_DEPRECATED_OBJC)
|
|
214
|
+
# if __has_feature(attribute_diagnose_if_objc)
|
|
215
|
+
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
|
|
216
|
+
# else
|
|
217
|
+
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
|
|
218
|
+
# endif
|
|
183
219
|
#endif
|
|
220
|
+
#if defined(__OBJC__)
|
|
184
221
|
#if !defined(IBSegueAction)
|
|
185
|
-
# define IBSegueAction
|
|
222
|
+
# define IBSegueAction
|
|
223
|
+
#endif
|
|
186
224
|
#endif
|
|
187
225
|
#if !defined(SWIFT_EXTERN)
|
|
188
226
|
# if defined(__cplusplus)
|
|
@@ -191,12 +229,40 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
191
229
|
# define SWIFT_EXTERN extern
|
|
192
230
|
# endif
|
|
193
231
|
#endif
|
|
194
|
-
#if
|
|
232
|
+
#if !defined(SWIFT_CALL)
|
|
233
|
+
# define SWIFT_CALL __attribute__((swiftcall))
|
|
234
|
+
#endif
|
|
235
|
+
#if !defined(SWIFT_INDIRECT_RESULT)
|
|
236
|
+
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
|
|
237
|
+
#endif
|
|
238
|
+
#if !defined(SWIFT_CONTEXT)
|
|
239
|
+
# define SWIFT_CONTEXT __attribute__((swift_context))
|
|
240
|
+
#endif
|
|
241
|
+
#if !defined(SWIFT_ERROR_RESULT)
|
|
242
|
+
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
|
|
243
|
+
#endif
|
|
244
|
+
#if defined(__cplusplus)
|
|
245
|
+
# define SWIFT_NOEXCEPT noexcept
|
|
246
|
+
#else
|
|
247
|
+
# define SWIFT_NOEXCEPT
|
|
248
|
+
#endif
|
|
249
|
+
#if defined(_WIN32)
|
|
250
|
+
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
|
251
|
+
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
|
|
252
|
+
#endif
|
|
253
|
+
#else
|
|
254
|
+
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
|
255
|
+
# define SWIFT_IMPORT_STDLIB_SYMBOL
|
|
256
|
+
#endif
|
|
257
|
+
#endif
|
|
258
|
+
#if defined(__OBJC__)
|
|
259
|
+
#if __has_feature(objc_modules)
|
|
195
260
|
#if __has_warning("-Watimport-in-framework-header")
|
|
196
261
|
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
|
197
262
|
#endif
|
|
198
263
|
#endif
|
|
199
264
|
|
|
265
|
+
#endif
|
|
200
266
|
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
|
|
201
267
|
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
|
|
202
268
|
#if __has_warning("-Wpragma-clang-attribute")
|
|
@@ -204,6 +270,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
204
270
|
#endif
|
|
205
271
|
#pragma clang diagnostic ignored "-Wunknown-pragmas"
|
|
206
272
|
#pragma clang diagnostic ignored "-Wnullability"
|
|
273
|
+
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
|
207
274
|
|
|
208
275
|
#if __has_attribute(external_source_symbol)
|
|
209
276
|
# pragma push_macro("any")
|
|
@@ -212,11 +279,19 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
212
279
|
# pragma pop_macro("any")
|
|
213
280
|
#endif
|
|
214
281
|
|
|
282
|
+
#if defined(__OBJC__)
|
|
215
283
|
|
|
216
|
-
SWIFT_EXTERN void
|
|
284
|
+
SWIFT_EXTERN void __vOXbpNRhpnChjnGnjZhWdRZ(void);
|
|
217
285
|
|
|
286
|
+
#endif
|
|
287
|
+
#if defined(__cplusplus)
|
|
288
|
+
#endif
|
|
218
289
|
#if __has_attribute(external_source_symbol)
|
|
219
290
|
# pragma clang attribute pop
|
|
220
291
|
#endif
|
|
221
292
|
#pragma clang diagnostic pop
|
|
222
293
|
#endif
|
|
294
|
+
|
|
295
|
+
#else
|
|
296
|
+
#error unsupported Swift architecture
|
|
297
|
+
#endif
|