Skip to content

Commit

Permalink
Merge pull request #1206 from OneSignal/release/5.0.0-alpha-01
Browse files Browse the repository at this point in the history
Release 5.0.0 alpha 01
  • Loading branch information
emawby committed Jan 10, 2023
2 parents 8b38246 + dc92b39 commit 55669f1
Show file tree
Hide file tree
Showing 370 changed files with 57,571 additions and 2,498 deletions.
2 changes: 1 addition & 1 deletion OneSignal.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OneSignal"
s.version = "3.11.2"
s.version = "5.0.0-alpha-01"
s.summary = "OneSignal push notification library for mobile apps."
s.homepage = "https://onesignal.com"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion OneSignalXCFramework.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OneSignalXCFramework"
s.version = "3.11.2"
s.version = "5.0.0-alpha-01"
s.summary = "OneSignal push notification library for mobile apps."
s.homepage = "https://onesignal.com"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
28 changes: 14 additions & 14 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,38 +76,38 @@ let package = Package(
),
.binaryTarget(
name: "OneSignalFramework",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.11.2/OneSignalFramework.xcframework.zip",
checksum: "e9cf7ebef15ab8757e6e9c95d359998f018f4de381944f4cc62bc4c25d1cdb9d"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-alpha-01/OneSignalFramework.xcframework.zip",
checksum: "4f50e9587156902b31d7141860252585203b695d1021e6e4ab0043e06a155a9a"
),
.binaryTarget(
name: "OneSignalUser",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.11.2/OneSignalUser.xcframework.zip",
checksum: "6378ad0fdba2e485274b87b192d0c6419f37e92bd33d9a2f7993b9c5e137b94f"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-alpha-01/OneSignalUser.xcframework.zip",
checksum: "7765bba3068471b937f334f430c52b3db896454804374b4f5f9e7ae318215cb2"
),
.binaryTarget(
name: "OneSignalNotifications",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.11.2/OneSignalNotifications.xcframework.zip",
checksum: "6378ad0fdba2e485274b87b192d0c6419f37e92bd33d9a2f7993b9c5e137b94f"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-alpha-01/OneSignalNotifications.xcframework.zip",
checksum: "d0dfc93d949bba2e93b200ff21ec495e0cc26734439502f4f9328c5a021856d8"
),
.binaryTarget(
name: "OneSignalExtension",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.11.2/OneSignalExtension.xcframework.zip",
checksum: "1725ed62c9a3630caccb04e6c52db02348719428e6a3eca6b1fec8ee35828162"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-alpha-01/OneSignalExtension.xcframework.zip",
checksum: "4c5f46b7e2c05cc92e2dea080a8620909d6bf3873bc1bb0580831a1ed0084cb5"
),
.binaryTarget(
name: "OneSignalOutcomes",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.11.2/OneSignalOutcomes.xcframework.zip",
checksum: "d1345bda87e3f0b4f50cc4f31de7c7f8a6be38e7b768d7ce4e599dc6e6f467ba"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-alpha-01/OneSignalOutcomes.xcframework.zip",
checksum: "f34e8b283a3c5db469164d5752f11cc9c464113bf04aa2531517241f8596cb0d"
),
.binaryTarget(
name: "OneSignalOSCore",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.11.2/OneSignalOSCore.xcframework.zip",
checksum: "6378ad0fdba2e485274b87b192d0c6419f37e92bd33d9a2f7993b9c5e137b94f"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-alpha-01/OneSignalOSCore.xcframework.zip",
checksum: "bb4e322248b6c9c93eb478fef44416417aaf6968333702dc9e5e9dcee07e614f"
),
.binaryTarget(
name: "OneSignalCore",
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/3.11.2/OneSignalCore.xcframework.zip",
checksum: "6378ad0fdba2e485274b87b192d0c6419f37e92bd33d9a2f7993b9c5e137b94f"
url: "https://github.com/OneSignal/OneSignal-iOS-SDK/releases/download/5.0.0-alpha-01/OneSignalCore.xcframework.zip",
checksum: "9649d2269722cf60b03f9c55dd9af5f65b1933b28852e9ed1a6bbb202dcb1150"
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// "*" in comment line ending comment means the string value has not been changed
// App

#define ONESIGNAL_VERSION @"031102"
#define ONESIGNAL_VERSION @"050000-alpha-01"

#define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID
#define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,34 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>OneSignalCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7_armv7s</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>OneSignalCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>armv7s</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>OneSignalCore.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -47,7 +44,7 @@
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Modified MIT License
*
* Copyright 2020 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>
@interface NSDateFormatter (OneSignal)
+ (instancetype)iso8601DateFormatter;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Modified MIT License
Copyright 2022 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>

// NS_ASSUME_NONNULL_BEGIN

@interface OSDeviceUtils : NSObject

+ (NSString *)getCurrentDeviceVersion;
+ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version;
+ (BOOL)isIOSVersionLessThan:(NSString *)version;
+ (NSString*)getDeviceVariant;

@end

// NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// OSDialogPresenter.h
// OneSignal
//
// Created by Elliot Mawby on 11/2/22.
// Copyright © 2022 Hiptic. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^OSDialogActionCompletion)(int tappedActionIndex);

@protocol OSDialogPresenter <NSObject>
- (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray<NSString *> * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion;
- (void)clearQueue;
@end

@interface OSDialogInstanceManager : NSObject
+ (void)setSharedInstance:(NSObject<OSDialogPresenter> *_Nonnull)instance;
+ (NSObject<OSDialogPresenter> *_Nullable)sharedInstance;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/

#import <Foundation/Foundation.h>
#import "OSNotification.h"
#import <OneSignalCore/OSNotification.h>

@protocol OSJSONDecodable
+ (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Modified MIT License
Copyright 2022 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>

// NS_ASSUME_NONNULL_BEGIN

@interface OSNetworkingUtils : NSObject

+ (NSNumber*)getNetType;

@end

// NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* THE SOFTWARE.
*/

#import "OSNotificationClasses.h"
#import <OneSignalCore/OSNotificationClasses.h>

#ifndef OSNotification_Internal_h
#define OSNotification_Internal_h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* THE SOFTWARE.
*/

#import "OSNotification.h"
#import <OneSignalCore/OSNotification.h>

// Pass in nil means a notification will not display
typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* 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.
*/

#ifndef OSObservable_h
#define OSObservable_h


@protocol OSObserver
- (void)onChanged:(id)state;
@end

@interface OSObservable<__covariant ObserverType, __covariant ObjectType> : NSObject
- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector;
- (void)addObserver:(ObserverType)observer;
- (void)removeObserver:(ObserverType)observer;
- (BOOL)notifyChange:(ObjectType)state;
@end

#endif /* OSObservable_h */
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ THE SOFTWARE.
@interface OSPrivacyConsentController : NSObject
+ (BOOL)requiresUserPrivacyConsent;
+ (void)consentGranted:(BOOL)granted;
+ (BOOL)getPrivacyConsent;
+ (BOOL)shouldLogMissingPrivacyConsentErrorWithMethodName:(NSString *)methodName;
+ (void)setRequiresPrivacyConsent:(BOOL)required;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
Modified MIT License
Copyright 2020 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.
*/

#ifndef OSRemoteParamController_h
#define OSRemoteParamController_h

@interface OSRemoteParamController : NSObject

+ (OSRemoteParamController *)sharedController;

@property (strong, nonatomic, readonly, nonnull) NSDictionary *remoteParams;

- (void)saveRemoteParams:(NSDictionary *_Nonnull)params;
- (BOOL)hasLocationKey;
- (BOOL)hasPrivacyConsentKey;

- (BOOL)isLocationShared;
- (void)saveLocationShared:(BOOL)shared;
- (BOOL)isPrivacyConsentRequired;
- (void)savePrivacyConsentRequired:(BOOL)shared;

@end

#endif /* OSRemoteParamController_h */
Loading

0 comments on commit 55669f1

Please sign in to comment.