From 331e9ea1acd7e1039fb32dbe28117454d31853d1 Mon Sep 17 00:00:00 2001 From: dkimitsa Date: Sat, 16 Sep 2023 22:58:11 +0300 Subject: [PATCH] * OneSignal updated to v5.0.1 --- README.md | 2 +- onesignal/README.md | 1 + onesignal/ios/README.md | 37 +- onesignal/ios/pom.xml | 2 +- .../OneSignal.framework/Headers/OneSignal.h | 463 ------------------ .../Headers/NSDateFormatter+OneSignal.h | 31 ++ .../Headers/OSDeviceUtils.h | 41 ++ .../Headers/OSDialogInstanceManager.h | 40 ++ .../Headers/OSInAppMessages.h | 142 ++++++ .../Headers/OSJSONHandling.h | 2 +- .../Headers/OSLocation.h | 40 ++ .../Headers/OSNetworkingUtils.h | 47 ++ .../Headers/OSNotification+Internal.h | 6 +- .../Headers/OSNotificationClasses.h | 13 +- .../Headers/OSObservable.h | 52 ++ .../Headers/OSPrivacyConsentController.h | 2 + .../Headers/OSRemoteParamController.h | 48 ++ .../Headers/OSRequests.h | 94 +--- .../Headers/OneSignalClient.h | 2 +- .../Headers/OneSignalCommonDefines.h | 111 +++-- .../Headers/OneSignalConfigManager.h | 36 ++ .../Headers/OneSignalCore.h | 50 +- .../Headers/OneSignalCoreHelper.h | 30 ++ .../Headers/OneSignalLog.h | 10 +- .../Headers/OneSignalMobileProvision.h | 23 + .../Headers/OneSignalRequest.h | 3 +- .../Headers/OneSignalSelectorHelpers.h | 34 ++ .../Headers/OneSignalTrackFirebaseAnalytics.h | 4 +- .../Headers/OneSignalWrapper.h | 38 ++ .../Headers/SwizzlingForwarder.h | 38 ++ .../Headers/OneSignalAttachmentHandler.h | 37 ++ .../Headers/OneSignalExtension.h | 44 ++ .../Headers/OneSignalExtensionBadgeHandler.h | 36 ++ ...ignalNotificationServiceExtensionHandler.h | 41 ++ .../OneSignalReceiveReceiptsController.h | 51 ++ .../Headers/OneSignalFramework-Swift.h | 265 ++++++++++ .../Headers/OneSignalFramework.h | 117 +++++ .../Headers/OneSignalLiveActivityController.h | 47 ++ .../Headers/OneSignalInAppMessages.h | 38 ++ .../Headers/OneSignalLocationManager.h | 57 +++ .../Headers/OSNotification+OneSignal.h | 37 ++ .../Headers/OSNotificationsManager.h | 125 +++++ .../Headers/OSPermission.h | 102 ++++ .../Headers/OneSignalNotificationSettings.h | 48 ++ .../Headers/OneSignalNotifications.h | 32 ++ .../Headers/OneSignalOSCore-Swift.h | 324 ++++++++++++ .../Headers/OneSignalOSCore.h | 34 ++ .../Headers/OSFocusInfluenceParam.h | 45 ++ .../Headers/OSSessionManager.h | 6 +- .../OneSignalOutcomeEventsController.h | 26 +- .../Headers/OneSignalOutcomes.h | 17 +- .../Headers/OneSignalUser-Swift.h | 410 ++++++++++++++++ .../Headers/OneSignalUser.h | 34 ++ onesignal/ios/src/main/bro-gen/onesignal.yaml | 317 ++++++++---- .../org/robovm/pods/onesignal/HTTPMethod.java | 3 +- .../pods/onesignal/OSBoolObservable.java | 67 +++ ...SubscriptionObserver.java => OSDebug.java} | 5 +- ...serverAdapter.java => OSDebugAdapter.java} | 7 +- .../robovm/pods/onesignal/OSDeviceState.java | 82 ---- .../robovm/pods/onesignal/OSDeviceUtils.java | 65 +++ .../onesignal/OSDialogInstanceManager.java | 61 +++ .../pods/onesignal/OSDialogPresenter.java | 58 +++ .../onesignal/OSDialogPresenterAdapter.java | 58 +++ ...gs.java => OSDisplayableNotification.java} | 21 +- ...Device.java => OSFocusInfluenceParam.java} | 31 +- .../pods/onesignal/OSInAppMessageAction.java | 86 ---- .../OSInAppMessageActionUrlType.java | 64 +++ ...ges.java => OSInAppMessageClickEvent.java} | 24 +- ....java => OSInAppMessageClickListener.java} | 6 +- ...> OSInAppMessageClickListenerAdapter.java} | 8 +- ...er.java => OSInAppMessageClickResult.java} | 37 +- .../OSInAppMessageDidDismissEvent.java | 60 +++ .../OSInAppMessageDidDisplayEvent.java | 60 +++ ...a => OSInAppMessageLifecycleListener.java} | 10 +- ...InAppMessageLifecycleListenerAdapter.java} | 12 +- .../OSInAppMessageWillDismissEvent.java | 60 +++ .../OSInAppMessageWillDisplayEvent.java | 60 +++ ...sageDelegate.java => OSInAppMessages.java} | 5 +- ...apter.java => OSInAppMessagesAdapter.java} | 7 +- ...stLogoutEmail.java => OSLastLocation.java} | 39 +- .../pods/onesignal/OSLiveActivities.java | 55 +++ ...pter.java => OSLiveActivitiesAdapter.java} | 7 +- .../org/robovm/pods/onesignal/OSLocation.java | 55 +++ .../pods/onesignal/OSLocationAdapter.java | 55 +++ .../pods/onesignal/OSLocationCoordinate.java | 62 +++ ...SignalCore.java => OSNetworkingUtils.java} | 17 +- .../robovm/pods/onesignal/OSNotification.java | 6 - ...ult.java => OSNotificationClickEvent.java} | 16 +- .../OSNotificationClickListener.java | 56 +++ .../OSNotificationClickListenerAdapter.java | 56 +++ ...on.java => OSNotificationClickResult.java} | 16 +- .../OSNotificationLifecycleListener.java | 56 +++ ...SNotificationLifecycleListenerAdapter.java | 56 +++ .../OSNotificationPermissionObserver.java | 56 +++ ...NotificationPermissionObserverAdapter.java | 56 +++ .../OSNotificationWillDisplayEvent.java | 60 +++ .../pods/onesignal/OSNotifications.java | 55 +++ .../onesignal/OSNotificationsAdapter.java | 55 +++ .../onesignal/OSNotificationsManager.java | 140 ++++++ .../robovm/pods/onesignal/OSObservable.java | 67 +++ .../org/robovm/pods/onesignal/OSObserver.java | 56 +++ .../pods/onesignal/OSObserverAdapter.java | 56 +++ .../org/robovm/pods/onesignal/OSOutcomes.java | 73 +++ .../OSPermissionChangedInternalObserver.java | 61 +++ .../pods/onesignal/OSPermissionState.java | 18 +- .../onesignal/OSPermissionStateInternal.java | 116 +++++ ...er.java => OSPermissionStateObserver.java} | 6 +- ... => OSPermissionStateObserverAdapter.java} | 8 +- .../onesignal/OSPrivacyConsentController.java | 4 + .../pods/onesignal/OSPushSubscription.java | 67 +++ .../onesignal/OSPushSubscriptionAdapter.java | 67 +++ ...va => OSPushSubscriptionChangedState.java} | 28 +- .../onesignal/OSPushSubscriptionObserver.java | 56 +++ .../OSPushSubscriptionObserverAdapter.java | 56 +++ ...tate.java => OSPushSubscriptionState.java} | 32 +- ...uage.java => OSRemoteParamController.java} | 37 +- .../pods/onesignal/OSRequestBadgeCount.java | 61 --- .../onesignal/OSRequestLiveActivityEnter.java | 6 +- .../onesignal/OSRequestLiveActivityExit.java | 6 +- .../pods/onesignal/OSRequestLogoutSMS.java | 60 --- .../pods/onesignal/OSRequestRegisterUser.java | 60 --- .../onesignal/OSRequestSendPurchases.java | 61 --- .../onesignal/OSRequestSyncHashedEmail.java | 60 --- .../onesignal/OSRequestUpdateDeviceToken.java | 66 --- .../OSRequestUpdateExternalUserId.java | 64 --- .../OSRequestUpdateNotificationTypes.java | 60 --- .../pods/onesignal/OSResponseStatusType.java | 66 +++ .../org/robovm/pods/onesignal/OSSession.java | 55 +++ .../pods/onesignal/OSSessionAdapter.java | 55 +++ .../pods/onesignal/OSSessionManager.java | 14 +- .../pods/onesignal/OSStubInAppMessages.java | 81 +++ .../robovm/pods/onesignal/OSStubLocation.java | 65 +++ .../pods/onesignal/OSSubscriptionState.java | 66 --- .../onesignal/OSUIApplicationReleaseMode.java | 68 +++ .../org/robovm/pods/onesignal/OSUser.java | 83 ++++ .../robovm/pods/onesignal/OSUserAdapter.java | 83 ++++ .../org/robovm/pods/onesignal/OneSignal.java | 203 ++------ ...s.java => OneSignalAttachmentHandler.java} | 25 +- ...State.java => OneSignalConfigManager.java} | 27 +- .../pods/onesignal/OneSignalConstants.java | 69 ++- .../pods/onesignal/OneSignalExtension.java | 67 +++ .../OneSignalExtensionBadgeHandler.java | 63 +++ .../onesignal/OneSignalInAppMessages.java | 89 ++++ .../OneSignalLiveActivityController.java | 69 +++ .../onesignal/OneSignalLocationManager.java | 77 +++ .../robovm/pods/onesignal/OneSignalLog.java | 12 +- ...mes.java => OneSignalMobileProvision.java} | 16 +- ...alNotificationServiceExtensionHandler.java | 63 +++ ...ava => OneSignalNotificationSettings.java} | 33 +- ...va => OneSignalNotificationsDelegate.java} | 8 +- ...OneSignalNotificationsDelegateAdapter.java | 58 +++ .../OneSignalOutcomeEventsController.java | 16 +- .../OneSignalReceiveReceiptsController.java | 65 +++ .../pods/onesignal/OneSignalRequest.java | 4 + .../OneSignalTrackFirebaseAnalytics.java | 2 +- .../onesignal/OneSignalUserManagerImpl.java | 138 ++++++ .../pods/onesignal/OneSignalWrapper.java | 65 +++ .../pods/onesignal/SwizzlingForwarder.java | 65 +++ .../pods/onesignal/ViewOrientation.java | 64 +++ .../robopods/META-INF/robovm/ios/robovm.xml | 5 +- scripts/harvester.kts | 64 +-- 161 files changed, 7002 insertions(+), 1976 deletions(-) delete mode 100644 onesignal/ios/src/main/bro-gen/OneSignal.framework/Headers/OneSignal.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDeviceUtils.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDialogInstanceManager.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSInAppMessages.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSLocation.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNetworkingUtils.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSObservable.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRemoteParamController.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalConfigManager.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalMobileProvision.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalWrapper.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/SwizzlingForwarder.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalAttachmentHandler.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtension.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtensionBadgeHandler.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalNotificationServiceExtensionHandler.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalReceiveReceiptsController.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalLocation.framework/Headers/OneSignalLocationManager.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotificationsManager.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSPermission.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotifications.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser-Swift.h create mode 100644 onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser.h create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSBoolObservable.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSSubscriptionObserver.java => OSDebug.java} (86%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSSubscriptionObserverAdapter.java => OSDebugAdapter.java} (82%) delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceState.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceUtils.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogInstanceManager.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenterAdapter.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSRequestGetTags.java => OSDisplayableNotification.java} (64%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSRequestCreateDevice.java => OSFocusInfluenceParam.java} (50%) delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageAction.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageActionUrlType.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSPermissionStateChanges.java => OSInAppMessageClickEvent.java} (68%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSSMSSubscriptionObserver.java => OSInAppMessageClickListener.java} (86%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSEmailSubscriptionObserverAdapter.java => OSInAppMessageClickListenerAdapter.java} (82%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSRequestSendTagsToServer.java => OSInAppMessageClickResult.java} (52%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDismissEvent.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDisplayEvent.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSInAppMessageLifecycleHandler.java => OSInAppMessageLifecycleListener.java} (83%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSInAppMessageLifecycleHandlerAdapter.java => OSInAppMessageLifecycleListenerAdapter.java} (79%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDismissEvent.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDisplayEvent.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSInAppMessageDelegate.java => OSInAppMessages.java} (91%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSInAppMessageDelegateAdapter.java => OSInAppMessagesAdapter.java} (87%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSRequestLogoutEmail.java => OSLastLocation.java} (51%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLiveActivities.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSSMSSubscriptionObserverAdapter.java => OSLiveActivitiesAdapter.java} (82%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocation.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationAdapter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationCoordinate.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OneSignalCore.java => OSNetworkingUtils.java} (67%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSNotificationOpenedResult.java => OSNotificationClickEvent.java} (76%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListener.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListenerAdapter.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSNotificationAction.java => OSNotificationClickResult.java} (75%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListener.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListenerAdapter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserver.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserverAdapter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationWillDisplayEvent.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotifications.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsAdapter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsManager.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObservable.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserver.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserverAdapter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSOutcomes.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionChangedInternalObserver.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateInternal.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSPermissionObserver.java => OSPermissionStateObserver.java} (91%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSPermissionObserverAdapter.java => OSPermissionStateObserverAdapter.java} (87%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscription.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionAdapter.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSEmailSubscriptionStateChanges.java => OSPushSubscriptionChangedState.java} (56%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserver.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserverAdapter.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSEmailSubscriptionState.java => OSPushSubscriptionState.java} (57%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSRequestUpdateLanguage.java => OSRemoteParamController.java} (51%) delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestBadgeCount.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLogoutSMS.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestRegisterUser.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSendPurchases.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSyncHashedEmail.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateDeviceToken.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateExternalUserId.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateNotificationTypes.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSResponseStatusType.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSession.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionAdapter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubInAppMessages.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubLocation.java delete mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionState.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUIApplicationReleaseMode.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUser.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUserAdapter.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSSubscriptionStateChanges.java => OneSignalAttachmentHandler.java} (60%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSSMSSubscriptionState.java => OneSignalConfigManager.java} (65%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtension.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtensionBadgeHandler.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalInAppMessages.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLiveActivityController.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLocationManager.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OneSignalOutcomes.java => OneSignalMobileProvision.java} (73%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationServiceExtensionHandler.java rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSSMSSubscriptionStateChanges.java => OneSignalNotificationSettings.java} (51%) rename onesignal/ios/src/main/java/org/robovm/pods/onesignal/{OSEmailSubscriptionObserver.java => OneSignalNotificationsDelegate.java} (83%) create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationsDelegateAdapter.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalReceiveReceiptsController.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalUserManagerImpl.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalWrapper.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/SwizzlingForwarder.java create mode 100644 onesignal/ios/src/main/java/org/robovm/pods/onesignal/ViewOrientation.java diff --git a/README.md b/README.md index 94d6c5896..37af87346 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ v1.33.0 - in development | [InMobi](inmobi/) | 10.1.4 | | [IronSource](ironsource/) | 7.3.1 | | [Lottie](lottie/) | 4.2.0 | -| [OneSignal](onesignal/) | 3.12.4 | +| [OneSignal](onesignal/) | 5.0.1 | | [Pollfish](pollfish/) | 6.4.1 | | [SAMKeychain](samkeychain/) | 1.5.3 | | [Singular](singular/) | 12.0.6 | diff --git a/onesignal/README.md b/onesignal/README.md index 0d4d03d6b..15e07a026 100644 --- a/onesignal/README.md +++ b/onesignal/README.md @@ -4,6 +4,7 @@ | RoboPods Version | OneSignal Version | |------------------|-------------------| +| 1.33.0 | 5.0.1 | | 1.30.0 | 3.12.4 | | 1.27.0 | 3.12.1 | | 1.24.0 | 3.11.2 | diff --git a/onesignal/ios/README.md b/onesignal/ios/README.md index 0feac2b1f..b905ea4f6 100644 --- a/onesignal/ios/README.md +++ b/onesignal/ios/README.md @@ -1,18 +1,35 @@ -# OneSignal iOS +# - `OneSignal iOS ## Sample app -[Link](https://github.com/dkimitsa/robovm-samples/tree/alt/robopods/onesignal/ios) +[Link](https://github.com/dkimitsa/robovm-samples/tree/alt/robopods/- `OneSignal/ios) ## Install Instructions ### 3rd party native framework This RoboPod requires you to add the following native frameworks: -- `OneSignal.framework` -- `OneSignalCore.framework` -- `OneSignalOutcomes.framework` - -These can be downloaded from github release page. +- OneSignalFramework +- OneSignalCore +- OneSignalOSCore +- OneSignalNotifications +- OneSignalOutcomes +- OneSignalUser + +Optional frameworks: +- OneSignalExtension +- OneSignalInAppMessages +- OneSignalLocation +These frameworks are not included into pod's `robovm.xml` and has to be added to application one if required: +``` + + ... + + OneSignalExtension + OneSignalInAppMessages + OneSignalLocation + + +``` ### to use this pod configure your `robovm.xml` @@ -20,7 +37,7 @@ These can be downloaded from github release page. ... - libs + libs ``` @@ -35,10 +52,10 @@ repositories { } dependencies { ... other dependencies ... - implementation "io.github.dkimitsa.robovm:robopods-onesignal-ios:$altpodsVersion" + implementation "io.github.dkimitsa.robovm:robopods-- `OneSignal-ios:$altpodsVersion" } ``` -## OneSignal home page +## - `OneSignal home page [Link](https://github.com/OneSignal/OneSignal-iOS-SDK) \ No newline at end of file diff --git a/onesignal/ios/pom.xml b/onesignal/ios/pom.xml index 6b0d02322..7bd9ec5b1 100644 --- a/onesignal/ios/pom.xml +++ b/onesignal/ios/pom.xml @@ -7,7 +7,7 @@ robopods-onesignal-ios - RoboPods OneSignal iOS v3.12.4 + RoboPods OneSignal iOS v5.0.1 jar diff --git a/onesignal/ios/src/main/bro-gen/OneSignal.framework/Headers/OneSignal.h b/onesignal/ios/src/main/bro-gen/OneSignal.framework/Headers/OneSignal.h deleted file mode 100644 index a85aa7bd7..000000000 --- a/onesignal/ios/src/main/bro-gen/OneSignal.framework/Headers/OneSignal.h +++ /dev/null @@ -1,463 +0,0 @@ -/** - 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. - */ - -/** - ### Setting up the SDK ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. - - ### API Reference ### - Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. - - ### Troubleshoot ### - Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. - - For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 - - ### More ### - iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate -*/ - -#import -#import -#import -#import -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-prototypes" -#pragma clang diagnostic ignored "-Wnullability-completeness" - -@interface OSInAppMessage : NSObject - -@property (strong, nonatomic, nonnull) NSString *messageId; - -// Convert the object into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - - -@interface OSInAppMessageTag : NSObject - -@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; -@property (strong, nonatomic, nullable) NSArray *tagsToRemove; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@interface OSInAppMessageAction : NSObject - -// The action name attached to the IAM action -@property (strong, nonatomic, nullable) NSString *clickName; - -// The URL (if any) that should be opened when the action occurs -@property (strong, nonatomic, nullable) NSURL *clickUrl; - -//UUID for the page in an IAM Carousel -@property (strong, nonatomic, nullable) NSString *pageId; - -// Whether or not the click action is first click on the IAM -@property (nonatomic) BOOL firstClick; - -// Whether or not the click action dismisses the message -@property (nonatomic) BOOL closesMessage; - -// The outcome to send for this action -@property (strong, nonatomic, nullable) NSArray *outcomes; - -// The tags to send for this action -@property (strong, nonatomic, nullable) OSInAppMessageTag *tags; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -@protocol OSInAppMessageDelegate -@optional -- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:)); -@end - -@protocol OSInAppMessageLifecycleHandler -@optional -- (void)onWillDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onDidDisplayInAppMessage:(OSInAppMessage *)message; -- (void)onWillDismissInAppMessage:(OSInAppMessage *)message; -- (void)onDidDismissInAppMessage:(OSInAppMessage *)message; -@end - -typedef NS_ENUM(NSInteger, OSNotificationPermission) { - // The user has not yet made a choice regarding whether your app can show notifications. - OSNotificationPermissionNotDetermined = 0, - - // The application is not authorized to post user notifications. - OSNotificationPermissionDenied, - - // The application is authorized to post user notifications. - OSNotificationPermissionAuthorized, - - // the application is only authorized to post Provisional notifications (direct to history) - OSNotificationPermissionProvisional, - - // the application is authorized to send notifications for 8 hours. Only used by App Clips. - OSNotificationPermissionEphemeral -}; - -// Permission Classes -@interface OSPermissionState : NSObject - -@property (readonly, nonatomic) BOOL reachable; -@property (readonly, nonatomic) BOOL hasPrompted; -@property (readonly, nonatomic) BOOL providesAppNotificationSettings; -@property (readonly, nonatomic) OSNotificationPermission status; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSPermissionStateChanges : NSObject - -@property (readonly, nonnull) OSPermissionState* to; -@property (readonly, nonnull) OSPermissionState* from; -- (NSDictionary* _Nonnull)toDictionary; - -@end - -// Subscription Classes -@interface OSSubscriptionState : NSObject - -@property (readonly, nonatomic) BOOL isSubscribed; // (yes only if userId, pushToken, and setSubscription exists / are true) -@property (readonly, nonatomic) BOOL isPushDisabled; // returns value of disablePush. -@property (readonly, nonatomic, nullable) NSString* userId; // AKA OneSignal PlayerId -@property (readonly, nonatomic, nullable) NSString* pushToken; // AKA Apple Device Token -- (NSDictionary* _Nonnull)toDictionary; - -@end - -@interface OSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSubscriptionState* to; -@property (readonly, nonnull) OSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString *emailUserId; // The new Email user ID -@property (readonly, nonatomic, nullable) NSString *emailAddress; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSEmailSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSEmailSubscriptionState* to; -@property (readonly, nonnull) OSEmailSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionState : NSObject -@property (readonly, nonatomic, nullable) NSString* smsUserId; -@property (readonly, nonatomic, nullable) NSString *smsNumber; -@property (readonly, nonatomic) BOOL isSubscribed; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@interface OSSMSSubscriptionStateChanges : NSObject -@property (readonly, nonnull) OSSMSSubscriptionState* to; -@property (readonly, nonnull) OSSMSSubscriptionState* from; -- (NSDictionary* _Nonnull)toDictionary; -@end - -@protocol OSPermissionObserver -- (void)onOSPermissionChanged:(OSPermissionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSubscriptionObserver -- (void)onOSSubscriptionChanged:(OSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSEmailSubscriptionObserver -- (void)onOSEmailSubscriptionChanged:(OSEmailSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@protocol OSSMSSubscriptionObserver -- (void)onOSSMSSubscriptionChanged:(OSSMSSubscriptionStateChanges* _Nonnull)stateChanges; -@end - -@interface OSDeviceState : NSObject -/** - * Get the app's notification permission - * @return false if the user disabled notifications for the app, otherwise true - */ -@property (readonly) BOOL hasNotificationPermission; -/** - * Get whether the user is subscribed to OneSignal notifications or not - * @return false if the user is not subscribed to OneSignal notifications, otherwise true - */ -@property (readonly) BOOL isPushDisabled; -/** - * Get whether the user is subscribed - * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false - */ -@property (readonly) BOOL isSubscribed; -/** - * Get the user notification permision status - * @return OSNotificationPermission -*/ -@property (readonly) OSNotificationPermission notificationPermissionStatus; -/** - * Get user id from registration (player id) - * @return user id if user is registered, otherwise null - */ -@property (readonly, nullable) NSString* userId; -/** - * Get apple deice push token - * @return push token if available, otherwise null - */ -@property (readonly, nullable) NSString* pushToken; -/** - * Get the user email id - * @return email id if user address was registered, otherwise null - */ -@property (readonly, nullable) NSString* emailUserId; -/** - * Get the user email - * @return email address if set, otherwise null - */ -@property (readonly, nullable) NSString* emailAddress; - -@property (readonly) BOOL isEmailSubscribed; - -/** - * Get the user sms id - * @return sms id if user sms number was registered, otherwise null - */ -@property (readonly, nullable) NSString* smsUserId; -/** - * Get the user sms number, number may start with + and continue with numbers or contain only numbers - * e.g: +11231231231 or 11231231231 - * @return sms number if set, otherwise null - */ -@property (readonly, nullable) NSString* smsNumber; - -@property (readonly) BOOL isSMSSubscribed; - -// Convert the class into a NSDictionary -- (NSDictionary *_Nonnull)jsonRepresentation; - -@end - -typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); - -/*Block for generic results on success and errors on failure*/ -typedef void (^OSResultSuccessBlock)(NSDictionary* result); -typedef void (^OSFailureBlock)(NSError* error); - - -// ======= OneSignal Class Interface ========= -@interface OneSignal : NSObject - -+ (NSString*)appId; -+ (NSString* _Nonnull)sdkVersionRaw; -+ (NSString* _Nonnull)sdkSemanticVersion; - -+ (void)disablePush:(BOOL)disable; - -// Only used for wrapping SDKs, such as Unity, Cordova, Xamarin, etc. -+ (void)setMSDKType:(NSString* _Nonnull)type; - -#pragma mark Initialization -+ (void)setAppId:(NSString* _Nonnull)newAppId; -+ (void)initWithLaunchOptions:(NSDictionary* _Nullable)launchOptions; -+ (void)setLaunchURLsInApp:(BOOL)launchInApp; -+ (void)setProvidesNotificationSettingsView:(BOOL)providesView; - - -#pragma mark Live Activity -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; -+ (void)enterLiveActivity:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId; -+ (void)exitLiveActivity:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Logging -+ (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel visualLevel:(ONE_S_LOG_LEVEL)visualLogLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; - -#pragma mark Prompt For Push -typedef void(^OSUserResponseBlock)(BOOL accepted); - -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block; -+ (void)promptForPushNotificationsWithUserResponse:(OSUserResponseBlock)block fallbackToSettings:(BOOL)fallback; -+ (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; -+ (OSDeviceState*)getDeviceState; - -#pragma mark Privacy Consent -+ (void)consentGranted:(BOOL)granted; -// Tells your application if privacy consent is still needed from the current user -+ (BOOL)requiresUserPrivacyConsent; -+ (void)setRequiresUserPrivacyConsent:(BOOL)required; - -#pragma mark Public Handlers - -// If the completion block is not called within 25 seconds of this block being called in notificationWillShowInForegroundHandler then the completion will be automatically fired. -typedef void (^OSNotificationWillShowInForegroundBlock)(OSNotification * _Nonnull notification, OSNotificationDisplayResponse _Nonnull completion); -typedef void (^OSNotificationOpenedBlock)(OSNotificationOpenedResult * _Nonnull result); -typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action); - -+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock _Nullable)block; -+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock _Nullable)block; -+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock _Nullable)block; -+ (void)setInAppMessageLifecycleHandler:(NSObject *_Nullable)delegate; - -#pragma mark Post Notification -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData; -+ (void)postNotification:(NSDictionary* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)postNotificationWithJsonString:(NSString* _Nonnull)jsonData onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; - -#pragma mark Location -// - Request and track user's location -+ (void)promptLocation; -+ (void)setLocationShared:(BOOL)enable; -+ (BOOL)isLocationShared; - -#pragma mark Tags -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTag:(NSString* _Nonnull)key value:(NSString* _Nonnull)value; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)sendTags:(NSDictionary* _Nonnull)keyValuePair; -+ (void)sendTagsWithJsonString:(NSString* _Nonnull)jsonString; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)getTags:(OSResultSuccessBlock _Nullable)successBlock; -+ (void)deleteTag:(NSString* _Nonnull)key onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTag:(NSString* _Nonnull)key; -+ (void)deleteTags:(NSArray* _Nonnull)keys onSuccess:(OSResultSuccessBlock _Nullable)successBlock onFailure:(OSFailureBlock _Nullable)failureBlock; -+ (void)deleteTags:(NSArray *_Nonnull)keys; -+ (void)deleteTagsWithJsonString:(NSString* _Nonnull)jsonString; - -#pragma mark Permission, Subscription, and Email Observers -NS_ASSUME_NONNULL_BEGIN - -+ (void)addPermissionObserver:(NSObject*)observer; -+ (void)removePermissionObserver:(NSObject*)observer; - -+ (void)addSubscriptionObserver:(NSObject*)observer; -+ (void)removeSubscriptionObserver:(NSObject*)observer; - -+ (void)addEmailSubscriptionObserver:(NSObject*)observer; -+ (void)removeEmailSubscriptionObserver:(NSObject*)observer; - -+ (void)addSMSSubscriptionObserver:(NSObject*)observer; -+ (void)removeSMSSubscriptionObserver:(NSObject*)observer; -NS_ASSUME_NONNULL_END - -#pragma mark Email -// Typedefs defining completion blocks for email & simultaneous HTTP requests -typedef void (^OSEmailFailureBlock)(NSError *error); -typedef void (^OSEmailSuccessBlock)(); - -// Allows you to set the email for this user. -// Email Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the emailAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setEmail: method without an emailAuthToken parameter. -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setEmail:(NSString * _Nonnull)email withEmailAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Sets email without an authentication token -+ (void)setEmail:(NSString * _Nonnull)email; -+ (void)setEmail:(NSString * _Nonnull)email withSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current email. -+ (void)logoutEmail; -+ (void)logoutEmailWithSuccess:(OSEmailSuccessBlock _Nullable)successBlock withFailure:(OSEmailFailureBlock _Nullable)failureBlock; - -#pragma mark SMS -// Typedefs defining completion blocks for SMS & simultaneous HTTP requests -typedef void (^OSSMSFailureBlock)(NSError *error); -typedef void (^OSSMSSuccessBlock)(NSDictionary *results); - -// Allows you to set the SMS for this user. SMS number may start with + and continue with numbers or contain only numbers -// e.g: +11231231231 or 11231231231 -// SMS Auth Token is a (recommended) optional parameter that should *NOT* be generated on the client. -// For security purposes, the smsAuthToken should be generated by your backend server. -// If you do not have a backend server for your application, use the version of thge setSMSNumber: method without an smsAuthToken parameter. -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSMSAuthHashToken:(NSString * _Nullable)hashToken withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Sets SMS without an authentication token -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber; -+ (void)setSMSNumber:(NSString * _Nonnull)smsNumber withSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -// Logs the device out of the current sms number. -+ (void)logoutSMSNumber; -+ (void)logoutSMSNumberWithSuccess:(OSSMSSuccessBlock _Nullable)successBlock withFailure:(OSSMSFailureBlock _Nullable)failureBlock; - -#pragma mark Language -// Typedefs defining completion blocks for updating language -typedef void (^OSUpdateLanguageFailureBlock)(NSError *error); -typedef void (^OSUpdateLanguageSuccessBlock)(); - -// Language input ISO 639-1 code representation for user input language -+ (void)setLanguage:(NSString * _Nonnull)language; -+ (void)setLanguage:(NSString * _Nonnull)language withSuccess:(OSUpdateLanguageSuccessBlock _Nullable)successBlock withFailure:(OSUpdateLanguageFailureBlock)failureBlock; - -#pragma mark External User Id -// Typedefs defining completion blocks for updating the external user id -typedef void (^OSUpdateExternalUserIdFailureBlock)(NSError *error); -typedef void (^OSUpdateExternalUserIdSuccessBlock)(NSDictionary *results); - -+ (void)setExternalUserId:(NSString * _Nonnull)externalId; -+ (void)setExternalUserId:(NSString * _Nonnull)externalId withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)setExternalUserId:(NSString *)externalId withExternalIdAuthHashToken:(NSString *)hashToken withSuccess:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; -+ (void)removeExternalUserId; -+ (void)removeExternalUserId:(OSUpdateExternalUserIdSuccessBlock _Nullable)successBlock withFailure:(OSUpdateExternalUserIdFailureBlock _Nullable)failureBlock; - -#pragma mark In-App Messaging -+ (BOOL)isInAppMessagingPaused; -+ (void)pauseInAppMessages:(BOOL)pause; -+ (void)addTrigger:(NSString * _Nonnull)key withValue:(id _Nonnull)value; -+ (void)addTriggers:(NSDictionary * _Nonnull)triggers; -+ (void)removeTriggerForKey:(NSString * _Nonnull)key; -+ (void)removeTriggersForKeys:(NSArray * _Nonnull)keys; -+ (NSDictionary * _Nonnull)getTriggers; -+ (id _Nullable)getTriggerValueForKey:(NSString * _Nonnull)key; - -#pragma mark Outcomes -+ (void)sendOutcome:(NSString * _Nonnull)name; -+ (void)sendOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name; -+ (void)sendUniqueOutcome:(NSString * _Nonnull)name onSuccess:(OSSendOutcomeSuccess _Nullable)success; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; -+ (void)sendOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value onSuccess:(OSSendOutcomeSuccess _Nullable)success; - -#pragma mark Extension -// iOS 10 only -// Process from Notification Service Extension. -// Used for iOS Media Attachemtns and Action Buttons. -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); -+ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; -+ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; -@end - -#pragma clang diagnostic pop diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h new file mode 100644 index 000000000..eb40931a9 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/NSDateFormatter+OneSignal.h @@ -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 +@interface NSDateFormatter (OneSignal) ++ (instancetype)iso8601DateFormatter; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDeviceUtils.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDeviceUtils.h new file mode 100644 index 000000000..e646d6d1d --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDeviceUtils.h @@ -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 + +// NS_ASSUME_NONNULL_BEGIN + +@interface OSDeviceUtils : NSObject + ++ (NSString *)getCurrentDeviceVersion; ++ (BOOL)isIOSVersionGreaterThanOrEqual:(NSString *)version; ++ (BOOL)isIOSVersionLessThan:(NSString *)version; ++ (NSString*)getDeviceVariant; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDialogInstanceManager.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDialogInstanceManager.h new file mode 100644 index 000000000..3c842a306 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSDialogInstanceManager.h @@ -0,0 +1,40 @@ +/* + 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 + +typedef void (^OSDialogActionCompletion)(int tappedActionIndex); + +@protocol OSDialogPresenter +- (void)presentDialogWithTitle:(NSString * _Nonnull)title withMessage:(NSString * _Nonnull)message withActions:(NSArray * _Nullable)actionTitles cancelTitle:(NSString * _Nonnull)cancelTitle withActionCompletion:(OSDialogActionCompletion _Nullable)completion; +- (void)clearQueue; +@end + +@interface OSDialogInstanceManager : NSObject ++ (void)setSharedInstance:(NSObject *_Nonnull)instance; ++ (NSObject *_Nullable)sharedInstance; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSInAppMessages.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSInAppMessages.h new file mode 100644 index 000000000..ff7a084e1 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSInAppMessages.h @@ -0,0 +1,142 @@ +/* + Modified MIT License + + Copyright 2023 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. + */ + +/** + Public API for the InAppMessages namespace. + */ + +@interface OSInAppMessage : NSObject + +@property (strong, nonatomic, nonnull) NSString *messageId; + +// Dictionary of properties available on OSInAppMessage only +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + + +@interface OSInAppMessageTag : NSObject + +@property (strong, nonatomic, nullable) NSDictionary *tagsToAdd; +@property (strong, nonatomic, nullable) NSArray *tagsToRemove; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +typedef NS_ENUM(NSUInteger, OSInAppMessageActionUrlType) { + OSInAppMessageActionUrlTypeSafari, + + OSInAppMessageActionUrlTypeWebview, + + OSInAppMessageActionUrlTypeReplaceContent +}; + +@interface OSInAppMessageClickResult : NSObject + +// The action name attached to the IAM action +@property (strong, nonatomic, nullable) NSString *actionId; + +// The URL (if any) that should be opened when the action occurs +@property (strong, nonatomic, nullable) NSString *url; + +// Whether or not the click action dismisses the message +@property (nonatomic) BOOL closingMessage; + +// Determines where the URL is loaded, ie. app opens a webview +@property (nonatomic) OSInAppMessageActionUrlType urlTarget; + +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; + +@end + +@interface OSInAppMessageWillDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDisplayEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageWillDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageDidDismissEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@interface OSInAppMessageClickEvent : NSObject +@property (nonatomic, readonly, nonnull) OSInAppMessage *message; +@property (nonatomic, readonly, nonnull) OSInAppMessageClickResult *result; +// Convert the class into a NSDictionary +- (NSDictionary *_Nonnull)jsonRepresentation; +@end + +@protocol OSInAppMessageClickListener +- (void)onClickInAppMessage:(OSInAppMessageClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@protocol OSInAppMessageLifecycleListener +@optional +- (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDisplay(event:)); +- (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDisplay(event:)); +- (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onWillDismiss(event:)); +- (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent *_Nonnull)event +NS_SWIFT_NAME(onDidDismiss(event:)); +@end + +@protocol OSInAppMessages + ++ (void)addTrigger:(NSString * _Nonnull)key withValue:(NSString * _Nonnull)value; ++ (void)addTriggers:(NSDictionary * _Nonnull)triggers; ++ (void)removeTrigger:(NSString * _Nonnull)key; ++ (void)removeTriggers:(NSArray * _Nonnull)keys; ++ (void)clearTriggers; +// Allows Swift users to: OneSignal.InAppMessages.paused = true ++ (BOOL)paused NS_REFINED_FOR_SWIFT; ++ (void)paused:(BOOL)pause NS_REFINED_FOR_SWIFT; + ++ (void)addClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)addLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; ++ (void)removeLifecycleListener:(NSObject *_Nullable)listener NS_REFINED_FOR_SWIFT; +@end + +@interface OSStubInAppMessages : NSObject ++ (Class)InAppMessages; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSJSONHandling.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSJSONHandling.h index 0a565039a..2979b48e6 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSJSONHandling.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSJSONHandling.h @@ -26,7 +26,7 @@ */ #import -#import "OSNotification.h" +#import @protocol OSJSONDecodable + (instancetype _Nullable)instanceWithData:(NSData * _Nonnull)data; diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSLocation.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSLocation.h new file mode 100644 index 000000000..a0a1eda40 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSLocation.h @@ -0,0 +1,40 @@ +/** +Modified MIT License + +Copyright 2023 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. +*/ + +/** + Public API for the Location namespace. + */ +@protocol OSLocation +// - Request and track user's location ++ (void)requestPermission; ++ (void)setShared:(BOOL)enable NS_REFINED_FOR_SWIFT; ++ (BOOL)isShared NS_REFINED_FOR_SWIFT; +@end + +@interface OSStubLocation : NSObject ++ (Class)Location; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNetworkingUtils.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNetworkingUtils.h new file mode 100644 index 000000000..795f87be5 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNetworkingUtils.h @@ -0,0 +1,47 @@ +/* + 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 + +// NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, OSResponseStatusType) { + OSResponseStatusInvalid = 0, + OSResponseStatusRetryable, + OSResponseStatusUnauthorized, + OSResponseStatusMissing, + OSResponseStatusConflict +}; + +@interface OSNetworkingUtils : NSObject + ++ (NSNumber*)getNetType; ++ (OSResponseStatusType)getResponseStatusType:(NSInteger)statusCode; + +@end + +// NS_ASSUME_NONNULL_END diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotification+Internal.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotification+Internal.h index cdc43ea8e..44fc23e87 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotification+Internal.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotification+Internal.h @@ -25,16 +25,12 @@ * THE SOFTWARE. */ -#import "OSNotificationClasses.h" +#import #ifndef OSNotification_Internal_h #define OSNotification_Internal_h @interface OSNotification(Internal) -+(instancetype _Nonnull )parseWithApns:(nonnull NSDictionary *)message; -- (void)setCompletionBlock:(OSNotificationDisplayResponse _Nonnull)completion; -- (void)startTimeoutTimer; -- (void)complete:(nullable OSNotification *)notification; @end #endif /* OSNotification_Internal_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotificationClasses.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotificationClasses.h index 2d8fed289..dd4a8ce18 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotificationClasses.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSNotificationClasses.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#import "OSNotification.h" +#import // Pass in nil means a notification will not display typedef void (^OSNotificationDisplayResponse)(OSNotification* _Nullable notification); @@ -36,20 +36,17 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) { OSNotificationActionTypeActionTaken }; -@interface OSNotificationAction : NSObject - -/* The type of the notification action */ -@property(readonly)OSNotificationActionType type; - +@interface OSNotificationClickResult : NSObject /* The ID associated with the button tapped. NULL when the actionType is NotificationTapped */ @property(readonly, nullable)NSString* actionId; +@property(readonly, nullable)NSString* url; @end -@interface OSNotificationOpenedResult : NSObject +@interface OSNotificationClickEvent : NSObject @property(readonly, nonnull)OSNotification* notification; -@property(readonly, nonnull)OSNotificationAction *action; +@property(readonly, nonnull)OSNotificationClickResult *result; /* Convert object into an NSString that can be convertible into a custom Dictionary / JSON Object */ - (NSString* _Nonnull)stringify; diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSObservable.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSObservable.h new file mode 100644 index 000000000..117041623 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSObservable.h @@ -0,0 +1,52 @@ +/** + * 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 + +// OSBoolObservable is for BOOL states which OSObservable above does not work with + +@interface OSBoolObservable<__covariant ObserverType> : NSObject +- (instancetype _Nonnull)initWithChangeSelector:(SEL)selector; +- (void)addObserver:(ObserverType)observer; +- (void)removeObserver:(ObserverType)observer; +- (BOOL)notifyChange:(BOOL)state; +@end + +#endif /* OSObservable_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSPrivacyConsentController.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSPrivacyConsentController.h index 37c4f09e6..63f5beb56 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSPrivacyConsentController.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSPrivacyConsentController.h @@ -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 diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRemoteParamController.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRemoteParamController.h new file mode 100644 index 000000000..94df375af --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRemoteParamController.h @@ -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 */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRequests.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRequests.h index 43bf0348b..03e3a02a6 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRequests.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OSRequests.h @@ -26,17 +26,13 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalRequests_h #define OneSignalRequests_h NS_ASSUME_NONNULL_BEGIN -@interface OSRequestGetTags : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; -@end - @interface OSRequestGetIosParams : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId; @end @@ -45,110 +41,26 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)withAppId:(NSString *)appId withJson:(NSMutableDictionary *)json; @end -@interface OSRequestUpdateNotificationTypes : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId notificationTypes:(NSNumber *)notificationTypes; -@end - -@interface OSRequestSendPurchases : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -+ (instancetype)withUserId:(NSString *)userId emailAuthToken:(NSString *)emailAuthToken appId:(NSString *)appId withPurchases:(NSArray *)purchases; -@end - @interface OSRequestSubmitNotificationOpened : OneSignalRequest + (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId wasOpened:(BOOL)opened messageId:(NSString *)messageId withDeviceType:(NSNumber *)deviceType; @end -@interface OSRequestSyncHashedEmail : OneSignalRequest -+ (instancetype)withUserId:(NSString *)userId appId:(NSString *)appId email:(NSString *)email networkType:(NSNumber *)netType; -@end - NS_ASSUME_NONNULL_END -@interface OSRequestUpdateDeviceToken : OneSignalRequest -// Push channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier notificationTypes:(NSNumber * _Nullable)notificationTypes externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// Email channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier withParentId:(NSString * _Nullable)parentId emailAuthToken:(NSString * _Nullable)emailAuthHash email:(NSString * _Nullable)email externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -// SMS channel update device token -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId deviceToken:(NSString * _Nullable)identifier smsAuthToken:(NSString * _Nullable)smsAuthToken externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestRegisterUser : OneSignalRequest -+ (instancetype _Nonnull)withData:(NSDictionary * _Nonnull)registrationData userId:(NSString * _Nullable)userId; -@end - -@interface OSRequestCreateDevice : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withEmail:(NSString * _Nullable)email withPlayerId:(NSString * _Nullable)playerId withEmailAuthHash:(NSString * _Nullable)emailAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId withDeviceType:(NSNumber * _Nonnull)deviceType withSMSNumber:(NSString * _Nullable)smsNumber withPlayerId:(NSString * _Nullable)playerId withSMSAuthHash:(NSString * _Nullable)smsAuthHash withExternalUserId:(NSString * _Nullable)externalUserId withExternalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestLogoutEmail : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId emailPlayerId:(NSString * _Nonnull)emailPlayerId devicePlayerId:(NSString * _Nonnull)devicePlayerId emailAuthHash:(NSString * _Nullable)emailAuthHash; -@end - -@interface OSRequestLogoutSMS : OneSignalRequest -+ (instancetype _Nonnull)withAppId:(NSString * _Nonnull)appId smsPlayerId:(NSString * _Nonnull)smsPlayerId smsAuthHash:(NSString * _Nullable)smsAuthHash devicePlayerId:(NSString * _Nonnull)devicePlayerId; -@end - -@interface OSRequestSendTagsToServer : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withEmailAuthHashToken:(NSString * _Nullable)emailAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId tags:(NSDictionary * _Nonnull)tags networkType:(NSNumber * _Nonnull)netType withSMSAuthHashToken:(NSString * _Nullable)smsAuthToken withExternalIdAuthHashToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateLanguage : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - language:(NSString * _Nonnull)language - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestBadgeCount : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - emailAuthToken:(NSString * _Nullable)emailAuthHash - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId - appId:(NSString * _Nonnull)appId - badgeCount:(NSNumber * _Nonnull)badgeCount - smsAuthToken:(NSString * _Nullable)smsAuthToken - externalIdAuthToken:(NSString * _Nullable)externalIdAuthToken; -@end - -@interface OSRequestUpdateExternalUserId : OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withEmailHashToken:(NSString * _Nullable)emailHashToken appId:(NSString * _Nonnull)appId; - -+ (instancetype _Nonnull)withUserId:(NSString * _Nullable)externalId withUserIdHashToken:(NSString * _Nullable)hashToken withOneSignalUserId:(NSString * _Nonnull)userId withSMSHashToken:(NSString * _Nullable)smsHashToken appId:(NSString * _Nonnull)appId; -@end - @interface OSRequestTrackV1 : OneSignalRequest + (instancetype _Nonnull)trackUsageData:(NSString * _Nonnull)osUsageData appId:(NSString * _Nonnull)appId; @end @interface OSRequestLiveActivityEnter: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId token:(NSString * _Nonnull)token; @end @interface OSRequestLiveActivityExit: OneSignalRequest -+ (instancetype _Nonnull)withUserId:(NSString * _Nonnull)userId ++ (instancetype _Nonnull)withSubscriptionId:(NSString * _Nonnull)subscriptionId appId:(NSString * _Nonnull)appId activityId:(NSString * _Nonnull)activityId; @end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalClient.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalClient.h index 432a9abda..46f466add 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalClient.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalClient.h @@ -26,7 +26,7 @@ */ #import -#import "OneSignalRequest.h" +#import #ifndef OneSignalClient_h #define OneSignalClient_h diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCommonDefines.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCommonDefines.h index 3b82f5f51..b528b3fdb 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCommonDefines.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCommonDefines.h @@ -46,7 +46,7 @@ // "*" in comment line ending comment means the string value has not been changed // App -#define ONESIGNAL_VERSION @"031204" +#define ONESIGNAL_VERSION @"050001" #define OSUD_APP_ID @"GT_APP_ID" // * OSUD_APP_ID #define OSUD_REGISTERED_WITH_APPLE @"GT_REGISTERED_WITH_APPLE" // * OSUD_REGISTERED_WITH_APPLE @@ -65,30 +65,14 @@ #define OSUD_PERMISSION_EPHEMERAL_FROM @"OSUD_PERMISSION_EPHEMERAL_FROM" // * OSUD_PERMISSION_EPHEMERAL_FROM #define OSUD_LANGUAGE @"OSUD_LANGUAGE" // * OSUD_LANGUAGE #define DEFAULT_LANGUAGE @"en" // * OSUD_LANGUAGE -// Player -#define OSUD_EXTERNAL_USER_ID @"OS_EXTERNAL_USER_ID" // * OSUD_EXTERNAL_USER_ID -#define OSUD_PLAYER_ID_TO @"GT_PLAYER_ID" // * OSUD_PLAYER_ID_TO -#define OSUD_PLAYER_ID_FROM @"GT_PLAYER_ID_LAST" // * OSUD_PLAYER_ID_FROM -#define OSUD_PUSH_TOKEN_TO @"GT_DEVICE_TOKEN" // * OSUD_PUSH_TOKEN_TO -#define OSUD_PUSH_TOKEN_FROM @"GT_DEVICE_TOKEN_LAST" // * OSUD_PUSH_TOKEN_FROM -#define OSUD_USER_SUBSCRIPTION_TO @"ONESIGNAL_SUBSCRIPTION" // * OSUD_USER_SUBSCRIPTION_TO -#define OSUD_USER_SUBSCRIPTION_FROM @"ONESIGNAL_SUBSCRIPTION_SETTING" // * OSUD_USER_SUBSCRIPTION_FROM -#define OSUD_EXTERNAL_ID_AUTH_CODE @"OSUD_EXTERNAL_ID_AUTH_CODE" -// Email -#define OSUD_EMAIL_ADDRESS @"EMAIL_ADDRESS" // * OSUD_EMAIL_ADDRESS -#define OSUD_EMAIL_PLAYER_ID @"GT_EMAIL_PLAYER_ID" // * OSUD_EMAIL_PLAYER_ID -#define OSUD_EMAIL_EXTERNAL_USER_ID @"OSUD_EMAIL_EXTERNAL_USER_ID" // OSUD_EMAIL_EXTERNAL_USER_ID -#define OSUD_REQUIRE_EMAIL_AUTH @"GT_REQUIRE_EMAIL_AUTH" // * OSUD_REQUIRE_EMAIL_AUTH -#define OSUD_EMAIL_AUTH_CODE @"GT_EMAIL_AUTH_CODE" // * OSUD_EMAIL_AUTH_CODE -// SMS -#define OSUD_SMS_NUMBER @"OSUD_SMS_NUMBER" -#define OSUD_SMS_PLAYER_ID @"OSUD_SMS_PLAYER_ID" -#define OSUD_SMS_EXTERNAL_USER_ID @"OSUD_SMS_EXTERNAL_USER_ID" -#define OSUD_REQUIRE_SMS_AUTH @"OSUD_REQUIRE_SMS_AUTH" -#define OSUD_SMS_AUTH_CODE @"OSUD_SMS_AUTH_CODE" + +/* Push Subscription */ +#define OSUD_LEGACY_PLAYER_ID @"GT_PLAYER_ID" // The legacy player ID from SDKs prior to 5.x.x +#define OSUD_PUSH_SUBSCRIPTION_ID @"OSUD_PUSH_SUBSCRIPTION_ID" +#define OSUD_PUSH_TOKEN @"GT_DEVICE_TOKEN" + // Notification #define OSUD_LAST_MESSAGE_OPENED @"GT_LAST_MESSAGE_OPENED_" // * OSUD_MOST_RECENT_NOTIFICATION_OPENED -#define OSUD_NOTIFICATION_OPEN_LAUNCH_URL @"ONESIGNAL_INAPP_LAUNCH_URL" // * OSUD_NOTIFICATION_OPEN_LAUNCH_URL #define OSUD_TEMP_CACHED_NOTIFICATION_MEDIA @"OSUD_TEMP_CACHED_NOTIFICATION_MEDIA" // OSUD_TEMP_CACHED_NOTIFICATION_MEDIA // Remote Params #define OSUD_LOCATION_ENABLED @"OSUD_LOCATION_ENABLED" @@ -118,8 +102,6 @@ #define OSUD_APP_LAST_CLOSED_TIME @"GT_LAST_CLOSED_TIME" // * OSUD_APP_LAST_CLOSED_TIME #define OSUD_UNSENT_ACTIVE_TIME @"GT_UNSENT_ACTIVE_TIME" // * OSUD_UNSENT_ACTIVE_TIME #define OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED @"GT_UNSENT_ACTIVE_TIME_ATTRIBUTED" // * OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED -#define OSUD_PLAYER_TAGS @"OSUD_PLAYER_TAGS" - // * OSUD_PLAYER_TAGS // Deprecated Selectors #define DEPRECATED_SELECTORS @[ @"application:didReceiveLocalNotification:", \ @@ -172,6 +154,7 @@ // APNS params #define ONESIGNAL_IAM_PREVIEW @"os_in_app_message_preview_id" +#define ONESIGNAL_POST_PREVIEW_IAM @"ONESIGNAL_POST_PREVIEW_IAM" #define ONESIGNAL_SUPPORTED_ATTACHMENT_TYPES @[@"aiff", @"wav", @"mp3", @"mp4", @"jpg", @"jpeg", @"png", @"gif", @"mpeg", @"mpg", @"avi", @"m4a", @"m4v"] @@ -200,6 +183,15 @@ typedef enum {BACKGROUND, END_SESSION} FocusEventType; typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define focusAttributionStateString(enum) [@[@"ATTRIBUTED", @"NOT_ATTRIBUTED"] objectAtIndex:enum] +// OneSignal Background Task Identifiers +#define ATTRIBUTED_FOCUS_TASK @"ATTRIBUTED_FOCUS_TASK" +#define UNATTRIBUTED_FOCUS_TASK @"UNATTRIBUTED_FOCUS_TASK" +#define SEND_SESSION_TIME_TO_USER_TASK @"SEND_SESSION_TIME_TO_USER_TASK" +#define OPERATION_REPO_BACKGROUND_TASK @"OPERATION_REPO_BACKGROUND_TASK" +#define IDENTITY_EXECUTOR_BACKGROUND_TASK @"IDENTITY_EXECUTOR_BACKGROUND_TASK_" +#define PROPERTIES_EXECUTOR_BACKGROUND_TASK @"PROPERTIES_EXECUTOR_BACKGROUND_TASK_" +#define SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK @"SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_" + // OneSignal constants #define OS_PUSH @"push" #define OS_EMAIL @"email" @@ -209,8 +201,8 @@ typedef enum {ATTRIBUTED, NOT_ATTRIBUTED} FocusAttributionState; #define OS_CHANNELS @[OS_PUSH, OS_EMAIL, OS_SMS] // OneSignal API Client Defines -typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; -#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE"] +typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE, PATCH} HTTPMethod; +#define OS_API_CLIENT_STRINGS @[@"GET", @"POST", @"HEAD", @"PUT", @"DELETE", @"OPTIONS", @"CONNECT", @"TRACE", @"PATCH"] #define httpMethodString(enum) [OS_API_CLIENT_STRINGS objectAtIndex:enum] // Notification types @@ -233,13 +225,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; // 1 week in seconds #define WEEK_IN_SECONDS 604800.0 -// Registration delay -#define REGISTRATION_DELAY_SECONDS 30.0 - -// How long the SDK will wait for APNS to respond -// before registering the user anyways -#define APNS_TIMEOUT 25.0 - // The SDK saves a list of category ID's allowing multiple notifications // to have their own unique buttons/etc. #define SHARED_CATEGORY_LIST @"com.onesignal.shared_registered_categories" @@ -253,13 +238,10 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #ifndef OS_TEST // OneSignal API Client Defines - #define REATTEMPT_DELAY 30.0 + #define REATTEMPT_DELAY 5.0 #define REQUEST_TIMEOUT_REQUEST 120.0 //for most HTTP requests #define REQUEST_TIMEOUT_RESOURCE 120.0 //for loading a resource like an image - #define MAX_ATTEMPT_COUNT 3 - - // Send tags batch delay - #define SEND_TAGS_DELAY 5.0 + #define MAX_ATTEMPT_COUNT 5 // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 128 @@ -276,9 +258,6 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define REQUEST_TIMEOUT_RESOURCE 0.02 //for loading a resource like an image #define MAX_ATTEMPT_COUNT 3 - // Send tags batch delay - #define SEND_TAGS_DELAY 0.005 - // the max number of UNNotificationCategory ID's the SDK will register #define MAX_CATEGORIES_SIZE 5 @@ -301,4 +280,52 @@ typedef enum {GET, POST, HEAD, PUT, DELETE, OPTIONS, CONNECT, TRACE} HTTPMethod; #define MAX_NOTIFICATION_MEDIA_SIZE_BYTES 50000000 +#pragma mark User Model + +#define OS_ONESIGNAL_ID @"onesignal_id" +#define OS_EXTERNAL_ID @"external_id" + +#define OS_ON_USER_WILL_CHANGE @"OS_ON_USER_WILL_CHANGE" + +// Models and Model Stores +#define OS_IDENTITY_MODEL_KEY @"OS_IDENTITY_MODEL_KEY" +#define OS_IDENTITY_MODEL_STORE_KEY @"OS_IDENTITY_MODEL_STORE_KEY" +#define OS_PROPERTIES_MODEL_KEY @"OS_PROPERTIES_MODEL_KEY" +#define OS_PROPERTIES_MODEL_STORE_KEY @"OS_PROPERTIES_MODEL_STORE_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_KEY" +#define OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY @"OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY" +#define OS_SUBSCRIPTION_MODEL_STORE_KEY @"OS_SUBSCRIPTION_MODEL_STORE_KEY" + +// Deltas +#define OS_ADD_ALIAS_DELTA @"OS_ADD_ALIAS_DELTA" +#define OS_REMOVE_ALIAS_DELTA @"OS_REMOVE_ALIAS_DELTA" + +#define OS_UPDATE_PROPERTIES_DELTA @"OS_UPDATE_PROPERTIES_DELTA" + +#define OS_ADD_SUBSCRIPTION_DELTA @"OS_ADD_SUBSCRIPTION_DELTA" +#define OS_REMOVE_SUBSCRIPTION_DELTA @"OS_REMOVE_SUBSCRIPTION_DELTA" +#define OS_UPDATE_SUBSCRIPTION_DELTA @"OS_UPDATE_SUBSCRIPTION_DELTA" + +// Operation Repo +#define OS_OPERATION_REPO_DELTA_QUEUE_KEY @"OS_OPERATION_REPO_DELTA_QUEUE_KEY" + +// User Executor +#define OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY" +#define OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY @"OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY" + +// Identity Executor +#define OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" + +// Property Executor +#define OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + +// Subscription Executor +#define OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY" +#define OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY @"OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY" + #endif /* OneSignalCommonDefines_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalConfigManager.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalConfigManager.h new file mode 100644 index 000000000..481b16eee --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalConfigManager.h @@ -0,0 +1,36 @@ +/* + 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 + +@interface OneSignalConfigManager : NSObject + ++ (void)setAppId:(NSString *)appId; ++ (NSString *_Nullable)getAppId; ++ (BOOL)shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:(NSString *)methodName; + +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCore.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCore.h index 5d7cc7c88..966ea8fdc 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCore.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCore.h @@ -27,24 +27,32 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalUserDefaults.h" -#import "OneSignalCommonDefines.h" -#import "OSNotification.h" -#import "OSNotification+Internal.h" -#import "OSNotificationClasses.h" -#import "OneSignalLog.h" -#import "NSURL+OneSignal.h" -#import "NSString+OneSignal.h" -#import "OSRequests.h" -#import "OneSignalRequest.h" -#import "OneSignalClient.h" -#import "OneSignalCoreHelper.h" -#import "OneSignalTrackFirebaseAnalytics.h" -#import "OSMacros.h" -#import "OSJSONHandling.h" -#import "OSPrivacyConsentController.h" - -@interface OneSignalCore : NSObject - -@end - +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCoreHelper.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCoreHelper.h index 2a95e9c38..9194ead16 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCoreHelper.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalCoreHelper.h @@ -25,6 +25,7 @@ * THE SOFTWARE. */ +#import @interface OneSignalCoreHelper : NSObject #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wnullability-completeness" @@ -37,4 +38,33 @@ + (NSString*)hashUsingSha1:(NSString*)string; + (NSString*)hashUsingMD5:(NSString*)string; + (NSString*)trimURLSpacing:(NSString*)url; ++ (NSString*)parseNSErrorAsJsonString:(NSError*)error; ++ (BOOL)isOneSignalPayload:(NSDictionary *)payload; ++ (NSMutableDictionary*) formatApsPayloadIntoStandard:(NSDictionary*)remoteUserInfo identifier:(NSString*)identifier; ++ (BOOL)isRemoteSilentNotification:(NSDictionary*)msg; ++ (BOOL)isDisplayableNotification:(NSDictionary*)msg; ++ (NSString*)randomStringWithLength:(int)length; ++ (BOOL)verifyURL:(NSString *)urlString; ++ (BOOL)isWWWScheme:(NSURL*)url; + +// For NSInvocations. Use this when wanting to performSelector with more than 2 arguments ++(void)callSelector:(SEL)selector onObject:(id)object withArgs:(NSArray*)args; +// For NSInvocations. Use this when wanting to performSelector with a boolean argument ++(void)callSelector:(SEL)selector onObject:(id)object withArg:(BOOL)arg; +/* + A simplified enum for UIDeviceOrientation with just invalid, portrait, and landscape + */ +typedef NS_ENUM(NSInteger, ViewOrientation) { + OrientationInvalid, + OrientationPortrait, + OrientationLandscape, +}; + ++ (ViewOrientation)validateOrientation:(UIDeviceOrientation)orientation; + ++ (CGFloat)sizeToScale:(float)size; + ++ (CGRect)getScreenBounds; + ++ (float)getScreenScale; @end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalLog.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalLog.h index 63bf4e1aa..d5e72bcbe 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalLog.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalLog.h @@ -26,8 +26,6 @@ */ #import -@interface OneSignalLog : NSObject -#pragma mark Logging typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_NONE, ONE_S_LL_FATAL, @@ -38,7 +36,13 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { ONE_S_LL_VERBOSE }; +@protocol OSDebug + (void)setLogLevel:(ONE_S_LOG_LEVEL)logLevel; -+ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (void)setAlertLevel:(ONE_S_LOG_LEVEL)logLevel NS_REFINED_FOR_SWIFT; +@end +@interface OneSignalLog : NSObject ++ (Class)Debug; ++ (void)onesignalLog:(ONE_S_LOG_LEVEL)logLevel message:(NSString* _Nonnull)message; ++ (ONE_S_LOG_LEVEL)getLogLevel; @end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalMobileProvision.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalMobileProvision.h new file mode 100644 index 000000000..b040ea114 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalMobileProvision.h @@ -0,0 +1,23 @@ +// +// OneSignalMobileProvision.h +// Renamed from UIApplication+BSMobileProvision.h to prevent conflicts +// +// Created by kaolin fire on 2013-06-24. +// Copyright (c) 2013 The Blindsight Corporation. All rights reserved. +// Released under the BSD 2-Clause License (see LICENSE) + +typedef NS_ENUM(NSInteger, OSUIApplicationReleaseMode) { + UIApplicationReleaseUnknown, + UIApplicationReleaseDev, + UIApplicationReleaseAdHoc, + UIApplicationReleaseWildcard, + UIApplicationReleaseAppStore, + UIApplicationReleaseSim, + UIApplicationReleaseEnterprise +}; + +@interface OneSignalMobileProvision : NSObject + ++ (OSUIApplicationReleaseMode) releaseMode; + +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalRequest.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalRequest.h index 4e1b1fa82..be81332ed 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalRequest.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalRequest.h @@ -28,7 +28,7 @@ #pragma clang diagnostic ignored "-Wnullability-completeness" #import -#import "OneSignalCommonDefines.h" +#import #ifndef OneSignalRequest_h @@ -47,6 +47,7 @@ typedef void (^OSFailureBlock)(NSError* error); @property (strong, nonatomic, nullable) NSDictionary *additionalHeaders; @property (nonatomic) int reattemptCount; @property (nonatomic) BOOL dataRequest; //false for JSON based requests +@property (nonatomic) NSDate *timestamp; -(BOOL)missingAppId; //for requests that don't require an appId parameter, the subclass should override this method and return false -(NSMutableURLRequest * _Nonnull )urlRequest; diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h new file mode 100644 index 000000000..4cd8469c7 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalSelectorHelpers.h @@ -0,0 +1,34 @@ +/** + * 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 OneSignalSelectorHelpers_h +#define OneSignalSelectorHelpers_h + +// Functions to help sizzle methods. +BOOL injectSelector(Class targetClass, SEL targetSelector, Class myClass, SEL mySelector); + +#endif /* OneSignalSelectorHelpers_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h index 7cc355975..948541aaf 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalTrackFirebaseAnalytics.h @@ -26,14 +26,14 @@ */ #import -#import "OSNotificationClasses.h" +#import @interface OneSignalTrackFirebaseAnalytics : NSObject +(BOOL)libraryExists; +(void)init; +(void)updateFromDownloadParams:(NSDictionary*)params; -+(void)trackOpenEvent:(OSNotificationOpenedResult*)results; ++(void)trackOpenEvent:(OSNotificationClickEvent*)event; +(void)trackReceivedEvent:(OSNotification*)notification; +(void)trackInfluenceOpenEvent; @end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalWrapper.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalWrapper.h new file mode 100644 index 000000000..8fbab577d --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/OneSignalWrapper.h @@ -0,0 +1,38 @@ +/* + Modified MIT License + + Copyright 2023 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 + +@interface OneSignalWrapper : NSObject + +/* Type of Wrapper SDK such as "unity" */ +@property (class, nullable) NSString* sdkType; + +/* Version of Wrapper SDK in format "xxyyzz" */ +@property (class, nullable) NSString* sdkVersion; + +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/SwizzlingForwarder.h b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/SwizzlingForwarder.h new file mode 100644 index 000000000..5559b52d1 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalCore.framework/Headers/SwizzlingForwarder.h @@ -0,0 +1,38 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Use this in your swizzled methods implementations to ensure your swizzling + does not create side effects. + This is done by checking if there was an existing implementations and also if + the object has a forwardingTargetForSelector: setup. + */ +@interface SwizzlingForwarder : NSObject +/** + Constructor to setup this instance so you can call invokeWithArgs latter + to forward the call onto the correct selector and object so you swizzling does + create any cause side effects. + @param object Your object, normally you should pass in self. + @param yourSelector Your named selector. + @param originalSelector The original selector, the one you would call if + swizzling was out of the picture. + @return Always returns an instance. + */ +-(instancetype)initWithTarget:(id)object + withYourSelector:(SEL)yourSelector + withOriginalSelector:(SEL)originalSelector; + +/** + Optionally call before invokeWithArgs to know it will execute anything. + */ +-(BOOL)hasReceiver; + +/** + Must call this to call in your swizzled method somewhere to ensure the + original code is still run. + */ +-(void)invokeWithArgs:(NSArray*)args; +@end + +NS_ASSUME_NONNULL_END diff --git a/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalAttachmentHandler.h b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalAttachmentHandler.h new file mode 100644 index 000000000..06cfe7231 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalAttachmentHandler.h @@ -0,0 +1,37 @@ +/* + Modified MIT License + + Copyright 2021 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 +#import + +@interface OneSignalAttachmentHandler : NSObject + ++ (void)addAttachments:(OSNotification*)notification toNotificationContent:(UNMutableNotificationContent*)content; ++ (void)addActionButtons:(OSNotification*)notification toNotificationContent:(UNMutableNotificationContent*)content; ++ (UNNotificationAction *)createActionForButton:(NSDictionary *)button; +@end + diff --git a/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtension.h b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtension.h new file mode 100644 index 000000000..9a0853efc --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtension.h @@ -0,0 +1,44 @@ +/* + Modified MIT License + + Copyright 2021 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 +#import +#import +#import +#import +#import + +@interface OneSignalExtension : NSObject +#pragma mark NotificationService Extension +#pragma clang diagnostic ignored "-Wnullability-completeness" +// iOS 10 only +// Process from Notification Service Extension. +// Used for iOS Media Attachemtns and Action Buttons. ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtensionBadgeHandler.h b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtensionBadgeHandler.h new file mode 100644 index 000000000..f14ad763a --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalExtensionBadgeHandler.h @@ -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 +#import +#import + +@interface OneSignalExtensionBadgeHandler : NSObject ++ (void)handleBadgeCountWithNotificationRequest:(UNNotificationRequest *)request withNotification:(OSNotification *)notification withMutableNotificationContent:(UNMutableNotificationContent *)replacementContent; ++ (void)updateCachedBadgeValue:(NSInteger)value; ++ (NSInteger)currentCachedBadgeValue; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalNotificationServiceExtensionHandler.h b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalNotificationServiceExtensionHandler.h new file mode 100644 index 000000000..fea8e99f4 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalNotificationServiceExtensionHandler.h @@ -0,0 +1,41 @@ +/** + * 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 +#import + +@interface OneSignalNotificationServiceExtensionHandler : NSObject + ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request + withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent; + ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest*)request withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent withContentHandler:(void (^)(UNNotificationContent *))contentHandler; + ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest *)request + withMutableNotificationContent:(UNMutableNotificationContent*)replacementContent; + +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalReceiveReceiptsController.h b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalReceiveReceiptsController.h new file mode 100644 index 000000000..e31136122 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalExtension.framework/Headers/OneSignalReceiveReceiptsController.h @@ -0,0 +1,51 @@ +/** + * 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 + +@interface OneSignalReceiveReceiptsController : NSObject + +- (void)sendReceiveReceiptWithNotificationId:(NSString * _Nonnull)notificationId; + +- (void)sendReceiveReceiptWithPlayerId:(nonnull NSString *)playerId + notificationId:(nonnull NSString *)notificationId + appId:(nonnull NSString *)appId; + +- (void)sendReceiveReceiptWithPlayerId:(nonnull NSString *)playerId + notificationId:(nonnull NSString *)notificationId + appId:(nonnull NSString *)appId + successBlock:(nullable OSResultSuccessBlock)success + failureBlock:(nullable OSFailureBlock)failure; + +- (void)sendReceiveReceiptWithPlayerId:(nonnull NSString *)playerId + notificationId:(nonnull NSString *)notificationId + appId:(nonnull NSString *)appId + delay:(int)delay + successBlock:(nullable OSResultSuccessBlock)success + failureBlock:(nullable OSFailureBlock)failure; + +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h b/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h new file mode 100644 index 000000000..fa1746a1a --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework-Swift.h @@ -0,0 +1,265 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALFRAMEWORK_SWIFT_H +#define ONESIGNALFRAMEWORK_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalFramework",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework.h b/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework.h new file mode 100644 index 000000000..d304b4ba6 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalFramework.h @@ -0,0 +1,117 @@ +/** + 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. + */ + +/** + ### Setting up the SDK ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-setupto setup OneSignal in your app. + + ### API Reference ### + Follow the documentation from https://documentation.onesignal.com/docs/ios-sdk-api for a detailed explanation of the API. + + ### Troubleshoot ### + Follow the documentation from https://documentation.onesignal.com/docs/troubleshooting-ios to fix common problems. + + For help on how to upgrade your code from 1.* SDK to 2.*: https://documentation.onesignal.com/docs/upgrading-to-ios-sdk-20 + + ### More ### + iOS Push Cert: https://documentation.onesignal.com/docs/generating-an-ios-push-certificate +*/ + +#import +#import +#import +#import +#import +#import +#import +#import "OneSignalLiveActivityController.h" + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wnullability-completeness" + +typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen); + +/*Block for generic results on success and errors on failure*/ +typedef void (^OSResultSuccessBlock)(NSDictionary* result); +typedef void (^OSFailureBlock)(NSError* error); + +// ======= OneSignal Class Interface ========= +@interface OneSignal : NSObject + ++ (NSString*)appId; ++ (NSString* _Nonnull)sdkVersionRaw; ++ (NSString* _Nonnull)sdkSemanticVersion; + +#pragma mark User ++ (id)User NS_REFINED_FOR_SWIFT; ++ (void)login:(NSString * _Nonnull)externalId; ++ (void)login:(NSString * _Nonnull)externalId withToken:(NSString * _Nullable)token +NS_SWIFT_NAME(login(externalId:token:)); ++ (void)logout; + +#pragma mark Notifications ++ (Class)Notifications NS_REFINED_FOR_SWIFT; + +#pragma mark Initialization ++ (void)setLaunchOptions:(nullable NSDictionary*)newLaunchOptions; // meant for use by wrappers ++ (void)initialize:(nonnull NSString*)newAppId withLaunchOptions:(nullable NSDictionary*)launchOptions; ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + +#pragma mark Live Activity ++ (Class)LiveActivities NS_REFINED_FOR_SWIFT; + +#pragma mark Logging ++ (Class)Debug NS_REFINED_FOR_SWIFT; + +#pragma mark Privacy Consent +/** + * Set to `true` if your application requires privacy consent. + * Consent should be provided prior to the invocation of `initialize` to ensure compliance. + */ ++ (void)setConsentRequired:(BOOL)required; ++ (void)setConsentGiven:(BOOL)granted; + +#pragma mark In-App Messaging ++ (Class)InAppMessages NS_REFINED_FOR_SWIFT; + +#pragma mark Location ++ (Class)Location NS_REFINED_FOR_SWIFT; + +#pragma mark Session ++ (Class)Session NS_REFINED_FOR_SWIFT; + +#pragma mark Extension +// iOS 10 only +// Process from Notification Service Extension. +// Used for iOS Media Attachemtns and Action Buttons. ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent __deprecated_msg("Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead."); ++ (UNMutableNotificationContent*)didReceiveNotificationExtensionRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler; ++ (UNMutableNotificationContent*)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest* _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent* _Nullable)replacementContent; +@end + +#pragma clang diagnostic pop diff --git a/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h b/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h new file mode 100644 index 000000000..43233bc0e --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalFramework.framework/Headers/OneSignalLiveActivityController.h @@ -0,0 +1,47 @@ +/** + * Modified MIT License + * + * Copyright 2023 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 OneSignalLiveActivityController_h +#define OneSignalLiveActivityController_h + +#import + +/** + Public API for the LiveActivities namespace. + */ +@protocol OSLiveActivities ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token; ++ (void)enter:(NSString * _Nonnull)activityId withToken:(NSString * _Nonnull)token withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; ++ (void)exit:(NSString * _Nonnull)activityId; ++ (void)exit:(NSString * _Nonnull)activityId withSuccess:(OSResultSuccessBlock _Nullable)successBlock withFailure:(OSFailureBlock _Nullable)failureBlock; +@end + +@interface OneSignalLiveActivityController: NSObject ++ (Class_Nonnull)LiveActivities; +@end + +#endif /* OneSignalLiveActivityController_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h b/onesignal/ios/src/main/bro-gen/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h new file mode 100644 index 000000000..11d0faa67 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalInAppMessages.framework/Headers/OneSignalInAppMessages.h @@ -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 +#import + +@interface OneSignalInAppMessages : NSObject + ++ (Class_Nonnull)InAppMessages; ++ (void)start; ++ (void)getInAppMessagesFromServer:(NSString * _Nullable)subscriptionId; ++ (void)onApplicationDidBecomeActive; ++ (void)migrate; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalLocation.framework/Headers/OneSignalLocationManager.h b/onesignal/ios/src/main/bro-gen/OneSignalLocation.framework/Headers/OneSignalLocationManager.h new file mode 100644 index 000000000..20fdd69b9 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalLocation.framework/Headers/OneSignalLocationManager.h @@ -0,0 +1,57 @@ +/** + * Modified MIT License + * + * Copyright 2016 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 +#import +#import +#import + +#ifndef OneSignalLocation_h +#define OneSignalLocation_h + +typedef struct os_location_coordinate { + double latitude; + double longitude; +} os_location_coordinate; + +typedef struct os_last_location { + os_location_coordinate cords; + double verticalAccuracy; + double horizontalAccuracy; +} os_last_location; +//rename to OneSignalLocationManager +@interface OneSignalLocationManager : NSObject ++ (Class)Location; ++ (OneSignalLocationManager*) sharedInstance; ++ (void)start; ++ (void)clearLastLocation; ++ (void)onFocus:(BOOL)isActive; ++ (void)startLocationSharedWithFlag:(BOOL)enable; ++ (void)promptLocationFallbackToSettings:(BOOL)fallback completionHandler:(void (^)(PromptActionResult result))completionHandler; +@end + +#endif /* OneSignalLocation_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h new file mode 100644 index 000000000..09197167e --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotification+OneSignal.h @@ -0,0 +1,37 @@ +/** + * Modified MIT License + * + * Copyright 2021OneSignal + * + * 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 +#import + +/** + Public interface used in the OSNotificationLifecycleListener's onWillDisplay event. + */ +@interface OSDisplayableNotification : OSNotification +- (void)display; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotificationsManager.h b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotificationsManager.h new file mode 100644 index 000000000..cd973d8d6 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSNotificationsManager.h @@ -0,0 +1,125 @@ +/* + 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 +#import +#import +#import +#import +#import + +@protocol OSNotificationClickListener +- (void)onClickNotification:(OSNotificationClickEvent *_Nonnull)event +NS_SWIFT_NAME(onClick(event:)); +@end + +@interface OSNotificationWillDisplayEvent : NSObject + +@property (readonly, strong, nonatomic, nonnull) OSDisplayableNotification *notification; // TODO: strong? nonatomic? nullable? +- (void)preventDefault; + +@end + +@protocol OSNotificationLifecycleListener +- (void)onWillDisplayNotification:(OSNotificationWillDisplayEvent *_Nonnull)event NS_SWIFT_NAME(onWillDisplay(event:)); +@end + +/** + Public API for the Notifications namespace. + */ +@protocol OSNotifications ++ (BOOL)permission NS_REFINED_FOR_SWIFT; ++ (BOOL)canRequestPermission NS_REFINED_FOR_SWIFT; ++ (OSNotificationPermission)permissionNative NS_REFINED_FOR_SWIFT; ++ (void)addForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)removeForegroundLifecycleListener:(NSObject *_Nullable)listener; ++ (void)addClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)removeClickListener:(NSObject*_Nonnull)listener NS_REFINED_FOR_SWIFT; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block; ++ (void)requestPermission:(OSUserResponseBlock _Nullable )block fallbackToSettings:(BOOL)fallback; ++ (void)registerForProvisionalAuthorization:(OSUserResponseBlock _Nullable )block NS_REFINED_FOR_SWIFT; ++ (void)addPermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)removePermissionObserver:(NSObject*_Nonnull)observer NS_REFINED_FOR_SWIFT; ++ (void)clearAll; +@end + + +@protocol OneSignalNotificationsDelegate +// set delegate before user +// can check responds to selector +- (void)setNotificationTypes:(int)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; + +@end + + +@interface OSNotificationsManager : NSObject + +@property (class, weak, nonatomic, nullable) id delegate; + ++ (Class _Nonnull)Notifications; ++ (void)start; ++ (void)setColdStartFromTapOnNotification:(BOOL)coldStartFromTapOnNotification; ++ (BOOL)getColdStartFromTapOnNotification; + +@property (class, readonly) OSPermissionStateInternal* _Nonnull currentPermissionState; +@property (class) OSPermissionStateInternal* _Nonnull lastPermissionState; + ++ (void)clearStatics; // Used by Unit Tests + +// Indicates if the app provides its own custom Notification customization settings UI +// To enable this, set kOSSettingsKeyProvidesAppNotificationSettings to true in init. ++ (BOOL)providesAppNotificationSettings; +/* Used to determine if the app is able to present it's own customized Notification Settings view (iOS 12+) */ ++ (void)setProvidesNotificationSettingsView:(BOOL)providesView; + ++ (BOOL)registerForAPNsToken; ++ (void)sendPushTokenToDelegate; + ++ (int)getNotificationTypes:(BOOL)pushDisabled; ++ (void)updateNotificationTypes:(int)notificationTypes; ++ (void)sendNotificationTypesUpdateToDelegate; + +// Used to manage observers added by the app developer. +@property (class, readonly) ObservablePermissionStateChangesType* _Nullable permissionStateChangesObserver; + +@property (class, readonly) OneSignalNotificationSettings* _Nonnull osNotificationSettings; + +// This is set by the user module ++ (void)setPushSubscriptionId:(NSString *_Nullable)pushSubscriptionId; + ++ (void)handleWillShowInForegroundForNotification:(OSNotification *_Nonnull)notification completion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)handleNotificationActionWithUrl:(NSString* _Nullable)url actionID:(NSString* _Nonnull)actionID; ++ (BOOL)clearBadgeCount:(BOOL)fromNotifOpened; + ++ (BOOL)receiveRemoteNotification:(UIApplication* _Nonnull)application UserInfo:(NSDictionary* _Nonnull)userInfo completionHandler:(void (^_Nonnull)(UIBackgroundFetchResult))completionHandler; ++ (void)notificationReceived:(NSDictionary* _Nonnull)messageDict wasOpened:(BOOL)opened; ++ (void)handleWillPresentNotificationInForegroundWithPayload:(NSDictionary * _Nonnull)payload withCompletion:(OSNotificationDisplayResponse _Nonnull)completion; ++ (void)didRegisterForRemoteNotifications:(UIApplication *_Nonnull)app deviceToken:(NSData *_Nonnull)inDeviceToken; ++ (void)handleDidFailRegisterForRemoteNotification:(NSError*_Nonnull)err; ++ (void)checkProvisionalAuthorizationStatus; +@end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSPermission.h b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSPermission.h new file mode 100644 index 000000000..5fd75c02b --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OSPermission.h @@ -0,0 +1,102 @@ +/** + * 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 + +#import + +typedef NS_ENUM(NSInteger, OSNotificationPermission) { + // The user has not yet made a choice regarding whether your app can show notifications. + OSNotificationPermissionNotDetermined = 0, + + // The application is not authorized to post user notifications. + OSNotificationPermissionDenied, + + // The application is authorized to post user notifications. + OSNotificationPermissionAuthorized, + + // the application is only authorized to post Provisional notifications (direct to history) + OSNotificationPermissionProvisional, + + // the application is authorized to send notifications for 8 hours. Only used by App Clips. + OSNotificationPermissionEphemeral +}; + +// Permission Classes + +// TODO: this object can be REMOVED now that permission is a boolean +@interface OSPermissionState : NSObject +@property (readonly, nonatomic) BOOL permission; +- (NSDictionary * _Nonnull)jsonRepresentation; +- (instancetype _Nonnull )initWithPermission:(BOOL)permission; +@end + +@protocol OSPermissionStateObserver +- (void)onChanged:(OSPermissionState * _Nonnull)state; +@end + +typedef OSObservable*, OSPermissionState*> ObservablePermissionStateType; + + +// Redefine OSPermissionState +@interface OSPermissionStateInternal : NSObject { +@protected BOOL _hasPrompted; +@protected BOOL _answeredPrompt; +} +@property (readwrite, nonatomic) BOOL hasPrompted; +@property (readwrite, nonatomic) BOOL providesAppNotificationSettings; +@property (readwrite, nonatomic) BOOL answeredPrompt; +@property (readwrite, nonatomic) BOOL accepted; +@property (readwrite, nonatomic) BOOL provisional; //internal flag +@property (readwrite, nonatomic) BOOL ephemeral; +@property (readwrite, nonatomic) BOOL reachable; +@property (readonly, nonatomic) OSNotificationPermission status; +@property int notificationTypes; + +@property (nonatomic) ObservablePermissionStateType * _Nonnull observable; + +- (void) persistAsFrom; + +- (instancetype _Nonnull )initAsTo; +- (instancetype _Nonnull )initAsFrom; + +- (OSPermissionState * _Nonnull)getExternalState; +- (NSDictionary * _Nonnull)jsonRepresentation; +@end + +@protocol OSNotificationPermissionObserver +- (void)onNotificationPermissionDidChange:(BOOL)permission; +@end + +typedef OSBoolObservable*> ObservablePermissionStateChangesType; + + +@interface OSPermissionChangedInternalObserver : NSObject ++ (void)fireChangesObserver:(OSPermissionStateInternal * _Nonnull)state; +@end + + diff --git a/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h new file mode 100644 index 000000000..6f4850b19 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotificationSettings.h @@ -0,0 +1,48 @@ +/** + * 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 OneSignalNotificationSettings_h +#define OneSignalNotificationSettings_h + +#import +#import + +typedef void(^OSUserResponseBlock)(BOOL accepted); + +@interface OneSignalNotificationSettings : NSObject +- (int) getNotificationTypes; +- (OSPermissionStateInternal*)getNotificationPermissionState; +- (void)getNotificationPermissionState:(void (^)(OSPermissionStateInternal *subscriptionState))completionHandler; +- (void)promptForNotifications:(OSUserResponseBlock)block; +- (void)registerForProvisionalAuthorization:(OSUserResponseBlock)block; +// Only used for iOS 9 +- (void)onNotificationPromptResponse:(int)notificationTypes; ++(dispatch_queue_t)getQueue; +@end + + +#endif /* OneSignaNotificationSettings_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotifications.h b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotifications.h new file mode 100644 index 000000000..4e0368d99 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalNotifications.framework/Headers/OneSignalNotifications.h @@ -0,0 +1,32 @@ +/* + 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 + +#import +#import +#import diff --git a/onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h b/onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h new file mode 100644 index 000000000..af1508feb --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore-Swift.h @@ -0,0 +1,324 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALOSCORE_SWIFT_H +#define ONESIGNALOSCORE_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalOSCore",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; + +SWIFT_PROTOCOL("_TtP15OneSignalOSCore23OSBackgroundTaskHandler_") +@protocol OSBackgroundTaskHandler +- (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; +- (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore23OSBackgroundTaskManager") +@interface OSBackgroundTaskManager : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) id _Nullable taskHandler;) ++ (id _Nullable)taskHandler SWIFT_WARN_UNUSED_RESULT; ++ (void)setTaskHandler:(id _Nullable)value; ++ (void)beginBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)endBackgroundTask:(NSString * _Nonnull)taskIdentifier; ++ (void)setTaskInvalid:(NSString * _Nonnull)taskIdentifier; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSCoder; + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSDelta") +@interface OSDelta : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore7OSModel") +@interface OSModel : NSObject +- (void)encodeWithCoder:(NSCoder * _Nonnull)coder; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_CLASS("_TtC15OneSignalOSCore18OSModelChangedArgs") +@interface OSModelChangedArgs : NSObject +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// The OSOperationRepo is a static singleton. +/// OSDeltas are enqueued when model store observers observe changes to their models, and sorted to their appropriate executors. +SWIFT_CLASS("_TtC15OneSignalOSCore15OSOperationRepo") +@interface OSOperationRepo : NSObject +- (void)flushDeltaQueueInBackground:(BOOL)inBackground; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore.h b/onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore.h new file mode 100644 index 000000000..e1e4858b7 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalOSCore.framework/Headers/OneSignalOSCore.h @@ -0,0 +1,34 @@ +/* + 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 + +//! Project version number for OneSignalOSCore. +FOUNDATION_EXPORT double OneSignalOSCoreVersionNumber; + +//! Project version string for OneSignalOSCore. +FOUNDATION_EXPORT const unsigned char OneSignalOSCoreVersionString[]; diff --git a/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h new file mode 100644 index 000000000..efb066cfc --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSFocusInfluenceParam.h @@ -0,0 +1,45 @@ +/** +* 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 OSFocusInfluenceParam_h +#define OSFocusInfluenceParam_h + +@interface OSFocusInfluenceParam : NSObject + +@property (nonatomic, readonly) NSString *influenceKey; +@property (nonatomic, readonly) NSArray *influenceIds; +@property (nonatomic, readonly) NSString *influenceDirectKey; +@property (nonatomic, readonly) BOOL directInfluence; + +- (id)initWithParamsInfluenceIds:(NSArray *)influenceIds + influenceKey:(NSString *)influenceKey + directInfluence:(BOOL)directInfluence + influenceDirectKey:(NSString *)influenceDirectKey; + +@end + +#endif /* OSFocusInfluenceParam_h */ diff --git a/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSSessionManager.h b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSSessionManager.h index 7e35c39e9..a1616f737 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSSessionManager.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OSSessionManager.h @@ -41,18 +41,20 @@ + (void)resetSharedSessionManager; @property (nonatomic) id _Nullable delegate; +@property AppEntryAction appEntryState; - (instancetype _Nonnull)init:(Class _Nullable)delegate withTrackerFactory:(OSTrackerFactory *_Nonnull)trackerFactory; - (NSArray *_Nonnull)getInfluences; - (NSArray *_Nonnull)getSessionInfluences; - (void)initSessionFromCache; -- (void)restartSessionIfNeeded:(AppEntryAction)entryAction; +- (void)restartSessionIfNeeded; - (void)onInAppMessageReceived:(NSString * _Nonnull)messageId; - (void)onDirectInfluenceFromIAMClick:(NSString * _Nonnull)directIAMId; - (void)onDirectInfluenceFromIAMClickFinished; - (void)onNotificationReceived:(NSString * _Nonnull)notificationId; - (void)onDirectInfluenceFromNotificationOpen:(AppEntryAction)entryAction withNotificationId:(NSString * _Nonnull)directNotificationId; -- (void)attemptSessionUpgrade:(AppEntryAction)entryAction; +- (void)attemptSessionUpgrade; +- (NSDate *_Nullable)sessionLaunchTime; @end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h index f99c5ce83..b49257d26 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomeEventsController.h @@ -30,6 +30,7 @@ #import "OSOutcomeEventsFactory.h" #import "OSInAppMessageOutcome.h" #import "OSOutcomeEvent.h" +#import "OSFocusInfluenceParam.h" @interface OneSignalOutcomeEventsController : NSObject @@ -37,25 +38,22 @@ outcomeEventsFactory:(OSOutcomeEventsFactory *_Nonnull)outcomeEventsFactory; - (void)clearOutcomes; +- (void)cleanUniqueOutcomeNotifications; + +- (void)addOutcome:(NSString * _Nonnull)name; +- (void)addUniqueOutcome:(NSString * _Nonnull)name; +- (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value; - (void)sendClickActionOutcomes:(NSArray *_Nonnull)outcomes appId:(NSString * _Nonnull)appId deviceType:(NSNumber * _Nonnull)deviceType; -- (void)sendOutcomeEvent:(NSString * _Nonnull)name - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendUniqueOutcomeEvent:(NSString * _Nonnull)name +- (void)sendSessionEndOutcomes:(NSNumber* _Nonnull)timeElapsed appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; - -- (void)sendOutcomeEventWithValue:(NSString * _Nonnull)name - value:(NSNumber * _Nullable)weight - appId:(NSString * _Nonnull)appId - deviceType:(NSNumber * _Nonnull)deviceType - successBlock:(OSSendOutcomeSuccess _Nullable)success; + pushSubscriptionId:(NSString * _Nonnull)pushSubscriptionId + onesignalId:(NSString * _Nonnull)onesignalId + influenceParams:(NSArray * _Nonnull)influenceParams + onSuccess:(OSResultSuccessBlock _Nonnull)successBlock + onFailure:(OSFailureBlock _Nonnull)failureBlock; @end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h index e673d4346..e3dcb57d1 100644 --- a/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h +++ b/onesignal/ios/src/main/bro-gen/OneSignalOutcomes.framework/Headers/OneSignalOutcomes.h @@ -40,8 +40,23 @@ #import "OSOutcomeEventsFactory.h" #import "OSTrackerFactory.h" #import "OSOutcomeEventsRepository.h" +#import "OSFocusInfluenceParam.h" -@interface OneSignalOutcomes : NSObject +/** + Public API for Session namespace. + */ +@protocol OSSession ++ (void)addOutcome:(NSString * _Nonnull)name; ++ (void)addUniqueOutcome:(NSString * _Nonnull)name; ++ (void)addOutcomeWithValue:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value NS_REFINED_FOR_SWIFT; + +@end + +@interface OSOutcomes : NSObject ++ (Class _Nonnull)Session; ++ (OneSignalOutcomeEventsController * _Nullable)sharedController; ++ (void)start; ++ (void)clearStatics; + (void)migrate; @end diff --git a/onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser-Swift.h b/onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser-Swift.h new file mode 100644 index 000000000..a449a1759 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser-Swift.h @@ -0,0 +1,410 @@ +#if 0 +#elif defined(__arm64__) && __arm64__ +// Generated by Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) +#ifndef ONESIGNALUSER_SWIFT_H +#define ONESIGNALUSER_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wduplicate-method-match" +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include +#include +#include +#else +#include +#include +#include +#endif + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT noexcept +#endif +#else +#if !defined(SWIFT_NOEXCEPT) +# define SWIFT_NOEXCEPT +#endif +#endif +#if defined(__cplusplus) +#if !defined(SWIFT_CXX_INT_DEFINED) +#define SWIFT_CXX_INT_DEFINED +namespace swift { +using Int = ptrdiff_t; +using UInt = size_t; +} +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +@import OneSignalNotifications; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OneSignalUser",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if defined(__OBJC__) +@class NSString; +@protocol OSPushSubscriptionObserver; + +/// This is the push subscription interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser18OSPushSubscription_") +@protocol OSPushSubscription +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +- (void)optIn; +- (void)optOut; +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@end + +@class OSPushSubscriptionState; +@class NSDictionary; + +SWIFT_CLASS("_TtC13OneSignalUser30OSPushSubscriptionChangedState") +@interface OSPushSubscriptionChangedState : NSObject +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull current; +@property (nonatomic, readonly, strong) OSPushSubscriptionState * _Nonnull previous; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +SWIFT_PROTOCOL("_TtP13OneSignalUser26OSPushSubscriptionObserver_") +@protocol OSPushSubscriptionObserver +- (void)onPushSubscriptionDidChangeWithState:(OSPushSubscriptionChangedState * _Nonnull)state; +@end + + +SWIFT_CLASS("_TtC13OneSignalUser23OSPushSubscriptionState") +@interface OSPushSubscriptionState : NSObject +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (NSDictionary * _Nonnull)jsonRepresentation SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// This is the user interface exposed to the public. +SWIFT_PROTOCOL("_TtP13OneSignalUser6OSUser_") +@protocol OSUser +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@end + + + +SWIFT_CLASS("_TtC13OneSignalUser24OneSignalUserManagerImpl") +@interface OneSignalUserManagerImpl : NSObject +SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) OneSignalUserManagerImpl * _Nonnull sharedInstance;) ++ (OneSignalUserManagerImpl * _Nonnull)sharedInstance SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly, copy) NSString * _Nullable onesignalId; +@property (nonatomic, readonly, copy) NSString * _Nullable pushSubscriptionId; +@property (nonatomic, readonly, copy) NSString * _Nullable language; +@property (nonatomic) BOOL requiresUserAuth; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +- (void)start; +- (void)loginWithExternalId:(NSString * _Nonnull)externalId token:(NSString * _Nullable)token; +/// The SDK needs to have a user at all times, so this method will create a new anonymous user. If the current user is already anonymous, calling logout results in a no-op. +- (void)logout; +- (void)clearAllModelsFromStores; +- (NSDictionary * _Nullable)getTags SWIFT_WARN_UNUSED_RESULT; +- (void)setLocationWithLatitude:(float)latitude longitude:(float)longitude; +- (void)sendPurchases:(NSArray *> * _Nonnull)purchases; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)setNotificationTypes:(int32_t)notificationTypes; +- (void)setPushToken:(NSString * _Nonnull)pushToken; +@end + +@class NSNumber; + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)startNewSession; +- (void)updateSessionWithSessionCount:(NSNumber * _Nullable)sessionCount sessionTime:(NSNumber * _Nullable)sessionTime refreshDeviceMetadata:(BOOL)refreshDeviceMetadata sendImmediately:(BOOL)sendImmediately onSuccess:(void (^ _Nullable)(void))onSuccess onFailure:(void (^ _Nullable)(void))onFailure; +/// App has been backgrounded. Run background tasks such to flush the operation repo and hydrating models. +/// Need to consider app killed vs app backgrounded and handle gracefully. +- (void)runBackgroundTasks; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)addObserver:(id _Nonnull)observer; +- (void)removeObserver:(id _Nonnull)observer; +@property (nonatomic, readonly, copy) NSString * _Nullable id; +@property (nonatomic, readonly, copy) NSString * _Nullable token; +@property (nonatomic, readonly) BOOL optedIn; +/// Enable the push subscription, and prompts if needed. optedIn can still be false after optIn() is called if permission is not granted. +- (void)optIn; +- (void)optOut; +@end + + +@interface OneSignalUserManagerImpl (SWIFT_EXTENSION(OneSignalUser)) +- (void)onJwtExpiredWithExpiredHandler:(void (^ _Nonnull)(NSString * _Nonnull, SWIFT_NOESCAPE void (^ _Nonnull)(NSString * _Nonnull)))expiredHandler; +@property (nonatomic, readonly, strong) id _Nonnull User; +@property (nonatomic, readonly, strong) id _Nonnull pushSubscription; +- (void)addAliasWithLabel:(NSString * _Nonnull)label id:(NSString * _Nonnull)id; +- (void)addAliases:(NSDictionary * _Nonnull)aliases; +- (void)removeAlias:(NSString * _Nonnull)label; +- (void)removeAliases:(NSArray * _Nonnull)labels; +- (void)addTagWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value; +- (void)addTags:(NSDictionary * _Nonnull)tags; +- (void)removeTag:(NSString * _Nonnull)tag; +- (void)removeTags:(NSArray * _Nonnull)tags; +- (void)addEmail:(NSString * _Nonnull)email; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeEmail:(NSString * _Nonnull)email; +- (void)addSms:(NSString * _Nonnull)number; +/// If this email doesn’t already exist on the user, it cannot be removed. +/// This will be a no-op and no request will be made. +/// Error handling needs to be implemented in the future. +- (void)removeSms:(NSString * _Nonnull)number; +- (void)setLanguage:(NSString * _Nonnull)language; +@end + +#endif +#if defined(__cplusplus) +#endif +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif + +#else +#error unsupported Swift architecture +#endif diff --git a/onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser.h b/onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser.h new file mode 100644 index 000000000..e677dada3 --- /dev/null +++ b/onesignal/ios/src/main/bro-gen/OneSignalUser.framework/Headers/OneSignalUser.h @@ -0,0 +1,34 @@ +/* + 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 + +//! Project version number for OneSignalUser. +FOUNDATION_EXPORT double OneSignalUserVersionNumber; + +//! Project version string for OneSignalUser. +FOUNDATION_EXPORT const unsigned char OneSignalUserVersionString[]; diff --git a/onesignal/ios/src/main/bro-gen/onesignal.yaml b/onesignal/ios/src/main/bro-gen/onesignal.yaml index 31c9d1613..8f8ab6094 100644 --- a/onesignal/ios/src/main/bro-gen/onesignal.yaml +++ b/onesignal/ios/src/main/bro-gen/onesignal.yaml @@ -1,14 +1,26 @@ package: org.robovm.pods.onesignal include: [foundation, usernotifications, uikit] -framework: OneSignal -internal_frameworks: [OneSignalCore, OneSignalOutcomes] +framework: OneSignalFramework +internal_frameworks: + - OneSignalCore + - OneSignalOSCore + - OneSignalExtension + - OneSignalLocation + - OneSignalNotifications + - OneSignalInAppMessages + - OneSignalOutcomes + - OneSignalUser clang_args: ['-x', 'objective-c'] headers: - - OneSignal.h + - "#import " + - "#import " + - "#import " + - "#import " -private_typedefs: {} - -typedefs: {} +private_typedefs: + OS_dispatch_source: org.robovm.apple.dispatch.DispatchSource + OS_dispatch_queue: org.robovm.apple.dispatch.DispatchQueue +typedefs: enums: OSNotificationActionType: {} @@ -23,22 +35,30 @@ enums: FocusEventType: { } FocusAttributionState: { } HTTPMethod: { } + ViewOrientation: { prefix: Orientation } + OSResponseStatusType: { prefix: OSResponseStatus } + OSUIApplicationReleaseMode: { prefix: UIApplicationRelease } + OSInAppMessageActionUrlType: { } classes: + # structs + os_last_location: + name: OSLastLocation + os_location_coordinate: + name: OSLocationCoordinate + OSNotification: methods: '+parseWithApns:': name: parse - OSNotificationAction: {} - OSNotificationOpenedResult: {} OSNotificationPayload: methods: '+parseWithApns:': name: parse - OSPermissionState: {} - OSPermissionStateChanges: {} + OSPermissionState: + methods: + '-initWithPermission:': + name: init OSPermissionSubscriptionState: {} - OSSubscriptionState: {} - OSSubscriptionStateChanges: {} OneSignal: methods: '+initWith.*': @@ -133,16 +153,15 @@ classes: name: enterLiveActivity '+exitLiveActivity:withSuccess:withFailure:': name: exitLiveActivity + '+login:withToken:': + name: login + '+initialize:withLaunchOptions:': + name: initialize - OSEmailSubscriptionState: {} - OSEmailSubscriptionStateChanges: {} - OSInAppMessageAction: {} OSDevice: {} OSInAppMessageOutcome: {} OSInAppMessageTag: {} - OSDeviceState: {} OSSMSSubscriptionState: { } - OSSMSSubscriptionStateChanges: { } OSInAppMessage: { } OSCachedUniqueOutcome: methods: @@ -193,106 +212,26 @@ classes: methods: '+shouldLogMissingPrivacyConsentErrorWithMethodName:': name: shouldLogMissingPrivacyConsentError - OSRequestBadgeCount: - methods: - '+withUserId:appId:badgeCount:emailAuthToken:externalIdAuthToken:': - name: createWithEmailAuth - '+withUserId:appId:badgeCount:smsAuthToken:externalIdAuthToken:': - name: createWithSmsAuth - OSRequestCreateDevice: - methods: - '+withAppId:withDeviceType:withEmail:withPlayerId:withEmailAuthHash:withExternalUserId:withExternalIdAuthToken:': - name: createWithEmail - '+withAppId:withDeviceType:withSMSNumber:withPlayerId:withSMSAuthHash:withExternalUserId:withExternalIdAuthToken:': - name: createWithSMSNumber OSRequestGetIosParams: methods: '+withUserId:appId:': name: create constructor: true - OSRequestGetTags: - methods: - '+withUserId:appId:': - name: create - constructor: true - OSRequestLogoutEmail: - methods: - '+withAppId:emailPlayerId:devicePlayerId:emailAuthHash:': - name: create - constructor: true - OSRequestLogoutSMS: - methods: - '+withAppId:smsPlayerId:smsAuthHash:devicePlayerId:': - name: create - constructor: true OSRequestPostNotification: methods: '+withAppId:withJson:': name: create constructor: true - OSRequestRegisterUser: - methods: - '+withData:userId:': - name: create - constructor: true - OSRequestSendPurchases: - methods: - '+withUserId:externalIdAuthToken:appId:withPurchases:': - name: createWithExternalIdAuthToken - '+withUserId:emailAuthToken:appId:withPurchases:': - name: createWithEmailAuthToken - OSRequestSendTagsToServer: - methods: - '+withUserId:appId:tags:networkType:withEmailAuthHashToken:withExternalIdAuthHashToken:': - name: createWithEmailAuthHashToken - '+withUserId:appId:tags:networkType:withSMSAuthHashToken:withExternalIdAuthHashToken:': - name: createWithSMSAuthHashToken OSRequestSubmitNotificationOpened: methods: '+withUserId:appId:wasOpened:messageId:withDeviceType:': name: create constructor: true - OSRequestSyncHashedEmail: - methods: - '+withUserId:appId:email:networkType:': - name: create - constructor: true OSRequestTrackV1: methods: '+trackUsageData:appId:': name: create constructor: true - OSRequestUpdateDeviceToken: - methods: - '+withUserId:appId:deviceToken:notificationTypes:externalIdAuthToken:': - name: create - constructor: true - '+withUserId:appId:deviceToken:withParentId:emailAuthToken:email:externalIdAuthToken:': - name: create - constructor: true - '+withUserId:appId:deviceToken:smsAuthToken:externalIdAuthToken:': - name: create - constructor: true - OSRequestUpdateExternalUserId: - methods: - '+withUserId:withUserIdHashToken:withOneSignalUserId:appId:': - name: create - constructor: true - '+withUserId:withUserIdHashToken:withOneSignalUserId:withEmailHashToken:appId:': - name: createWithEmailHashToken - '+withUserId:withUserIdHashToken:withOneSignalUserId:withSMSHashToken:appId:': - name: createWithSMSHashToken - OSRequestUpdateLanguage: - methods: - '+withUserId:appId:language:emailAuthToken:externalIdAuthToken:': - name: createWithEmailAuthToken - '+withUserId:appId:language:smsAuthToken:externalIdAuthToken:': - name: createWithSMSAuthToken - OSRequestUpdateNotificationTypes: - methods: - '+withUserId:appId:notificationTypes:': - name: create - constructor: true OSSessionManager: methods: '-init:withTrackerFactory:': @@ -315,7 +254,6 @@ classes: name: executeSimultaneousRequests '-executeSimultaneousRequests:withCompletion:': name: executeSimultaneousRequests - OneSignalCore: {} OneSignalCoreHelper: exclude: true OneSignalLog: @@ -334,6 +272,10 @@ classes: name: sendUniqueOutcomeEvent '-sendOutcomeEventWithValue:value:appId:deviceType:successBlock:': name: sendOutcomeEvent + '-addOutcomeWithValue:value:': + name: addOutcome + '-sendSessionEndOutcomes:appId:pushSubscriptionId:onesignalId:influenceParams:onSuccess:onFailure:': + name: sendSessionEndOutcomes OneSignalOutcomes: {} OneSignalRequest: {} OneSignalTrackFirebaseAnalytics: @@ -380,26 +322,136 @@ classes: name: init OSRequestLiveActivityEnter: methods: - '+withUserId:appId:activityId:token:': + '+withSubscriptionId:appId:activityId:token:': name: create constructor: true OSRequestLiveActivityExit: methods: - '+withUserId:appId:activityId:': + '+withSubscriptionId:appId:activityId:': name: create constructor: true + OSBoolObservable: + methods: + '-initWithChangeSelector:': + name: init + OSDeviceUtils: { } + OSDialogInstanceManager: { } + OSDisplayableNotification: { } + OSFocusInfluenceParam: + methods: + '-initWithParamsInfluenceIds:influenceKey:directInfluence:influenceDirectKey:': + name: init + OSInAppMessageClickEvent: { } + OSInAppMessageClickResult: { } + OSInAppMessageDidDismissEvent: { } + OSInAppMessageDidDisplayEvent: { } + OSInAppMessageWillDismissEvent: { } + OSInAppMessageWillDisplayEvent: { } + OSNetworkingUtils: { } + OSNotificationClickEvent: { } + OSNotificationClickResult: { } + OSNotificationWillDisplayEvent: { } + OSNotificationsManager: + methods: + '+handleWillShowInForegroundForNotification:completion:': + name: handleWillShowInForegroundForNotification + '+handleNotificationActionWithUrl:actionID:': + name: handleNotificationAction + '+receiveRemoteNotification:UserInfo:completionHandler:': + name: receiveRemoteNotification + '+notificationReceived:wasOpened:': + name: notificationReceived + '+handleWillPresentNotificationInForegroundWithPayload:withCompletion:': + name: handleWillPresentNotificationInForeground + '+didRegisterForRemoteNotifications:deviceToken:': + name: didRegisterForRemoteNotifications + OSObservable: + methods: + '-initWithChangeSelector:': + name: init + OSOutcomes: { } + OSPermissionChangedInternalObserver: { } + OSPermissionStateInternal: + methods: + '-initAsTo': + static_constructor: true + static_constructor_name: asTo + '-initAsFrom': + static_constructor: true + static_constructor_name: asFrom + OSPushSubscriptionChangedState: { } + OSPushSubscriptionState: { } + OSRemoteParamController: { } + OSStubInAppMessages: { } + OSStubLocation: { } + OneSignalConfigManager: { } + OneSignalLiveActivityController: { } + OneSignalMobileProvision: { } + OneSignalNotificationSettings: { } + OneSignalUserManagerImpl: + methods: + '-loginWithExternalId:token:': + name: login + '-setLocationWithLatitude:longitude:': + name: setLocation + '-updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:': + name: updateSession + OneSignalWrapper: { } + SwizzlingForwarder: + methods: + '-initWithTarget:withYourSelector:withOriginalSelector:': + name: init + '-invokeWithArgs:': + name: invoke + OneSignalAttachmentHandler: + methods: + '+addAttachments:toNotificationContent:': + name: addAttachments + '+addActionButtons:toNotificationContent:': + name: addActionButtons + OneSignalExtension: + methods: + '+didReceiveNotificationExtensionRequest:withMutableNotificationContent:': + name: didReceiveNotificationExtensionRequest + '+didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler:': + name: didReceiveNotificationExtensionRequest + '+serviceExtensionTimeWillExpireRequest:withMutableNotificationContent:': + name: serviceExtensionTimeWillExpireRequest + OneSignalExtensionBadgeHandler: + methods: + '+handleBadgeCountWithNotificationRequest:withNotification:withMutableNotificationContent:': + name: handleBadgeCount + OneSignalInAppMessages: { } + OneSignalLocationManager: + methods: + '+startLocationSharedWithFlag:': + name: startLocationShared + '+promptLocationFallbackToSettings:completionHandler:': + name: promptLocationFallbackToSettings + OneSignalNotificationServiceExtensionHandler: + methods: + '+didReceiveNotificationExtensionRequest:withMutableNotificationContent:': + name: didReceiveNotificationExtensionRequest + '+didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler:': + name: didReceiveNotificationExtensionRequest + '+serviceExtensionTimeWillExpireRequest:withMutableNotificationContent:': + name: serviceExtensionTimeWillExpireRequest + OneSignalReceiveReceiptsController: + methods: + '-sendReceiveReceiptWithNotificationId:': + name: sendReceiveReceipt + '-sendReceiveReceiptWithPlayerId:notificationId:appId:': + name: sendReceiveReceipt + '-sendReceiveReceiptWithPlayerId:notificationId:appId:successBlock:failureBlock:': + name: sendReceiveReceipt + '-sendReceiveReceiptWithPlayerId:notificationId:appId:delay:successBlock:failureBlock:': + name: sendReceiveReceipt protocols: - OSPermissionObserver: {} - OSSubscriptionObserver: {} - OSEmailSubscriptionObserver: {} OSNotificationDisplayTypeDelegate: skip_adapter: true # only one method there methods: '-willPresentInFocusNotificationWithPayload:withCompletion:': name: willPresentInFocusNotification - OSInAppMessageDelegate: {} - OSSMSSubscriptionObserver: {} - OSInAppMessageLifecycleHandler: {} OSJSONDecodable: methods: '+instanceWithData:': @@ -408,7 +460,56 @@ protocols: name: create OSJSONEncodable: { } SessionStatusDelegate: { } + OSDebug: { } + OSDialogPresenter: + methods: + '-presentDialogWithTitle:withMessage:withActions:cancelTitle:withActionCompletion:': + name: presentDialog + OSInAppMessageClickListener: { } + OSInAppMessageLifecycleListener: { } + OSInAppMessages: + methods: + '+addTrigger:withValue:': + name: addTrigger + OSLiveActivities: + methods: + '+enter:withToken:': + name: enter + '+enter:withToken:withSuccess:withFailure:': + name: enter + '+exit:withSuccess:withFailure:': + name: exit + OSLocation: { } + OSNotificationClickListener: { } + OSNotificationLifecycleListener: { } + OSNotificationPermissionObserver: { } + OSNotifications: + methods: + '+requestPermission:fallbackToSettings:': + name: requestPermission + OSObserver: { } + OSPermissionStateObserver: { } + OSPushSubscription: { } + OSPushSubscriptionObserver: + methods: + '-onPushSubscriptionDidChangeWithState:': + name: onPushSubscriptionDidChange + OSSession: + methods: + '+addOutcomeWithValue:value:': + name: addOutcome + OSUser: + methods: + '-addAliasWithLabel:id:': + name: addAlias + '-addTagWithKey:value:': + name: addTag + '-onJwtExpiredWithExpiredHandler:': + name: onJwtExpired + OneSignalNotificationsDelegate: { } functions: + injectSelector: + exclude: true # Make sure we don't miss any functions if new ones are introduced in a later version (.*): class: __FixMe @@ -420,9 +521,9 @@ values: name: '#{g[0]}' type: NSString - ONESIGNAL_VERSION: + OneSignal(.*): class: OneSignal - name: getVersion + name: '#{g[0]}' # Make sure we don't miss any values if new ones are introduced in a later version (.*): diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/HTTPMethod.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/HTTPMethod.java index 2b683c64c..344a68fad 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/HTTPMethod.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/HTTPMethod.java @@ -45,7 +45,8 @@ public enum /**/HTTPMethod/**/ implements ValuedEnum { DELETE(4L), OPTIONS(5L), CONNECT(6L), - TRACE(7L); + TRACE(7L), + PATCH(8L); /**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSBoolObservable.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSBoolObservable.java new file mode 100644 index 000000000..ace42f35c --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSBoolObservable.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSBoolObservable/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSBoolObservablePtr extends Ptr, OSBoolObservablePtr> {}/**/ + /**/static { ObjCRuntime.bind(OSBoolObservable.class); }/**/ + /**//**/ + /**/ + public OSBoolObservable() {} + protected OSBoolObservable(Handle h, long handle) { super(h, handle); } + protected OSBoolObservable(SkipInit skipInit) { super(skipInit); } + @Method(selector = "initWithChangeSelector:") + public OSBoolObservable(Selector selector) { super((SkipInit) null); initObject(init(selector)); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "initWithChangeSelector:") + protected native @Pointer long init(Selector selector); + @Method(selector = "addObserver:") + public native void addObserver(ObserverType observer); + @Method(selector = "removeObserver:") + public native void removeObserver(ObserverType observer); + @Method(selector = "notifyChange:") + public native boolean notifyChange(boolean state); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDebug.java similarity index 86% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionObserver.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDebug.java index 2a09dbae7..4410409b6 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionObserver.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDebug.java @@ -36,7 +36,7 @@ /**/ /**//**/ -/**/public/**/ interface /**/OSSubscriptionObserver/**/ +/**/public/**/ interface /**/OSDebug/**/ /**/extends NSObjectProtocol/**/ { /**/ @@ -48,8 +48,7 @@ /**/ /**/ - @Method(selector = "onOSSubscriptionChanged:") - void onOSSubscriptionChanged(OSSubscriptionStateChanges stateChanges); + /**/ /**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionObserverAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDebugAdapter.java similarity index 82% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionObserverAdapter.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDebugAdapter.java index 1a7b155d5..078d608c5 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionObserverAdapter.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDebugAdapter.java @@ -35,9 +35,9 @@ /**/ /**/ /**//**/ -/**/public/**/ class /**/OSSubscriptionObserverAdapter/**/ +/**/public/**/ class /**/OSDebugAdapter/**/ extends /**/NSObject/**/ - /**/implements OSSubscriptionObserver/**/ { + /**/implements OSDebug/**/ { /**/ /**/ @@ -50,7 +50,6 @@ /**/ /**//**/ /**/ - @NotImplemented("onOSSubscriptionChanged:") - public void onOSSubscriptionChanged(OSSubscriptionStateChanges stateChanges) {} + /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceState.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceState.java deleted file mode 100644 index 1fc8874e0..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceState.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSDeviceState/**/ - extends /**/NSObject/**/ - /**//**/ { - - /**/public static class OSDeviceStatePtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSDeviceState.class); }/**/ - /**//**/ - /**/ - public OSDeviceState() {} - protected OSDeviceState(Handle h, long handle) { super(h, handle); } - protected OSDeviceState(SkipInit skipInit) { super(skipInit); } - /**/ - /**/ - @Property(selector = "hasNotificationPermission") - public native boolean hasNotificationPermission(); - @Property(selector = "isPushDisabled") - public native boolean isPushDisabled(); - @Property(selector = "isSubscribed") - public native boolean isSubscribed(); - @Property(selector = "notificationPermissionStatus") - public native OSNotificationPermission getNotificationPermissionStatus(); - @Property(selector = "userId") - public native String getUserId(); - @Property(selector = "pushToken") - public native String getPushToken(); - @Property(selector = "emailUserId") - public native String getEmailUserId(); - @Property(selector = "emailAddress") - public native String getEmailAddress(); - @Property(selector = "isEmailSubscribed") - public native boolean isEmailSubscribed(); - @Property(selector = "smsUserId") - public native String getSmsUserId(); - @Property(selector = "smsNumber") - public native String getSmsNumber(); - @Property(selector = "isSMSSubscribed") - public native boolean isSMSSubscribed(); - /**/ - /**//**/ - /**/ - @Method(selector = "jsonRepresentation") - public native NSDictionary jsonRepresentation(); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceUtils.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceUtils.java new file mode 100644 index 000000000..9e18b59d9 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDeviceUtils.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSDeviceUtils/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSDeviceUtilsPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSDeviceUtils.class); }/**/ + /**//**/ + /**/ + public OSDeviceUtils() {} + protected OSDeviceUtils(Handle h, long handle) { super(h, handle); } + protected OSDeviceUtils(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "getCurrentDeviceVersion") + public static native String getCurrentDeviceVersion(); + @Method(selector = "isIOSVersionGreaterThanOrEqual:") + public static native boolean isIOSVersionGreaterThanOrEqual(String version); + @Method(selector = "isIOSVersionLessThan:") + public static native boolean isIOSVersionLessThan(String version); + @Method(selector = "getDeviceVariant") + public static native String getDeviceVariant(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogInstanceManager.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogInstanceManager.java new file mode 100644 index 000000000..e3a7dc67f --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogInstanceManager.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSDialogInstanceManager/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSDialogInstanceManagerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSDialogInstanceManager.class); }/**/ + /**//**/ + /**/ + public OSDialogInstanceManager() {} + protected OSDialogInstanceManager(Handle h, long handle) { super(h, handle); } + protected OSDialogInstanceManager(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "setSharedInstance:") + public static native void setSharedInstance(OSDialogPresenter instance); + @Method(selector = "sharedInstance") + public static native OSDialogPresenter sharedInstance(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenter.java new file mode 100644 index 000000000..95c58d990 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenter.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSDialogPresenter/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + @Method(selector = "presentDialogWithTitle:withMessage:withActions:cancelTitle:withActionCompletion:") + void presentDialog(String title, String message, NSArray actionTitles, String cancelTitle, @Block VoidIntBlock completion); + @Method(selector = "clearQueue") + void clearQueue(); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenterAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenterAdapter.java new file mode 100644 index 000000000..889faf445 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDialogPresenterAdapter.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSDialogPresenterAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSDialogPresenter/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + @NotImplemented("presentDialogWithTitle:withMessage:withActions:cancelTitle:withActionCompletion:") + public void presentDialog(String title, String message, NSArray actionTitles, String cancelTitle, @Block VoidIntBlock completion) {} + @NotImplemented("clearQueue") + public void clearQueue() {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestGetTags.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDisplayableNotification.java similarity index 64% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestGetTags.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDisplayableNotification.java index 00f994424..2f8a2cee0 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestGetTags.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSDisplayableNotification.java @@ -36,25 +36,26 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestGetTags/**/ - extends /**/OneSignalRequest/**/ +/**/public/**/ class /**/OSDisplayableNotification/**/ + extends /**/OSNotification/**/ /**//**/ { - /**/public static class OSRequestGetTagsPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestGetTags.class); }/**/ + /**/public static class OSDisplayableNotificationPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSDisplayableNotification.class); }/**/ /**//**/ /**/ - public OSRequestGetTags() {} - protected OSRequestGetTags(Handle h, long handle) { super(h, handle); } - protected OSRequestGetTags(SkipInit skipInit) { super(skipInit); } - public OSRequestGetTags(String userId, String appId) { super((Handle) null, create(userId, appId)); retain(getHandle()); } + public OSDisplayableNotification() {} + protected OSDisplayableNotification(Handle h, long handle) { super(h, handle); } + protected OSDisplayableNotification(SkipInit skipInit) { super(skipInit); } /**/ /**/ /**/ /**//**/ /**/ - @Method(selector = "withUserId:appId:") - protected static native @Pointer long create(String userId, String appId); + @Method(selector = "display") + public native void display(); + @Method(selector = "parseWithApns:") + public static native OSDisplayableNotification parse(NSDictionary message); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestCreateDevice.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSFocusInfluenceParam.java similarity index 50% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestCreateDevice.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSFocusInfluenceParam.java index 05b0d99ef..a672d22f0 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestCreateDevice.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSFocusInfluenceParam.java @@ -36,26 +36,33 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestCreateDevice/**/ - extends /**/OneSignalRequest/**/ +/**/public/**/ class /**/OSFocusInfluenceParam/**/ + extends /**/NSObject/**/ /**//**/ { - /**/public static class OSRequestCreateDevicePtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestCreateDevice.class); }/**/ + /**/public static class OSFocusInfluenceParamPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSFocusInfluenceParam.class); }/**/ /**//**/ /**/ - public OSRequestCreateDevice() {} - protected OSRequestCreateDevice(Handle h, long handle) { super(h, handle); } - protected OSRequestCreateDevice(SkipInit skipInit) { super(skipInit); } + public OSFocusInfluenceParam() {} + protected OSFocusInfluenceParam(Handle h, long handle) { super(h, handle); } + protected OSFocusInfluenceParam(SkipInit skipInit) { super(skipInit); } + @Method(selector = "initWithParamsInfluenceIds:influenceKey:directInfluence:influenceDirectKey:") + public OSFocusInfluenceParam(NSArray influenceIds, String influenceKey, boolean directInfluence, String influenceDirectKey) { super((SkipInit) null); initObject(init(influenceIds, influenceKey, directInfluence, influenceDirectKey)); } /**/ /**/ - + @Property(selector = "influenceKey") + public native String getInfluenceKey(); + @Property(selector = "influenceIds") + public native NSArray getInfluenceIds(); + @Property(selector = "influenceDirectKey") + public native String getInfluenceDirectKey(); + @Property(selector = "directInfluence") + public native boolean isDirectInfluence(); /**/ /**//**/ /**/ - @Method(selector = "withAppId:withDeviceType:withEmail:withPlayerId:withEmailAuthHash:withExternalUserId:withExternalIdAuthToken:") - public static native OSRequestCreateDevice createWithEmail(String appId, NSNumber deviceType, String email, String playerId, String emailAuthHash, String externalUserId, String externalIdAuthToken); - @Method(selector = "withAppId:withDeviceType:withSMSNumber:withPlayerId:withSMSAuthHash:withExternalUserId:withExternalIdAuthToken:") - public static native OSRequestCreateDevice createWithSMSNumber(String appId, NSNumber deviceType, String smsNumber, String playerId, String smsAuthHash, String externalUserId, String externalIdAuthToken); + @Method(selector = "initWithParamsInfluenceIds:influenceKey:directInfluence:influenceDirectKey:") + protected native @Pointer long init(NSArray influenceIds, String influenceKey, boolean directInfluence, String influenceDirectKey); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageAction.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageAction.java deleted file mode 100644 index 6310770eb..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageAction.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSInAppMessageAction/**/ - extends /**/NSObject/**/ - /**//**/ { - - /**/public static class OSInAppMessageActionPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSInAppMessageAction.class); }/**/ - /**//**/ - /**/ - public OSInAppMessageAction() {} - protected OSInAppMessageAction(Handle h, long handle) { super(h, handle); } - protected OSInAppMessageAction(SkipInit skipInit) { super(skipInit); } - /**/ - /**/ - @Property(selector = "clickName") - public native String getClickName(); - @Property(selector = "setClickName:") - public native void setClickName(String v); - @Property(selector = "clickUrl") - public native NSURL getClickUrl(); - @Property(selector = "setClickUrl:") - public native void setClickUrl(NSURL v); - @Property(selector = "pageId") - public native String getPageId(); - @Property(selector = "setPageId:") - public native void setPageId(String v); - @Property(selector = "firstClick") - public native boolean isFirstClick(); - @Property(selector = "setFirstClick:") - public native void setFirstClick(boolean v); - @Property(selector = "closesMessage") - public native boolean isClosesMessage(); - @Property(selector = "setClosesMessage:") - public native void setClosesMessage(boolean v); - @Property(selector = "outcomes") - public native NSArray getOutcomes(); - @Property(selector = "setOutcomes:") - public native void setOutcomes(NSArray v); - @Property(selector = "tags") - public native OSInAppMessageTag getTags(); - @Property(selector = "setTags:") - public native void setTags(OSInAppMessageTag v); - /**/ - /**//**/ - /**/ - @Method(selector = "jsonRepresentation") - public native NSDictionary jsonRepresentation(); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageActionUrlType.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageActionUrlType.java new file mode 100644 index 000000000..2b9f4197a --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageActionUrlType.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Marshaler(ValuedEnum.AsMachineSizedUIntMarshaler.class)/**/ +public enum /**/OSInAppMessageActionUrlType/**/ implements ValuedEnum { + /**/ + Safari(0L), + Webview(1L), + ReplaceContent(2L); + /**/ + + /**/ + /**/ + /**//**/ + /**//**/ + + private final long n; + + private /**/OSInAppMessageActionUrlType/**/(long n) { this.n = n; } + public long value() { return n; } + public static /**/OSInAppMessageActionUrlType/**/ valueOf(long n) { + for (/**/OSInAppMessageActionUrlType/**/ v : values()) { + if (v.n == n) { + return v; + } + } + throw new IllegalArgumentException("No constant with value " + n + " found in " + + /**/OSInAppMessageActionUrlType/**/.class.getName()); + } +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateChanges.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickEvent.java similarity index 68% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateChanges.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickEvent.java index 82bab2650..e7c2cf174 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateChanges.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickEvent.java @@ -36,27 +36,27 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSPermissionStateChanges/**/ +/**/public/**/ class /**/OSInAppMessageClickEvent/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSPermissionStateChangesPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSPermissionStateChanges.class); }/**/ + /**/public static class OSInAppMessageClickEventPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSInAppMessageClickEvent.class); }/**/ /**//**/ /**/ - public OSPermissionStateChanges() {} - protected OSPermissionStateChanges(Handle h, long handle) { super(h, handle); } - protected OSPermissionStateChanges(SkipInit skipInit) { super(skipInit); } + public OSInAppMessageClickEvent() {} + protected OSInAppMessageClickEvent(Handle h, long handle) { super(h, handle); } + protected OSInAppMessageClickEvent(SkipInit skipInit) { super(skipInit); } /**/ /**/ - @Property(selector = "to") - public native OSPermissionState getTo(); - @Property(selector = "from") - public native OSPermissionState getFrom(); + @Property(selector = "message") + public native OSInAppMessage getMessage(); + @Property(selector = "result") + public native OSInAppMessageClickResult getResult(); /**/ /**//**/ /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickListener.java similarity index 86% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionObserver.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickListener.java index 428504136..f778cdcc6 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionObserver.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickListener.java @@ -36,7 +36,7 @@ /**/ /**//**/ -/**/public/**/ interface /**/OSSMSSubscriptionObserver/**/ +/**/public/**/ interface /**/OSInAppMessageClickListener/**/ /**/extends NSObjectProtocol/**/ { /**/ @@ -48,8 +48,8 @@ /**/ /**/ - @Method(selector = "onOSSMSSubscriptionChanged:") - void onOSSMSSubscriptionChanged(OSSMSSubscriptionStateChanges stateChanges); + @Method(selector = "onClickInAppMessage:") + void onClickInAppMessage(OSInAppMessageClickEvent event); /**/ /**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionObserverAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickListenerAdapter.java similarity index 82% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionObserverAdapter.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickListenerAdapter.java index 3902264cc..c641e4600 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionObserverAdapter.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickListenerAdapter.java @@ -35,9 +35,9 @@ /**/ /**/ /**//**/ -/**/public/**/ class /**/OSEmailSubscriptionObserverAdapter/**/ +/**/public/**/ class /**/OSInAppMessageClickListenerAdapter/**/ extends /**/NSObject/**/ - /**/implements OSEmailSubscriptionObserver/**/ { + /**/implements OSInAppMessageClickListener/**/ { /**/ /**/ @@ -50,7 +50,7 @@ /**/ /**//**/ /**/ - @NotImplemented("onOSEmailSubscriptionChanged:") - public void onOSEmailSubscriptionChanged(OSEmailSubscriptionStateChanges stateChanges) {} + @NotImplemented("onClickInAppMessage:") + public void onClickInAppMessage(OSInAppMessageClickEvent event) {} /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSendTagsToServer.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickResult.java similarity index 52% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSendTagsToServer.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickResult.java index 867fbf78d..07a89ec34 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSendTagsToServer.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageClickResult.java @@ -36,26 +36,39 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestSendTagsToServer/**/ - extends /**/OneSignalRequest/**/ +/**/public/**/ class /**/OSInAppMessageClickResult/**/ + extends /**/NSObject/**/ /**//**/ { - /**/public static class OSRequestSendTagsToServerPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestSendTagsToServer.class); }/**/ + /**/public static class OSInAppMessageClickResultPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSInAppMessageClickResult.class); }/**/ /**//**/ /**/ - public OSRequestSendTagsToServer() {} - protected OSRequestSendTagsToServer(Handle h, long handle) { super(h, handle); } - protected OSRequestSendTagsToServer(SkipInit skipInit) { super(skipInit); } + public OSInAppMessageClickResult() {} + protected OSInAppMessageClickResult(Handle h, long handle) { super(h, handle); } + protected OSInAppMessageClickResult(SkipInit skipInit) { super(skipInit); } /**/ /**/ - + @Property(selector = "actionId") + public native String getActionId(); + @Property(selector = "setActionId:") + public native void setActionId(String v); + @Property(selector = "url") + public native String getUrl(); + @Property(selector = "setUrl:") + public native void setUrl(String v); + @Property(selector = "closingMessage") + public native boolean isClosingMessage(); + @Property(selector = "setClosingMessage:") + public native void setClosingMessage(boolean v); + @Property(selector = "urlTarget") + public native OSInAppMessageActionUrlType getUrlTarget(); + @Property(selector = "setUrlTarget:") + public native void setUrlTarget(OSInAppMessageActionUrlType v); /**/ /**//**/ /**/ - @Method(selector = "withUserId:appId:tags:networkType:withEmailAuthHashToken:withExternalIdAuthHashToken:") - public static native OSRequestSendTagsToServer createWithEmailAuthHashToken(String userId, String appId, NSDictionary tags, NSNumber netType, String emailAuthToken, String externalIdAuthToken); - @Method(selector = "withUserId:appId:tags:networkType:withSMSAuthHashToken:withExternalIdAuthHashToken:") - public static native OSRequestSendTagsToServer createWithSMSAuthHashToken(String userId, String appId, NSDictionary tags, NSNumber netType, String smsAuthToken, String externalIdAuthToken); + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDismissEvent.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDismissEvent.java new file mode 100644 index 000000000..56fa48c51 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDismissEvent.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSInAppMessageDidDismissEvent/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSInAppMessageDidDismissEventPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSInAppMessageDidDismissEvent.class); }/**/ + /**//**/ + /**/ + public OSInAppMessageDidDismissEvent() {} + protected OSInAppMessageDidDismissEvent(Handle h, long handle) { super(h, handle); } + protected OSInAppMessageDidDismissEvent(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "message") + public native OSInAppMessage getMessage(); + /**/ + /**//**/ + /**/ + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDisplayEvent.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDisplayEvent.java new file mode 100644 index 000000000..9b07f223b --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDidDisplayEvent.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSInAppMessageDidDisplayEvent/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSInAppMessageDidDisplayEventPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSInAppMessageDidDisplayEvent.class); }/**/ + /**//**/ + /**/ + public OSInAppMessageDidDisplayEvent() {} + protected OSInAppMessageDidDisplayEvent(Handle h, long handle) { super(h, handle); } + protected OSInAppMessageDidDisplayEvent(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "message") + public native OSInAppMessage getMessage(); + /**/ + /**//**/ + /**/ + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleHandler.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleListener.java similarity index 83% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleHandler.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleListener.java index 9dd7ebfda..148e1c379 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleHandler.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleListener.java @@ -36,7 +36,7 @@ /**/ /**//**/ -/**/public/**/ interface /**/OSInAppMessageLifecycleHandler/**/ +/**/public/**/ interface /**/OSInAppMessageLifecycleListener/**/ /**/extends NSObjectProtocol/**/ { /**/ @@ -49,13 +49,13 @@ /**/ /**/ @Method(selector = "onWillDisplayInAppMessage:") - void onWillDisplayInAppMessage(OSInAppMessage message); + void onWillDisplayInAppMessage(OSInAppMessageWillDisplayEvent event); @Method(selector = "onDidDisplayInAppMessage:") - void onDidDisplayInAppMessage(OSInAppMessage message); + void onDidDisplayInAppMessage(OSInAppMessageDidDisplayEvent event); @Method(selector = "onWillDismissInAppMessage:") - void onWillDismissInAppMessage(OSInAppMessage message); + void onWillDismissInAppMessage(OSInAppMessageWillDismissEvent event); @Method(selector = "onDidDismissInAppMessage:") - void onDidDismissInAppMessage(OSInAppMessage message); + void onDidDismissInAppMessage(OSInAppMessageDidDismissEvent event); /**/ /**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleHandlerAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleListenerAdapter.java similarity index 79% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleHandlerAdapter.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleListenerAdapter.java index 8a2b934ff..4f1d395a6 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleHandlerAdapter.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageLifecycleListenerAdapter.java @@ -35,9 +35,9 @@ /**/ /**/ /**//**/ -/**/public/**/ class /**/OSInAppMessageLifecycleHandlerAdapter/**/ +/**/public/**/ class /**/OSInAppMessageLifecycleListenerAdapter/**/ extends /**/NSObject/**/ - /**/implements OSInAppMessageLifecycleHandler/**/ { + /**/implements OSInAppMessageLifecycleListener/**/ { /**/ /**/ @@ -51,12 +51,12 @@ /**//**/ /**/ @NotImplemented("onWillDisplayInAppMessage:") - public void onWillDisplayInAppMessage(OSInAppMessage message) {} + public void onWillDisplayInAppMessage(OSInAppMessageWillDisplayEvent event) {} @NotImplemented("onDidDisplayInAppMessage:") - public void onDidDisplayInAppMessage(OSInAppMessage message) {} + public void onDidDisplayInAppMessage(OSInAppMessageDidDisplayEvent event) {} @NotImplemented("onWillDismissInAppMessage:") - public void onWillDismissInAppMessage(OSInAppMessage message) {} + public void onWillDismissInAppMessage(OSInAppMessageWillDismissEvent event) {} @NotImplemented("onDidDismissInAppMessage:") - public void onDidDismissInAppMessage(OSInAppMessage message) {} + public void onDidDismissInAppMessage(OSInAppMessageDidDismissEvent event) {} /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDismissEvent.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDismissEvent.java new file mode 100644 index 000000000..a06f46a9c --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDismissEvent.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSInAppMessageWillDismissEvent/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSInAppMessageWillDismissEventPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSInAppMessageWillDismissEvent.class); }/**/ + /**//**/ + /**/ + public OSInAppMessageWillDismissEvent() {} + protected OSInAppMessageWillDismissEvent(Handle h, long handle) { super(h, handle); } + protected OSInAppMessageWillDismissEvent(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "message") + public native OSInAppMessage getMessage(); + /**/ + /**//**/ + /**/ + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDisplayEvent.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDisplayEvent.java new file mode 100644 index 000000000..07e83ca5d --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageWillDisplayEvent.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSInAppMessageWillDisplayEvent/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSInAppMessageWillDisplayEventPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSInAppMessageWillDisplayEvent.class); }/**/ + /**//**/ + /**/ + public OSInAppMessageWillDisplayEvent() {} + protected OSInAppMessageWillDisplayEvent(Handle h, long handle) { super(h, handle); } + protected OSInAppMessageWillDisplayEvent(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "message") + public native OSInAppMessage getMessage(); + /**/ + /**//**/ + /**/ + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDelegate.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessages.java similarity index 91% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDelegate.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessages.java index 4c4b9340d..ecef76a80 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDelegate.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessages.java @@ -36,7 +36,7 @@ /**/ /**//**/ -/**/public/**/ interface /**/OSInAppMessageDelegate/**/ +/**/public/**/ interface /**/OSInAppMessages/**/ /**/extends NSObjectProtocol/**/ { /**/ @@ -48,8 +48,7 @@ /**/ /**/ - @Method(selector = "handleMessageAction:") - void handleMessageAction(OSInAppMessageAction action); + /**/ /**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDelegateAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessagesAdapter.java similarity index 87% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDelegateAdapter.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessagesAdapter.java index bf2a4db43..ed5a9f8e0 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessageDelegateAdapter.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSInAppMessagesAdapter.java @@ -35,9 +35,9 @@ /**/ /**/ /**//**/ -/**/public/**/ class /**/OSInAppMessageDelegateAdapter/**/ +/**/public/**/ class /**/OSInAppMessagesAdapter/**/ extends /**/NSObject/**/ - /**/implements OSInAppMessageDelegate/**/ { + /**/implements OSInAppMessages/**/ { /**/ /**/ @@ -50,7 +50,6 @@ /**/ /**//**/ /**/ - @NotImplemented("handleMessageAction:") - public void handleMessageAction(OSInAppMessageAction action) {} + /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLogoutEmail.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLastLocation.java similarity index 51% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLogoutEmail.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLastLocation.java index 2f5f21889..88a651698 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLogoutEmail.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLastLocation.java @@ -35,26 +35,31 @@ /**/ /**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestLogoutEmail/**/ - extends /**/OneSignalRequest/**/ +/**//**/ +/**/public/**/ class /**/OSLastLocation/**/ + extends /**/Struct/**/ /**//**/ { - /**/public static class OSRequestLogoutEmailPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestLogoutEmail.class); }/**/ + /**/public static class OSLastLocationPtr extends Ptr {}/**/ + /**/ + /**/ /**//**/ /**/ - public OSRequestLogoutEmail() {} - protected OSRequestLogoutEmail(Handle h, long handle) { super(h, handle); } - protected OSRequestLogoutEmail(SkipInit skipInit) { super(skipInit); } - public OSRequestLogoutEmail(String appId, String emailPlayerId, String devicePlayerId, String emailAuthHash) { super((Handle) null, create(appId, emailPlayerId, devicePlayerId, emailAuthHash)); retain(getHandle()); } + public OSLastLocation() {} + public OSLastLocation(OSLocationCoordinate cords, double verticalAccuracy, double horizontalAccuracy) { + this.setCords(cords); + this.setVerticalAccuracy(verticalAccuracy); + this.setHorizontalAccuracy(horizontalAccuracy); + } /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withAppId:emailPlayerId:devicePlayerId:emailAuthHash:") - protected static native @Pointer long create(String appId, String emailPlayerId, String devicePlayerId, String emailAuthHash); - /**/ + /**//**/ + /**/ + @StructMember(0) public native @ByVal OSLocationCoordinate getCords(); + @StructMember(0) public native OSLastLocation setCords(@ByVal OSLocationCoordinate cords); + @StructMember(1) public native double getVerticalAccuracy(); + @StructMember(1) public native OSLastLocation setVerticalAccuracy(double verticalAccuracy); + @StructMember(2) public native double getHorizontalAccuracy(); + @StructMember(2) public native OSLastLocation setHorizontalAccuracy(double horizontalAccuracy); + /**/ + /**//**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLiveActivities.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLiveActivities.java new file mode 100644 index 000000000..b2113e43e --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLiveActivities.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSLiveActivities/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionObserverAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLiveActivitiesAdapter.java similarity index 82% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionObserverAdapter.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLiveActivitiesAdapter.java index 525f81667..cb0630e2f 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionObserverAdapter.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLiveActivitiesAdapter.java @@ -35,9 +35,9 @@ /**/ /**/ /**//**/ -/**/public/**/ class /**/OSSMSSubscriptionObserverAdapter/**/ +/**/public/**/ class /**/OSLiveActivitiesAdapter/**/ extends /**/NSObject/**/ - /**/implements OSSMSSubscriptionObserver/**/ { + /**/implements OSLiveActivities/**/ { /**/ /**/ @@ -50,7 +50,6 @@ /**/ /**//**/ /**/ - @NotImplemented("onOSSMSSubscriptionChanged:") - public void onOSSMSSubscriptionChanged(OSSMSSubscriptionStateChanges stateChanges) {} + /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocation.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocation.java new file mode 100644 index 000000000..a9f21363e --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocation.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSLocation/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationAdapter.java new file mode 100644 index 000000000..5d82e1034 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationAdapter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSLocationAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSLocation/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationCoordinate.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationCoordinate.java new file mode 100644 index 000000000..5f193052b --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSLocationCoordinate.java @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ class /**/OSLocationCoordinate/**/ + extends /**/Struct/**/ + /**//**/ { + + /**/public static class OSLocationCoordinatePtr extends Ptr {}/**/ + /**/ + /**/ + /**//**/ + /**/ + public OSLocationCoordinate() {} + public OSLocationCoordinate(double latitude, double longitude) { + this.setLatitude(latitude); + this.setLongitude(longitude); + } + /**/ + /**//**/ + /**/ + @StructMember(0) public native double getLatitude(); + @StructMember(0) public native OSLocationCoordinate setLatitude(double latitude); + @StructMember(1) public native double getLongitude(); + @StructMember(1) public native OSLocationCoordinate setLongitude(double longitude); + /**/ + /**//**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalCore.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNetworkingUtils.java similarity index 67% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalCore.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNetworkingUtils.java index c553c152e..59bde091e 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalCore.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNetworkingUtils.java @@ -36,23 +36,26 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OneSignalCore/**/ +/**/public/**/ class /**/OSNetworkingUtils/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OneSignalCorePtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OneSignalCore.class); }/**/ + /**/public static class OSNetworkingUtilsPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSNetworkingUtils.class); }/**/ /**//**/ /**/ - public OneSignalCore() {} - protected OneSignalCore(Handle h, long handle) { super(h, handle); } - protected OneSignalCore(SkipInit skipInit) { super(skipInit); } + public OSNetworkingUtils() {} + protected OSNetworkingUtils(Handle h, long handle) { super(h, handle); } + protected OSNetworkingUtils(SkipInit skipInit) { super(skipInit); } /**/ /**/ /**/ /**//**/ /**/ - + @Method(selector = "getNetType") + public static native NSNumber getNetType(); + @Method(selector = "getResponseStatusType:") + public static native OSResponseStatusType getResponseStatusType(@MachineSizedSInt long statusCode); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotification.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotification.java index 52c4c8be1..6c4314fae 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotification.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotification.java @@ -100,11 +100,5 @@ public OSNotification() {} public native String stringify(); @Method(selector = "parseWithApns:") public static native OSNotification parse(NSDictionary message); - @Method(selector = "setCompletionBlock:") - public native void setCompletionBlock(@Block VoidBlock1 completion); - @Method(selector = "startTimeoutTimer") - public native void startTimeoutTimer(); - @Method(selector = "complete:") - public native void complete(OSNotification notification); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationOpenedResult.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickEvent.java similarity index 76% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationOpenedResult.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickEvent.java index bcec06f4b..e75bc8bc1 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationOpenedResult.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickEvent.java @@ -36,23 +36,23 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSNotificationOpenedResult/**/ +/**/public/**/ class /**/OSNotificationClickEvent/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSNotificationOpenedResultPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSNotificationOpenedResult.class); }/**/ + /**/public static class OSNotificationClickEventPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSNotificationClickEvent.class); }/**/ /**//**/ /**/ - public OSNotificationOpenedResult() {} - protected OSNotificationOpenedResult(Handle h, long handle) { super(h, handle); } - protected OSNotificationOpenedResult(SkipInit skipInit) { super(skipInit); } + public OSNotificationClickEvent() {} + protected OSNotificationClickEvent(Handle h, long handle) { super(h, handle); } + protected OSNotificationClickEvent(SkipInit skipInit) { super(skipInit); } /**/ /**/ @Property(selector = "notification") public native OSNotification getNotification(); - @Property(selector = "action") - public native OSNotificationAction getAction(); + @Property(selector = "result") + public native OSNotificationClickResult getResult(); /**/ /**//**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListener.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListener.java new file mode 100644 index 000000000..d894ebdd3 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListener.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSNotificationClickListener/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + @Method(selector = "onClickNotification:") + void onClickNotification(OSNotificationClickEvent event); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListenerAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListenerAdapter.java new file mode 100644 index 000000000..4befb7cfc --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickListenerAdapter.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSNotificationClickListenerAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSNotificationClickListener/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + @NotImplemented("onClickNotification:") + public void onClickNotification(OSNotificationClickEvent event) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationAction.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickResult.java similarity index 75% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationAction.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickResult.java index 0f9a66e7f..b050c1bf8 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationAction.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationClickResult.java @@ -36,23 +36,23 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSNotificationAction/**/ +/**/public/**/ class /**/OSNotificationClickResult/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSNotificationActionPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSNotificationAction.class); }/**/ + /**/public static class OSNotificationClickResultPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSNotificationClickResult.class); }/**/ /**//**/ /**/ - public OSNotificationAction() {} - protected OSNotificationAction(Handle h, long handle) { super(h, handle); } - protected OSNotificationAction(SkipInit skipInit) { super(skipInit); } + public OSNotificationClickResult() {} + protected OSNotificationClickResult(Handle h, long handle) { super(h, handle); } + protected OSNotificationClickResult(SkipInit skipInit) { super(skipInit); } /**/ /**/ - @Property(selector = "type") - public native OSNotificationActionType getType(); @Property(selector = "actionId") public native String getActionId(); + @Property(selector = "url") + public native String getUrl(); /**/ /**//**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListener.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListener.java new file mode 100644 index 000000000..5e92beab0 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListener.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSNotificationLifecycleListener/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + @Method(selector = "onWillDisplayNotification:") + void onWillDisplayNotification(OSNotificationWillDisplayEvent event); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListenerAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListenerAdapter.java new file mode 100644 index 000000000..2f09b17fa --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationLifecycleListenerAdapter.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSNotificationLifecycleListenerAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSNotificationLifecycleListener/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + @NotImplemented("onWillDisplayNotification:") + public void onWillDisplayNotification(OSNotificationWillDisplayEvent event) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserver.java new file mode 100644 index 000000000..75af6eb9d --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserver.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSNotificationPermissionObserver/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + @Method(selector = "onNotificationPermissionDidChange:") + void onNotificationPermissionDidChange(boolean permission); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserverAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserverAdapter.java new file mode 100644 index 000000000..63ffee025 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationPermissionObserverAdapter.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSNotificationPermissionObserverAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSNotificationPermissionObserver/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + @NotImplemented("onNotificationPermissionDidChange:") + public void onNotificationPermissionDidChange(boolean permission) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationWillDisplayEvent.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationWillDisplayEvent.java new file mode 100644 index 000000000..3ae51b26c --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationWillDisplayEvent.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSNotificationWillDisplayEvent/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSNotificationWillDisplayEventPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSNotificationWillDisplayEvent.class); }/**/ + /**//**/ + /**/ + public OSNotificationWillDisplayEvent() {} + protected OSNotificationWillDisplayEvent(Handle h, long handle) { super(h, handle); } + protected OSNotificationWillDisplayEvent(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "notification") + public native OSDisplayableNotification getNotification(); + /**/ + /**//**/ + /**/ + @Method(selector = "preventDefault") + public native void preventDefault(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotifications.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotifications.java new file mode 100644 index 000000000..b40817bbd --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotifications.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSNotifications/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsAdapter.java new file mode 100644 index 000000000..922d26148 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsAdapter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSNotificationsAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSNotifications/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsManager.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsManager.java new file mode 100644 index 000000000..16f03323c --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSNotificationsManager.java @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSNotificationsManager/**/ + extends /**/NSObject/**/ + /**/implements OSNotifications/**/ { + + /**/public static class OSNotificationsManagerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSNotificationsManager.class); }/**/ + /**//**/ + /**/ + public OSNotificationsManager() {} + protected OSNotificationsManager(Handle h, long handle) { super(h, handle); } + protected OSNotificationsManager(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "delegate") + public static native OneSignalNotificationsDelegate getDelegate(); + @Property(selector = "setDelegate:", strongRef = true) + public static native void setDelegate(OneSignalNotificationsDelegate v); + @Property(selector = "currentPermissionState") + public static native OSPermissionStateInternal getCurrentPermissionState(); + @Property(selector = "lastPermissionState") + public static native OSPermissionStateInternal getLastPermissionState(); + @Property(selector = "setLastPermissionState:") + public static native void setLastPermissionState(OSPermissionStateInternal v); + @Property(selector = "permissionStateChangesObserver") + public static native OSBoolObservable getPermissionStateChangesObserver(); + @Property(selector = "osNotificationSettings") + public static native OneSignalNotificationSettings getOsNotificationSettings(); + /**/ + /**//**/ + /**/ + @Method(selector = "Notifications") + public static native Class Notifications(); + @Method(selector = "start") + public static native void start(); + @Method(selector = "setColdStartFromTapOnNotification:") + public static native void setColdStartFromTapOnNotification(boolean coldStartFromTapOnNotification); + @Method(selector = "getColdStartFromTapOnNotification") + public static native boolean getColdStartFromTapOnNotification(); + @Method(selector = "clearStatics") + public static native void clearStatics(); + @Method(selector = "providesAppNotificationSettings") + public static native boolean providesAppNotificationSettings(); + @Method(selector = "setProvidesNotificationSettingsView:") + public static native void setProvidesNotificationSettingsView(boolean providesView); + @Method(selector = "registerForAPNsToken") + public static native boolean registerForAPNsToken(); + @Method(selector = "sendPushTokenToDelegate") + public static native void sendPushTokenToDelegate(); + @Method(selector = "getNotificationTypes:") + public static native int getNotificationTypes(boolean pushDisabled); + @Method(selector = "updateNotificationTypes:") + public static native void updateNotificationTypes(int notificationTypes); + @Method(selector = "sendNotificationTypesUpdateToDelegate") + public static native void sendNotificationTypesUpdateToDelegate(); + @Method(selector = "setPushSubscriptionId:") + public static native void setPushSubscriptionId(String pushSubscriptionId); + @Method(selector = "handleWillShowInForegroundForNotification:completion:") + public static native void handleWillShowInForegroundForNotification(OSNotification notification, @Block VoidBlock1 completion); + @Method(selector = "handleNotificationActionWithUrl:actionID:") + public static native void handleNotificationAction(String url, String actionID); + @Method(selector = "clearBadgeCount:") + public static native boolean clearBadgeCount(boolean fromNotifOpened); + @Method(selector = "receiveRemoteNotification:UserInfo:completionHandler:") + public static native boolean receiveRemoteNotification(UIApplication application, NSDictionary userInfo, @Block VoidBlock1 completionHandler); + @Method(selector = "notificationReceived:wasOpened:") + public static native void notificationReceived(NSDictionary messageDict, boolean opened); + @Method(selector = "handleWillPresentNotificationInForegroundWithPayload:withCompletion:") + public static native void handleWillPresentNotificationInForeground(NSDictionary payload, @Block VoidBlock1 completion); + @Method(selector = "didRegisterForRemoteNotifications:deviceToken:") + public static native void didRegisterForRemoteNotifications(UIApplication app, NSData inDeviceToken); + @Method(selector = "handleDidFailRegisterForRemoteNotification:") + public static native void handleDidFailRegisterForRemoteNotification(NSError err); + @Method(selector = "checkProvisionalAuthorizationStatus") + public static native void checkProvisionalAuthorizationStatus(); + @Method(selector = "permission") + public static native boolean permission(); + @Method(selector = "canRequestPermission") + public static native boolean canRequestPermission(); + @Method(selector = "permissionNative") + public static native OSNotificationPermission permissionNative(); + @Method(selector = "addForegroundLifecycleListener:") + public static native void addForegroundLifecycleListener(OSNotificationLifecycleListener listener); + @Method(selector = "removeForegroundLifecycleListener:") + public static native void removeForegroundLifecycleListener(OSNotificationLifecycleListener listener); + @Method(selector = "addClickListener:") + public static native void addClickListener(OSNotificationClickListener listener); + @Method(selector = "removeClickListener:") + public static native void removeClickListener(OSNotificationClickListener listener); + @Method(selector = "requestPermission:") + public static native void requestPermission(@Block VoidBooleanBlock block); + @Method(selector = "requestPermission:fallbackToSettings:") + public static native void requestPermission(@Block VoidBooleanBlock block, boolean fallback); + @Method(selector = "registerForProvisionalAuthorization:") + public static native void registerForProvisionalAuthorization(@Block VoidBooleanBlock block); + @Method(selector = "addPermissionObserver:") + public static native void addPermissionObserver(OSNotificationPermissionObserver observer); + @Method(selector = "removePermissionObserver:") + public static native void removePermissionObserver(OSNotificationPermissionObserver observer); + @Method(selector = "clearAll") + public static native void clearAll(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObservable.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObservable.java new file mode 100644 index 000000000..ae8ed0ef5 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObservable.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSObservable/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSObservablePtr extends Ptr, OSObservablePtr> {}/**/ + /**/static { ObjCRuntime.bind(OSObservable.class); }/**/ + /**//**/ + /**/ + public OSObservable() {} + protected OSObservable(Handle h, long handle) { super(h, handle); } + protected OSObservable(SkipInit skipInit) { super(skipInit); } + @Method(selector = "initWithChangeSelector:") + public OSObservable(Selector selector) { super((SkipInit) null); initObject(init(selector)); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "initWithChangeSelector:") + protected native @Pointer long init(Selector selector); + @Method(selector = "addObserver:") + public native void addObserver(ObserverType observer); + @Method(selector = "removeObserver:") + public native void removeObserver(ObserverType observer); + @Method(selector = "notifyChange:") + public native boolean notifyChange(T state); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserver.java new file mode 100644 index 000000000..e746d7642 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserver.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSObserver/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + @Method(selector = "onChanged:") + void onChanged(NSObject state); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserverAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserverAdapter.java new file mode 100644 index 000000000..5248b61fd --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSObserverAdapter.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSObserverAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSObserver/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + @NotImplemented("onChanged:") + public void onChanged(NSObject state) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSOutcomes.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSOutcomes.java new file mode 100644 index 000000000..e767a439c --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSOutcomes.java @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSOutcomes/**/ + extends /**/NSObject/**/ + /**/implements OSSession/**/ { + + /**/public static class OSOutcomesPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSOutcomes.class); }/**/ + /**//**/ + /**/ + public OSOutcomes() {} + protected OSOutcomes(Handle h, long handle) { super(h, handle); } + protected OSOutcomes(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "Session") + public static native Class Session(); + @Method(selector = "sharedController") + public static native OneSignalOutcomeEventsController sharedController(); + @Method(selector = "start") + public static native void start(); + @Method(selector = "clearStatics") + public static native void clearStatics(); + @Method(selector = "migrate") + public static native void migrate(); + @Method(selector = "addOutcome:") + public static native void addOutcome(String name); + @Method(selector = "addUniqueOutcome:") + public static native void addUniqueOutcome(String name); + @Method(selector = "addOutcomeWithValue:value:") + public static native void addOutcome(String name, NSNumber value); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionChangedInternalObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionChangedInternalObserver.java new file mode 100644 index 000000000..59896c0c5 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionChangedInternalObserver.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSPermissionChangedInternalObserver/**/ + extends /**/NSObject/**/ + /**/implements OSPermissionStateObserver/**/ { + + /**/public static class OSPermissionChangedInternalObserverPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSPermissionChangedInternalObserver.class); }/**/ + /**//**/ + /**/ + public OSPermissionChangedInternalObserver() {} + protected OSPermissionChangedInternalObserver(Handle h, long handle) { super(h, handle); } + protected OSPermissionChangedInternalObserver(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "fireChangesObserver:") + public static native void fireChangesObserver(OSPermissionStateInternal state); + @Method(selector = "onChanged:") + public native void onChanged(OSPermissionState state); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionState.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionState.java index 03d5423c7..5ee88f432 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionState.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionState.java @@ -47,20 +47,18 @@ public OSPermissionState() {} protected OSPermissionState(Handle h, long handle) { super(h, handle); } protected OSPermissionState(SkipInit skipInit) { super(skipInit); } + @Method(selector = "initWithPermission:") + public OSPermissionState(boolean permission) { super((SkipInit) null); initObject(init(permission)); } /**/ /**/ - @Property(selector = "reachable") - public native boolean isReachable(); - @Property(selector = "hasPrompted") - public native boolean hasPrompted(); - @Property(selector = "providesAppNotificationSettings") - public native boolean providesAppNotificationSettings(); - @Property(selector = "status") - public native OSNotificationPermission getStatus(); + @Property(selector = "permission") + public native boolean isPermission(); /**/ /**//**/ /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); + @Method(selector = "initWithPermission:") + protected native @Pointer long init(boolean permission); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateInternal.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateInternal.java new file mode 100644 index 000000000..30f5746de --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateInternal.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSPermissionStateInternal/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OSPermissionStateInternalPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSPermissionStateInternal.class); }/**/ + /**//**/ + /**/ + public OSPermissionStateInternal() {} + protected OSPermissionStateInternal(Handle h, long handle) { super(h, handle); } + protected OSPermissionStateInternal(SkipInit skipInit) { super(skipInit); } + @Method(selector = "initAsTo") + public static OSPermissionStateInternal asTo() { + OSPermissionStateInternal res = new OSPermissionStateInternal((SkipInit) null); + res.initObject(res.initAsTo()); + return res; + } + @Method(selector = "initAsFrom") + public static OSPermissionStateInternal asFrom() { + OSPermissionStateInternal res = new OSPermissionStateInternal((SkipInit) null); + res.initObject(res.initAsFrom()); + return res; + } + /**/ + /**/ + @Property(selector = "hasPrompted") + public native boolean hasPrompted(); + @Property(selector = "setHasPrompted:") + public native void setHasPrompted(boolean v); + @Property(selector = "providesAppNotificationSettings") + public native boolean providesAppNotificationSettings(); + @Property(selector = "setProvidesAppNotificationSettings:") + public native void setProvidesAppNotificationSettings(boolean v); + @Property(selector = "answeredPrompt") + public native boolean isAnsweredPrompt(); + @Property(selector = "setAnsweredPrompt:") + public native void setAnsweredPrompt(boolean v); + @Property(selector = "accepted") + public native boolean isAccepted(); + @Property(selector = "setAccepted:") + public native void setAccepted(boolean v); + @Property(selector = "provisional") + public native boolean isProvisional(); + @Property(selector = "setProvisional:") + public native void setProvisional(boolean v); + @Property(selector = "ephemeral") + public native boolean isEphemeral(); + @Property(selector = "setEphemeral:") + public native void setEphemeral(boolean v); + @Property(selector = "reachable") + public native boolean isReachable(); + @Property(selector = "setReachable:") + public native void setReachable(boolean v); + @Property(selector = "status") + public native OSNotificationPermission getStatus(); + @Property(selector = "notificationTypes") + public native int getNotificationTypes(); + @Property(selector = "setNotificationTypes:") + public native void setNotificationTypes(int v); + @Property(selector = "observable") + public native OSObservable getObservable(); + @Property(selector = "setObservable:") + public native void setObservable(OSObservable v); + /**/ + /**//**/ + /**/ + @Method(selector = "persistAsFrom") + public native void persistAsFrom(); + @Method(selector = "initAsTo") + protected native @Pointer long initAsTo(); + @Method(selector = "initAsFrom") + protected native @Pointer long initAsFrom(); + @Method(selector = "getExternalState") + public native OSPermissionState getExternalState(); + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateObserver.java similarity index 91% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionObserver.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateObserver.java index 26052cc2e..5e6d44747 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionObserver.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateObserver.java @@ -36,7 +36,7 @@ /**/ /**//**/ -/**/public/**/ interface /**/OSPermissionObserver/**/ +/**/public/**/ interface /**/OSPermissionStateObserver/**/ /**/extends NSObjectProtocol/**/ { /**/ @@ -48,8 +48,8 @@ /**/ /**/ - @Method(selector = "onOSPermissionChanged:") - void onOSPermissionChanged(OSPermissionStateChanges stateChanges); + @Method(selector = "onChanged:") + void onChanged(OSPermissionState state); /**/ /**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionObserverAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateObserverAdapter.java similarity index 87% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionObserverAdapter.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateObserverAdapter.java index 55613bd63..19e54f003 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionObserverAdapter.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPermissionStateObserverAdapter.java @@ -35,9 +35,9 @@ /**/ /**/ /**//**/ -/**/public/**/ class /**/OSPermissionObserverAdapter/**/ +/**/public/**/ class /**/OSPermissionStateObserverAdapter/**/ extends /**/NSObject/**/ - /**/implements OSPermissionObserver/**/ { + /**/implements OSPermissionStateObserver/**/ { /**/ /**/ @@ -50,7 +50,7 @@ /**/ /**//**/ /**/ - @NotImplemented("onOSPermissionChanged:") - public void onOSPermissionChanged(OSPermissionStateChanges stateChanges) {} + @NotImplemented("onChanged:") + public void onChanged(OSPermissionState state) {} /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPrivacyConsentController.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPrivacyConsentController.java index fac9c68f7..b9225c69c 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPrivacyConsentController.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPrivacyConsentController.java @@ -57,7 +57,11 @@ public OSPrivacyConsentController() {} public static native boolean requiresUserPrivacyConsent(); @Method(selector = "consentGranted:") public static native void consentGranted(boolean granted); + @Method(selector = "getPrivacyConsent") + public static native boolean getPrivacyConsent(); @Method(selector = "shouldLogMissingPrivacyConsentErrorWithMethodName:") public static native boolean shouldLogMissingPrivacyConsentError(String methodName); + @Method(selector = "setRequiresPrivacyConsent:") + public static native void setRequiresPrivacyConsent(boolean required); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscription.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscription.java new file mode 100644 index 000000000..acbd8226a --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscription.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSPushSubscription/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + @Property(selector = "id") + String getId(); + @Property(selector = "token") + String getToken(); + @Property(selector = "optedIn") + boolean isOptedIn(); + /**/ + /**/ + @Method(selector = "optIn") + void optIn(); + @Method(selector = "optOut") + void optOut(); + @Method(selector = "addObserver:") + void addObserver(OSPushSubscriptionObserver observer); + @Method(selector = "removeObserver:") + void removeObserver(OSPushSubscriptionObserver observer); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionAdapter.java new file mode 100644 index 000000000..14a7883e3 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionAdapter.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSPushSubscriptionAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSPushSubscription/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + @NotImplemented("id") + public String getId() { return null; } + @NotImplemented("token") + public String getToken() { return null; } + @NotImplemented("optedIn") + public boolean isOptedIn() { return false; } + /**/ + /**//**/ + /**/ + @NotImplemented("optIn") + public void optIn() {} + @NotImplemented("optOut") + public void optOut() {} + @NotImplemented("addObserver:") + public void addObserver(OSPushSubscriptionObserver observer) {} + @NotImplemented("removeObserver:") + public void removeObserver(OSPushSubscriptionObserver observer) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionStateChanges.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionChangedState.java similarity index 56% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionStateChanges.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionChangedState.java index e041c222f..9b78816f4 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionStateChanges.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionChangedState.java @@ -35,28 +35,30 @@ /**/ /**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSEmailSubscriptionStateChanges/**/ +/**/@Library(Library.INTERNAL) @NativeClass("_TtC13OneSignalUser30OSPushSubscriptionChangedState")/**/ +/**/public/**/ class /**/OSPushSubscriptionChangedState/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSEmailSubscriptionStateChangesPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSEmailSubscriptionStateChanges.class); }/**/ + /**/public static class OSPushSubscriptionChangedStatePtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSPushSubscriptionChangedState.class); }/**/ /**//**/ /**/ - public OSEmailSubscriptionStateChanges() {} - protected OSEmailSubscriptionStateChanges(Handle h, long handle) { super(h, handle); } - protected OSEmailSubscriptionStateChanges(SkipInit skipInit) { super(skipInit); } + protected OSPushSubscriptionChangedState() {} + protected OSPushSubscriptionChangedState(Handle h, long handle) { super(h, handle); } + protected OSPushSubscriptionChangedState(SkipInit skipInit) { super(skipInit); } /**/ /**/ - @Property(selector = "to") - public native OSEmailSubscriptionState getTo(); - @Property(selector = "from") - public native OSEmailSubscriptionState getFrom(); + @Property(selector = "current") + public native OSPushSubscriptionState getCurrent(); + @Property(selector = "previous") + public native OSPushSubscriptionState getPrevious(); + @Property(selector = "description") + public native String getDescription(); /**/ /**//**/ /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserver.java new file mode 100644 index 000000000..5e7c22da2 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserver.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSPushSubscriptionObserver/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + @Method(selector = "onPushSubscriptionDidChangeWithState:") + void onPushSubscriptionDidChange(OSPushSubscriptionChangedState state); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserverAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserverAdapter.java new file mode 100644 index 000000000..ea741718f --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionObserverAdapter.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSPushSubscriptionObserverAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSPushSubscriptionObserver/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + @NotImplemented("onPushSubscriptionDidChangeWithState:") + public void onPushSubscriptionDidChange(OSPushSubscriptionChangedState state) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionState.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionState.java similarity index 57% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionState.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionState.java index 7d2d7adde..98c34a7cb 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionState.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSPushSubscriptionState.java @@ -35,30 +35,32 @@ /**/ /**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSEmailSubscriptionState/**/ +/**/@Library(Library.INTERNAL) @NativeClass("_TtC13OneSignalUser23OSPushSubscriptionState")/**/ +/**/public/**/ class /**/OSPushSubscriptionState/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSEmailSubscriptionStatePtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSEmailSubscriptionState.class); }/**/ + /**/public static class OSPushSubscriptionStatePtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSPushSubscriptionState.class); }/**/ /**//**/ /**/ - public OSEmailSubscriptionState() {} - protected OSEmailSubscriptionState(Handle h, long handle) { super(h, handle); } - protected OSEmailSubscriptionState(SkipInit skipInit) { super(skipInit); } + protected OSPushSubscriptionState() {} + protected OSPushSubscriptionState(Handle h, long handle) { super(h, handle); } + protected OSPushSubscriptionState(SkipInit skipInit) { super(skipInit); } /**/ /**/ - @Property(selector = "emailUserId") - public native String getEmailUserId(); - @Property(selector = "emailAddress") - public native String getEmailAddress(); - @Property(selector = "isSubscribed") - public native boolean isSubscribed(); + @Property(selector = "id") + public native String getId(); + @Property(selector = "token") + public native String getToken(); + @Property(selector = "optedIn") + public native boolean isOptedIn(); + @Property(selector = "description") + public native String getDescription(); /**/ /**//**/ /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); + @Method(selector = "jsonRepresentation") + public native NSDictionary jsonRepresentation(); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateLanguage.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRemoteParamController.java similarity index 51% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateLanguage.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRemoteParamController.java index 8d9efc465..658b3bc53 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateLanguage.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRemoteParamController.java @@ -36,26 +36,39 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestUpdateLanguage/**/ - extends /**/OneSignalRequest/**/ +/**/public/**/ class /**/OSRemoteParamController/**/ + extends /**/NSObject/**/ /**//**/ { - /**/public static class OSRequestUpdateLanguagePtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestUpdateLanguage.class); }/**/ + /**/public static class OSRemoteParamControllerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSRemoteParamController.class); }/**/ /**//**/ /**/ - public OSRequestUpdateLanguage() {} - protected OSRequestUpdateLanguage(Handle h, long handle) { super(h, handle); } - protected OSRequestUpdateLanguage(SkipInit skipInit) { super(skipInit); } + public OSRemoteParamController() {} + protected OSRemoteParamController(Handle h, long handle) { super(h, handle); } + protected OSRemoteParamController(SkipInit skipInit) { super(skipInit); } /**/ /**/ - + @Property(selector = "remoteParams") + public native NSDictionary getRemoteParams(); /**/ /**//**/ /**/ - @Method(selector = "withUserId:appId:language:emailAuthToken:externalIdAuthToken:") - public static native OSRequestUpdateLanguage createWithEmailAuthToken(String userId, String appId, String language, String emailAuthHash, String externalIdAuthToken); - @Method(selector = "withUserId:appId:language:smsAuthToken:externalIdAuthToken:") - public static native OSRequestUpdateLanguage createWithSMSAuthToken(String userId, String appId, String language, String smsAuthToken, String externalIdAuthToken); + @Method(selector = "saveRemoteParams:") + public native void saveRemoteParams(NSDictionary params); + @Method(selector = "hasLocationKey") + public native boolean hasLocationKey(); + @Method(selector = "hasPrivacyConsentKey") + public native boolean hasPrivacyConsentKey(); + @Method(selector = "isLocationShared") + public native boolean isLocationShared(); + @Method(selector = "saveLocationShared:") + public native void saveLocationShared(boolean shared); + @Method(selector = "isPrivacyConsentRequired") + public native boolean isPrivacyConsentRequired(); + @Method(selector = "savePrivacyConsentRequired:") + public native void savePrivacyConsentRequired(boolean shared); + @Method(selector = "sharedController") + public static native OSRemoteParamController sharedController(); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestBadgeCount.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestBadgeCount.java deleted file mode 100644 index 7483f64af..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestBadgeCount.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestBadgeCount/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestBadgeCountPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestBadgeCount.class); }/**/ - /**//**/ - /**/ - public OSRequestBadgeCount() {} - protected OSRequestBadgeCount(Handle h, long handle) { super(h, handle); } - protected OSRequestBadgeCount(SkipInit skipInit) { super(skipInit); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withUserId:appId:badgeCount:emailAuthToken:externalIdAuthToken:") - public static native OSRequestBadgeCount createWithEmailAuth(String userId, String appId, NSNumber badgeCount, String emailAuthHash, String externalIdAuthToken); - @Method(selector = "withUserId:appId:badgeCount:smsAuthToken:externalIdAuthToken:") - public static native OSRequestBadgeCount createWithSmsAuth(String userId, String appId, NSNumber badgeCount, String smsAuthToken, String externalIdAuthToken); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityEnter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityEnter.java index 7b5ea7b17..d9588f39a 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityEnter.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityEnter.java @@ -47,14 +47,14 @@ public OSRequestLiveActivityEnter() {} protected OSRequestLiveActivityEnter(Handle h, long handle) { super(h, handle); } protected OSRequestLiveActivityEnter(SkipInit skipInit) { super(skipInit); } - public OSRequestLiveActivityEnter(String userId, String appId, String activityId, String token) { super((Handle) null, create(userId, appId, activityId, token)); retain(getHandle()); } + public OSRequestLiveActivityEnter(String subscriptionId, String appId, String activityId, String token) { super((Handle) null, create(subscriptionId, appId, activityId, token)); retain(getHandle()); } /**/ /**/ /**/ /**//**/ /**/ - @Method(selector = "withUserId:appId:activityId:token:") - protected static native @Pointer long create(String userId, String appId, String activityId, String token); + @Method(selector = "withSubscriptionId:appId:activityId:token:") + protected static native @Pointer long create(String subscriptionId, String appId, String activityId, String token); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityExit.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityExit.java index 5aa3f189c..7e203e1eb 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityExit.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLiveActivityExit.java @@ -47,14 +47,14 @@ public OSRequestLiveActivityExit() {} protected OSRequestLiveActivityExit(Handle h, long handle) { super(h, handle); } protected OSRequestLiveActivityExit(SkipInit skipInit) { super(skipInit); } - public OSRequestLiveActivityExit(String userId, String appId, String activityId) { super((Handle) null, create(userId, appId, activityId)); retain(getHandle()); } + public OSRequestLiveActivityExit(String subscriptionId, String appId, String activityId) { super((Handle) null, create(subscriptionId, appId, activityId)); retain(getHandle()); } /**/ /**/ /**/ /**//**/ /**/ - @Method(selector = "withUserId:appId:activityId:") - protected static native @Pointer long create(String userId, String appId, String activityId); + @Method(selector = "withSubscriptionId:appId:activityId:") + protected static native @Pointer long create(String subscriptionId, String appId, String activityId); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLogoutSMS.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLogoutSMS.java deleted file mode 100644 index ee63a8aa5..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestLogoutSMS.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestLogoutSMS/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestLogoutSMSPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestLogoutSMS.class); }/**/ - /**//**/ - /**/ - public OSRequestLogoutSMS() {} - protected OSRequestLogoutSMS(Handle h, long handle) { super(h, handle); } - protected OSRequestLogoutSMS(SkipInit skipInit) { super(skipInit); } - public OSRequestLogoutSMS(String appId, String smsPlayerId, String smsAuthHash, String devicePlayerId) { super((Handle) null, create(appId, smsPlayerId, smsAuthHash, devicePlayerId)); retain(getHandle()); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withAppId:smsPlayerId:smsAuthHash:devicePlayerId:") - protected static native @Pointer long create(String appId, String smsPlayerId, String smsAuthHash, String devicePlayerId); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestRegisterUser.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestRegisterUser.java deleted file mode 100644 index 627f55fbc..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestRegisterUser.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestRegisterUser/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestRegisterUserPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestRegisterUser.class); }/**/ - /**//**/ - /**/ - public OSRequestRegisterUser() {} - protected OSRequestRegisterUser(Handle h, long handle) { super(h, handle); } - protected OSRequestRegisterUser(SkipInit skipInit) { super(skipInit); } - public OSRequestRegisterUser(NSDictionary registrationData, String userId) { super((Handle) null, create(registrationData, userId)); retain(getHandle()); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withData:userId:") - protected static native @Pointer long create(NSDictionary registrationData, String userId); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSendPurchases.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSendPurchases.java deleted file mode 100644 index 75cdaa692..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSendPurchases.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestSendPurchases/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestSendPurchasesPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestSendPurchases.class); }/**/ - /**//**/ - /**/ - public OSRequestSendPurchases() {} - protected OSRequestSendPurchases(Handle h, long handle) { super(h, handle); } - protected OSRequestSendPurchases(SkipInit skipInit) { super(skipInit); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withUserId:externalIdAuthToken:appId:withPurchases:") - public static native OSRequestSendPurchases createWithExternalIdAuthToken(String userId, String externalIdAuthToken, String appId, NSArray purchases); - @Method(selector = "withUserId:emailAuthToken:appId:withPurchases:") - public static native OSRequestSendPurchases createWithEmailAuthToken(String userId, String emailAuthToken, String appId, NSArray purchases); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSyncHashedEmail.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSyncHashedEmail.java deleted file mode 100644 index faf4e12dc..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestSyncHashedEmail.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestSyncHashedEmail/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestSyncHashedEmailPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestSyncHashedEmail.class); }/**/ - /**//**/ - /**/ - public OSRequestSyncHashedEmail() {} - protected OSRequestSyncHashedEmail(Handle h, long handle) { super(h, handle); } - protected OSRequestSyncHashedEmail(SkipInit skipInit) { super(skipInit); } - public OSRequestSyncHashedEmail(String userId, String appId, String email, NSNumber netType) { super((Handle) null, create(userId, appId, email, netType)); retain(getHandle()); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withUserId:appId:email:networkType:") - protected static native @Pointer long create(String userId, String appId, String email, NSNumber netType); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateDeviceToken.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateDeviceToken.java deleted file mode 100644 index 70a9e1d95..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateDeviceToken.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestUpdateDeviceToken/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestUpdateDeviceTokenPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestUpdateDeviceToken.class); }/**/ - /**//**/ - /**/ - public OSRequestUpdateDeviceToken() {} - protected OSRequestUpdateDeviceToken(Handle h, long handle) { super(h, handle); } - protected OSRequestUpdateDeviceToken(SkipInit skipInit) { super(skipInit); } - public OSRequestUpdateDeviceToken(String userId, String appId, String identifier, NSNumber notificationTypes, String externalIdAuthToken) { super((Handle) null, create(userId, appId, identifier, notificationTypes, externalIdAuthToken)); retain(getHandle()); } - public OSRequestUpdateDeviceToken(String userId, String appId, String identifier, String parentId, String emailAuthHash, String email, String externalIdAuthToken) { super((Handle) null, create(userId, appId, identifier, parentId, emailAuthHash, email, externalIdAuthToken)); retain(getHandle()); } - public OSRequestUpdateDeviceToken(String userId, String appId, String identifier, String smsAuthToken, String externalIdAuthToken) { super((Handle) null, create(userId, appId, identifier, smsAuthToken, externalIdAuthToken)); retain(getHandle()); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withUserId:appId:deviceToken:notificationTypes:externalIdAuthToken:") - protected static native @Pointer long create(String userId, String appId, String identifier, NSNumber notificationTypes, String externalIdAuthToken); - @Method(selector = "withUserId:appId:deviceToken:withParentId:emailAuthToken:email:externalIdAuthToken:") - protected static native @Pointer long create(String userId, String appId, String identifier, String parentId, String emailAuthHash, String email, String externalIdAuthToken); - @Method(selector = "withUserId:appId:deviceToken:smsAuthToken:externalIdAuthToken:") - protected static native @Pointer long create(String userId, String appId, String identifier, String smsAuthToken, String externalIdAuthToken); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateExternalUserId.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateExternalUserId.java deleted file mode 100644 index 66cdc809c..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateExternalUserId.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestUpdateExternalUserId/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestUpdateExternalUserIdPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestUpdateExternalUserId.class); }/**/ - /**//**/ - /**/ - public OSRequestUpdateExternalUserId() {} - protected OSRequestUpdateExternalUserId(Handle h, long handle) { super(h, handle); } - protected OSRequestUpdateExternalUserId(SkipInit skipInit) { super(skipInit); } - public OSRequestUpdateExternalUserId(String externalId, String hashToken, String userId, String appId) { super((Handle) null, create(externalId, hashToken, userId, appId)); retain(getHandle()); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withUserId:withUserIdHashToken:withOneSignalUserId:appId:") - protected static native @Pointer long create(String externalId, String hashToken, String userId, String appId); - @Method(selector = "withUserId:withUserIdHashToken:withOneSignalUserId:withEmailHashToken:appId:") - public static native OSRequestUpdateExternalUserId createWithEmailHashToken(String externalId, String hashToken, String userId, String emailHashToken, String appId); - @Method(selector = "withUserId:withUserIdHashToken:withOneSignalUserId:withSMSHashToken:appId:") - public static native OSRequestUpdateExternalUserId createWithSMSHashToken(String externalId, String hashToken, String userId, String smsHashToken, String appId); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateNotificationTypes.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateNotificationTypes.java deleted file mode 100644 index cfef74f67..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSRequestUpdateNotificationTypes.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSRequestUpdateNotificationTypes/**/ - extends /**/OneSignalRequest/**/ - /**//**/ { - - /**/public static class OSRequestUpdateNotificationTypesPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSRequestUpdateNotificationTypes.class); }/**/ - /**//**/ - /**/ - public OSRequestUpdateNotificationTypes() {} - protected OSRequestUpdateNotificationTypes(Handle h, long handle) { super(h, handle); } - protected OSRequestUpdateNotificationTypes(SkipInit skipInit) { super(skipInit); } - public OSRequestUpdateNotificationTypes(String userId, String appId, NSNumber notificationTypes) { super((Handle) null, create(userId, appId, notificationTypes)); retain(getHandle()); } - /**/ - /**/ - - /**/ - /**//**/ - /**/ - @Method(selector = "withUserId:appId:notificationTypes:") - protected static native @Pointer long create(String userId, String appId, NSNumber notificationTypes); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSResponseStatusType.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSResponseStatusType.java new file mode 100644 index 000000000..82e1e4abe --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSResponseStatusType.java @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Marshaler(ValuedEnum.AsMachineSizedSIntMarshaler.class)/**/ +public enum /**/OSResponseStatusType/**/ implements ValuedEnum { + /**/ + Invalid(0L), + Retryable(1L), + Unauthorized(2L), + Missing(3L), + Conflict(4L); + /**/ + + /**/ + /**/ + /**//**/ + /**//**/ + + private final long n; + + private /**/OSResponseStatusType/**/(long n) { this.n = n; } + public long value() { return n; } + public static /**/OSResponseStatusType/**/ valueOf(long n) { + for (/**/OSResponseStatusType/**/ v : values()) { + if (v.n == n) { + return v; + } + } + throw new IllegalArgumentException("No constant with value " + n + " found in " + + /**/OSResponseStatusType/**/.class.getName()); + } +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSession.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSession.java new file mode 100644 index 000000000..cebad3ef4 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSession.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSSession/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + + /**/ + /**/ + + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionAdapter.java new file mode 100644 index 000000000..c148b2c0e --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionAdapter.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSSessionAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSSession/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionManager.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionManager.java index 8c913639d..b169764be 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionManager.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSessionManager.java @@ -55,6 +55,10 @@ public OSSessionManager() {} public native SessionStatusDelegate getDelegate(); @Property(selector = "setDelegate:") public native void setDelegate(SessionStatusDelegate v); + @Property(selector = "appEntryState") + public native AppEntryAction getAppEntryState(); + @Property(selector = "setAppEntryState:") + public native void setAppEntryState(AppEntryAction v); /**/ /**//**/ /**/ @@ -66,8 +70,8 @@ public OSSessionManager() {} public native NSArray getSessionInfluences(); @Method(selector = "initSessionFromCache") public native void initSessionFromCache(); - @Method(selector = "restartSessionIfNeeded:") - public native void restartSessionIfNeeded(AppEntryAction entryAction); + @Method(selector = "restartSessionIfNeeded") + public native void restartSessionIfNeeded(); @Method(selector = "onInAppMessageReceived:") public native void onInAppMessageReceived(String messageId); @Method(selector = "onDirectInfluenceFromIAMClick:") @@ -78,8 +82,10 @@ public OSSessionManager() {} public native void onNotificationReceived(String notificationId); @Method(selector = "onDirectInfluenceFromNotificationOpen:withNotificationId:") public native void onDirectInfluenceFromNotificationOpen(AppEntryAction entryAction, String directNotificationId); - @Method(selector = "attemptSessionUpgrade:") - public native void attemptSessionUpgrade(AppEntryAction entryAction); + @Method(selector = "attemptSessionUpgrade") + public native void attemptSessionUpgrade(); + @Method(selector = "sessionLaunchTime") + public native NSDate sessionLaunchTime(); @Method(selector = "sharedSessionManager") public static native OSSessionManager sharedSessionManager(); @Method(selector = "resetSharedSessionManager") diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubInAppMessages.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubInAppMessages.java new file mode 100644 index 000000000..58761daea --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubInAppMessages.java @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSStubInAppMessages/**/ + extends /**/NSObject/**/ + /**/implements OSInAppMessages/**/ { + + /**/public static class OSStubInAppMessagesPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSStubInAppMessages.class); }/**/ + /**//**/ + /**/ + public OSStubInAppMessages() {} + protected OSStubInAppMessages(Handle h, long handle) { super(h, handle); } + protected OSStubInAppMessages(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "InAppMessages") + public static native Class InAppMessages(); + @Method(selector = "addTrigger:withValue:") + public static native void addTrigger(String key, String value); + @Method(selector = "addTriggers:") + public static native void addTriggers(NSDictionary triggers); + @Method(selector = "removeTrigger:") + public static native void removeTrigger(String key); + @Method(selector = "removeTriggers:") + public static native void removeTriggers(NSArray keys); + @Method(selector = "clearTriggers") + public static native void clearTriggers(); + @Method(selector = "paused") + public static native boolean paused(); + @Method(selector = "paused:") + public static native void paused(boolean pause); + @Method(selector = "addClickListener:") + public static native void addClickListener(OSInAppMessageClickListener listener); + @Method(selector = "removeClickListener:") + public static native void removeClickListener(OSInAppMessageClickListener listener); + @Method(selector = "addLifecycleListener:") + public static native void addLifecycleListener(OSInAppMessageLifecycleListener listener); + @Method(selector = "removeLifecycleListener:") + public static native void removeLifecycleListener(OSInAppMessageLifecycleListener listener); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubLocation.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubLocation.java new file mode 100644 index 000000000..2820c1f84 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSStubLocation.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OSStubLocation/**/ + extends /**/NSObject/**/ + /**/implements OSLocation/**/ { + + /**/public static class OSStubLocationPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OSStubLocation.class); }/**/ + /**//**/ + /**/ + public OSStubLocation() {} + protected OSStubLocation(Handle h, long handle) { super(h, handle); } + protected OSStubLocation(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "Location") + public static native Class Location(); + @Method(selector = "requestPermission") + public static native void requestPermission(); + @Method(selector = "setShared:") + public static native void setShared(boolean enable); + @Method(selector = "isShared") + public static native boolean isShared(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionState.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionState.java deleted file mode 100644 index 1cd4d72cd..000000000 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionState.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2013-2015 RoboVM AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.robovm.pods.onesignal; - -/**/ -import java.io.*; -import java.nio.*; -import java.util.*; -import org.robovm.objc.*; -import org.robovm.objc.annotation.*; -import org.robovm.objc.block.*; -import org.robovm.rt.*; -import org.robovm.rt.annotation.*; -import org.robovm.rt.bro.*; -import org.robovm.rt.bro.annotation.*; -import org.robovm.rt.bro.ptr.*; -import org.robovm.apple.foundation.*; -import org.robovm.apple.usernotifications.*; -import org.robovm.apple.uikit.*; -/**/ - -/**/ - -/**/ -/**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSSubscriptionState/**/ - extends /**/NSObject/**/ - /**//**/ { - - /**/public static class OSSubscriptionStatePtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSSubscriptionState.class); }/**/ - /**//**/ - /**/ - public OSSubscriptionState() {} - protected OSSubscriptionState(Handle h, long handle) { super(h, handle); } - protected OSSubscriptionState(SkipInit skipInit) { super(skipInit); } - /**/ - /**/ - @Property(selector = "isSubscribed") - public native boolean isSubscribed(); - @Property(selector = "isPushDisabled") - public native boolean isPushDisabled(); - @Property(selector = "userId") - public native String getUserId(); - @Property(selector = "pushToken") - public native String getPushToken(); - /**/ - /**//**/ - /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); - /**/ -} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUIApplicationReleaseMode.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUIApplicationReleaseMode.java new file mode 100644 index 000000000..680e31766 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUIApplicationReleaseMode.java @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Marshaler(ValuedEnum.AsMachineSizedSIntMarshaler.class)/**/ +public enum /**/OSUIApplicationReleaseMode/**/ implements ValuedEnum { + /**/ + Unknown(0L), + Dev(1L), + AdHoc(2L), + Wildcard(3L), + AppStore(4L), + Sim(5L), + Enterprise(6L); + /**/ + + /**/ + /**/ + /**//**/ + /**//**/ + + private final long n; + + private /**/OSUIApplicationReleaseMode/**/(long n) { this.n = n; } + public long value() { return n; } + public static /**/OSUIApplicationReleaseMode/**/ valueOf(long n) { + for (/**/OSUIApplicationReleaseMode/**/ v : values()) { + if (v.n == n) { + return v; + } + } + throw new IllegalArgumentException("No constant with value " + n + " found in " + + /**/OSUIApplicationReleaseMode/**/.class.getName()); + } +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUser.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUser.java new file mode 100644 index 000000000..53c170588 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUser.java @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**//**/ +/**/public/**/ interface /**/OSUser/**/ + /**/extends NSObjectProtocol/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**/ + @Property(selector = "pushSubscription") + OSPushSubscription getPushSubscription(); + /**/ + /**/ + @Method(selector = "addAliasWithLabel:id:") + void addAlias(String label, String id); + @Method(selector = "addAliases:") + void addAliases(NSDictionary aliases); + @Method(selector = "removeAlias:") + void removeAlias(String label); + @Method(selector = "removeAliases:") + void removeAliases(NSArray labels); + @Method(selector = "addTagWithKey:value:") + void addTag(String key, String value); + @Method(selector = "addTags:") + void addTags(NSDictionary tags); + @Method(selector = "removeTag:") + void removeTag(String tag); + @Method(selector = "removeTags:") + void removeTags(NSArray tags); + @Method(selector = "addEmail:") + void addEmail(String email); + @Method(selector = "removeEmail:") + void removeEmail(String email); + @Method(selector = "addSms:") + void addSms(String number); + @Method(selector = "removeSms:") + void removeSms(String number); + @Method(selector = "setLanguage:") + void setLanguage(String language); + @Method(selector = "onJwtExpiredWithExpiredHandler:") + void onJwtExpired(@Block("(,@Block)") VoidBlock2> expiredHandler); + /**/ + /**/ + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUserAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUserAdapter.java new file mode 100644 index 000000000..d0129da8c --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSUserAdapter.java @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OSUserAdapter/**/ + extends /**/NSObject/**/ + /**/implements OSUser/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + @NotImplemented("pushSubscription") + public OSPushSubscription getPushSubscription() { return null; } + /**/ + /**//**/ + /**/ + @NotImplemented("addAliasWithLabel:id:") + public void addAlias(String label, String id) {} + @NotImplemented("addAliases:") + public void addAliases(NSDictionary aliases) {} + @NotImplemented("removeAlias:") + public void removeAlias(String label) {} + @NotImplemented("removeAliases:") + public void removeAliases(NSArray labels) {} + @NotImplemented("addTagWithKey:value:") + public void addTag(String key, String value) {} + @NotImplemented("addTags:") + public void addTags(NSDictionary tags) {} + @NotImplemented("removeTag:") + public void removeTag(String tag) {} + @NotImplemented("removeTags:") + public void removeTags(NSArray tags) {} + @NotImplemented("addEmail:") + public void addEmail(String email) {} + @NotImplemented("removeEmail:") + public void removeEmail(String email) {} + @NotImplemented("addSms:") + public void addSms(String number) {} + @NotImplemented("removeSms:") + public void removeSms(String number) {} + @NotImplemented("setLanguage:") + public void setLanguage(String language) {} + @NotImplemented("onJwtExpiredWithExpiredHandler:") + public void onJwtExpired(@Block("(,@Block)") VoidBlock2> expiredHandler) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignal.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignal.java index 82be4c7b3..cb686ecbf 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignal.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignal.java @@ -53,176 +53,55 @@ public OneSignal() {} /**/ /**//**/ /**/ + @GlobalValue(symbol="OneSignalUserVersionNumber", optional=true) + public static native double UserVersionNumber(); + @GlobalValue(symbol="OneSignalUserVersionNumber", optional=true) + public static native void UserVersionNumber(double v); + @GlobalValue(symbol="OneSignalUserVersionString", optional=true) + public static native BytePtr UserVersionString(); + @GlobalValue(symbol="OneSignalOSCoreVersionNumber", optional=true) + public static native double OSCoreVersionNumber(); + @GlobalValue(symbol="OneSignalOSCoreVersionNumber", optional=true) + public static native void OSCoreVersionNumber(double v); + @GlobalValue(symbol="OneSignalOSCoreVersionString", optional=true) + public static native BytePtr OSCoreVersionString(); + @Method(selector = "appId") public static native String appId(); @Method(selector = "sdkVersionRaw") public static native String sdkVersionRaw(); @Method(selector = "sdkSemanticVersion") public static native String sdkSemanticVersion(); - @Method(selector = "disablePush:") - public static native void disablePush(boolean disable); - @Method(selector = "setMSDKType:") - public static native void setMSDKType(String type); - @Method(selector = "setAppId:") - public static native void setAppId(String newAppId); - @Method(selector = "initWithLaunchOptions:") - public static native ObjCClass Init(UIApplicationLaunchOptions launchOptions); - @Method(selector = "setLaunchURLsInApp:") - public static native void setLaunchURLsInApp(boolean launchInApp); + @Method(selector = "User") + public static native OSUser User(); + @Method(selector = "login:") + public static native void login(String externalId); + @Method(selector = "login:withToken:") + public static native void login(String externalId, String token); + @Method(selector = "logout") + public static native void logout(); + @Method(selector = "Notifications") + public static native Class Notifications(); + @Method(selector = "setLaunchOptions:") + public static native void setLaunchOptions(NSDictionary newLaunchOptions); + @Method(selector = "initialize:withLaunchOptions:") + public static native void initialize(String newAppId, NSDictionary launchOptions); @Method(selector = "setProvidesNotificationSettingsView:") public static native void setProvidesNotificationSettingsView(boolean providesView); - @Method(selector = "enterLiveActivity:withToken:") - public static native void enterLiveActivity(String activityId, String token); - @Method(selector = "enterLiveActivity:withToken:withSuccess:withFailure:") - public static native void enterLiveActivity(String activityId, String token, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "exitLiveActivity:") - public static native void exitLiveActivity(String activityId); - @Method(selector = "exitLiveActivity:withSuccess:withFailure:") - public static native void exitLiveActivity(String activityId, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "setLogLevel:visualLevel:") - public static native void setLogLevel(OSLogLevel logLevel, OSLogLevel visualLogLevel); - @Method(selector = "onesignalLog:message:") - public static native void onesignalLog(OSLogLevel logLevel, String message); - @Method(selector = "promptForPushNotificationsWithUserResponse:") - public static native void promptForPushNotifications(@Block VoidBooleanBlock block); - @Method(selector = "promptForPushNotificationsWithUserResponse:fallbackToSettings:") - public static native void promptForPushNotifications(@Block VoidBooleanBlock block, boolean fallback); - @Method(selector = "registerForProvisionalAuthorization:") - public static native void registerForProvisionalAuthorization(@Block VoidBooleanBlock block); - @Method(selector = "getDeviceState") - public static native OSDeviceState getDeviceState(); - @Method(selector = "consentGranted:") - public static native void consentGranted(boolean granted); - @Method(selector = "requiresUserPrivacyConsent") - public static native boolean requiresUserPrivacyConsent(); - @Method(selector = "setRequiresUserPrivacyConsent:") - public static native void setRequiresUserPrivacyConsent(boolean required); - @Method(selector = "setNotificationWillShowInForegroundHandler:") - public static native void setNotificationWillShowInForegroundHandler(@Block("(,@Block)") VoidBlock2> block); - @Method(selector = "setNotificationOpenedHandler:") - public static native void setNotificationOpenedHandler(@Block VoidBlock1 block); - @Method(selector = "setInAppMessageClickHandler:") - public static native void setInAppMessageClickHandler(@Block VoidBlock1 block); - @Method(selector = "setInAppMessageLifecycleHandler:") - public static native void setInAppMessageLifecycleHandler(OSInAppMessageLifecycleHandler delegate); - @Method(selector = "postNotification:") - public static native void postNotification(NSDictionary jsonData); - @Method(selector = "postNotification:onSuccess:onFailure:") - public static native void postNotification(NSDictionary jsonData, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "postNotificationWithJsonString:onSuccess:onFailure:") - public static native void postNotification(String jsonData, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "promptLocation") - public static native void promptLocation(); - @Method(selector = "setLocationShared:") - public static native void setLocationShared(boolean enable); - @Method(selector = "isLocationShared") - public static native boolean isLocationShared(); - @Method(selector = "sendTag:value:onSuccess:onFailure:") - public static native void sendTag(String key, String value, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "sendTag:value:") - public static native void sendTag(String key, String value); - @Method(selector = "sendTags:onSuccess:onFailure:") - public static native void sendTags(NSDictionary keyValuePair, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "sendTags:") - public static native void sendTags(NSDictionary keyValuePair); - @Method(selector = "sendTagsWithJsonString:") - public static native void sendTags(String jsonString); - @Method(selector = "getTags:onFailure:") - public static native void getTags(@Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "getTags:") - public static native void getTags(@Block VoidBlock1> successBlock); - @Method(selector = "deleteTag:onSuccess:onFailure:") - public static native void deleteTag(String key, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "deleteTag:") - public static native void deleteTag(String key); - @Method(selector = "deleteTags:onSuccess:onFailure:") - public static native void deleteTags(NSArray keys, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "deleteTags:") - public static native void deleteTags(NSArray keys); - @Method(selector = "deleteTagsWithJsonString:") - public static native void deleteTags(String jsonString); - @Method(selector = "addPermissionObserver:") - public static native void addPermissionObserver(OSPermissionObserver observer); - @Method(selector = "removePermissionObserver:") - public static native void removePermissionObserver(OSPermissionObserver observer); - @Method(selector = "addSubscriptionObserver:") - public static native void addSubscriptionObserver(OSSubscriptionObserver observer); - @Method(selector = "removeSubscriptionObserver:") - public static native void removeSubscriptionObserver(OSSubscriptionObserver observer); - @Method(selector = "addEmailSubscriptionObserver:") - public static native void addEmailSubscriptionObserver(OSEmailSubscriptionObserver observer); - @Method(selector = "removeEmailSubscriptionObserver:") - public static native void removeEmailSubscriptionObserver(OSEmailSubscriptionObserver observer); - @Method(selector = "addSMSSubscriptionObserver:") - public static native void addSMSSubscriptionObserver(OSSMSSubscriptionObserver observer); - @Method(selector = "removeSMSSubscriptionObserver:") - public static native void removeSMSSubscriptionObserver(OSSMSSubscriptionObserver observer); - @Method(selector = "setEmail:withEmailAuthHashToken:") - public static native void setEmail(String email, String hashToken); - @Method(selector = "setEmail:withEmailAuthHashToken:withSuccess:withFailure:") - public static native void setEmail(String email, String hashToken, @Block Runnable successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "setEmail:") - public static native void setEmail(String email); - @Method(selector = "setEmail:withSuccess:withFailure:") - public static native void setEmail(String email, @Block Runnable successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "logoutEmail") - public static native void logoutEmail(); - @Method(selector = "logoutEmailWithSuccess:withFailure:") - public static native void logoutEmail(@Block Runnable successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "setSMSNumber:withSMSAuthHashToken:") - public static native void setSMSNumber(String smsNumber, String hashToken); - @Method(selector = "setSMSNumber:withSMSAuthHashToken:withSuccess:withFailure:") - public static native void setSMSNumber(String smsNumber, String hashToken, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "setSMSNumber:") - public static native void setSMSNumber(String smsNumber); - @Method(selector = "setSMSNumber:withSuccess:withFailure:") - public static native void setSMSNumber(String smsNumber, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "logoutSMSNumber") - public static native void logoutSMSNumber(); - @Method(selector = "logoutSMSNumberWithSuccess:withFailure:") - public static native void logoutSMSNumber(@Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "setLanguage:") - public static native void setLanguage(String language); - @Method(selector = "setLanguage:withSuccess:withFailure:") - public static native void setLanguage(String language, @Block Runnable successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "setExternalUserId:") - public static native void setExternalUserId(String externalId); - @Method(selector = "setExternalUserId:withSuccess:withFailure:") - public static native void setExternalUserId(String externalId, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "setExternalUserId:withExternalIdAuthHashToken:withSuccess:withFailure:") - public static native void setExternalUserId(String externalId, String hashToken, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "removeExternalUserId") - public static native void removeExternalUserId(); - @Method(selector = "removeExternalUserId:withFailure:") - public static native void removeExternalUserId(@Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); - @Method(selector = "isInAppMessagingPaused") - public static native boolean isInAppMessagingPaused(); - @Method(selector = "pauseInAppMessages:") - public static native void pauseInAppMessages(boolean pause); - @Method(selector = "addTrigger:withValue:") - public static native void addTrigger(String key, NSObject value); - @Method(selector = "addTriggers:") - public static native void addTriggers(NSDictionary triggers); - @Method(selector = "removeTriggerForKey:") - public static native void removeTriggerForKey(String key); - @Method(selector = "removeTriggersForKeys:") - public static native void removeTriggersForKeys(NSArray keys); - @Method(selector = "getTriggers") - public static native NSDictionary getTriggers(); - @Method(selector = "getTriggerValueForKey:") - public static native NSObject getTriggerValueForKey(String key); - @Method(selector = "sendOutcome:") - public static native void sendOutcome(String name); - @Method(selector = "sendOutcome:onSuccess:") - public static native void sendOutcome(String name, @Block VoidBlock1 success); - @Method(selector = "sendUniqueOutcome:") - public static native void sendUniqueOutcome(String name); - @Method(selector = "sendUniqueOutcome:onSuccess:") - public static native void sendUniqueOutcome(String name, @Block VoidBlock1 success); - @Method(selector = "sendOutcomeWithValue:value:") - public static native void sendOutcome(String name, NSNumber value); - @Method(selector = "sendOutcomeWithValue:value:onSuccess:") - public static native void sendOutcome(String name, NSNumber value, @Block VoidBlock1 success); + @Method(selector = "LiveActivities") + public static native Class LiveActivities(); + @Method(selector = "Debug") + public static native Class Debug(); + @Method(selector = "setConsentRequired:") + public static native void setConsentRequired(boolean required); + @Method(selector = "setConsentGiven:") + public static native void setConsentGiven(boolean granted); + @Method(selector = "InAppMessages") + public static native Class InAppMessages(); + @Method(selector = "Location") + public static native Class Location(); + @Method(selector = "Session") + public static native Class Session(); /** * @deprecated Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead. */ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionStateChanges.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalAttachmentHandler.java similarity index 60% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionStateChanges.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalAttachmentHandler.java index ec74e2a99..fc12c2430 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSubscriptionStateChanges.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalAttachmentHandler.java @@ -36,27 +36,28 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSSubscriptionStateChanges/**/ +/**/public/**/ class /**/OneSignalAttachmentHandler/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSSubscriptionStateChangesPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSSubscriptionStateChanges.class); }/**/ + /**/public static class OneSignalAttachmentHandlerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalAttachmentHandler.class); }/**/ /**//**/ /**/ - public OSSubscriptionStateChanges() {} - protected OSSubscriptionStateChanges(Handle h, long handle) { super(h, handle); } - protected OSSubscriptionStateChanges(SkipInit skipInit) { super(skipInit); } + public OneSignalAttachmentHandler() {} + protected OneSignalAttachmentHandler(Handle h, long handle) { super(h, handle); } + protected OneSignalAttachmentHandler(SkipInit skipInit) { super(skipInit); } /**/ /**/ - @Property(selector = "to") - public native OSSubscriptionState getTo(); - @Property(selector = "from") - public native OSSubscriptionState getFrom(); + /**/ /**//**/ /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); + @Method(selector = "addAttachments:toNotificationContent:") + public static native void addAttachments(OSNotification notification, UNMutableNotificationContent content); + @Method(selector = "addActionButtons:toNotificationContent:") + public static native void addActionButtons(OSNotification notification, UNMutableNotificationContent content); + @Method(selector = "createActionForButton:") + public static native UNNotificationAction createActionForButton(NSDictionary button); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionState.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalConfigManager.java similarity index 65% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionState.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalConfigManager.java index 886fdbe1a..89041cb0f 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionState.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalConfigManager.java @@ -36,29 +36,28 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSSMSSubscriptionState/**/ +/**/public/**/ class /**/OneSignalConfigManager/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSSMSSubscriptionStatePtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSSMSSubscriptionState.class); }/**/ + /**/public static class OneSignalConfigManagerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalConfigManager.class); }/**/ /**//**/ /**/ - public OSSMSSubscriptionState() {} - protected OSSMSSubscriptionState(Handle h, long handle) { super(h, handle); } - protected OSSMSSubscriptionState(SkipInit skipInit) { super(skipInit); } + public OneSignalConfigManager() {} + protected OneSignalConfigManager(Handle h, long handle) { super(h, handle); } + protected OneSignalConfigManager(SkipInit skipInit) { super(skipInit); } /**/ /**/ - @Property(selector = "smsUserId") - public native String getSmsUserId(); - @Property(selector = "smsNumber") - public native String getSmsNumber(); - @Property(selector = "isSubscribed") - public native boolean isSubscribed(); + /**/ /**//**/ /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); + @Method(selector = "setAppId:") + public static native void setAppId(String appId); + @Method(selector = "getAppId") + public static native String getAppId(); + @Method(selector = "shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod:") + public static native boolean shouldAwaitAppIdAndLogMissingPrivacyConsentForMethod(String methodName); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalConstants.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalConstants.java index b5c7fa8cd..e1daf4e27 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalConstants.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalConstants.java @@ -47,7 +47,7 @@ public static final String OS_API_VERSION = "1"; public static final String OS_API_SERVER_URL = "https://api.onesignal.com/"; public static final String OS_IAM_WEBVIEW_BASE_URL = "https://onesignal.com/"; - public static final String ONESIGNAL_VERSION = "031204"; + public static final String ONESIGNAL_VERSION = "050001"; public static final String OSUD_APP_ID = "GT_APP_ID"; public static final String OSUD_REGISTERED_WITH_APPLE = "GT_REGISTERED_WITH_APPLE"; public static final String OSUD_APP_PROVIDES_NOTIFICATION_SETTINGS = "OS_APP_PROVIDES_NOTIFICATION_SETTINGS"; @@ -65,26 +65,10 @@ public static final String OSUD_PERMISSION_EPHEMERAL_FROM = "OSUD_PERMISSION_EPHEMERAL_FROM"; public static final String OSUD_LANGUAGE = "OSUD_LANGUAGE"; public static final String DEFAULT_LANGUAGE = "en"; - public static final String OSUD_EXTERNAL_USER_ID = "OS_EXTERNAL_USER_ID"; - public static final String OSUD_PLAYER_ID_TO = "GT_PLAYER_ID"; - public static final String OSUD_PLAYER_ID_FROM = "GT_PLAYER_ID_LAST"; - public static final String OSUD_PUSH_TOKEN_TO = "GT_DEVICE_TOKEN"; - public static final String OSUD_PUSH_TOKEN_FROM = "GT_DEVICE_TOKEN_LAST"; - public static final String OSUD_USER_SUBSCRIPTION_TO = "ONESIGNAL_SUBSCRIPTION"; - public static final String OSUD_USER_SUBSCRIPTION_FROM = "ONESIGNAL_SUBSCRIPTION_SETTING"; - public static final String OSUD_EXTERNAL_ID_AUTH_CODE = "OSUD_EXTERNAL_ID_AUTH_CODE"; - public static final String OSUD_EMAIL_ADDRESS = "EMAIL_ADDRESS"; - public static final String OSUD_EMAIL_PLAYER_ID = "GT_EMAIL_PLAYER_ID"; - public static final String OSUD_EMAIL_EXTERNAL_USER_ID = "OSUD_EMAIL_EXTERNAL_USER_ID"; - public static final String OSUD_REQUIRE_EMAIL_AUTH = "GT_REQUIRE_EMAIL_AUTH"; - public static final String OSUD_EMAIL_AUTH_CODE = "GT_EMAIL_AUTH_CODE"; - public static final String OSUD_SMS_NUMBER = "OSUD_SMS_NUMBER"; - public static final String OSUD_SMS_PLAYER_ID = "OSUD_SMS_PLAYER_ID"; - public static final String OSUD_SMS_EXTERNAL_USER_ID = "OSUD_SMS_EXTERNAL_USER_ID"; - public static final String OSUD_REQUIRE_SMS_AUTH = "OSUD_REQUIRE_SMS_AUTH"; - public static final String OSUD_SMS_AUTH_CODE = "OSUD_SMS_AUTH_CODE"; + public static final String OSUD_LEGACY_PLAYER_ID = "GT_PLAYER_ID"; + public static final String OSUD_PUSH_SUBSCRIPTION_ID = "OSUD_PUSH_SUBSCRIPTION_ID"; + public static final String OSUD_PUSH_TOKEN = "GT_DEVICE_TOKEN"; public static final String OSUD_LAST_MESSAGE_OPENED = "GT_LAST_MESSAGE_OPENED_"; - public static final String OSUD_NOTIFICATION_OPEN_LAUNCH_URL = "ONESIGNAL_INAPP_LAUNCH_URL"; public static final String OSUD_TEMP_CACHED_NOTIFICATION_MEDIA = "OSUD_TEMP_CACHED_NOTIFICATION_MEDIA"; public static final String OSUD_LOCATION_ENABLED = "OSUD_LOCATION_ENABLED"; public static final String OSUD_REQUIRES_USER_PRIVACY_CONSENT = "OSUD_REQUIRES_USER_PRIVACY_CONSENT"; @@ -109,7 +93,6 @@ public static final String OSUD_APP_LAST_CLOSED_TIME = "GT_LAST_CLOSED_TIME"; public static final String OSUD_UNSENT_ACTIVE_TIME = "GT_UNSENT_ACTIVE_TIME"; public static final String OSUD_UNSENT_ACTIVE_TIME_ATTRIBUTED = "GT_UNSENT_ACTIVE_TIME_ATTRIBUTED"; - public static final String OSUD_PLAYER_TAGS = "OSUD_PLAYER_TAGS"; public static final String IOS_FBA = "fba"; public static final String IOS_USES_PROVISIONAL_AUTHORIZATION = "uses_provisional_auth"; public static final String IOS_REQUIRES_EMAIL_AUTHENTICATION = "require_email_auth"; @@ -133,6 +116,14 @@ public static final String ONESIGNAL_FB_LAST_GAF_CAMPAIGN_RECEIVED = "OS_LAST_RECIEVED_GAF_CAMPAIGN"; public static final String ONESIGNAL_FB_LAST_NOTIFICATION_ID_RECEIVED = "OS_LAST_RECIEVED_NOTIFICATION_ID"; public static final String ONESIGNAL_IAM_PREVIEW = "os_in_app_message_preview_id"; + public static final String ONESIGNAL_POST_PREVIEW_IAM = "ONESIGNAL_POST_PREVIEW_IAM"; + public static final String ATTRIBUTED_FOCUS_TASK = "ATTRIBUTED_FOCUS_TASK"; + public static final String UNATTRIBUTED_FOCUS_TASK = "UNATTRIBUTED_FOCUS_TASK"; + public static final String SEND_SESSION_TIME_TO_USER_TASK = "SEND_SESSION_TIME_TO_USER_TASK"; + public static final String OPERATION_REPO_BACKGROUND_TASK = "OPERATION_REPO_BACKGROUND_TASK"; + public static final String IDENTITY_EXECUTOR_BACKGROUND_TASK = "IDENTITY_EXECUTOR_BACKGROUND_TASK_"; + public static final String PROPERTIES_EXECUTOR_BACKGROUND_TASK = "PROPERTIES_EXECUTOR_BACKGROUND_TASK_"; + public static final String SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK = "SUBSCRIPTION_EXECUTOR_BACKGROUND_TASK_"; public static final String OS_PUSH = "push"; public static final String OS_EMAIL = "email"; public static final String OS_SMS = "sms"; @@ -151,22 +142,48 @@ public static final int ERROR_PUSH_PROMPT_NEVER_ANSWERED = -19; public static final int AUTH_STATUS_EPHEMERAL = 4; public static final double WEEK_IN_SECONDS = 604800.0; - public static final double REGISTRATION_DELAY_SECONDS = 30.0; - public static final double APNS_TIMEOUT = 25.0; public static final String SHARED_CATEGORY_LIST = "com.onesignal.shared_registered_categories"; public static final int DEVICE_TYPE_PUSH = 0; public static final int DEVICE_TYPE_EMAIL = 11; public static final int DEVICE_TYPE_SMS = 14; public static final int MAX_NSE_LIFETIME_SECOUNDS = 30; - public static final double REATTEMPT_DELAY = 30.0; + public static final double REATTEMPT_DELAY = 5.0; public static final double REQUEST_TIMEOUT_REQUEST = 120.0; public static final double REQUEST_TIMEOUT_RESOURCE = 120.0; - public static final int MAX_ATTEMPT_COUNT = 3; - public static final double SEND_TAGS_DELAY = 5.0; + public static final int MAX_ATTEMPT_COUNT = 5; public static final int MAX_CATEGORIES_SIZE = 128; public static final double CUSTOM_DISPLAY_TYPE_TIMEOUT = 25.0; public static final double MAX_CONF_DELIVERY_DELAY = 25.0; public static final int MAX_NOTIFICATION_MEDIA_SIZE_BYTES = 50000000; + public static final String OS_ONESIGNAL_ID = "onesignal_id"; + public static final String OS_EXTERNAL_ID = "external_id"; + public static final String OS_ON_USER_WILL_CHANGE = "OS_ON_USER_WILL_CHANGE"; + public static final String OS_IDENTITY_MODEL_KEY = "OS_IDENTITY_MODEL_KEY"; + public static final String OS_IDENTITY_MODEL_STORE_KEY = "OS_IDENTITY_MODEL_STORE_KEY"; + public static final String OS_PROPERTIES_MODEL_KEY = "OS_PROPERTIES_MODEL_KEY"; + public static final String OS_PROPERTIES_MODEL_STORE_KEY = "OS_PROPERTIES_MODEL_STORE_KEY"; + public static final String OS_PUSH_SUBSCRIPTION_MODEL_KEY = "OS_PUSH_SUBSCRIPTION_MODEL_KEY"; + public static final String OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY = "OS_PUSH_SUBSCRIPTION_MODEL_STORE_KEY"; + public static final String OS_SUBSCRIPTION_MODEL_STORE_KEY = "OS_SUBSCRIPTION_MODEL_STORE_KEY"; + public static final String OS_ADD_ALIAS_DELTA = "OS_ADD_ALIAS_DELTA"; + public static final String OS_REMOVE_ALIAS_DELTA = "OS_REMOVE_ALIAS_DELTA"; + public static final String OS_UPDATE_PROPERTIES_DELTA = "OS_UPDATE_PROPERTIES_DELTA"; + public static final String OS_ADD_SUBSCRIPTION_DELTA = "OS_ADD_SUBSCRIPTION_DELTA"; + public static final String OS_REMOVE_SUBSCRIPTION_DELTA = "OS_REMOVE_SUBSCRIPTION_DELTA"; + public static final String OS_UPDATE_SUBSCRIPTION_DELTA = "OS_UPDATE_SUBSCRIPTION_DELTA"; + public static final String OS_OPERATION_REPO_DELTA_QUEUE_KEY = "OS_OPERATION_REPO_DELTA_QUEUE_KEY"; + public static final String OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY = "OS_USER_EXECUTOR_USER_REQUEST_QUEUE_KEY"; + public static final String OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY = "OS_USER_EXECUTOR_TRANSFER_SUBSCRIPTION_REQUEST_QUEUE_KEY"; + public static final String OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY = "OS_IDENTITY_EXECUTOR_DELTA_QUEUE_KEY"; + public static final String OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY = "OS_IDENTITY_EXECUTOR_ADD_REQUEST_QUEUE_KEY"; + public static final String OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY = "OS_IDENTITY_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY"; + public static final String OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY = "OS_PROPERTIES_EXECUTOR_DELTA_QUEUE_KEY"; + public static final String OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY = "OS_PROPERTIES_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY"; + public static final String OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY = "OS_SUBSCRIPTION_EXECUTOR_DELTA_QUEUE_KEY"; + public static final String OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY = "OS_SUBSCRIPTION_EXECUTOR_ADD_REQUEST_QUEUE_KEY"; + public static final String OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY = "OS_SUBSCRIPTION_EXECUTOR_REMOVE_REQUEST_QUEUE_KEY"; + public static final String OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY = "OS_SUBSCRIPTION_EXECUTOR_UPDATE_REQUEST_QUEUE_KEY"; + public static final int SWIFT_TYPEDEFS = 1; public static final String OUTCOMES_PARAM = "outcomes"; public static final String DIRECT_PARAM = "direct"; public static final String INDIRECT_PARAM = "indirect"; diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtension.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtension.java new file mode 100644 index 000000000..6129c7d7f --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtension.java @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalExtension/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OneSignalExtensionPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalExtension.class); }/**/ + /**//**/ + /**/ + public OneSignalExtension() {} + protected OneSignalExtension(Handle h, long handle) { super(h, handle); } + protected OneSignalExtension(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + /** + * @deprecated Please use didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler: instead. + */ + @Deprecated + @Method(selector = "didReceiveNotificationExtensionRequest:withMutableNotificationContent:") + public static native UNMutableNotificationContent didReceiveNotificationExtensionRequest(UNNotificationRequest request, UNMutableNotificationContent replacementContent); + @Method(selector = "didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler:") + public static native UNMutableNotificationContent didReceiveNotificationExtensionRequest(UNNotificationRequest request, UNMutableNotificationContent replacementContent, @Block VoidBlock1 contentHandler); + @Method(selector = "serviceExtensionTimeWillExpireRequest:withMutableNotificationContent:") + public static native UNMutableNotificationContent serviceExtensionTimeWillExpireRequest(UNNotificationRequest request, UNMutableNotificationContent replacementContent); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtensionBadgeHandler.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtensionBadgeHandler.java new file mode 100644 index 000000000..dfeb6af9d --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalExtensionBadgeHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalExtensionBadgeHandler/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OneSignalExtensionBadgeHandlerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalExtensionBadgeHandler.class); }/**/ + /**//**/ + /**/ + public OneSignalExtensionBadgeHandler() {} + protected OneSignalExtensionBadgeHandler(Handle h, long handle) { super(h, handle); } + protected OneSignalExtensionBadgeHandler(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "handleBadgeCountWithNotificationRequest:withNotification:withMutableNotificationContent:") + public static native void handleBadgeCount(UNNotificationRequest request, OSNotification notification, UNMutableNotificationContent replacementContent); + @Method(selector = "updateCachedBadgeValue:") + public static native void updateCachedBadgeValue(@MachineSizedSInt long value); + @Method(selector = "currentCachedBadgeValue") + public static native @MachineSizedSInt long currentCachedBadgeValue(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalInAppMessages.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalInAppMessages.java new file mode 100644 index 000000000..a1b73062f --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalInAppMessages.java @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalInAppMessages/**/ + extends /**/NSObject/**/ + /**/implements OSInAppMessages/**/ { + + /**/public static class OneSignalInAppMessagesPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalInAppMessages.class); }/**/ + /**//**/ + /**/ + public OneSignalInAppMessages() {} + protected OneSignalInAppMessages(Handle h, long handle) { super(h, handle); } + protected OneSignalInAppMessages(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "InAppMessages") + public static native Class InAppMessages(); + @Method(selector = "start") + public static native void start(); + @Method(selector = "getInAppMessagesFromServer:") + public static native void getInAppMessagesFromServer(String subscriptionId); + @Method(selector = "onApplicationDidBecomeActive") + public static native void onApplicationDidBecomeActive(); + @Method(selector = "migrate") + public static native void migrate(); + @Method(selector = "addTrigger:withValue:") + public static native void addTrigger(String key, String value); + @Method(selector = "addTriggers:") + public static native void addTriggers(NSDictionary triggers); + @Method(selector = "removeTrigger:") + public static native void removeTrigger(String key); + @Method(selector = "removeTriggers:") + public static native void removeTriggers(NSArray keys); + @Method(selector = "clearTriggers") + public static native void clearTriggers(); + @Method(selector = "paused") + public static native boolean paused(); + @Method(selector = "paused:") + public static native void paused(boolean pause); + @Method(selector = "addClickListener:") + public static native void addClickListener(OSInAppMessageClickListener listener); + @Method(selector = "removeClickListener:") + public static native void removeClickListener(OSInAppMessageClickListener listener); + @Method(selector = "addLifecycleListener:") + public static native void addLifecycleListener(OSInAppMessageLifecycleListener listener); + @Method(selector = "removeLifecycleListener:") + public static native void removeLifecycleListener(OSInAppMessageLifecycleListener listener); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLiveActivityController.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLiveActivityController.java new file mode 100644 index 000000000..953f76b2c --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLiveActivityController.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalLiveActivityController/**/ + extends /**/NSObject/**/ + /**/implements OSLiveActivities, OSPushSubscriptionObserver/**/ { + + /**/public static class OneSignalLiveActivityControllerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalLiveActivityController.class); }/**/ + /**//**/ + /**/ + public OneSignalLiveActivityController() {} + protected OneSignalLiveActivityController(Handle h, long handle) { super(h, handle); } + protected OneSignalLiveActivityController(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "LiveActivities") + public static native Class LiveActivities(); + @Method(selector = "enter:withToken:") + public static native void enter(String activityId, String token); + @Method(selector = "enter:withToken:withSuccess:withFailure:") + public static native void enter(String activityId, String token, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); + @Method(selector = "exit:") + public static native void exit(String activityId); + @Method(selector = "exit:withSuccess:withFailure:") + public static native void exit(String activityId, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); + @Method(selector = "onPushSubscriptionDidChangeWithState:") + public native void onPushSubscriptionDidChange(OSPushSubscriptionChangedState state); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLocationManager.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLocationManager.java new file mode 100644 index 000000000..6c0e735f5 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLocationManager.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalLocationManager/**/ + extends /**/NSObject/**/ + /**/implements OSLocation/**/ { + + /**/public static class OneSignalLocationManagerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalLocationManager.class); }/**/ + /**//**/ + /**/ + public OneSignalLocationManager() {} + protected OneSignalLocationManager(Handle h, long handle) { super(h, handle); } + protected OneSignalLocationManager(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "Location") + public static native Class Location(); + @Method(selector = "sharedInstance") + public static native OneSignalLocationManager sharedInstance(); + @Method(selector = "start") + public static native void start(); + @Method(selector = "clearLastLocation") + public static native void clearLastLocation(); + @Method(selector = "onFocus:") + public static native void onFocus(boolean isActive); + @Method(selector = "startLocationSharedWithFlag:") + public static native void startLocationShared(boolean enable); + @Method(selector = "promptLocationFallbackToSettings:completionHandler:") + public static native void promptLocationFallbackToSettings(boolean fallback, @Block VoidBlock1 completionHandler); + @Method(selector = "requestPermission") + public static native void requestPermission(); + @Method(selector = "setShared:") + public static native void setShared(boolean enable); + @Method(selector = "isShared") + public static native boolean isShared(); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLog.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLog.java index e11ca2375..d9b1e1ce9 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLog.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalLog.java @@ -38,7 +38,7 @@ /**/@Library(Library.INTERNAL) @NativeClass/**/ /**/public/**/ class /**/OneSignalLog/**/ extends /**/NSObject/**/ - /**//**/ { + /**/implements OSDebug/**/ { /**/public static class OneSignalLogPtr extends Ptr {}/**/ /**/static { ObjCRuntime.bind(OneSignalLog.class); }/**/ @@ -53,9 +53,15 @@ public OneSignalLog() {} /**/ /**//**/ /**/ - @Method(selector = "setLogLevel:") - public static native void setLogLevel(OSLogLevel logLevel); + @Method(selector = "Debug") + public static native Class Debug(); @Method(selector = "onesignalLog:message:") public static native void log(OSLogLevel logLevel, String message); + @Method(selector = "getLogLevel") + public static native OSLogLevel getLogLevel(); + @Method(selector = "setLogLevel:") + public static native void setLogLevel(OSLogLevel logLevel); + @Method(selector = "setAlertLevel:") + public static native void setAlertLevel(OSLogLevel logLevel); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalOutcomes.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalMobileProvision.java similarity index 73% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalOutcomes.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalMobileProvision.java index 60eddc770..34debedd2 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalOutcomes.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalMobileProvision.java @@ -36,24 +36,24 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OneSignalOutcomes/**/ +/**/public/**/ class /**/OneSignalMobileProvision/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OneSignalOutcomesPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OneSignalOutcomes.class); }/**/ + /**/public static class OneSignalMobileProvisionPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalMobileProvision.class); }/**/ /**//**/ /**/ - public OneSignalOutcomes() {} - protected OneSignalOutcomes(Handle h, long handle) { super(h, handle); } - protected OneSignalOutcomes(SkipInit skipInit) { super(skipInit); } + public OneSignalMobileProvision() {} + protected OneSignalMobileProvision(Handle h, long handle) { super(h, handle); } + protected OneSignalMobileProvision(SkipInit skipInit) { super(skipInit); } /**/ /**/ /**/ /**//**/ /**/ - @Method(selector = "migrate") - public static native void migrate(); + @Method(selector = "releaseMode") + public static native OSUIApplicationReleaseMode releaseMode(); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationServiceExtensionHandler.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationServiceExtensionHandler.java new file mode 100644 index 000000000..ebba28945 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationServiceExtensionHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalNotificationServiceExtensionHandler/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OneSignalNotificationServiceExtensionHandlerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalNotificationServiceExtensionHandler.class); }/**/ + /**//**/ + /**/ + public OneSignalNotificationServiceExtensionHandler() {} + protected OneSignalNotificationServiceExtensionHandler(Handle h, long handle) { super(h, handle); } + protected OneSignalNotificationServiceExtensionHandler(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "didReceiveNotificationExtensionRequest:withMutableNotificationContent:") + public static native UNMutableNotificationContent didReceiveNotificationExtensionRequest(UNNotificationRequest request, UNMutableNotificationContent replacementContent); + @Method(selector = "didReceiveNotificationExtensionRequest:withMutableNotificationContent:withContentHandler:") + public static native UNMutableNotificationContent didReceiveNotificationExtensionRequest(UNNotificationRequest request, UNMutableNotificationContent replacementContent, @Block VoidBlock1 contentHandler); + @Method(selector = "serviceExtensionTimeWillExpireRequest:withMutableNotificationContent:") + public static native UNMutableNotificationContent serviceExtensionTimeWillExpireRequest(UNNotificationRequest request, UNMutableNotificationContent replacementContent); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionStateChanges.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationSettings.java similarity index 51% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionStateChanges.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationSettings.java index e2a3937c7..207efad92 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSSMSSubscriptionStateChanges.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationSettings.java @@ -36,27 +36,36 @@ /**/ /**/@Library(Library.INTERNAL) @NativeClass/**/ -/**/public/**/ class /**/OSSMSSubscriptionStateChanges/**/ +/**/public/**/ class /**/OneSignalNotificationSettings/**/ extends /**/NSObject/**/ /**//**/ { - /**/public static class OSSMSSubscriptionStateChangesPtr extends Ptr {}/**/ - /**/static { ObjCRuntime.bind(OSSMSSubscriptionStateChanges.class); }/**/ + /**/public static class OneSignalNotificationSettingsPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalNotificationSettings.class); }/**/ /**//**/ /**/ - public OSSMSSubscriptionStateChanges() {} - protected OSSMSSubscriptionStateChanges(Handle h, long handle) { super(h, handle); } - protected OSSMSSubscriptionStateChanges(SkipInit skipInit) { super(skipInit); } + public OneSignalNotificationSettings() {} + protected OneSignalNotificationSettings(Handle h, long handle) { super(h, handle); } + protected OneSignalNotificationSettings(SkipInit skipInit) { super(skipInit); } /**/ /**/ - @Property(selector = "to") - public native OSSMSSubscriptionState getTo(); - @Property(selector = "from") - public native OSSMSSubscriptionState getFrom(); + /**/ /**//**/ /**/ - @Method(selector = "toDictionary") - public native NSDictionary toDictionary(); + @Method(selector = "getNotificationTypes") + public native int getNotificationTypes(); + @Method(selector = "getNotificationPermissionState") + public native OSPermissionStateInternal getNotificationPermissionState(); + @Method(selector = "getNotificationPermissionState:") + public native void getNotificationPermissionState(@Block VoidBlock1 completionHandler); + @Method(selector = "promptForNotifications:") + public native void promptForNotifications(@Block VoidBooleanBlock block); + @Method(selector = "registerForProvisionalAuthorization:") + public native void registerForProvisionalAuthorization(@Block VoidBooleanBlock block); + @Method(selector = "onNotificationPromptResponse:") + public native void onNotificationPromptResponse(int notificationTypes); + @Method(selector = "getQueue") + public static native org.robovm.apple.dispatch.DispatchQueue getQueue(); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionObserver.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationsDelegate.java similarity index 83% rename from onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionObserver.java rename to onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationsDelegate.java index 578926400..f002e9195 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OSEmailSubscriptionObserver.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationsDelegate.java @@ -36,7 +36,7 @@ /**/ /**//**/ -/**/public/**/ interface /**/OSEmailSubscriptionObserver/**/ +/**/public/**/ interface /**/OneSignalNotificationsDelegate/**/ /**/extends NSObjectProtocol/**/ { /**/ @@ -48,8 +48,10 @@ /**/ /**/ - @Method(selector = "onOSEmailSubscriptionChanged:") - void onOSEmailSubscriptionChanged(OSEmailSubscriptionStateChanges stateChanges); + @Method(selector = "setNotificationTypes:") + void setNotificationTypes(int notificationTypes); + @Method(selector = "setPushToken:") + void setPushToken(String pushToken); /**/ /**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationsDelegateAdapter.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationsDelegateAdapter.java new file mode 100644 index 000000000..79b0755b2 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalNotificationsDelegateAdapter.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ +/**/ +/**//**/ +/**/public/**/ class /**/OneSignalNotificationsDelegateAdapter/**/ + extends /**/NSObject/**/ + /**/implements OneSignalNotificationsDelegate/**/ { + + /**/ + /**/ + /**/ + /**/ + /**//**/ + /**//**/ + /**/ + + /**/ + /**//**/ + /**/ + @NotImplemented("setNotificationTypes:") + public void setNotificationTypes(int notificationTypes) {} + @NotImplemented("setPushToken:") + public void setPushToken(String pushToken) {} + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalOutcomeEventsController.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalOutcomeEventsController.java index 542e9e701..50ad26e6c 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalOutcomeEventsController.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalOutcomeEventsController.java @@ -59,13 +59,17 @@ public OneSignalOutcomeEventsController() {} protected native @Pointer long init(OSSessionManager sessionManager, OSOutcomeEventsFactory outcomeEventsFactory); @Method(selector = "clearOutcomes") public native void clearOutcomes(); + @Method(selector = "cleanUniqueOutcomeNotifications") + public native void cleanUniqueOutcomeNotifications(); + @Method(selector = "addOutcome:") + public native void addOutcome(String name); + @Method(selector = "addUniqueOutcome:") + public native void addUniqueOutcome(String name); + @Method(selector = "addOutcomeWithValue:value:") + public native void addOutcome(String name, NSNumber value); @Method(selector = "sendClickActionOutcomes:appId:deviceType:") public native void sendClickActionOutcomes(NSArray outcomes, String appId, NSNumber deviceType); - @Method(selector = "sendOutcomeEvent:appId:deviceType:successBlock:") - public native void sendOutcomeEvent(String name, String appId, NSNumber deviceType, @Block VoidBlock1 success); - @Method(selector = "sendUniqueOutcomeEvent:appId:deviceType:successBlock:") - public native void sendUniqueOutcomeEvent(String name, String appId, NSNumber deviceType, @Block VoidBlock1 success); - @Method(selector = "sendOutcomeEventWithValue:value:appId:deviceType:successBlock:") - public native void sendOutcomeEvent(String name, NSNumber weight, String appId, NSNumber deviceType, @Block VoidBlock1 success); + @Method(selector = "sendSessionEndOutcomes:appId:pushSubscriptionId:onesignalId:influenceParams:onSuccess:onFailure:") + public native void sendSessionEndOutcomes(NSNumber timeElapsed, String appId, String pushSubscriptionId, String onesignalId, NSArray influenceParams, @Block VoidBlock1> successBlock, @Block VoidBlock1 failureBlock); /**/ } diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalReceiveReceiptsController.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalReceiveReceiptsController.java new file mode 100644 index 000000000..b292c7fb4 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalReceiveReceiptsController.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalReceiveReceiptsController/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OneSignalReceiveReceiptsControllerPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalReceiveReceiptsController.class); }/**/ + /**//**/ + /**/ + public OneSignalReceiveReceiptsController() {} + protected OneSignalReceiveReceiptsController(Handle h, long handle) { super(h, handle); } + protected OneSignalReceiveReceiptsController(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "sendReceiveReceiptWithNotificationId:") + public native void sendReceiveReceipt(String notificationId); + @Method(selector = "sendReceiveReceiptWithPlayerId:notificationId:appId:") + public native void sendReceiveReceipt(String playerId, String notificationId, String appId); + @Method(selector = "sendReceiveReceiptWithPlayerId:notificationId:appId:successBlock:failureBlock:") + public native void sendReceiveReceipt(String playerId, String notificationId, String appId, @Block VoidBlock1> success, @Block VoidBlock1 failure); + @Method(selector = "sendReceiveReceiptWithPlayerId:notificationId:appId:delay:successBlock:failureBlock:") + public native void sendReceiveReceipt(String playerId, String notificationId, String appId, int delay, @Block VoidBlock1> success, @Block VoidBlock1 failure); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalRequest.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalRequest.java index 62f387cb0..a558e8274 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalRequest.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalRequest.java @@ -77,6 +77,10 @@ public OneSignalRequest() {} public native boolean isDataRequest(); @Property(selector = "setDataRequest:") public native void setDataRequest(boolean v); + @Property(selector = "timestamp") + public native NSDate getTimestamp(); + @Property(selector = "setTimestamp:") + public native void setTimestamp(NSDate v); /**/ /**//**/ /**/ diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalTrackFirebaseAnalytics.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalTrackFirebaseAnalytics.java index 084f7868d..8e39433cc 100644 --- a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalTrackFirebaseAnalytics.java +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalTrackFirebaseAnalytics.java @@ -60,7 +60,7 @@ public OneSignalTrackFirebaseAnalytics() {} @Method(selector = "updateFromDownloadParams:") public static native void updateFromDownloadParams(NSDictionary params); @Method(selector = "trackOpenEvent:") - public static native void trackOpenEvent(OSNotificationOpenedResult results); + public static native void trackOpenEvent(OSNotificationClickEvent event); @Method(selector = "trackReceivedEvent:") public static native void trackReceivedEvent(OSNotification notification); @Method(selector = "trackInfluenceOpenEvent") diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalUserManagerImpl.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalUserManagerImpl.java new file mode 100644 index 000000000..8ffe15d7b --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalUserManagerImpl.java @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass("_TtC13OneSignalUser24OneSignalUserManagerImpl")/**/ +/**/public/**/ class /**/OneSignalUserManagerImpl/**/ + extends /**/NSObject/**/ + /**/implements OneSignalNotificationsDelegate, OSPushSubscription, OSUser/**/ { + + /**/public static class OneSignalUserManagerImplPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalUserManagerImpl.class); }/**/ + /**//**/ + /**/ + protected OneSignalUserManagerImpl() {} + protected OneSignalUserManagerImpl(Handle h, long handle) { super(h, handle); } + protected OneSignalUserManagerImpl(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "onesignalId") + public native String getOnesignalId(); + @Property(selector = "pushSubscriptionId") + public native String getPushSubscriptionId(); + @Property(selector = "language") + public native String getLanguage(); + @Property(selector = "requiresUserAuth") + public native boolean requiresUserAuth(); + @Property(selector = "setRequiresUserAuth:") + public native void setRequiresUserAuth(boolean v); + @Property(selector = "id") + public native String getId(); + @Property(selector = "token") + public native String getToken(); + @Property(selector = "optedIn") + public native boolean isOptedIn(); + @Property(selector = "User") + public native OSUser getUser(); + @Property(selector = "pushSubscription") + public native OSPushSubscription getPushSubscription(); + /**/ + /**//**/ + /**/ + @Method(selector = "start") + public native void start(); + @Method(selector = "loginWithExternalId:token:") + public native void login(String externalId, String token); + @Method(selector = "logout") + public native void logout(); + @Method(selector = "clearAllModelsFromStores") + public native void clearAllModelsFromStores(); + @Method(selector = "getTags") + public native NSDictionary getTags(); + @Method(selector = "setLocationWithLatitude:longitude:") + public native void setLocation(float latitude, float longitude); + @Method(selector = "sendPurchases:") + public native void sendPurchases(NSArray purchases); + @Method(selector = "sharedInstance") + public static native OneSignalUserManagerImpl sharedInstance(); + @Method(selector = "setNotificationTypes:") + public native void setNotificationTypes(int notificationTypes); + @Method(selector = "setPushToken:") + public native void setPushToken(String pushToken); + @Method(selector = "startNewSession") + public native void startNewSession(); + @Method(selector = "updateSessionWithSessionCount:sessionTime:refreshDeviceMetadata:sendImmediately:onSuccess:onFailure:") + public native void updateSession(NSNumber sessionCount, NSNumber sessionTime, boolean refreshDeviceMetadata, boolean sendImmediately, @Block Runnable onSuccess, @Block Runnable onFailure); + @Method(selector = "runBackgroundTasks") + public native void runBackgroundTasks(); + @Method(selector = "addObserver:") + public native void addObserver(OSPushSubscriptionObserver observer); + @Method(selector = "removeObserver:") + public native void removeObserver(OSPushSubscriptionObserver observer); + @Method(selector = "optIn") + public native void optIn(); + @Method(selector = "optOut") + public native void optOut(); + @Method(selector = "onJwtExpiredWithExpiredHandler:") + public native void onJwtExpired(@Block("(,@Block)") VoidBlock2> expiredHandler); + @Method(selector = "addAliasWithLabel:id:") + public native void addAlias(String label, String id); + @Method(selector = "addAliases:") + public native void addAliases(NSDictionary aliases); + @Method(selector = "removeAlias:") + public native void removeAlias(String label); + @Method(selector = "removeAliases:") + public native void removeAliases(NSArray labels); + @Method(selector = "addTagWithKey:value:") + public native void addTag(String key, String value); + @Method(selector = "addTags:") + public native void addTags(NSDictionary tags); + @Method(selector = "removeTag:") + public native void removeTag(String tag); + @Method(selector = "removeTags:") + public native void removeTags(NSArray tags); + @Method(selector = "addEmail:") + public native void addEmail(String email); + @Method(selector = "removeEmail:") + public native void removeEmail(String email); + @Method(selector = "addSms:") + public native void addSms(String number); + @Method(selector = "removeSms:") + public native void removeSms(String number); + @Method(selector = "setLanguage:") + public native void setLanguage(String language); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalWrapper.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalWrapper.java new file mode 100644 index 000000000..f6e511fc2 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/OneSignalWrapper.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/OneSignalWrapper/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class OneSignalWrapperPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(OneSignalWrapper.class); }/**/ + /**//**/ + /**/ + public OneSignalWrapper() {} + protected OneSignalWrapper(Handle h, long handle) { super(h, handle); } + protected OneSignalWrapper(SkipInit skipInit) { super(skipInit); } + /**/ + /**/ + @Property(selector = "sdkType") + public static native String getSdkType(); + @Property(selector = "setSdkType:") + public static native void setSdkType(String v); + @Property(selector = "sdkVersion") + public static native String getSdkVersion(); + @Property(selector = "setSdkVersion:") + public static native void setSdkVersion(String v); + /**/ + /**//**/ + /**/ + + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/SwizzlingForwarder.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/SwizzlingForwarder.java new file mode 100644 index 000000000..d618e54f1 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/SwizzlingForwarder.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Library(Library.INTERNAL) @NativeClass/**/ +/**/public/**/ class /**/SwizzlingForwarder/**/ + extends /**/NSObject/**/ + /**//**/ { + + /**/public static class SwizzlingForwarderPtr extends Ptr {}/**/ + /**/static { ObjCRuntime.bind(SwizzlingForwarder.class); }/**/ + /**//**/ + /**/ + public SwizzlingForwarder() {} + protected SwizzlingForwarder(Handle h, long handle) { super(h, handle); } + protected SwizzlingForwarder(SkipInit skipInit) { super(skipInit); } + @Method(selector = "initWithTarget:withYourSelector:withOriginalSelector:") + public SwizzlingForwarder(NSObject object, Selector yourSelector, Selector originalSelector) { super((SkipInit) null); initObject(init(object, yourSelector, originalSelector)); } + /**/ + /**/ + + /**/ + /**//**/ + /**/ + @Method(selector = "initWithTarget:withYourSelector:withOriginalSelector:") + protected native @Pointer long init(NSObject object, Selector yourSelector, Selector originalSelector); + @Method(selector = "hasReceiver") + public native boolean hasReceiver(); + @Method(selector = "invokeWithArgs:") + public native void invoke(NSArray args); + /**/ +} diff --git a/onesignal/ios/src/main/java/org/robovm/pods/onesignal/ViewOrientation.java b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/ViewOrientation.java new file mode 100644 index 000000000..49fac61b3 --- /dev/null +++ b/onesignal/ios/src/main/java/org/robovm/pods/onesignal/ViewOrientation.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2013-2015 RoboVM AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.robovm.pods.onesignal; + +/**/ +import java.io.*; +import java.nio.*; +import java.util.*; +import org.robovm.objc.*; +import org.robovm.objc.annotation.*; +import org.robovm.objc.block.*; +import org.robovm.rt.*; +import org.robovm.rt.annotation.*; +import org.robovm.rt.bro.*; +import org.robovm.rt.bro.annotation.*; +import org.robovm.rt.bro.ptr.*; +import org.robovm.apple.foundation.*; +import org.robovm.apple.usernotifications.*; +import org.robovm.apple.uikit.*; +/**/ + +/**/ + +/**/ +/**/@Marshaler(ValuedEnum.AsMachineSizedSIntMarshaler.class)/**/ +public enum /**/ViewOrientation/**/ implements ValuedEnum { + /**/ + Invalid(0L), + Portrait(1L), + Landscape(2L); + /**/ + + /**/ + /**/ + /**//**/ + /**//**/ + + private final long n; + + private /**/ViewOrientation/**/(long n) { this.n = n; } + public long value() { return n; } + public static /**/ViewOrientation/**/ valueOf(long n) { + for (/**/ViewOrientation/**/ v : values()) { + if (v.n == n) { + return v; + } + } + throw new IllegalArgumentException("No constant with value " + n + " found in " + + /**/ViewOrientation/**/.class.getName()); + } +} diff --git a/onesignal/ios/src/main/robopods/META-INF/robovm/ios/robovm.xml b/onesignal/ios/src/main/robopods/META-INF/robovm/ios/robovm.xml index 865f3ad8f..1a9e98248 100644 --- a/onesignal/ios/src/main/robopods/META-INF/robovm/ios/robovm.xml +++ b/onesignal/ios/src/main/robopods/META-INF/robovm/ios/robovm.xml @@ -1,8 +1,11 @@ - OneSignal + OneSignalFramework OneSignalCore + OneSignalOSCore + OneSignalNotifications OneSignalOutcomes + OneSignalUser CoreGraphics WebKit SystemConfiguration diff --git a/scripts/harvester.kts b/scripts/harvester.kts index ae3a5d7bd..98c698b00 100755 --- a/scripts/harvester.kts +++ b/scripts/harvester.kts @@ -182,8 +182,11 @@ val knownFrameworks = mutableMapOf Unit>( "OneSignal" to { framework -> val artifact = "$framework.framework" val versionFile: String by lazy { - downloadFolder.extend("OneSignal.xcframework/version").readText() + downloadFolder.extend("OneSignalFramework.xcframework/version").readText() } + val internalFrameworks = arrayOf("OneSignalFramework", "OneSignalCore", "OneSignalOSCore", + "OneSignalExtension", "OneSignalLocation", "OneSignalNotifications", "OneSignalInAppMessages", + "OneSignalOutcomes", "OneSignalUser" ) processFramework( artifact = artifact, moduleFolder = "onesignal/ios", @@ -191,42 +194,41 @@ val knownFrameworks = mutableMapOf Unit>( destinationHeadersDir = Path.of("onesignal", "ios", "src", "main", "bro-gen").toFile(), yaml = "onesignal.yaml", headerFolderCleaner = { frm, dst -> - cleanUpHeaders(frm, dst.extend("OneSignal.framework")) - cleanUpHeaders(frm, dst.extend("OneSignalCore.framework")) - cleanUpHeaders(frm, dst.extend("OneSignalOutcomes.framework")) + internalFrameworks.forEach { + cleanUpHeaders(frm, dst.extend("$it.framework")) + } }, headersCopier = { _, src, dst -> - copyHeaders("OneSignal.framework", - src.extend("OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers"), - dst.extend("OneSignal.framework/Headers")) - copyHeaders("OneSignalCore.framework", - src.extend("OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers"), - dst.extend("OneSignalCore.framework/Headers")) - copyHeaders("OneSignalOutcomes.framework", - src.extend("OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers"), - dst.extend("OneSignalOutcomes.framework/Headers")) + internalFrameworks.forEach { + copyHeaders("$it.framework", + src.extend("$it.xcframework/ios-arm64/$it.framework/Headers"), + dst.extend("$it.framework/Headers")) + } } , interactiveValidateHeaderFolder = { _, src, instruction, optional -> - interactiveValidateHeaderFolder("OneSignal.framework", - src.extend("OneSignal.xcframework/ios-arm64_armv7_armv7s/OneSignal.framework/Headers"), - instruction, optional) - interactiveValidateHeaderFolder("OneSignalCore.framework", - src.extend("OneSignalCore.xcframework/ios-arm64_armv7_armv7s/OneSignalCore.framework/Headers"), - instruction, optional) - interactiveValidateHeaderFolder("OneSignalOutcomes.framework", - src.extend("OneSignalOutcomes.xcframework/ios-arm64_armv7_armv7s/OneSignalOutcomes.framework/Headers"), - instruction, optional) + internalFrameworks.forEach { + interactiveValidateHeaderFolder("$it.framework", + src.extend("$it.xcframework/ios-arm64/$it.framework/Headers"), + instruction, optional) + } }, version = { versionFile }, - instruction = """ - 1. Download OneSignal.xcframework.zip from https://github.com/OneSignal/OneSignal-iOS-SDK/releases - 2. Unpack, expected loaction ${downloadFolder.extend("OneSignal.xcframework")} - 3. Download OneSignalCore.xcframework.zip from https://github.com/OneSignal/OneSignal-iOS-SDK/releases - 4. Unpack, expected loaction ${downloadFolder.extend("OneSignalCore.xcframework")} - 5. Download OneSignalOutcomes.xcframework.zip from https://github.com/OneSignal/OneSignal-iOS-SDK/releases - 6. Unpack, expected loaction ${downloadFolder.extend("OneSignalOutcomes.xcframework")} - 7. create a file ${downloadFolder.extend("OneSignal.xcframework/version")} and put verions there, e.g. 4.0.0 - """.trimIndent() + instruction = run { + """ + - Download frameworks: + + """.trimIndent() + + internalFrameworks.map { + """ + - Download $it.xcframework.zip from https://github.com/OneSignal/OneSignal-iOS-SDK/releases + - Unpack, expected loaction ${downloadFolder.extend("$it.xcframework")} + """.trimIndent() + }.joinToString("\n")+ + """ + + - create a file ${downloadFolder.extend("OneSignalFramework.xcframework/version")} and put verions there, e.g. 4.0.0 + """.trimIndent() + } ) }, "Pollfish" to { framework ->