Skip to content

Commit dbc5170

Browse files
committed
Fix after rebase: File differences
* OSFlutterUser.h - This file got deleted, so add it back * debug.dart - Renamed * Runner/Info.plist - small differences fixed * Runner.xcodeproj/project.pbxproj - small differences fixed
1 parent 888ace7 commit dbc5170

File tree

5 files changed

+51
-19
lines changed

5 files changed

+51
-19
lines changed

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -329,6 +329,7 @@
329329
/* Begin PBXShellScriptBuildPhase section */
330330
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
331331
isa = PBXShellScriptBuildPhase;
332+
alwaysOutOfDate = 1;
332333
buildActionMask = 2147483647;
333334
files = (
334335
);
@@ -421,6 +422,7 @@
421422
};
422423
9740EEB61CF901F6004384FC /* Run Script */ = {
423424
isa = PBXShellScriptBuildPhase;
425+
alwaysOutOfDate = 1;
424426
buildActionMask = 2147483647;
425427
files = (
426428
);

example/ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,7 @@
5050
<false/>
5151
<key>CADisableMinimumFrameDurationOnPhone</key>
5252
<true/>
53+
<key>UIApplicationSupportsIndirectInputEvents</key>
54+
<true/>
5355
</dict>
5456
</plist>

example/lib/main.dart

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,11 @@ class _MyAppState extends State<MyApp> {
117117

118118
void _handleSendTags() {
119119
print("Sending tags");
120-
// OneSignal.shared.sendTag("test2", "val2").then((response) {
121-
// print("Successfully sent tags with response: $response");
122-
// }).catchError((error) {
123-
// print("Encountered an error sending tags: $error");
124-
// });
120+
OneSignal.User.addTagWithKey("test2", "val2");
125121

126122
print("Sending tags array");
127-
var sendTags = {'test': 'value'};
128-
// OneSignal.shared.sendTags(sendTags).then((response) {
129-
// print("Successfully sent tags with response: $response");
130-
// }).catchError((error) {
131-
// print("Encountered an error sending tags: $error");
132-
// });
123+
var sendTags = {'test': 'value', 'test2': 'value2'};
124+
OneSignal.User.addTags(sendTags);
133125
}
134126

135127
void _handleRemoveTag() {
@@ -159,29 +151,29 @@ class _MyAppState extends State<MyApp> {
159151
}
160152

161153
void _handleSetEmail() {
162-
// if (_emailAddress == null) return;
163-
154+
if (_emailAddress == null) return;
164155
print("Setting email");
165156

166157
OneSignal.User.addEmail(_emailAddress!);
167158
}
168159

169-
void _handleSetLanguage() {
170-
// if (_language == null) return;
160+
void _handleRemoveEmail() {
161+
if (_emailAddress == null) return;
162+
print("Remove email");
171163

172164
OneSignal.User.removeEmail(_emailAddress!);
173165
}
174166

175167
void _handleSetSMSNumber() {
176168
if (_smsNumber == null) return;
177-
178169
print("Setting SMS Number");
179170

180171
OneSignal.User.addSms(_smsNumber!);
181172
}
182173

183-
void _handleLogoutSMSNumber() {
184-
print("Logging out of smsNumber");
174+
void _handleRemoveSMSNumber() {
175+
if (_smsNumber == null) return;
176+
print("Remove smsNumber");
185177

186178
OneSignal.User.removeSms(_smsNumber!);
187179
}

ios/Classes/OSFlutterUser.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Modified MIT License
3+
*
4+
* Copyright 2017 OneSignal
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* 1. The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* 2. All copies of substantial portions of the Software may only be used in connection
17+
* with services provided by OneSignal.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
* THE SOFTWARE.
26+
*/
27+
28+
29+
#import <Foundation/Foundation.h>
30+
#import <Flutter/Flutter.h>
31+
32+
@interface OSFlutterUser : NSObject<FlutterPlugin>
33+
34+
@property (strong, nonatomic) FlutterMethodChannel *channel;
35+
36+
@end
File renamed without changes.

0 commit comments

Comments
 (0)