Skip to content

Commit

Permalink
Fix after rebase: File differences
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nan-li committed Jan 31, 2024
1 parent 888ace7 commit dbc5170
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 19 deletions.
4 changes: 3 additions & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -329,6 +329,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -421,6 +422,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
28 changes: 10 additions & 18 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,11 @@ class _MyAppState extends State<MyApp> {

void _handleSendTags() {
print("Sending tags");
// OneSignal.shared.sendTag("test2", "val2").then((response) {
// print("Successfully sent tags with response: $response");
// }).catchError((error) {
// print("Encountered an error sending tags: $error");
// });
OneSignal.User.addTagWithKey("test2", "val2");

print("Sending tags array");
var sendTags = {'test': 'value'};
// OneSignal.shared.sendTags(sendTags).then((response) {
// print("Successfully sent tags with response: $response");
// }).catchError((error) {
// print("Encountered an error sending tags: $error");
// });
var sendTags = {'test': 'value', 'test2': 'value2'};
OneSignal.User.addTags(sendTags);
}

void _handleRemoveTag() {
Expand Down Expand Up @@ -159,29 +151,29 @@ class _MyAppState extends State<MyApp> {
}

void _handleSetEmail() {
// if (_emailAddress == null) return;

if (_emailAddress == null) return;
print("Setting email");

OneSignal.User.addEmail(_emailAddress!);
}

void _handleSetLanguage() {
// if (_language == null) return;
void _handleRemoveEmail() {
if (_emailAddress == null) return;
print("Remove email");

OneSignal.User.removeEmail(_emailAddress!);
}

void _handleSetSMSNumber() {
if (_smsNumber == null) return;

print("Setting SMS Number");

OneSignal.User.addSms(_smsNumber!);
}

void _handleLogoutSMSNumber() {
print("Logging out of smsNumber");
void _handleRemoveSMSNumber() {
if (_smsNumber == null) return;
print("Remove smsNumber");

OneSignal.User.removeSms(_smsNumber!);
}
Expand Down
36 changes: 36 additions & 0 deletions ios/Classes/OSFlutterUser.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Modified MIT License
*
* Copyright 2017 OneSignal
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* 1. The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* 2. All copies of substantial portions of the Software may only be used in connection
* with services provided by OneSignal.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/


#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>

@interface OSFlutterUser : NSObject<FlutterPlugin>

@property (strong, nonatomic) FlutterMethodChannel *channel;

@end
File renamed without changes.

0 comments on commit dbc5170

Please sign in to comment.