Граф коммитов

147 Коммитов

Автор SHA1 Сообщение Дата
Tom Tan 375938a215
Remove go wrapper (#1268) 2024-04-30 16:38:12 -07:00
absaroj 9fd2e2720c
adding comment about using the typealised enums in swift (#1241)
Co-authored-by: Matthew Koscumb <49213788+mkoscumb@users.noreply.github.com>
2024-02-02 09:55:18 -08:00
absaroj bad56a0b93
adding setters and getters for properties in eventprops for swift wrappers (#1239) 2024-01-30 18:54:52 -08:00
Matthew Koscumb 5d539d18ea
Fix -Wimplicit-retain-self warnings in ODWLogger.mm (#1235) 2024-01-25 14:46:20 -08:00
Sid Dahiya 55c90b5d58
Add missing configuration value from ODWPrivacyGuardInitConfig (#1130) 2023-09-26 13:07:41 -07:00
absaroj 15e18554a0
Adding example Xcode project to showcase swift wrapper package import (#1178)
* adding example app for swift wrappers

* linking required libs and setting build dependencies to build the project

* adding a readme file with details

* removing box specific files

* remove assets

* applying pr suggestions

* fixing a bug and correcting sample app projectclear

* correcting heading signature
2023-06-28 15:13:51 -07:00
absaroj cc955ac269
Hiding all ObjC types behind Swift wrappers (#1176)
* adding swift wrapper

* moving files to sources

* moving files to proper places

* adding module for header expose and importing it in swift wrapper

* correcting files for build errors and other changes

* adding module for objc

* swift build passing'

* adding readme

* changing the package name to 1dsswiftwrapper

* changing target name

* adding pr suggestions

* adding build.sh changes

* cmake list file changes

* creating static lib

* adding swift wrappers build and linking

* adding more logic for building and producing sample app

* adding code for swiftc invoking

* adding comments

* adding change to create the sample app

* linking and includding modules in swiftc to build the sample exe: being created

* adding comments

* compiling all files frrom sample

* removing extraline

* correcting the output folder of swift build

* correcting build output folder paths

* adding typealias file to stop importing the objcmodule in clients (#1171)

* adding typealias file to stop importing the objcmodule in clients

* giving better names

* adding call to create logger

* adding changes for framework include

* adding fwks

* linking libs and fwks

* adding getter and setters for swift as computed properties

* adding sample app changes

* adding app changes

* adding commondatacontext

* swift build passing

* correcting common context init

* adding get set in event properties list

* adding getter to eventprops

* removing useless methods

* adding getter and setter for eventprops

* adding getter

* fixing type bug

* fixing main app issues

* adding semantic context variable to the logger

* modifying the access level for the objc types in swift to make sure they are not exposed to the lcient

* adding default constructor

* keeping main.swift clean
'

* correcting comment

* adding computed property for objc variable

---------

Co-authored-by: Lalit Kumar Bhasin <labhas@microsoft.com>
2023-06-23 15:40:02 -07:00
absaroj 42dae872d6
adding sample app changes for the swift wrappers (#1175) 2023-06-23 14:56:42 -07:00
absaroj ada085eb18
Adding changes for local build script and cmakelist to create exe using swift package (#1166)
* adding swift wrapper

* moving files to sources

* moving files to proper places

* adding module for header expose and importing it in swift wrapper

* correcting files for build errors and other changes

* adding module for objc

* swift build passing'

* adding readme

* changing the package name to 1dsswiftwrapper

* changing target name

* adding pr suggestions

* adding build.sh changes

* cmake list file changes

* creating static lib

* adding swift wrappers build and linking

* adding more logic for building and producing sample app

* adding code for swiftc invoking

* adding comments

* adding change to create the sample app

* linking and includding modules in swiftc to build the sample exe: being created

* adding comments

* compiling all files frrom sample

* removing extraline

* correcting the output folder of swift build

* correcting build output folder paths

* adding typealias file to stop importing the objcmodule in clients (#1171)

* adding typealias file to stop importing the objcmodule in clients

* giving better names

---------

Co-authored-by: Lalit Kumar Bhasin <labhas@microsoft.com>
2023-06-21 12:17:44 -07:00
absaroj 061386741c
Configuring wrappers as Swift Package (#1160) 2023-06-09 13:37:12 -07:00
absaroj 8032b1aef1
adding swift wrapper for DiagnosticDataViewer (#1148)
* adding diagnostic wrapper for swift

* adding suggestions from pr

* making it final

* adding vars instead of methods

* correcting var

* fixing build issues

---------

Co-authored-by: Lalit Kumar Bhasin <labhas@microsoft.com>
2023-05-23 19:31:33 -07:00
absaroj 90020d5148
Adding swift wrapper for logmanager and logger classes over Objc (#1143)
* adding mgr and logger classes

* adding comment

* adding line at end

* adding pr suggestions

* adding pr suggestions

* changing file names

* adding suggestions from the pr comments

* adding suggestions from PR

* adding pr suggestions

* removing self from the instance references

* adding final to the logger class
2023-05-23 19:29:07 -07:00
absaroj 25bc0806f2
adding config class to swift wrappers (#1141)
* adding config class

* adding comment

* correcting the cmake min version

* adding checks for libs being linked in cmake

* correcting comments and args

* changing filename

* removing comment

* correcting the use of optional in swift wrapper

* marking class final

---------
2023-05-19 19:54:59 -07:00
absaroj 63f28337ae
adding privacy and semantic wrappers (#1144)
* adding privacy and semantic wrappers

* adding comment to constructor

* changing file names

* correcting argument optionals

* adding suggestions from pr

* removing self from the instance references
2023-05-19 16:02:49 -07:00
n8ta-msft 0d785a1302
Add missing frameworks (#1150) 2023-05-19 10:41:24 -07:00
absaroj 0f06e94318
Add Properties class for Swift wrappers (#1138)
* adding local build script file for swift wrappers

* adding main file to test the swift logger classes

* adding build.sh and cmake file for swift wrappers ONLY build

* adding git ignore file

* correcting xcodebuild args

* removing comments

* adding EventProperties class, wrapper for properties in Swift along with other required files

* adding pr suggestions

* adding min version of cmake required to generate for swift
2023-05-01 22:01:51 -07:00
absaroj a4f9b00785
adding null check after utf8string conversion before using it for locale code (#1116) 2023-03-21 15:33:46 -07:00
dawidk-msft ea0eb89365
Introduce option to checkpoint database on Flush() (#1104)
The way SQLite is initialized (synchronous=NORMAL config) introduces potential issues with durability of changes/updates in some corner cases.

iOS Outlook logs telemetry in scenarios where some critical validation/check failed and cannot be handled and process self-terminates. In between logging the event and terminating we call Flush() to avoid lost events. If we checkpoint the DB before returning from the Flush() call app can safely assume no events will be lost. This change introduces an option that enables such behavior.

Alternative solution would be to use the default configuration (with synchronous=FULL) which doesn't have that problem but has overhead of filesystem syncing for each transaction which makes it a bad idea from the perf point of view.
2023-02-28 23:24:05 -08:00
Nishchith C P eddf9b3c92
Fixed the issue of configuration being shared between multiple loggers with different configuration (#1021) 2022-06-09 12:02:54 -07:00
Sid Dahiya c18ed6c034
Update modules commit and related wrappers (#958) 2021-11-17 10:03:09 -08:00
eduardo-camacho a8c90ab03a
Set locale and country code only when supported by Apple OS Version (#929) 2021-09-16 08:39:34 -07:00
Reiley Yang 3fcb47f28c
standardize the copyright info (#925) 2021-08-31 15:19:56 -07:00
Sid Dahiya f43b6bde02
Add Reset Privacy Guard API (#900)
* Add Reset Privacy Guard API and make reinitialization of Privacy Guard no-op.

* Add example in main.mm

Co-authored-by: Sid Dahiya <sidahiy@microsoft.com>
2021-07-14 14:28:45 -07:00
Sid Dahiya 83b0b52eef
Obj-C Wrapper Updates (#898)
* Fix compile breaks in main.mm

* Add missing includes and sources.

* Replace copy property with assign for complex objects.

* add missing reference to SystemConfiguration

* Add SetType method to EventProperties.

* Remove assign for default types.

* Revert dot-notation assignments.

* Fix spacing.

* Revert cmakelists changes.

* Fix main.mm PrivacyGuard updates.

* Update CMakeLists.txt

* Update ODWEventProperties.h

Co-authored-by: Sid Dahiya <sidahiy@microsoft.com>
2021-07-08 18:43:20 -07:00
Sid Dahiya 9391655857
Add Custom Prefix configuration to Java and ObjC (#879)
* Add CFG_STR_COMPAT_PREFIX to Java wrappers.

* Add ODWCFG_BOOL_COMPAT_DOTS to ObjC wrappers

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-28 12:07:28 -07:00
dipatid 1eaca26f59
set canUseSDk flag to false before pause transmission (#868) 2021-05-13 12:39:32 -07:00
Sid Dahiya 2b9c151c1b
Add Multiple LogManager support for Privacy Guard (#850)
* Add PrivacyGuardHelper

The class manages the PrivacyGuard shared_ptr.shared_ptr. This is needed to allow for logmanger-specific integration.

* Add checks for module before including PG.

* Update modules commit to module-master

* Fix build breaks and address comments.

* Correctly use the shared_ptr

* Fix missing methods for ILogManager

- Added tests
- Renamed PrivacyGuardState to PrivacyGuardHelper.

* Remove `/*static*/` where it's not used.

* Simplify the PG registration for LogManager

* Revert "Remove `/*static*/` where it's not used."

This reverts commit 3cf8f12242.

* Revert "Add PrivacyGuardState"

This reverts commit 42996be631.

# Conflicts:
#	lib/android_build/maesdk/src/main/java/com/microsoft/applications/events/LogManagerProvider.java
#	lib/jni/LogManager_jni.cpp
#	lib/jni/PrivacyGuard_jni.cpp

* Revert more changes.

* Cleanup LogManager and tests

* Minor rename of methods.

* Improve the test for PG on Multiple LogManager

* Minor refactoring.

* Add Java implementation for PG InitConfig

* Fix Mac build break for Android

Add support for multi-user scenarios
Point modules to newer commit with PG Module changes.

* Update modules and JNI.

* Try fix build break.

* Disable Android test for PG

Remove all the #ifs I added to make the test work.

* Fix PrivacyGuard_JNI compilation

* Remove deprecated CDC fields from Java.

* Update Obj-C Wrapper.

* Add ObjC InitConfig files.

* ObjC Wrapper updates.

* Update modules commit.

* Modules repo commit update.

* Pair programming and Xcode FTW

* Java Updates

* Address ObjC comments.

* Update main.mm to initialize the NSMutableArrays before using them.

* fix typo

* Update PG test

* Update InitConfig to use a C'tor for required values.

* Fix a typo on ObjC Wrapper

* Update Modules commit point to master tip.

Co-authored-by: David Brown <dabrow@microsoft.com>
2021-05-11 17:33:25 -07:00
dipatid ed6667bcc6
[iOS Wrapper] Added applicationWillTerminate notification Handler in ODWLogger.mm (#847)
* Added applicationWillTerminate notification observer

* Added appWillTerminte notification handler to not allow use of SDK after the notification fires

* Minor corrections

* used compiler flags for iOS

* Added [ODWLogManager applicationWillTerminate] class method instead of listening to notification in SDK

* Addded pause transmission and flushAndTearDown calls in appWillTerminate method.

* correctin in api call

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-06 09:19:51 -07:00
Matthew Koscumb 27d226c6f4
Enable Warning as Error on GCC and Clang builds for symmetry with MSVC. (#797)
* Enable Warning as Error on GCC and Clang builds for symmetry with Windows.

* Fix -Wreorder issues in HttpClient_Curl.hpp

* Default assign variables using in-class initializer per CppStandardGuidelines C.48

* Disable -Wtype-limits on clang in parity with MSVC

* Handle GCC separately from Clang for manipulating the warning state.

* Undo a clang-format change.

* Exec is used on non-Apple platforms, however this means that the method fires -Wunused-function on Apple platforms. Locally supress that warning.

* Suppress missing field initializer warning around tm, as I'm not 100% what the most correct fix is here.

* Avoid multi-line comment continuation in -Wcomment

* GCC throws -Wunknown-pragmas on #pragma clang, surround invocations with #ifdef __clang__

* Remove unused local variable, as it's not necessary for the test.

* Suppress -Wobjc-missing-super warnings in third_party code.

* Fix a -Wformat-security warning by treating the message string as an argument.

* Fix error: comparison between ‘const enum Microsoft::Applications::Events::EventProperty::<unnamed>’ and ‘const enum evt_prop_t’ [-Werror=enum-compare]

* Rather than %@, use %s for c-style strings.

* The two types here aren't safely default comparable, cast to underlying types.

* Rather than raising an exception directly, call ODWLogger raiseException

* Wrap #pragma warning with _MSC_VER ifdefs.

* No need for an NSString when NSException prefers a string literal.

* Fix -Wreorder issues in HttpResponseDecoderTests

* Fix error: 'ShadowBondSplicer::addRecord' hides overloaded virtual function [-Werror,-Woverloaded-virtual] by renaming the helper to addCsRecord

* Fix unused local variable warnings by removing the unused locals.

* Fix error: local variable 'output' will be copied despite being returned by name [-Werror,-Wreturn-std-move]. Note that this won't be necessary with guaranteed NVRO in C++17, yay!

* Remove unused locals in MetaStatsTests::GenerateStartEvent

* Fix -Wswitch error on non-Android.

* Fix error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] in OfflineStorageTests_Room.cpp

* More unsigned-signed comparison warning fixes.

* howMany is used in a lambda capture, but clang thinks it isn't used. Odd.

* The unused-lambda-capture warning appears to be a Clang9 bug, don't disable this warning for GCC

* More signed-unsigned comparison fixes.

* Fix signed-unsigned comparison warning in TransmissionPolicyManagerTests. Used long long since that's the return type of std::chrono::duration::milliseconds::count()

* Don't need the long long, default int is fine.

* Fix -wsign-compare in TransmitProfilesTests.cpp

* Missed assigning isAborted to false, std::atomic<T> will zero init its details, but not the T (until C++20).

* Fix -Wdeprecated-copy by defining the copy and move constructors for the Variant type.

* Add copy and move c'tors and assignment operators to the GUID_t type.

* Add copy and move constructors and assignment operators on time_ticks_t

* Fix -Wformat-truncation on GCC 9.3.0 in Pal.cpp by suppressing the warning on this line. This appears to be a false positive.

* INSTANTIATE_TEST_CASE_P is deprecated, using INSTANTIATE_TEST_SUITE_P

* Clang also defines __GNUC__, so since this warning is  a GCC only issue suppress the warning when !defined __clang__

* Missed closing #endif in PAL.cpp

* Some versions of GTest deprecate INSTANTIATE_TEST_CASE_P and others do not, the 1DS SDK should unify on a single version of GTest that's part of the repo, or via a package manager. That's not going to be part of this changelist, so simply suppress this warning.

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-04-13 15:15:14 -07:00
Sagar Punhani 15c500ab2a
Fix bool check for objc (#824)
Co-authored-by: Sagar Punhani <sagar7p@gmail.com>
2021-04-09 13:27:56 -07:00
Tommy Meisel fcc59f1930
[ObjC] Add function to set host (#816)
* add function to set host

* fix build

* add getter, unit test

Co-authored-by: Tommy Meisel <thmeisel@microsoft.com>
2021-03-30 18:32:23 -07:00
Tommy Meisel a58dd9c971
Fix ODWLogConfiguration.set function (#814)
* update setWithValue, add unit test

* fix tests

Co-authored-by: Tommy Meisel <thmeisel@microsoft.com>
2021-03-30 12:11:01 -07:00
Tommy Meisel ef6b90c651
Move setting initialized to inner function (#803) 2021-03-04 23:11:50 -08:00
Tommy Meisel 24eacfa085
Prospective fix for crash (#800)
Make configuration static to keep in-memory
2021-03-04 17:36:04 -08:00
Sid Dahiya 27e0e5826d
Update ODWPrivacyGuard.mm 2021-03-02 08:46:10 -08:00
Sid Dahiya fd566799e0 Switch CommonDataContext to not be unique_ptr. 2021-03-01 14:11:32 -08:00
Sid Dahiya d3b7a1a76d Update PrivacyGuard constructor. 2021-02-26 18:36:11 -08:00
Sid Dahiya 5d19e2cd02 Fixes based on module changes. 2021-02-26 17:55:05 -08:00
theta3 125818fcf7
Expose LogConfiguration.getLogConfigurationCopy() and LogManager.loggerWithTenant() with custom config on iOS (#785)
Currently iOS only uses default config, which makes side-by-side loggers with different configuration not possible

Co-authored-by: Tommy Meisel <thomas.meisel95@gmail.com>
Co-authored-by: Tommy Meisel <thmeisel@microsoft.com>
2021-02-25 15:23:57 -08:00
dipatid 5c02eb2ff3
fixed documentation warnings in ObjC layer which cause XCode build to fail (#776) 2021-01-29 11:45:25 +05:30
dipatid 79c412fad9 adding return value statements in flush and flushAndTearDown methods 2021-01-25 15:57:53 +05:30
Max Golovanov a943a8808f
Update ODWLogManager.mm
ILogConfiguration should remain in scope while its LogManager is running
2021-01-15 13:45:20 -08:00
bemartin c5b7a1569d
Add missing methods and properties to obj-c wrapper with corresponding Xamarin bindings (#750)
* Add Obj-C wrapper to set cache path and add methods returnin a status for Flush and FlushAndTearDown

* Update

* Another update

* Maybe final one

* Addressing feedback

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-01-07 09:29:54 -08:00
Benoit Martin 5b3de2bd55 Update tests 2020-10-22 16:03:48 -07:00
Benoit Martin 79385556c0 Xamarin bindings update 2020-10-22 09:24:28 -07:00
Vipul Agarwal 59e6942bf8 resolved nit comments 2020-10-21 01:09:47 +05:30
Vipul Agarwal cd4666286a resolved extra creation of ODWLogger instance 2020-10-21 00:05:14 +05:30
Vipul Agarwal 340ced5a27 resolved comments 2020-10-20 23:11:39 +05:30
Vipul Agarwal 4e0f29e7b4 resolved comments 2020-10-20 10:49:10 +05:30
Vipul Agarwal ad566a3505 exposed init apis in obj c header 2020-10-19 18:55:47 +05:30