Skip to content

Commit

Permalink
Merge branch 'sdk_4_ios' into 'main'
Browse files Browse the repository at this point in the history
Sdk 4 ios

See merge request ec/epotheke/epotheke-sdk!19
  • Loading branch information
florian-otto committed Aug 9, 2024
2 parents 79b1462 + d146ba8 commit f4cf8b9
Show file tree
Hide file tree
Showing 61 changed files with 1,558 additions and 181 deletions.
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ variables:
stages:
- compile
- test
- package
- publish
- docs

Expand All @@ -31,3 +32,5 @@ include:
- '/ci/test.yml'
- '/ci/publish.yml'
- '/ci/docs.yml'
- '/ci/build_cocoapod.yml'
- '/ci/publish_cocoapod.yml'
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ plugins {
kotlin {
iosX64 { }
iosArm64 { }
iosSimulatorArm64 { }
// iosSimulatorArm64 { }
}
23 changes: 23 additions & 0 deletions ci/build_cocoapod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
build-cocoapod:
stage: package
tags:
- "mac"
cache:
- key: "$CACHE_KEY"
paths: !reference [ .cache-gradle-base, paths ]
policy: pull-push
- key: "$CACHE_TMP_KEY"
paths: [ .cache-gradle-builds, paths ]
policy: pull-push
script:
- !reference [.versioning, script]
- pod repo update
- ./gradlew podPublishReleaseXCFramework
- mv sdk/build/cocoapods/publish/release/Epotheke.xcframework Epotheke.xcframework
- cp LICENSE.GPL LICENSE
artifacts:
name: 'Epotheke-CocoaPod'
paths:
- Epotheke.xcframework/
- LICENSE.*
- LICENSE
58 changes: 58 additions & 0 deletions ci/publish_cocoapod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
publish-to-github:
stage: publish
image: debian:stable-20230109-slim
tags:
- "podman"
script:
- apt-get update && apt-get upgrade -y && apt-get install -y jq curl zip
# Create Release
- TAG=$(echo "${CI_COMMIT_TAG}" | cut -c 2-)
- >-
RELEASE_ID=$(curl -u ${GITHUB_USERNAME}:${GITHUB_TOKEN} -X POST -v \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/epotheke/epotheke-sdk/releases \
-d '{ "tag_name":"'"${CI_COMMIT_TAG}"'", "name":"'"${TAG}"'", "draft":false, "prerelease":false, "generate_release_notes":false }' | jq '.id')
# Upload iOS Framework
- zip -r EpothekePod.zip LICENSE* Epotheke.xcframework
- >-
curl -u ${GITHUB_USERNAME}:${GITHUB_TOKEN} \
-X POST -v \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/zip" \
--data-binary "@EpothekePod.zip" \
https://uploads.github.com/repos/epotheke/epotheke-sdk/releases/${RELEASE_ID}/assets?name=Epotheke-CocoaPod.zip
dependencies:
- "build-cocoapod"
needs:
- "build-cocoapod"
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+(-rc.\d+)?$/

publish-ios-pod-spec:
stage: publish
tags:
- "mac"
- "dev-cert"
script:
- TAG=$(echo "${CI_COMMIT_TAG}" | cut -c 2-)
- echo "Pod::Spec.new do |s|" > epotheke-sdk.podspec
- echo "s.name = 'epotheke-sdk'" >> epotheke-sdk.podspec
- echo "s.version = '${TAG}'" >> epotheke-sdk.podspec
- echo "s.summary = 'epotheke sdk'" >> epotheke-sdk.podspec
- echo "s.description = 'iOS framework for integration of Epotheke services'" >> epotheke-sdk.podspec
- echo "s.homepage = 'https://www.epotheke.com'" >> epotheke-sdk.podspec
- echo "s.author = { 'Name' => '[email protected]' }" >> epotheke-sdk.podspec
- echo "s.license = { :type => 'GPLv3', :file => 'LICENSE' }" >> epotheke-sdk.podspec
- echo "s.source = { :http => 'https://github.com/epotheke/epotheke-sdk/releases/download/"${CI_COMMIT_TAG}"/Epotheke-CocoaPod.zip' }" >> epotheke-sdk.podspec
- echo "s.ios.deployment_target = '13.0'" >> epotheke-sdk.podspec
- cat ${PODSPEC_PARTIAL_TEMPLATE} >> epotheke-sdk.podspec
- echo end >> epotheke-sdk.podspec
- pod spec lint epotheke-sdk.podspec --verbose
- pod trunk push epotheke-sdk.podspec
needs: [ "publish-to-github" ]
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+(-rc.\d+)$/
when: manual
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
2 changes: 1 addition & 1 deletion demo-android-standalone/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
}
}

val epothekeSdkVersion = "1.1.3-SNAPSHOT"
val epothekeSdkVersion = "1.1.3"

dependencies {
androidTestImplementation("androidx.test.ext:junit:1.1.5")
Expand Down
42 changes: 42 additions & 0 deletions demo-ios-standalone/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

# Xcode Project
**/*.xcodeproj/xcuserdata/
**/*.xcworkspace/xcuserdata/
**/.swiftpm/xcode/xcuserdata/
**/*.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
**/*.xcworkspace/xcshareddata/*.xccheckout
**/*.xcworkspace/xcshareddata/*.xcscmblueprint
**/*.playground/**/timeline.xctimeline
.idea/

# Build
**/.build/
**/Build/
DerivedData/
*.ipa

# Carthage
Carthage/

# CocoaPods
Pods/

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/sign&cert

# CSV
*.orig
.svn

# Other
*~
.DS_Store
*.swp
*.save
._*
*.bak

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-40.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-60.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-58.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-87.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-80.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-120.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-121.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-180.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-41.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-59.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-42.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-81.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-152.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-167.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "app_icon_oecTest.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment version="4864" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="iOS_OeC_testApp" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ph4-Aq-1wB" userLabel="EpothekeBtn">
<rect key="frame" x="24" y="294" width="327" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
<color key="backgroundColor" systemColor="systemGreenColor"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Epotheke">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="performEpo:" destination="BYZ-38-t0r" eventType="touchUpInside" id="qpZ-7E-5ze"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="136.80000000000001" y="132.68365817091455"/>
</scene>
</scenes>
<resources>
<systemColor name="systemGreenColor">
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
Loading

0 comments on commit f4cf8b9

Please sign in to comment.