-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UIKit target and examples (#4626)
Release v3.0.0
- Loading branch information
Showing
68 changed files
with
7,923 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
} | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
Examples/AdditionalExamples/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Examples/AdditionalExamples/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Examples/AdditionalExamples/Assets.xcassets/turnleft.dataset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+6.01 KB
Examples/AdditionalExamples/Assets.xcassets/turnleft.dataset/turnleft.mp3
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
Examples/AdditionalExamples/Assets.xcassets/turnright.dataset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+6.32 KB
Examples/AdditionalExamples/Assets.xcassets/turnright.dataset/turnright.mp3
Binary file not shown.
25 changes: 25 additions & 0 deletions
25
Examples/AdditionalExamples/Base.lproj/LaunchScreen.storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.