Skip to content

Commit

Permalink
Add UIKit target and examples (#4626)
Browse files Browse the repository at this point in the history
Release v3.0.0
  • Loading branch information
kried authored Apr 12, 2024
1 parent 8db5442 commit 784d27a
Show file tree
Hide file tree
Showing 68 changed files with 7,923 additions and 11 deletions.
68 changes: 68 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: 2.1

jobs:
build-job:
parameters:
xcode:
type: string
ios:
type: string
mac_runner:
type: string
macos:
xcode: << parameters.xcode >>
resource_class: << parameters.mac_runner >>
steps:
- checkout
- run:
name: Prepare .mapbox file
command: |
echo "pk.foo.bar" > ~/.mapbox
- run:
name: Prepare .netrc file
command: |
echo "machine api.mapbox.com" >> ~/.netrc
echo "login mapbox" >> ~/.netrc
echo "password $SDK_REGISTRY_TOKEN" >> ~/.netrc
chmod 600 ~/.netrc
- run:
name: Install iOS runtime if needed
command: |
xcrun simctl list runtimes
if ! xcrun simctl list runtimes | grep -q "<< parameters.ios >>"; then
brew install aria2 xcodesorg/made/xcodes
sudo xcodes runtimes install "iOS << parameters.ios >>"
else
echo "Runtime << parameters.ios >> is already installed, skipping..."
fi
- run:
name: Build Examples
command: |
samples=("UIKitExample" "CoreSDKExample" "AdditionalExamples")
for sampleName in "${samples[@]}"; do
xcodebuild -project Examples/Examples.xcodeproj -scheme $sampleName \
-sdk iphonesimulator -configuration Release \
-destination 'platform=iOS Simulator,name=iPhone 11,OS=<< parameters.ios >>' \
clean build \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
done
workflows:
workflow:
jobs:
- build-job:
matrix:
parameters:
xcode: ["15.0.0", "15.3.0"]
ios: ["15.0", "17.2"]
mac_runner: ["macos.m1.medium.gen1"]
context:
- 'SDK Registry Token'
- build-job:
name: "build-job-17.0-macos.x86.medium.gen2-15.1.0"
xcode: "15.1.0"
ios: "17.0"
mac_runner: "macos.x86.medium.gen2"
context:
- 'SDK Registry Token'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ Examples/Swift/Navigation_Example.mobileprovision
vendor/bundle/ruby/
.vscode
.swiftpm
XCFrameworks/
Package.resolved
2,519 changes: 2,519 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions Examples/AdditionalExamples/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

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

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Examples/AdditionalExamples/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"data" : [
{
"idiom" : "universal",
"filename" : "turnleft.mp3"
}
]
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"data" : [
{
"idiom" : "universal",
"filename" : "turnright.mp3"
}
]
}
Binary file not shown.
25 changes: 25 additions & 0 deletions Examples/AdditionalExamples/Base.lproj/LaunchScreen.storyboard
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" 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" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<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>
Loading

0 comments on commit 784d27a

Please sign in to comment.