Skip to content

Commit 5044c24

Browse files
committed
temp binaries for testing
1 parent 331caf0 commit 5044c24

File tree

180 files changed

+10096
-566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+10096
-566
lines changed

iOS_SDK/OneSignalDevApp/OneSignalDevApp/AppDelegate.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
9595
return YES;
9696
}
9797

98-
#define ONESIGNAL_APP_ID_DEFAULT @"0ba9731b-33bd-43f4-8b59-61172e27447d"
99-
#define ONESIGNAL_APP_ID_KEY_FOR_TESTING @"ONESIGNAL_APP_ID_KEY_FOR_TESTING"
98+
#define ONESIGNAL_APP_ID_DEFAULT @"77e32082-ea27-42e3-a898-c72e141824ef"
99+
#define ONESIGNAL_APP_ID_KEY_FOR_TESTING @"77e32082-ea27-42e3-a898-c72e141824ef"
100100

101101
+ (NSString*)getOneSignalAppId {
102102
NSString* userDefinedAppId = [[NSUserDefaults standardUserDefaults] objectForKey:ONESIGNAL_APP_ID_KEY_FOR_TESTING];
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>LibraryIdentifier</key>
9+
<string>ios-arm64_armv7_armv7s</string>
10+
<key>LibraryPath</key>
11+
<string>OneSignalCore.framework</string>
12+
<key>SupportedArchitectures</key>
13+
<array>
14+
<string>arm64</string>
15+
<string>armv7</string>
16+
<string>armv7s</string>
17+
</array>
18+
<key>SupportedPlatform</key>
19+
<string>ios</string>
20+
</dict>
21+
<dict>
22+
<key>LibraryIdentifier</key>
23+
<string>ios-arm64_i386_x86_64-simulator</string>
24+
<key>LibraryPath</key>
25+
<string>OneSignalCore.framework</string>
26+
<key>SupportedArchitectures</key>
27+
<array>
28+
<string>arm64</string>
29+
<string>i386</string>
30+
<string>x86_64</string>
31+
</array>
32+
<key>SupportedPlatform</key>
33+
<string>ios</string>
34+
<key>SupportedPlatformVariant</key>
35+
<string>simulator</string>
36+
</dict>
37+
<dict>
38+
<key>LibraryIdentifier</key>
39+
<string>ios-arm64_x86_64-maccatalyst</string>
40+
<key>LibraryPath</key>
41+
<string>OneSignalCore.framework</string>
42+
<key>SupportedArchitectures</key>
43+
<array>
44+
<string>arm64</string>
45+
<string>x86_64</string>
46+
</array>
47+
<key>SupportedPlatform</key>
48+
<string>ios</string>
49+
<key>SupportedPlatformVariant</key>
50+
<string>maccatalyst</string>
51+
</dict>
52+
</array>
53+
<key>CFBundlePackageType</key>
54+
<string>XFWK</string>
55+
<key>XCFrameworkFormatVersion</key>
56+
<string>1.0</string>
57+
</dict>
58+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Modified MIT License
3+
*
4+
* Copyright 2021 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+
#import <Foundation/Foundation.h>
29+
30+
#ifndef NSString_OneSignal_h
31+
#define NSString_OneSignal_h
32+
@interface NSString (OneSignal)
33+
34+
- (NSString *_Nonnull)one_getVersionForRange:(NSRange)range;
35+
- (NSString *_Nonnull)one_substringAfter:(NSString *_Nonnull)needle;
36+
- (NSString *_Nonnull)one_getSemanticVersion;
37+
- (NSString *_Nullable)fileExtensionForMimeType;
38+
- (NSString *_Nullable)supportedFileExtension;
39+
40+
// returns a lower case hex representation of the data
41+
+ (nullable NSString *)hexStringFromData:(nonnull NSData *)data;
42+
43+
@end
44+
#endif
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+
#import <Foundation/Foundation.h>
29+
30+
@interface NSURL (OneSignal)
31+
32+
- (NSString *)valueFromQueryParameter:(NSString *)parameter;
33+
34+
- (NSString *)supportedFileExtensionFromQueryItems;
35+
36+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
#import <Foundation/Foundation.h>
29+
#import "OSNotification.h"
30+
31+
@protocol OSJSONDecodable
32+
+ (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data;
33+
34+
+ (instancetype _Nullable)instanceWithJson:(NSDictionary * _Nonnull)json;
35+
+ (instancetype _Nullable)instancePreviewFromNotification:(OSNotification * _Nonnull)notification;
36+
@end
37+
38+
@protocol OSJSONEncodable
39+
- (NSDictionary * _Nonnull)jsonRepresentation;
40+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
Modified MIT License
3+
4+
Copyright 2021 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+
#define mustOverride() @throw [NSException exceptionWithName:NSInvalidArgumentException reason:[NSString stringWithFormat:@"%s must be overridden in a subclass/category", __PRETTY_FUNCTION__] userInfo:nil]
29+
#define methodNotImplemented() mustOverride()
30+
// Defines let and var in Objective-c for shorter code
31+
// __auto_type is compatible with Xcode 8+
32+
#if defined(__cplusplus)
33+
#define let auto const
34+
#else
35+
#define let const __auto_type
36+
#endif
37+
38+
#if defined(__cplusplus)
39+
#define var auto
40+
#else
41+
#define var __auto_type
42+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
#import "OSNotificationClasses.h"
29+
30+
#ifndef OSNotification_Internal_h
31+
#define OSNotification_Internal_h
32+
33+
@interface OSNotification(Internal)
34+
+(instancetype _Nonnull )parseWithApns:(nonnull NSDictionary *)message;
35+
- (void)setCompletionBlock:(OSNotificationDisplayResponse _Nonnull)completion;
36+
- (void)startTimeoutTimer;
37+
- (void)complete:(OSNotification *)notification;
38+
@end
39+
40+
#endif /* OSNotification_Internal_h */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/**
2+
* Modified MIT License
3+
*
4+
* Copyright 2021 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+
/* OneSignal OSNotification */
28+
@interface OSNotification : NSObject
29+
30+
/* Unique Message Identifier */
31+
@property(readonly, nullable)NSString* notificationId;
32+
33+
/* Unique Template Identifier */
34+
@property(readonly, nullable)NSString* templateId;
35+
36+
/* Name of Template */
37+
@property(readonly, nullable)NSString* templateName;
38+
39+
/* True when the key content-available is set to 1 in the apns payload.
40+
content-available is used to wake your app when the payload is received.
41+
See Apple's documenation for more details.
42+
https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application
43+
*/
44+
@property(readonly)BOOL contentAvailable;
45+
46+
/* True when the key mutable-content is set to 1 in the apns payload.
47+
mutable-content is used to wake your Notification Service Extension to modify a notification.
48+
See Apple's documenation for more details.
49+
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
50+
*/
51+
@property(readonly, getter=hasMutableContent)BOOL mutableContent;
52+
53+
/*
54+
Notification category key previously registered to display with.
55+
This overrides OneSignal's actionButtons.
56+
See Apple's documenation for more details.
57+
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SupportingNotificationsinYourApp.html#//apple_ref/doc/uid/TP40008194-CH4-SW26
58+
*/
59+
@property(readonly, nullable)NSString* category;
60+
61+
/* The badge assigned to the application icon */
62+
@property(readonly)NSInteger badge;
63+
@property(readonly)NSInteger badgeIncrement;
64+
65+
/* The sound parameter passed to the notification
66+
By default set to UILocalNotificationDefaultSoundName */
67+
@property(readonly, nullable)NSString* sound;
68+
69+
/* Main push content */
70+
@property(readonly, nullable)NSString* title;
71+
@property(readonly, nullable)NSString* subtitle;
72+
@property(readonly, nullable)NSString* body;
73+
74+
/* Web address to launch within the app via a WKWebView */
75+
@property(readonly, nullable)NSString* launchURL;
76+
77+
/* Additional key value properties set within the payload */
78+
@property(readonly, nullable)NSDictionary* additionalData;
79+
80+
/* iOS 10+ : Attachments sent as part of the rich notification */
81+
@property(readonly, nullable)NSDictionary* attachments;
82+
83+
/* Action buttons passed */
84+
@property(readonly, nullable)NSArray *actionButtons;
85+
86+
/* Holds the original payload received
87+
Keep the raw value for users that would like to root the push */
88+
@property(readonly, nonnull)NSDictionary *rawPayload;
89+
90+
/* iOS 10+ : Groups notifications into threads */
91+
@property(readonly, nullable)NSString *threadId;
92+
93+
/* iOS 15+ : Relevance Score for notification summary */
94+
@property(readonly, nullable)NSNumber *relevanceScore;
95+
96+
/* iOS 15+ : Interruption Level */
97+
@property(readonly)NSString *interruptionLevel;
98+
99+
@property(readonly, nullable)NSString *collapseId;
100+
101+
/* Parses an APNS push payload into a OSNotification object.
102+
Useful to call from your NotificationServiceExtension when the
103+
didReceiveNotificationRequest:withContentHandler: method fires. */
104+
+ (instancetype)parseWithApns:(nonnull NSDictionary*)message;
105+
106+
/* Convert object into a custom Dictionary / JSON Object */
107+
- (NSDictionary* _Nonnull)jsonRepresentation;
108+
109+
/* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */
110+
- (NSString* _Nonnull)stringify;
111+
112+
@end

0 commit comments

Comments
 (0)