Skip to content

Commit 47b7f79

Browse files
authored
Merge pull request #108 from OneSignal/ios_pods_and_set_external_id_fixes
Ios pods and set external id fixes
2 parents 60f5258 + 9bba90b commit 47b7f79

File tree

7 files changed

+46
-44
lines changed

7 files changed

+46
-44
lines changed

example/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<dict>
55
<key>com.apple.security.application-groups</key>
66
<array>
7-
<string>group.com.testapp.brad.onesignal</string>
7+
<string>group.com.onesignal.example.onesignal</string>
88
</array>
99
</dict>
1010
</plist>

example/ios/Podfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ post_install do |installer|
6565
end
6666
end
6767
end
68+
69+
# Fixes Flutter.framework in shell script build phase '[CP] Embed Pods Frameworks' error
70+
install! 'cocoapods', :disable_input_output_paths => true

example/ios/Podfile.lock

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- OneSignal (2.8.5)
4-
- OneSignalFlutter (0.0.1):
3+
- OneSignal (2.10.0)
4+
- onesignal_flutter (2.0.0):
55
- Flutter
6-
- OneSignal
6+
- OneSignal (< 3.0, >= 2.9.5)
77

88
DEPENDENCIES:
9-
- Flutter (from `.symlinks/flutter/ios-release`)
10-
- OneSignal (< 3.0, >= 2.8.5)
11-
- OneSignalFlutter (from `.symlinks/plugins/OneSignalFlutter/ios`)
9+
- Flutter (from `.symlinks/flutter/ios`)
10+
- OneSignal (< 3.0, >= 2.9.4)
11+
- onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`)
1212

1313
SPEC REPOS:
14-
https://github.com/CocoaPods/Specs.git:
14+
https://github.com/cocoapods/specs.git:
1515
- OneSignal
1616

1717
EXTERNAL SOURCES:
1818
Flutter:
19-
:path: ".symlinks/flutter/ios-release"
20-
OneSignalFlutter:
21-
:path: ".symlinks/plugins/OneSignalFlutter/ios"
19+
:path: ".symlinks/flutter/ios"
20+
onesignal_flutter:
21+
:path: ".symlinks/plugins/onesignal_flutter/ios"
2222

2323
SPEC CHECKSUMS:
24-
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
25-
OneSignal: 42dae269c7eca517aee34963820e1eb922390031
26-
OneSignalFlutter: d16f1045e4f4ea30190d9da8beb5376067a1b71f
24+
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
25+
OneSignal: 0f5ff711d9f25da54885e4ab06ef0abc221a46ef
26+
onesignal_flutter: 9f295af4ef4a987342bb374c5988392e076ccafd
2727

28-
PODFILE CHECKSUM: c9a3a5716001f4e2fe1389a29e9ff4ef6296b9ad
28+
PODFILE CHECKSUM: 9ef7a252697efd34b66667034535923c4615900c
2929

30-
COCOAPODS: 1.5.0
30+
COCOAPODS: 1.6.1

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/* Begin PBXBuildFile section */
1010
12872BFFA124081F6A9FC4A8 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E8622CBDF58E0A1817ACFF5 /* libPods-OneSignalNotificationServiceExtension.a */; };
1111
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
12-
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
1312
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1413
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
1514
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@@ -69,7 +68,6 @@
6968
/* Begin PBXFileReference section */
7069
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
7170
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
72-
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
7371
39608820A78EFC26683593B5 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7472
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
7573
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
@@ -140,7 +138,6 @@
140138
9740EEB11CF90186004384FC /* Flutter */ = {
141139
isa = PBXGroup;
142140
children = (
143-
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
144141
3B80C3931E831B6300D905FE /* App.framework */,
145142
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
146143
9740EEBA1CF902C7004384FC /* Flutter.framework */,
@@ -276,7 +273,7 @@
276273
TargetAttributes = {
277274
97C146ED1CF9000F007C117D = {
278275
CreatedOnToolsVersion = 7.3.1;
279-
DevelopmentTeam = 4ZR3G6ZK9T;
276+
DevelopmentTeam = 99SW8E36CT;
280277
SystemCapabilities = {
281278
com.apple.ApplicationGroups.iOS = {
282279
enabled = 1;
@@ -288,7 +285,7 @@
288285
};
289286
CAB34E8E20F96BDA0024CA6B = {
290287
CreatedOnToolsVersion = 9.4.1;
291-
DevelopmentTeam = 4ZR3G6ZK9T;
288+
DevelopmentTeam = 99SW8E36CT;
292289
ProvisioningStyle = Automatic;
293290
SystemCapabilities = {
294291
com.apple.ApplicationGroups.iOS = {
@@ -303,6 +300,7 @@
303300
developmentRegion = English;
304301
hasScannedForEncodings = 0;
305302
knownRegions = (
303+
English,
306304
en,
307305
Base,
308306
);
@@ -327,7 +325,6 @@
327325
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
328326
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
329327
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
330-
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
331328
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
332329
);
333330
runOnlyForDeploymentPostprocessing = 0;
@@ -348,12 +345,9 @@
348345
files = (
349346
);
350347
inputPaths = (
351-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
352-
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
353348
);
354349
name = "[CP] Embed Pods Frameworks";
355350
outputPaths = (
356-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
357351
);
358352
runOnlyForDeploymentPostprocessing = 0;
359353
shellPath = /bin/sh;
@@ -585,7 +579,7 @@
585579
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
586580
CODE_SIGN_IDENTITY = "iPhone Developer";
587581
CURRENT_PROJECT_VERSION = 1;
588-
DEVELOPMENT_TEAM = 4ZR3G6ZK9T;
582+
DEVELOPMENT_TEAM = 99SW8E36CT;
589583
ENABLE_BITCODE = NO;
590584
FRAMEWORK_SEARCH_PATHS = (
591585
"$(inherited)",
@@ -597,7 +591,7 @@
597591
"$(inherited)",
598592
"$(PROJECT_DIR)/Flutter",
599593
);
600-
PRODUCT_BUNDLE_IDENTIFIER = com.testapp.brad;
594+
PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example;
601595
PRODUCT_NAME = "$(TARGET_NAME)";
602596
VERSIONING_SYSTEM = "apple-generic";
603597
};
@@ -611,7 +605,7 @@
611605
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
612606
CODE_SIGN_IDENTITY = "iPhone Developer";
613607
CURRENT_PROJECT_VERSION = 1;
614-
DEVELOPMENT_TEAM = 4ZR3G6ZK9T;
608+
DEVELOPMENT_TEAM = 99SW8E36CT;
615609
ENABLE_BITCODE = NO;
616610
FRAMEWORK_SEARCH_PATHS = (
617611
"$(inherited)",
@@ -623,7 +617,7 @@
623617
"$(inherited)",
624618
"$(PROJECT_DIR)/Flutter",
625619
);
626-
PRODUCT_BUNDLE_IDENTIFIER = com.testapp.brad;
620+
PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example;
627621
PRODUCT_NAME = "$(TARGET_NAME)";
628622
VERSIONING_SYSTEM = "apple-generic";
629623
};
@@ -643,15 +637,16 @@
643637
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
644638
CODE_SIGN_IDENTITY = "iPhone Developer";
645639
CODE_SIGN_STYLE = Automatic;
646-
DEVELOPMENT_TEAM = 4ZR3G6ZK9T;
640+
DEVELOPMENT_TEAM = 99SW8E36CT;
647641
ENABLE_BITCODE = NO;
648642
GCC_C_LANGUAGE_STANDARD = gnu11;
649643
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
650-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
644+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
651645
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
652-
PRODUCT_BUNDLE_IDENTIFIER = com.testapp.brad.OneSignalNotificationServiceExtension;
646+
PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA;
653647
PRODUCT_NAME = "$(TARGET_NAME)";
654-
SDKROOT = iphoneos11.4;
648+
PROVISIONING_PROFILE_SPECIFIER = "";
649+
SDKROOT = iphoneos;
655650
SKIP_INSTALL = YES;
656651
TARGETED_DEVICE_FAMILY = "1,2";
657652
};
@@ -671,15 +666,16 @@
671666
CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements;
672667
CODE_SIGN_IDENTITY = "iPhone Developer";
673668
CODE_SIGN_STYLE = Automatic;
674-
DEVELOPMENT_TEAM = 4ZR3G6ZK9T;
669+
DEVELOPMENT_TEAM = 99SW8E36CT;
675670
ENABLE_BITCODE = NO;
676671
GCC_C_LANGUAGE_STANDARD = gnu11;
677672
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
678-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
673+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
679674
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
680-
PRODUCT_BUNDLE_IDENTIFIER = com.testapp.brad.OneSignalNotificationServiceExtension;
675+
PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA;
681676
PRODUCT_NAME = "$(TARGET_NAME)";
682-
SDKROOT = iphoneos11.4;
677+
PROVISIONING_PROFILE_SPECIFIER = "";
678+
SDKROOT = iphoneos;
683679
SKIP_INSTALL = YES;
684680
TARGETED_DEVICE_FAMILY = "1,2";
685681
};

example/ios/Runner/Info.plist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
<string>1</string>
2525
<key>LSRequiresIPhoneOS</key>
2626
<true/>
27+
<key>NSAppTransportSecurity</key>
28+
<dict>
29+
<key>NSAllowsArbitraryLoads</key>
30+
<true/>
31+
</dict>
2732
<key>UILaunchStoryboardName</key>
2833
<string>LaunchScreen</string>
2934
<key>UIMainStoryboardFile</key>
@@ -43,10 +48,5 @@
4348
</array>
4449
<key>UIViewControllerBasedStatusBarAppearance</key>
4550
<false/>
46-
<key>NSAppTransportSecurity</key>
47-
<dict>
48-
<key>NSAllowsArbitraryLoads</key>
49-
<true/>
50-
</dict>
5151
</dict>
5252
</plist>

example/ios/Runner/Runner.entitlements

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<string>development</string>
77
<key>com.apple.security.application-groups</key>
88
<array>
9-
<string>group.com.testapp.brad.onesignal</string>
9+
<string>group.com.onesignal.example.onesignal</string>
1010
</array>
1111
</dict>
1212
</plist>

ios/Classes/OneSignalPlugin.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
127127
} else if ([@"OneSignal#initNotificationOpenedHandlerParams" isEqualToString:call.method]) {
128128
[self initNotificationOpenedHandlerParams];
129129
} else if ([@"OneSignal#setExternalUserId" isEqualToString:call.method]) {
130-
[OneSignal setExternalUserId:call.arguments[@"externalUserId"]];
130+
id externalId = call.arguments[@"externalUserId"];
131+
if (externalId == [NSNull null])
132+
externalId = nil;
133+
[OneSignal setExternalUserId:externalId];
131134
} else if ([@"OneSignal#removeExternalUserId" isEqualToString:call.method]) {
132135
[OneSignal removeExternalUserId];
133136
} else {

0 commit comments

Comments
 (0)