diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml
index 033cb72..3e935af 100644
--- a/.github/workflows/continuous_integration.yml
+++ b/.github/workflows/continuous_integration.yml
@@ -3,7 +3,7 @@ name: Continuous Integration
on:
push:
branches:
- - main
+ - main, development
pull_request:
types: [opened, synchronize, reopened]
diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml
index 20e4d4c..e11b4ab 100644
--- a/.github/workflows/prepare_release.yml
+++ b/.github/workflows/prepare_release.yml
@@ -40,7 +40,7 @@ jobs:
- name: Get new version
id: version
- run: echo "VERSION=$(ruby -e 'puts File.read("./OSGeolocationLib.podspec").match(/spec.version.*=.*''(\d+\.\d+\.\d+)''/)[1]')" >> $GITHUB_ENV
+ run: echo "VERSION=$(ruby -e 'puts File.read("./IONGeolocationLib.podspec").match(/spec.version.*=.*''(\d+\.\d+\.\d+)''/)[1]')" >> $GITHUB_ENV
- name: Create new branch
run: |
@@ -48,12 +48,12 @@ jobs:
- name: Move zip file to root and push changes
run: |
- if [ -f OSGeolocationLib.zip ]; then
- rm OSGeolocationLib.zip
+ if [ -f IONGeolocationLib.zip ]; then
+ rm IONGeolocationLib.zip
else
echo "File does not exist."
fi
- mv build/OSGeolocationLib.zip .
+ mv build/IONGeolocationLib.zip .
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
@@ -63,7 +63,7 @@ jobs:
- name: Create pull request
id: create_pr
run: |
- gh pr create -B main -H prepare-new-release-${{ env.VERSION }} --title 'Prepare `main` to Release `${{ env.VERSION }}`' --body 'Bumps version to `${{ env.VERSION }}`.
Creates an updated and ready-to-be-released `OSGeolocationLib.zip`.'
+ gh pr create -B main -H prepare-new-release-${{ env.VERSION }} --title 'Prepare `main` to Release `${{ env.VERSION }}`' --body 'Bumps version to `${{ env.VERSION }}`.
Creates an updated and ready-to-be-released `IONGeolocationLib.zip`.'
PR_NUMBER=$(gh pr view --json number --jq '.number')
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
env:
diff --git a/.github/workflows/release_and_publish.yml b/.github/workflows/release_and_publish.yml
index 4735ea5..b49aace 100644
--- a/.github/workflows/release_and_publish.yml
+++ b/.github/workflows/release_and_publish.yml
@@ -20,7 +20,7 @@ jobs:
- name: Get new version
id: version
- run: echo "VERSION=$(ruby -e 'puts File.read("./OSGeolocationLib.podspec").match(/spec.version.*=.*''(\d+\.\d+\.\d+)''/)[1]')" >> $GITHUB_ENV
+ run: echo "VERSION=$(ruby -e 'puts File.read("./IONGeolocationLib.podspec").match(/spec.version.*=.*''(\d+\.\d+\.\d+)''/)[1]')" >> $GITHUB_ENV
- name: Extract release notes
run: sh scripts/extract_release_notes.sh "${{ env.VERSION }}" >> release_notes.md
@@ -50,14 +50,14 @@ jobs:
gh release create "$TAG_NAME" \
--title "$TAG_NAME" \
--notes "$RELEASE_NOTES" \
- "OSGeolocationLib.zip"
+ "IONGeolocationLib.zip"
echo "Release created for tag: $TAG_NAME"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Cocoapods
- run: pod trunk push ./OSGeolocationLib.podspec --allow-warnings
+ run: pod trunk push ./IONGeolocationLib.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
diff --git a/OSGeolocationLib.podspec b/IONGeolocationLib.podspec
similarity index 71%
rename from OSGeolocationLib.podspec
rename to IONGeolocationLib.podspec
index d91220b..370984d 100644
--- a/OSGeolocationLib.podspec
+++ b/IONGeolocationLib.podspec
@@ -1,16 +1,16 @@
Pod::Spec.new do |spec|
- spec.name = 'OSGeolocationLib'
+ spec.name = 'IONGeolocationLib'
spec.version = '0.0.1'
spec.summary = 'A native iOS library for Geolocation authorisation and monitoring.'
spec.description = 'A Swift library for iOS that provides simple, reliable access to device GPS capabilities. Get location data, monitor position changes, and manage location services with a clean, modern API.'
- spec.homepage = 'https://github.com/ionic-team/OSGeolocationLib-iOS'
+ spec.homepage = 'https://github.com/ionic-team/IONGeolocationLib-iOS'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.author = { 'OutSystems Mobile Ecosystem' => 'rd.mobileecosystem.team@outsystems.com' }
- spec.source = { :http => "https://github.com/ionic-team/OSGeolocationLib-iOS/releases/download/#{spec.version}/OSGeolocationLib.zip", :type => "zip" }
- spec.vendored_frameworks = "OSGeolocationLib.xcframework"
+ spec.source = { :http => "https://github.com/ionic-team/IONGeolocationLib-iOS/releases/download/#{spec.version}/IONGeolocationLib.zip", :type => "zip" }
+ spec.vendored_frameworks = "IONGeolocationLib.xcframework"
spec.ios.deployment_target = '14.0'
spec.swift_versions = ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9']
diff --git a/OSGeolocationLib.xcodeproj/project.pbxproj b/IONGeolocationLib.xcodeproj/project.pbxproj
similarity index 76%
rename from OSGeolocationLib.xcodeproj/project.pbxproj
rename to IONGeolocationLib.xcodeproj/project.pbxproj
index 632bbd4..0409510 100644
--- a/OSGeolocationLib.xcodeproj/project.pbxproj
+++ b/IONGeolocationLib.xcodeproj/project.pbxproj
@@ -7,13 +7,13 @@
objects = {
/* Begin PBXBuildFile section */
- 752B49212D11B262002EA65D /* OSGLOCManagerWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49202D11B262002EA65D /* OSGLOCManagerWrapper.swift */; };
- 752B49232D11D421002EA65D /* OSGLOCAuthorisationRequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49222D11D421002EA65D /* OSGLOCAuthorisationRequestType.swift */; };
- 752B49262D11D440002EA65D /* OSGLOCAuthorisation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49252D11D440002EA65D /* OSGLOCAuthorisation.swift */; };
- 752B49282D11D46D002EA65D /* OSGLOCPositionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49272D11D46D002EA65D /* OSGLOCPositionModel.swift */; };
- 752B492B2D11DCC6002EA65D /* OSGLOCManagerProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B492A2D11DCC6002EA65D /* OSGLOCManagerProtocols.swift */; };
- 7575CF6A2BFCEE6F008F3FD0 /* OSGeolocationLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7575CF612BFCEE6F008F3FD0 /* OSGeolocationLib.framework */; };
- 7575CF802BFCEEEA008F3FD0 /* OSGLOCManagerWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7575CF7D2BFCEEEA008F3FD0 /* OSGLOCManagerWrapperTests.swift */; };
+ 752B49212D11B262002EA65D /* IONGLOCManagerWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49202D11B262002EA65D /* IONGLOCManagerWrapper.swift */; };
+ 752B49232D11D421002EA65D /* IONGLOCAuthorisationRequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49222D11D421002EA65D /* IONGLOCAuthorisationRequestType.swift */; };
+ 752B49262D11D440002EA65D /* IONGLOCAuthorisation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49252D11D440002EA65D /* IONGLOCAuthorisation.swift */; };
+ 752B49282D11D46D002EA65D /* IONGLOCPositionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B49272D11D46D002EA65D /* IONGLOCPositionModel.swift */; };
+ 752B492B2D11DCC6002EA65D /* IONGLOCManagerProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 752B492A2D11DCC6002EA65D /* IONGLOCManagerProtocols.swift */; };
+ 7575CF6A2BFCEE6F008F3FD0 /* IONGeolocationLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7575CF612BFCEE6F008F3FD0 /* IONGeolocationLib.framework */; };
+ 7575CF802BFCEEEA008F3FD0 /* IONGLOCManagerWrapperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7575CF7D2BFCEEEA008F3FD0 /* IONGLOCManagerWrapperTests.swift */; };
75E8BAA12D12D5AB00ED4467 /* MockCLLocationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75E8BAA02D12D5AB00ED4467 /* MockCLLocationManager.swift */; };
75E8BAA32D12F87D00ED4467 /* MockServicesChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75E8BAA22D12F87300ED4467 /* MockServicesChecker.swift */; };
/* End PBXBuildFile section */
@@ -29,14 +29,14 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- 752B49202D11B262002EA65D /* OSGLOCManagerWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSGLOCManagerWrapper.swift; sourceTree = ""; };
- 752B49222D11D421002EA65D /* OSGLOCAuthorisationRequestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSGLOCAuthorisationRequestType.swift; sourceTree = ""; };
- 752B49252D11D440002EA65D /* OSGLOCAuthorisation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSGLOCAuthorisation.swift; sourceTree = ""; };
- 752B49272D11D46D002EA65D /* OSGLOCPositionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSGLOCPositionModel.swift; sourceTree = ""; };
- 752B492A2D11DCC6002EA65D /* OSGLOCManagerProtocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSGLOCManagerProtocols.swift; sourceTree = ""; };
- 7575CF612BFCEE6F008F3FD0 /* OSGeolocationLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OSGeolocationLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 7575CF692BFCEE6F008F3FD0 /* OSGeolocationLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OSGeolocationLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- 7575CF7D2BFCEEEA008F3FD0 /* OSGLOCManagerWrapperTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSGLOCManagerWrapperTests.swift; sourceTree = ""; };
+ 752B49202D11B262002EA65D /* IONGLOCManagerWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IONGLOCManagerWrapper.swift; sourceTree = ""; };
+ 752B49222D11D421002EA65D /* IONGLOCAuthorisationRequestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IONGLOCAuthorisationRequestType.swift; sourceTree = ""; };
+ 752B49252D11D440002EA65D /* IONGLOCAuthorisation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IONGLOCAuthorisation.swift; sourceTree = ""; };
+ 752B49272D11D46D002EA65D /* IONGLOCPositionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IONGLOCPositionModel.swift; sourceTree = ""; };
+ 752B492A2D11DCC6002EA65D /* IONGLOCManagerProtocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IONGLOCManagerProtocols.swift; sourceTree = ""; };
+ 7575CF612BFCEE6F008F3FD0 /* IONGeolocationLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IONGeolocationLib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7575CF692BFCEE6F008F3FD0 /* IONGeolocationLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IONGeolocationLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7575CF7D2BFCEEEA008F3FD0 /* IONGLOCManagerWrapperTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IONGLOCManagerWrapperTests.swift; sourceTree = ""; };
75E8BAA02D12D5AB00ED4467 /* MockCLLocationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockCLLocationManager.swift; sourceTree = ""; };
75E8BAA22D12F87300ED4467 /* MockServicesChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockServicesChecker.swift; sourceTree = ""; };
/* End PBXFileReference section */
@@ -53,7 +53,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 7575CF6A2BFCEE6F008F3FD0 /* OSGeolocationLib.framework in Frameworks */,
+ 7575CF6A2BFCEE6F008F3FD0 /* IONGeolocationLib.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -63,8 +63,8 @@
752B492C2D11DFDD002EA65D /* Publishers */ = {
isa = PBXGroup;
children = (
- 752B49202D11B262002EA65D /* OSGLOCManagerWrapper.swift */,
- 752B492A2D11DCC6002EA65D /* OSGLOCManagerProtocols.swift */,
+ 752B49202D11B262002EA65D /* IONGLOCManagerWrapper.swift */,
+ 752B492A2D11DCC6002EA65D /* IONGLOCManagerProtocols.swift */,
);
path = Publishers;
sourceTree = "";
@@ -72,8 +72,8 @@
7575CF572BFCEE6F008F3FD0 = {
isa = PBXGroup;
children = (
- 7575CF632BFCEE6F008F3FD0 /* OSGeolocationLib */,
- 7575CF6D2BFCEE6F008F3FD0 /* OSGeolocationLibTests */,
+ 7575CF632BFCEE6F008F3FD0 /* IONGeolocationLib */,
+ 7575CF6D2BFCEE6F008F3FD0 /* IONGeolocationLibTests */,
7575CF622BFCEE6F008F3FD0 /* Products */,
);
sourceTree = "";
@@ -81,31 +81,31 @@
7575CF622BFCEE6F008F3FD0 /* Products */ = {
isa = PBXGroup;
children = (
- 7575CF612BFCEE6F008F3FD0 /* OSGeolocationLib.framework */,
- 7575CF692BFCEE6F008F3FD0 /* OSGeolocationLibTests.xctest */,
+ 7575CF612BFCEE6F008F3FD0 /* IONGeolocationLib.framework */,
+ 7575CF692BFCEE6F008F3FD0 /* IONGeolocationLibTests.xctest */,
);
name = Products;
sourceTree = "";
};
- 7575CF632BFCEE6F008F3FD0 /* OSGeolocationLib */ = {
+ 7575CF632BFCEE6F008F3FD0 /* IONGeolocationLib */ = {
isa = PBXGroup;
children = (
752B492C2D11DFDD002EA65D /* Publishers */,
- 752B49252D11D440002EA65D /* OSGLOCAuthorisation.swift */,
- 752B49222D11D421002EA65D /* OSGLOCAuthorisationRequestType.swift */,
- 752B49272D11D46D002EA65D /* OSGLOCPositionModel.swift */,
+ 752B49252D11D440002EA65D /* IONGLOCAuthorisation.swift */,
+ 752B49222D11D421002EA65D /* IONGLOCAuthorisationRequestType.swift */,
+ 752B49272D11D46D002EA65D /* IONGLOCPositionModel.swift */,
);
- path = OSGeolocationLib;
+ path = IONGeolocationLib;
sourceTree = "";
};
- 7575CF6D2BFCEE6F008F3FD0 /* OSGeolocationLibTests */ = {
+ 7575CF6D2BFCEE6F008F3FD0 /* IONGeolocationLibTests */ = {
isa = PBXGroup;
children = (
75E8BAA02D12D5AB00ED4467 /* MockCLLocationManager.swift */,
75E8BAA22D12F87300ED4467 /* MockServicesChecker.swift */,
- 7575CF7D2BFCEEEA008F3FD0 /* OSGLOCManagerWrapperTests.swift */,
+ 7575CF7D2BFCEEEA008F3FD0 /* IONGLOCManagerWrapperTests.swift */,
);
- path = OSGeolocationLibTests;
+ path = IONGeolocationLibTests;
sourceTree = "";
};
/* End PBXGroup section */
@@ -121,9 +121,9 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
- 7575CF602BFCEE6F008F3FD0 /* OSGeolocationLib */ = {
+ 7575CF602BFCEE6F008F3FD0 /* IONGeolocationLib */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 7575CF732BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "OSGeolocationLib" */;
+ buildConfigurationList = 7575CF732BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "IONGeolocationLib" */;
buildPhases = (
7575CF5C2BFCEE6F008F3FD0 /* Headers */,
7575CF5D2BFCEE6F008F3FD0 /* Sources */,
@@ -135,14 +135,14 @@
);
dependencies = (
);
- name = OSGeolocationLib;
+ name = IONGeolocationLib;
productName = GeolocationLib;
- productReference = 7575CF612BFCEE6F008F3FD0 /* OSGeolocationLib.framework */;
+ productReference = 7575CF612BFCEE6F008F3FD0 /* IONGeolocationLib.framework */;
productType = "com.apple.product-type.framework";
};
- 7575CF682BFCEE6F008F3FD0 /* OSGeolocationLibTests */ = {
+ 7575CF682BFCEE6F008F3FD0 /* IONGeolocationLibTests */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 7575CF762BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "OSGeolocationLibTests" */;
+ buildConfigurationList = 7575CF762BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "IONGeolocationLibTests" */;
buildPhases = (
7575CF652BFCEE6F008F3FD0 /* Sources */,
7575CF662BFCEE6F008F3FD0 /* Frameworks */,
@@ -153,9 +153,9 @@
dependencies = (
7575CF6C2BFCEE6F008F3FD0 /* PBXTargetDependency */,
);
- name = OSGeolocationLibTests;
+ name = IONGeolocationLibTests;
productName = GeolocationLibTests;
- productReference = 7575CF692BFCEE6F008F3FD0 /* OSGeolocationLibTests.xctest */;
+ productReference = 7575CF692BFCEE6F008F3FD0 /* IONGeolocationLibTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
@@ -178,7 +178,7 @@
};
};
};
- buildConfigurationList = 7575CF5B2BFCEE6F008F3FD0 /* Build configuration list for PBXProject "OSGeolocationLib" */;
+ buildConfigurationList = 7575CF5B2BFCEE6F008F3FD0 /* Build configuration list for PBXProject "IONGeolocationLib" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
@@ -194,8 +194,8 @@
projectDirPath = "";
projectRoot = "";
targets = (
- 7575CF602BFCEE6F008F3FD0 /* OSGeolocationLib */,
- 7575CF682BFCEE6F008F3FD0 /* OSGeolocationLibTests */,
+ 7575CF602BFCEE6F008F3FD0 /* IONGeolocationLib */,
+ 7575CF682BFCEE6F008F3FD0 /* IONGeolocationLibTests */,
);
};
/* End PBXProject section */
@@ -243,11 +243,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 752B49262D11D440002EA65D /* OSGLOCAuthorisation.swift in Sources */,
- 752B49282D11D46D002EA65D /* OSGLOCPositionModel.swift in Sources */,
- 752B49232D11D421002EA65D /* OSGLOCAuthorisationRequestType.swift in Sources */,
- 752B49212D11B262002EA65D /* OSGLOCManagerWrapper.swift in Sources */,
- 752B492B2D11DCC6002EA65D /* OSGLOCManagerProtocols.swift in Sources */,
+ 752B49262D11D440002EA65D /* IONGLOCAuthorisation.swift in Sources */,
+ 752B49282D11D46D002EA65D /* IONGLOCPositionModel.swift in Sources */,
+ 752B49232D11D421002EA65D /* IONGLOCAuthorisationRequestType.swift in Sources */,
+ 752B49212D11B262002EA65D /* IONGLOCManagerWrapper.swift in Sources */,
+ 752B492B2D11DCC6002EA65D /* IONGLOCManagerProtocols.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -255,7 +255,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 7575CF802BFCEEEA008F3FD0 /* OSGLOCManagerWrapperTests.swift in Sources */,
+ 7575CF802BFCEEEA008F3FD0 /* IONGLOCManagerWrapperTests.swift in Sources */,
75E8BAA12D12D5AB00ED4467 /* MockCLLocationManager.swift in Sources */,
75E8BAA32D12F87D00ED4467 /* MockServicesChecker.swift in Sources */,
);
@@ -266,7 +266,7 @@
/* Begin PBXTargetDependency section */
7575CF6C2BFCEE6F008F3FD0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = 7575CF602BFCEE6F008F3FD0 /* OSGeolocationLib */;
+ target = 7575CF602BFCEE6F008F3FD0 /* IONGeolocationLib */;
targetProxy = 7575CF6B2BFCEE6F008F3FD0 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
@@ -426,7 +426,7 @@
MARKETING_VERSION = 0.0.1;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
- PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.geolocation.GeolocationLib;
+ PRODUCT_BUNDLE_IDENTIFIER = io.ionic.libs.geolocation.GeolocationLib;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -461,7 +461,7 @@
MARKETING_VERSION = 0.0.1;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
- PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.geolocation.GeolocationLib;
+ PRODUCT_BUNDLE_IDENTIFIER = io.ionic.libs.geolocation.GeolocationLib;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -479,7 +479,7 @@
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MARKETING_VERSION = 0.0.1;
- PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.geolocation.GeolocationLibTests;
+ PRODUCT_BUNDLE_IDENTIFIER = io.ionic.libs.geolocation.GeolocationLibTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
@@ -500,7 +500,7 @@
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
MARKETING_VERSION = 0.0.1;
- PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.geolocation.GeolocationLibTests;
+ PRODUCT_BUNDLE_IDENTIFIER = io.ionic.libs.geolocation.GeolocationLibTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
@@ -514,7 +514,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 7575CF5B2BFCEE6F008F3FD0 /* Build configuration list for PBXProject "OSGeolocationLib" */ = {
+ 7575CF5B2BFCEE6F008F3FD0 /* Build configuration list for PBXProject "IONGeolocationLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7575CF712BFCEE6F008F3FD0 /* Debug */,
@@ -523,7 +523,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 7575CF732BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "OSGeolocationLib" */ = {
+ 7575CF732BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "IONGeolocationLib" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7575CF742BFCEE6F008F3FD0 /* Debug */,
@@ -532,7 +532,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 7575CF762BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "OSGeolocationLibTests" */ = {
+ 7575CF762BFCEE6F008F3FD0 /* Build configuration list for PBXNativeTarget "IONGeolocationLibTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7575CF772BFCEE6F008F3FD0 /* Debug */,
diff --git a/OSGeolocationLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/IONGeolocationLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from OSGeolocationLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to IONGeolocationLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/OSGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/IONGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from OSGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to IONGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/OSGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/IONGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
similarity index 100%
rename from OSGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
rename to IONGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
diff --git a/OSGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/IONGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
similarity index 100%
rename from OSGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
rename to IONGeolocationLib.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
diff --git a/OSGeolocationLib.xcodeproj/xcshareddata/xcschemes/OSGeolocationLib.xcscheme b/IONGeolocationLib.xcodeproj/xcshareddata/xcschemes/IONGeolocationLib.xcscheme
similarity index 80%
rename from OSGeolocationLib.xcodeproj/xcshareddata/xcschemes/OSGeolocationLib.xcscheme
rename to IONGeolocationLib.xcodeproj/xcshareddata/xcschemes/IONGeolocationLib.xcscheme
index cf10041..0fa3a98 100644
--- a/OSGeolocationLib.xcodeproj/xcshareddata/xcschemes/OSGeolocationLib.xcscheme
+++ b/IONGeolocationLib.xcodeproj/xcshareddata/xcschemes/IONGeolocationLib.xcscheme
@@ -15,9 +15,9 @@
+ BuildableName = "IONGeolocationLib.framework"
+ BlueprintName = "IONGeolocationLib"
+ ReferencedContainer = "container:IONGeolocationLib.xcodeproj">
@@ -35,9 +35,9 @@
+ BuildableName = "IONGeolocationLibTests.xctest"
+ BlueprintName = "IONGeolocationLibTests"
+ ReferencedContainer = "container:IONGeolocationLib.xcodeproj">
@@ -63,9 +63,9 @@
+ BuildableName = "IONGeolocationLib.framework"
+ BlueprintName = "IONGeolocationLib"
+ ReferencedContainer = "container:IONGeolocationLib.xcodeproj">
diff --git a/OSGeolocationLib/OSGLOCAuthorisation.swift b/IONGeolocationLib/IONGLOCAuthorisation.swift
similarity index 85%
rename from OSGeolocationLib/OSGLOCAuthorisation.swift
rename to IONGeolocationLib/IONGLOCAuthorisation.swift
index 57d87a5..5154b92 100644
--- a/OSGeolocationLib/OSGLOCAuthorisation.swift
+++ b/IONGeolocationLib/IONGLOCAuthorisation.swift
@@ -1,6 +1,6 @@
import CoreLocation
-public enum OSGLOCAuthorisation {
+public enum IONGLOCAuthorisation {
case notDetermined
case restricted
case denied
@@ -20,7 +20,7 @@ public enum OSGLOCAuthorisation {
}
extension CLLocationManager {
- var currentAuthorisationValue: OSGLOCAuthorisation {
+ var currentAuthorisationValue: IONGLOCAuthorisation {
.init(from: authorizationStatus)
}
}
diff --git a/OSGeolocationLib/OSGLOCAuthorisationRequestType.swift b/IONGeolocationLib/IONGLOCAuthorisationRequestType.swift
similarity index 89%
rename from OSGeolocationLib/OSGLOCAuthorisationRequestType.swift
rename to IONGeolocationLib/IONGLOCAuthorisationRequestType.swift
index d44815e..6a6449f 100644
--- a/OSGeolocationLib/OSGLOCAuthorisationRequestType.swift
+++ b/IONGeolocationLib/IONGLOCAuthorisationRequestType.swift
@@ -1,6 +1,6 @@
import CoreLocation
-public enum OSGLOCAuthorisationRequestType {
+public enum IONGLOCAuthorisationRequestType {
case whenInUse
case always
diff --git a/OSGeolocationLib/OSGLOCPositionModel.swift b/IONGeolocationLib/IONGLOCPositionModel.swift
similarity index 89%
rename from OSGeolocationLib/OSGLOCPositionModel.swift
rename to IONGeolocationLib/IONGLOCPositionModel.swift
index 22dfeae..4862498 100644
--- a/OSGeolocationLib/OSGLOCPositionModel.swift
+++ b/IONGeolocationLib/IONGLOCPositionModel.swift
@@ -1,6 +1,6 @@
import CoreLocation
-public struct OSGLOCPositionModel: Equatable {
+public struct IONGLOCPositionModel: Equatable {
private(set) public var altitude: Double
private(set) public var course: Double
private(set) public var horizontalAccuracy: Double
@@ -22,8 +22,8 @@ public struct OSGLOCPositionModel: Equatable {
}
}
-public extension OSGLOCPositionModel {
- static func create(from location: CLLocation) -> OSGLOCPositionModel {
+public extension IONGLOCPositionModel {
+ static func create(from location: CLLocation) -> IONGLOCPositionModel {
.init(
altitude: location.altitude,
course: location.course,
diff --git a/IONGeolocationLib/Publishers/IONGLOCManagerProtocols.swift b/IONGeolocationLib/Publishers/IONGLOCManagerProtocols.swift
new file mode 100644
index 0000000..1f821b7
--- /dev/null
+++ b/IONGeolocationLib/Publishers/IONGLOCManagerProtocols.swift
@@ -0,0 +1,43 @@
+import Combine
+
+public protocol IONGLOCServicesChecker {
+ func areLocationServicesEnabled() -> Bool
+}
+
+public protocol IONGLOCAuthorisationHandler {
+ var authorisationStatus: IONGLOCAuthorisation { get }
+ var authorisationStatusPublisher: Published.Publisher { get }
+
+ func requestAuthorisation(withType authorisationType: IONGLOCAuthorisationRequestType)
+}
+
+public enum IONGLOCLocationError: Error {
+ case locationUnavailable
+ case other(_ error: Error)
+}
+
+public protocol IONGLOCLocationHandler {
+ var currentLocation: IONGLOCPositionModel? { get }
+ var currentLocationPublisher: AnyPublisher { get }
+
+ func updateConfiguration(_ configuration: IONGLOCConfigurationModel)
+}
+
+public protocol IONGLOCSingleLocationHandler: IONGLOCLocationHandler {
+ func requestSingleLocation()
+}
+
+public protocol IONGLOCMonitorLocationHandler: IONGLOCLocationHandler {
+ func startMonitoringLocation()
+ func stopMonitoringLocation()
+}
+
+public struct IONGLOCConfigurationModel {
+ private(set) var enableHighAccuracy: Bool
+ private(set) var minimumUpdateDistanceInMeters: Double?
+
+ public init(enableHighAccuracy: Bool, minimumUpdateDistanceInMeters: Double? = nil) {
+ self.enableHighAccuracy = enableHighAccuracy
+ self.minimumUpdateDistanceInMeters = minimumUpdateDistanceInMeters
+ }
+}
diff --git a/OSGeolocationLib/Publishers/OSGLOCManagerWrapper.swift b/IONGeolocationLib/Publishers/IONGLOCManagerWrapper.swift
similarity index 64%
rename from OSGeolocationLib/Publishers/OSGLOCManagerWrapper.swift
rename to IONGeolocationLib/Publishers/IONGLOCManagerWrapper.swift
index 7c7347f..cd377ce 100644
--- a/OSGeolocationLib/Publishers/OSGLOCManagerWrapper.swift
+++ b/IONGeolocationLib/Publishers/IONGLOCManagerWrapper.swift
@@ -1,9 +1,9 @@
import Combine
import CoreLocation
-public typealias OSGLOCService = OSGLOCServicesChecker & OSGLOCAuthorisationHandler & OSGLOCSingleLocationHandler & OSGLOCMonitorLocationHandler
+public typealias IONGLOCService = IONGLOCServicesChecker & IONGLOCAuthorisationHandler & IONGLOCSingleLocationHandler & IONGLOCMonitorLocationHandler
-public struct OSGLOCServicesValidator: OSGLOCServicesChecker {
+public struct IONGLOCServicesValidator: IONGLOCServicesChecker {
public init() {}
public func areLocationServicesEnabled() -> Bool {
@@ -11,26 +11,26 @@ public struct OSGLOCServicesValidator: OSGLOCServicesChecker {
}
}
-public class OSGLOCManagerWrapper: NSObject, OSGLOCService {
- @Published public var authorisationStatus: OSGLOCAuthorisation
- public var authorisationStatusPublisher: Published.Publisher { $authorisationStatus }
+public class IONGLOCManagerWrapper: NSObject, IONGLOCService {
+ @Published public var authorisationStatus: IONGLOCAuthorisation
+ public var authorisationStatusPublisher: Published.Publisher { $authorisationStatus }
- @Published public var currentLocation: OSGLOCPositionModel?
- public var currentLocationPublisher: AnyPublisher {
+ @Published public var currentLocation: IONGLOCPositionModel?
+ public var currentLocationPublisher: AnyPublisher {
$currentLocation
.dropFirst() // ignore the first value as it's the one set on the constructor.
.tryMap { location in
- guard let location else { throw OSGLOCLocationError.locationUnavailable }
+ guard let location else { throw IONGLOCLocationError.locationUnavailable }
return location
}
- .mapError { $0 as? OSGLOCLocationError ?? .other($0) }
+ .mapError { $0 as? IONGLOCLocationError ?? .other($0) }
.eraseToAnyPublisher()
}
private let locationManager: CLLocationManager
- private let servicesChecker: OSGLOCServicesChecker
+ private let servicesChecker: IONGLOCServicesChecker
- public init(locationManager: CLLocationManager = .init(), servicesChecker: OSGLOCServicesChecker = OSGLOCServicesValidator()) {
+ public init(locationManager: CLLocationManager = .init(), servicesChecker: IONGLOCServicesChecker = IONGLOCServicesValidator()) {
self.locationManager = locationManager
self.servicesChecker = servicesChecker
self.authorisationStatus = locationManager.currentAuthorisationValue
@@ -39,7 +39,7 @@ public class OSGLOCManagerWrapper: NSObject, OSGLOCService {
locationManager.delegate = self
}
- public func requestAuthorisation(withType authorisationType: OSGLOCAuthorisationRequestType) {
+ public func requestAuthorisation(withType authorisationType: IONGLOCAuthorisationRequestType) {
authorisationType.requestAuthorization(using: locationManager)
}
@@ -55,7 +55,7 @@ public class OSGLOCManagerWrapper: NSObject, OSGLOCService {
locationManager.requestLocation()
}
- public func updateConfiguration(_ configuration: OSGLOCConfigurationModel) {
+ public func updateConfiguration(_ configuration: IONGLOCConfigurationModel) {
locationManager.desiredAccuracy = configuration.enableHighAccuracy ? kCLLocationAccuracyBest : kCLLocationAccuracyThreeKilometers
configuration.minimumUpdateDistanceInMeters.map {
locationManager.distanceFilter = $0
@@ -67,7 +67,7 @@ public class OSGLOCManagerWrapper: NSObject, OSGLOCService {
}
}
-extension OSGLOCManagerWrapper: CLLocationManagerDelegate {
+extension IONGLOCManagerWrapper: CLLocationManagerDelegate {
public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
authorisationStatus = manager.currentAuthorisationValue
}
@@ -77,7 +77,7 @@ extension OSGLOCManagerWrapper: CLLocationManagerDelegate {
currentLocation = nil
return
}
- currentLocation = OSGLOCPositionModel.create(from: latestLocation)
+ currentLocation = IONGLOCPositionModel.create(from: latestLocation)
}
public func locationManager(_ manager: CLLocationManager, didFailWithError error: any Error) {
diff --git a/OSGeolocationLibTests/OSGLOCManagerWrapperTests.swift b/IONGeolocationLibTests/IONGLOCManagerWrapperTests.swift
similarity index 90%
rename from OSGeolocationLibTests/OSGLOCManagerWrapperTests.swift
rename to IONGeolocationLibTests/IONGLOCManagerWrapperTests.swift
index 6e9e7b6..5d91361 100644
--- a/OSGeolocationLibTests/OSGLOCManagerWrapperTests.swift
+++ b/IONGeolocationLibTests/IONGLOCManagerWrapperTests.swift
@@ -1,11 +1,11 @@
-import OSGeolocationLib
+import IONGeolocationLib
import XCTest
import Combine
import CoreLocation
-final class OSGLOCManagerWrapperTests: XCTestCase {
- private var sut: OSGLOCManagerWrapper!
+final class IONGLOCManagerWrapperTests: XCTestCase {
+ private var sut: IONGLOCManagerWrapper!
private var locationManager: MockCLLocationManager!
private var servicesChecker: MockServicesChecker!
@@ -53,7 +53,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
func test_locationManagerAuthorisationChangesToWhenInUse_authorisationStatusUpdatesToWhenInUse() {
// Given
- let expectedStatus = OSGLOCAuthorisation.authorisedWhenInUse
+ let expectedStatus = IONGLOCAuthorisation.authorisedWhenInUse
let expectation = expectation(description: "Authorisation status updated to 'authorisedWhenInUse'.")
validateAuthorisationStatusPublisher(expectation, expectedStatus)
@@ -67,7 +67,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
func test_locationManagerAuthorisationChangesToAlways_authorisationStatusUpdatesToAlways() {
// Given
- let expectedStatus = OSGLOCAuthorisation.authorisedAlways
+ let expectedStatus = IONGLOCAuthorisation.authorisedAlways
let expectation = expectation(description: "Authorisation status updated to 'authorisedAlways'.")
validateAuthorisationStatusPublisher(expectation, expectedStatus)
@@ -83,7 +83,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
// Given
locationManager.changeAuthorisation(to: .authorizedWhenInUse)
- let expectedStatus = OSGLOCAuthorisation.authorisedAlways
+ let expectedStatus = IONGLOCAuthorisation.authorisedAlways
let expectationAlways = expectation(description: "Authorisation status updated to 'authorisedAlways'.")
validateAuthorisationStatusPublisher(expectationAlways, expectedStatus)
@@ -145,7 +145,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
XCTAssertEqual(locationManager.distanceFilter, CLLocationManager.defaultDistanceFilter)
// When
- let configuration = OSGLOCConfigurationModel(enableHighAccuracy: true)
+ let configuration = IONGLOCConfigurationModel(enableHighAccuracy: true)
sut.updateConfiguration(configuration)
// Then
@@ -159,7 +159,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
XCTAssertEqual(locationManager.distanceFilter, CLLocationManager.defaultDistanceFilter)
// When
- let configuration = OSGLOCConfigurationModel(enableHighAccuracy: false)
+ let configuration = IONGLOCConfigurationModel(enableHighAccuracy: false)
sut.updateConfiguration(configuration)
// Then
@@ -173,7 +173,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
XCTAssertEqual(locationManager.distanceFilter, CLLocationManager.defaultDistanceFilter)
// When
- let configuration = OSGLOCConfigurationModel(enableHighAccuracy: true, minimumUpdateDistanceInMeters: 10)
+ let configuration = IONGLOCConfigurationModel(enableHighAccuracy: true, minimumUpdateDistanceInMeters: 10)
sut.updateConfiguration(configuration)
// Then
@@ -214,7 +214,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
func test_locationIsUpdated_locationManagerTriggersNewPosition() {
// Given
let expectedLocation = CLLocation(latitude: 37.7749, longitude: -122.4194)
- let expectedPosition = OSGLOCPositionModel.create(from: expectedLocation)
+ let expectedPosition = IONGLOCPositionModel.create(from: expectedLocation)
let expectation = expectation(description: "Location updated.")
validateCurrentLocationPublisher(expectation, expectedPosition)
@@ -230,7 +230,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
// Given
let firstLocation = CLLocation(latitude: 37.7749, longitude: -122.4194)
let expectedLocation = CLLocation(latitude: 48.8859, longitude: -111.3083)
- let expectedPosition = OSGLOCPositionModel.create(from: expectedLocation)
+ let expectedPosition = IONGLOCPositionModel.create(from: expectedLocation)
let expectation = expectation(description: "Location updated.")
validateCurrentLocationPublisher(expectation, expectedPosition)
@@ -248,7 +248,7 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
locationManager.updateLocation(to: [firstLocation])
let expectedLocation = CLLocation(latitude: 48.8859, longitude: -111.3083)
- let expectedPosition = OSGLOCPositionModel.create(from: expectedLocation)
+ let expectedPosition = IONGLOCPositionModel.create(from: expectedLocation)
let expectation = expectation(description: "Location updated.")
validateCurrentLocationPublisher(expectation, expectedPosition)
@@ -288,8 +288,8 @@ final class OSGLOCManagerWrapperTests: XCTestCase {
}
}
-private extension OSGLOCManagerWrapperTests {
- func validateCurrentLocationPublisher(_ expectation: XCTestExpectation, _ expectedPosition: OSGLOCPositionModel? = nil) {
+private extension IONGLOCManagerWrapperTests {
+ func validateCurrentLocationPublisher(_ expectation: XCTestExpectation, _ expectedPosition: IONGLOCPositionModel? = nil) {
sut.currentLocationPublisher
.sink(receiveCompletion: { completion in
if expectedPosition == nil, case .failure = completion {
@@ -302,7 +302,7 @@ private extension OSGLOCManagerWrapperTests {
.store(in: &cancellables)
}
- func validateAuthorisationStatusPublisher(_ expectation: XCTestExpectation, _ expectedStatus: OSGLOCAuthorisation) {
+ func validateAuthorisationStatusPublisher(_ expectation: XCTestExpectation, _ expectedStatus: IONGLOCAuthorisation) {
sut.authorisationStatusPublisher
.dropFirst() // ignore the first value as it's the one set on the constructor.
.sink { status in
diff --git a/OSGeolocationLibTests/MockCLLocationManager.swift b/IONGeolocationLibTests/MockCLLocationManager.swift
similarity index 100%
rename from OSGeolocationLibTests/MockCLLocationManager.swift
rename to IONGeolocationLibTests/MockCLLocationManager.swift
diff --git a/OSGeolocationLibTests/MockServicesChecker.swift b/IONGeolocationLibTests/MockServicesChecker.swift
similarity index 80%
rename from OSGeolocationLibTests/MockServicesChecker.swift
rename to IONGeolocationLibTests/MockServicesChecker.swift
index 19c03e9..62fa008 100644
--- a/OSGeolocationLibTests/MockServicesChecker.swift
+++ b/IONGeolocationLibTests/MockServicesChecker.swift
@@ -1,6 +1,6 @@
-import OSGeolocationLib
+import IONGeolocationLib
-class MockServicesChecker: OSGLOCServicesChecker {
+class MockServicesChecker: IONGLOCServicesChecker {
private var didEnableLocationServices = false
func areLocationServicesEnabled() -> Bool {
diff --git a/OSGeolocationLib/Publishers/OSGLOCManagerProtocols.swift b/OSGeolocationLib/Publishers/OSGLOCManagerProtocols.swift
deleted file mode 100644
index 3ba0da4..0000000
--- a/OSGeolocationLib/Publishers/OSGLOCManagerProtocols.swift
+++ /dev/null
@@ -1,43 +0,0 @@
-import Combine
-
-public protocol OSGLOCServicesChecker {
- func areLocationServicesEnabled() -> Bool
-}
-
-public protocol OSGLOCAuthorisationHandler {
- var authorisationStatus: OSGLOCAuthorisation { get }
- var authorisationStatusPublisher: Published.Publisher { get }
-
- func requestAuthorisation(withType authorisationType: OSGLOCAuthorisationRequestType)
-}
-
-public enum OSGLOCLocationError: Error {
- case locationUnavailable
- case other(_ error: Error)
-}
-
-public protocol OSGLOCLocationHandler {
- var currentLocation: OSGLOCPositionModel? { get }
- var currentLocationPublisher: AnyPublisher { get }
-
- func updateConfiguration(_ configuration: OSGLOCConfigurationModel)
-}
-
-public protocol OSGLOCSingleLocationHandler: OSGLOCLocationHandler {
- func requestSingleLocation()
-}
-
-public protocol OSGLOCMonitorLocationHandler: OSGLOCLocationHandler {
- func startMonitoringLocation()
- func stopMonitoringLocation()
-}
-
-public struct OSGLOCConfigurationModel {
- private(set) var enableHighAccuracy: Bool
- private(set) var minimumUpdateDistanceInMeters: Double?
-
- public init(enableHighAccuracy: Bool, minimumUpdateDistanceInMeters: Double? = nil) {
- self.enableHighAccuracy = enableHighAccuracy
- self.minimumUpdateDistanceInMeters = minimumUpdateDistanceInMeters
- }
-}
diff --git a/README.md b/README.md
index 42ae8c1..2affd08 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-# OSGeolocationLib
+# IONGeolocationLib
A Swift library for iOS that provides simple, reliable access to device GPS capabilities. Get location data, monitor position changes, and manage location services with a clean, modern API.
-[](https://cocoapods.org/pods/OSGeolocationLib)
-[](https://cocoapods.org/pods/OSGeolocationLib)
-[](https://cocoapods.org/pods/OSGeolocationLib)
+[](https://cocoapods.org/pods/IONGeolocationLib)
+[](https://cocoapods.org/pods/IONGeolocationLib)
+[](https://cocoapods.org/pods/IONGeolocationLib)
## Requirements
@@ -16,10 +16,10 @@ A Swift library for iOS that provides simple, reliable access to device GPS capa
### CocoaPods
-`OSGeolocationLib` is available through [CocoaPods](https://cocoapods.org). Add this to your Podfile:
+`IONGeolocationLib` is available through [CocoaPods](https://cocoapods.org). Add this to your Podfile:
```ruby
-pod 'OSGeolocationLib', '~> 0.0.1' # Use the latest 0.0.x version
+pod 'IONGeolocationLib', '~> 0.0.1' # Use the latest 0.0.x version
```
## Quick Start
@@ -29,16 +29,16 @@ This library is currently used by the Geolocation Plugin for OutSystems' [Cordov
## Features
All the library's features are split in 4 different protocols. Each are detailed in the following subsections:
-- `OSGLOCServicesChecker`
-- `OSGLOCAuthorisationHandler`
-- `OSGLOCSingleLocationHandler`
-- `OSGLOCMonitorLocationHandler`
+- `IONGLOCServicesChecker`
+- `IONGLOCAuthorisationHandler`
+- `IONGLOCSingleLocationHandler`
+- `IONGLOCMonitorLocationHandler`
-There's also the typealias `OSGLOCService` that merges all protocols together. Its concrete implementation is achieved by the `OSGLOCManagerWrapper` class.
+There's also the typealias `IONGLOCService` that merges all protocols together. Its concrete implementation is achieved by the `IONGLOCManagerWrapper` class.
-### `OSGLOCServicesChecker`
+### `IONGLOCServicesChecker`
-The sole goal of `OSGLOCServicesChecker` is to verify if the location services have been enabled on the device.
+The sole goal of `IONGLOCServicesChecker` is to verify if the location services have been enabled on the device.
#### Check if Location Services are Enabled
@@ -49,7 +49,7 @@ func areLocationServicesEnabled() -> Bool
Returns a Boolean value indicating whether location services are enabled on the device.
-### `OSGLOCAuthorisationHandler`
+### `IONGLOCAuthorisationHandler`
Manages all authorisation status logic related with location. It's composed by the following:
- a property that indicates the app's at-the-moment authorisation status to use location services;
@@ -61,7 +61,7 @@ Authorisation is vital to receive location-related information. The user needs t
#### Location Services' Authorisation Status Property
```swift
-var authorisationStatus: OSGLOCAuthorisation
+var authorisationStatus: IONGLOCAuthorisation
```
It returns the at-the-moment authorisation status to use the device's location services. The following are the possible values:
@@ -74,7 +74,7 @@ It returns the at-the-moment authorisation status to use the device's location s
#### Location Services' Authorisation Status Publisher
```swift
-var authorisationStatusPublisher: Published.Publisher
+var authorisationStatusPublisher: Published.Publisher
```
It returns a publisher that delivers all authorisation status updates to whoever subscribes to it. The `authorisationStatus` values are the elements that can be emitted by `authorisationStatusPublisher`.
@@ -82,14 +82,14 @@ It returns a publisher that delivers all authorisation status updates to whoever
#### Request User's Permission to Use Location Services
```
-func requestAuthorisation(withType authorisationType: OSGLOCAuthorisationRequestType)
+func requestAuthorisation(withType authorisationType: IONGLOCAuthorisationRequestType)
```
Requests the user’s permission to use location services. There are two types of authorisation that can be requested:
- `always`: Requests the user’s permission to use location services regardless of whether the app is in use;
- `whenInUse`: Requests the user’s permission to use location services while the app is in use.
-### `OSGLOCLocationHandler`
+### `IONGLOCLocationHandler`
Manages all location-related information. It's composed by the following:
- a property that retrieves the device's at-the-moment location position. It can be `nil` if there hasn't been a request or in case of some issue occurring while fetching it;
@@ -98,16 +98,16 @@ Manages all location-related information. It's composed by the following:
- the location data accuracy the app wants to receive;
- the minimum distance the device must move horizontally before an update event is generated. The distance is measured in meters (m).
-`OSGLOCLocationHandler` serves has the base for both `OSGLOCSingleLocationHandler` and `OSGLOCMonitorLocationHandler`. More on both later.
+`IONGLOCLocationHandler` serves has the base for both `IONGLOCSingleLocationHandler` and `IONGLOCMonitorLocationHandler`. More on both later.
#### Current Location Property
```swift
-var currentLocation: OSGLOCPositionModel?
+var currentLocation: IONGLOCPositionModel?
```
It returns the device's latest fetched location position. It can be `nil` if there hasn't been a request or in case of some issue occuring while fetching it.
-`OSGLOCPositionModel` is composed by the following properties:
+`IONGLOCPositionModel` is composed by the following properties:
- `altitude`: Altitude above mean sea level, measured in meters (m);
- `course`: Direction in which the device is travelling, measured in degrees (º) and relative to due north;
- `horizontalAccuracy`: Radius of uncertainty, measured in meters (m);
@@ -120,7 +120,7 @@ It returns the device's latest fetched location position. It can be `nil` if the
#### Current Location Publisher
```swift
-var currentLocationPublisher: AnyPublisher
+var currentLocationPublisher: AnyPublisher
```
It returns a publisher that delivers all location updates to whoever subscribes to it. The `currentLocation` values are the elements that can be emitted by `currentLocationPublisher`.
@@ -128,14 +128,14 @@ It returns a publisher that delivers all location updates to whoever subscribes
#### Update the Location Manager's Configuration
```swift
-func updateConfiguration(_ configuration: OSGLOCConfigurationModel)
+func updateConfiguration(_ configuration: IONGLOCConfigurationModel)
```
Updates two properties that condition how location update events are generated:
- `enableHighAccuracy`: Boolean value that indicates if the app wants location data accuracy to be at its best or not. It needs to be explicitly mentioned by the method callers
- `minimumUpdateDistanceInMeters`: Minimum distance the device must move horizontally before an update event is generated, measured in meters (m). As it's optional, it can be omitted by the method callers.
-### `OSGLOCSingleLocationHandler`
+### `IONGLOCSingleLocationHandler`
It's responsible to trigger one-time deliveries of the device's current location. It's composed by the following:
- a method that requests the user's current location position.
@@ -149,7 +149,7 @@ func requestSingleLocation()
The method returns immediately. By calling it, it triggers an update to `currentLocation` and a new element delivery by `currentLocationPublisher`.
-### `OSGLOCMonitorLocationHandler`
+### `IONGLOCMonitorLocationHandler`
It's responsible for the continuous generation of updates that report the device's current location position. It's composed by the following:
- a method that starts the generation of updates;
@@ -173,10 +173,10 @@ The method should be called whenever you no longer need to received location-rel
## Error Handling
-The library uses `OSGLOCLocationError` for error handling regarding location position updates. Possible errors include:
+The library uses `IONGLOCLocationError` for error handling regarding location position updates. Possible errors include:
```swift
-enum OSGLOCLocationError: Error {
+enum IONGLOCLocationError: Error {
case locationUnavailable
case other(_ error: Error)
}
@@ -184,7 +184,7 @@ enum OSGLOCLocationError: Error {
## Location Data Format
-Location updates are delivered as `OSGLOCPositionModel` objects:
+Location updates are delivered as `IONGLOCPositionModel` objects:
```json
{
@@ -245,8 +245,8 @@ Common issues and solutions:
## License
-`OSGeolocationLib` is available under the MIT license. See the [LICENSE](LICENSE) file for more info.
+`IONGeolocationLib` is available under the MIT license. See the [LICENSE](LICENSE) file for more info.
## Support
-- Report issues on our [Issue Tracker](https://github.com/ionic-team/OSGeolocationLib-iOS/issues)
\ No newline at end of file
+- Report issues on our [Issue Tracker](https://github.com/ionic-team/IONGeolocationLib-iOS/issues)
\ No newline at end of file
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index 84597b0..893a932 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -18,14 +18,14 @@ default_platform(:ios)
platform :ios do
desc "Lane to run the unit tests"
lane :unit_tests do
- run_tests(scheme: "OSGeolocationLib")
+ run_tests(scheme: "IONGeolocationLib")
end
desc "Code coverage"
lane :coverage do
slather(
- scheme: "OSGeolocationLib",
- proj: "OSGeolocationLib.xcodeproj",
+ scheme: "IONGeolocationLib",
+ proj: "IONGeolocationLib.xcodeproj",
output_directory: "sonar-reports",
sonarqube_xml: "true"
)
@@ -33,7 +33,7 @@ platform :ios do
lane :lint do
swiftlint(
- output_file: "sonar-reports/OSGeolocationLib-swiftlint.txt",
+ output_file: "sonar-reports/IONGeolocationLib-swiftlint.txt",
ignore_exit_status: true
)
end
diff --git a/scripts/build_framework.sh b/scripts/build_framework.sh
index 3a79b0f..d603e26 100755
--- a/scripts/build_framework.sh
+++ b/scripts/build_framework.sh
@@ -1,6 +1,6 @@
BUILD_FOLDER="build"
-BUILD_SCHEME="OSGeolocationLib"
-FRAMEWORK_NAME="OSGeolocationLib"
+BUILD_SCHEME="IONGeolocationLib"
+FRAMEWORK_NAME="IONGeolocationLib"
SIMULATOR_ARCHIVE_PATH="${BUILD_FOLDER}/iphonesimulator.xcarchive"
IOS_DEVICE_ARCHIVE_PATH="${BUILD_FOLDER}/iphoneos.xcarchive"
diff --git a/scripts/bump_versions.rb b/scripts/bump_versions.rb
index 6d5a1db..05aef1b 100644
--- a/scripts/bump_versions.rb
+++ b/scripts/bump_versions.rb
@@ -6,7 +6,7 @@
level = ARGV[0]
# Define the path to your .podspec file
-podspec_path = "./OSGeolocationLib.podspec"
+podspec_path = "./IONGeolocationLib.podspec"
# Read the .podspec file
podspec_content = File.read(podspec_path)
@@ -48,7 +48,7 @@
File.write(podspec_path, new_podspec_content)
# Set the application name
-LIBRARY_NAME = "OSGeolocationLib"
+LIBRARY_NAME = "IONGeolocationLib"
# Set the Xcode project file path
project_file = "#{LIBRARY_NAME}.xcodeproj/project.pbxproj"
@@ -71,7 +71,7 @@
readme_path = "./README.md"
readme_content = File.read(readme_path)
-new_readme_content = readme_content.gsub(/(pod 'OSGeolocationLib', '~> )\d+\.\d+\.\d+/, "\\1#{new_version_number}\\2")
+new_readme_content = readme_content.gsub(/(pod 'IONGeolocationLib', '~> )\d+\.\d+\.\d+/, "\\1#{new_version_number}\\2")
.gsub(/(# Use the latest )\d+\.\d+/, "\\1#{[major, minor].join('.')}\\2")
File.write(readme_path, new_readme_content)