com.onesignal.unity.ios 3.0.1 → 3.0.4
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.
|
@@ -138,7 +138,7 @@ namespace OneSignalSDK {
|
|
|
138
138
|
_project.AddFile(relativeDestination, entitlementFileName);
|
|
139
139
|
_project.SetBuildProperty(targetGuid, "CODE_SIGN_ENTITLEMENTS", relativeDestination);
|
|
140
140
|
|
|
141
|
-
return
|
|
141
|
+
return relativeDestination;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
/// <summary>
|
|
@@ -163,15 +163,17 @@ namespace OneSignalSDK {
|
|
|
163
163
|
/// </summary>
|
|
164
164
|
private void AddNotificationServiceExtension() {
|
|
165
165
|
#if !UNITY_CLOUD_BUILD
|
|
166
|
-
//
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
// refresh plist and podfile on appends
|
|
167
|
+
ExtensionCreatePlist(_outputPath);
|
|
168
|
+
ExtensionAddPodsToTarget();
|
|
169
|
+
|
|
170
|
+
var extensionGuid = _project.TargetGuidByName(ServiceExtensionTargetName);
|
|
171
|
+
|
|
172
|
+
// skip target setup if already present
|
|
173
|
+
if (!string.IsNullOrEmpty(extensionGuid))
|
|
171
174
|
return;
|
|
172
|
-
}
|
|
173
175
|
|
|
174
|
-
|
|
176
|
+
extensionGuid = _project.AddAppExtension(_project.GetMainTargetGuid(),
|
|
175
177
|
ServiceExtensionTargetName,
|
|
176
178
|
PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.iOS) + "." + ServiceExtensionTargetName,
|
|
177
179
|
ServiceExtensionTargetName + "/" + "Info.plist" // Unix path as it's used by Xcode
|
|
@@ -198,8 +200,6 @@ namespace OneSignalSDK {
|
|
|
198
200
|
projCapability.AddAppGroups(new[] { _appGroupName });
|
|
199
201
|
|
|
200
202
|
projCapability.WriteToFile();
|
|
201
|
-
|
|
202
|
-
ExtensionAddPodsToTarget();
|
|
203
203
|
#endif
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -248,13 +248,6 @@ namespace OneSignalSDK {
|
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
var podfile = File.ReadAllText(podfilePath);
|
|
252
|
-
|
|
253
|
-
var extensionEntryRegex = new Regex($@"target '{ServiceExtensionTargetName}' do\n(.+)\nend");
|
|
254
|
-
if (extensionEntryRegex.IsMatch(podfile))
|
|
255
|
-
return;
|
|
256
|
-
|
|
257
|
-
var versionRegex = new Regex("(?<=<iosPod name=\"OneSignalXCFramework\" version=\").+(?=\" addToAllTargets=\"true\" />)");
|
|
258
251
|
var dependenciesFilePath = Path.Combine(EditorFilesPath, DependenciesFilename);
|
|
259
252
|
|
|
260
253
|
if (!File.Exists(dependenciesFilePath)) {
|
|
@@ -263,16 +256,26 @@ namespace OneSignalSDK {
|
|
|
263
256
|
}
|
|
264
257
|
|
|
265
258
|
var dependenciesFile = File.ReadAllText(dependenciesFilePath);
|
|
259
|
+
var dependenciesRegex = new Regex("(?<=<iosPod name=\"OneSignalXCFramework\" version=\").+(?=\" addToAllTargets=\"true\" />)");
|
|
266
260
|
|
|
267
|
-
if (!
|
|
261
|
+
if (!dependenciesRegex.IsMatch(dependenciesFile)) {
|
|
268
262
|
Debug.LogError($"Could not read current iOS framework dependency version from {DependenciesFilename}");
|
|
269
263
|
return;
|
|
270
264
|
}
|
|
271
265
|
|
|
272
|
-
var
|
|
273
|
-
|
|
266
|
+
var podfile = File.ReadAllText(podfilePath);
|
|
267
|
+
var podfileRegex = new Regex($@"target '{ServiceExtensionTargetName}' do\n pod 'OneSignalXCFramework', '(.+)'\nend\n");
|
|
268
|
+
|
|
269
|
+
var requiredVersion = dependenciesRegex.Match(dependenciesFile).ToString();
|
|
270
|
+
var requiredTarget = $"target '{ServiceExtensionTargetName}' do\n pod 'OneSignalXCFramework', '{requiredVersion}'\nend\n";
|
|
271
|
+
|
|
272
|
+
if (!podfileRegex.IsMatch(podfile))
|
|
273
|
+
podfile += requiredTarget;
|
|
274
|
+
else {
|
|
275
|
+
var podfileTarget = podfileRegex.Match(podfile).ToString();
|
|
276
|
+
podfile = podfile.Replace(podfileTarget, requiredTarget);
|
|
277
|
+
}
|
|
274
278
|
|
|
275
|
-
podfile += $"target '{ServiceExtensionTargetName}' do\n pod 'OneSignalXCFramework', '{version}'\nend\n";
|
|
276
279
|
File.WriteAllText(podfilePath, podfile);
|
|
277
280
|
}
|
|
278
281
|
}
|
|
@@ -12,7 +12,7 @@ PluginImporter:
|
|
|
12
12
|
validateReferences: 1
|
|
13
13
|
platformData:
|
|
14
14
|
- first:
|
|
15
|
-
Any:
|
|
15
|
+
Any:
|
|
16
16
|
second:
|
|
17
17
|
enabled: 0
|
|
18
18
|
settings: {}
|
|
@@ -25,13 +25,13 @@ PluginImporter:
|
|
|
25
25
|
- first:
|
|
26
26
|
iPhone: iOS
|
|
27
27
|
second:
|
|
28
|
-
enabled:
|
|
28
|
+
enabled: 0
|
|
29
29
|
settings: {}
|
|
30
30
|
- first:
|
|
31
31
|
tvOS: tvOS
|
|
32
32
|
second:
|
|
33
|
-
enabled:
|
|
33
|
+
enabled: 0
|
|
34
34
|
settings: {}
|
|
35
|
-
userData:
|
|
36
|
-
assetBundleName:
|
|
37
|
-
assetBundleVariant:
|
|
35
|
+
userData:
|
|
36
|
+
assetBundleName:
|
|
37
|
+
assetBundleVariant:
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.onesignal.unity.ios",
|
|
3
3
|
"displayName": "OneSignal Unity SDK - iOS",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.4",
|
|
5
5
|
"unity": "2018.4",
|
|
6
6
|
"description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"com.onesignal.unity.core": "3.0.
|
|
8
|
+
"com.onesignal.unity.core": "3.0.4"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"push-notifications",
|